When do you get the error User is not logged in. Cannot allocate license?
The exception is
[2/5/13 7:53:26:216 GMT] 00000039 SystemOut O [02/05/13 07:53:26 GMT] CRRAM0002W 53062742 WARN ws com.ibm.ram.repository.web.ws.core.RAM1Impl - User is not logged in. Cannot allocate license.
com.ibm.ram.repository.security.RAMLicenseException: User is not logged in. Cannot allocate license.
at com.ibm.ram.repository.security.SecurityManager$PromoteLicensePolicy.a
at com.ibm.ram.repository.security.AbstractUser.allocateLicense(AbstractU
at com.ibm.ram.repository.core.RepositorySessionHandler.allocateLicense(R
at com.ibm.ram.repository.assets.AssetManager.assertReadDetails(AssetMana
at com.ibm.ram.repository.assets.AssetManager.primGetAsset(AssetManager.j
at com.ibm.ram.repository.assets.AssetManager.getAsset(AssetManager.java:
at com.ibm.ram.repository.web.ws.core.RAM1Impl.getAsset(RAM1Impl.java:269
at com.ibm.ram.repository.web.ws.core.RAM1Impl.getAssetByID(RAM1Impl.java
at com.ibm.ram.repository.web.ws.was.RAM1SoapBindingImpl.getAssetByID(RAM
at sun.reflect.GeneratedMethodAccessor264.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess
at java.lang.reflect.Method.invoke(Method.java:611)
at com.ibm.ws.webservices.engine.dispatchers.java.JavaDispatcher.invokeMe
at com.ibm.ws.webservices.engine.dispatchers.java.JavaDispatcher.invokeOp
at com.ibm.ws.webservices.engine.dispatchers.SoapRPCProcessor.processRequ
at com.ibm.ws.webservices.engine.dispatchers.SoapRPCProcessor.processMess
at com.ibm.ws.webservices.engine.dispatchers.BasicDispatcher.processMessa
at com.ibm.ws.webservices.engine.dispatchers.java.SessionDispatcher.invok
at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerW
at com.ibm.ws.webservices.engine.handlers.jaxrpc.JAXRPCHandler.invoke(JAX
at com.ibm.ws.webservices.engine.handlers.WrappedHandler.invoke(WrappedHa
at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerW
at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerW
at com.ibm.ws.webservices.engine.WebServicesEngine.invoke(WebServicesEngi
at com.ibm.ws.webservices.engine.transport.http.WebServicesServlet.doPost
at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
at com.ibm.ws.webservices.engine.transport.http.WebServicesServletBase.se
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilter
at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilte
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilt
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWr
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWr
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(Servl
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppR
at com.ibm.ram.repository.web.ws.RAMSecure.doPost(RAMSecure.java:48)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilter
[2/5/13 7:53:26:567 GMT] 00000069 SystemOut O [02/05/13 07:53:26 GMT] CRRAM0003I 53063093 INFO ws com.ibm.ram.repository.web.RAMAssetAccess$RAMAssetAccessException - error code:403
com.ibm.ram.repository.web.RAMAssetAccess$RAMAssetAccessException: Failed to submit asset - DND_64912_SUSE_GOLD_5/2_img - ID#31BD9807-432E-23DC-93B8-A2F7D32437CD Version#1.2 - User is not logged in. Cannot allocate license.
at com.ibm.ram.repository.web.RAMAssetAccess.submitAsset(RAMAssetAccess.j
at com.ibm.ram.repository.web.RAMAssetAccess.upload(RAMAssetAccess.java:2
at com.ibm._jsp._RAMAssetAccess._jspService(_RAMAssetAccess.java:87)
at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:99)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilter
at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilte
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilt
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWr
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWr
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(Servl
at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest
at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.hand
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppR
at com.ibm.ram.repository.web.ws.RAMSecure.doPost(RAMSecure.java:48)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilter
at com.ibm.ram.repository.web.RAMWSServletFilter.doFilter(RAMWSServletFil
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterIn
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilter
at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilte
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilt
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWr
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWr
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(Servl
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(Cach
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:8
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.ja
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscriminat
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(Ht
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInbound
at com.ibm.ws.ssl.channel.impl.SSLConnectionLink.determineNextChannel(SSL
at com.ibm.ws.ssl.channel.impl.SSLConnectionLink$MyReadCompletedCallback.
at com.ibm.ws.ssl.channel.impl.SSLReadServiceContext$SSLReadCompletedCall
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFutur
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannel
We use the devcloud user to connect to ram using the java api whereas we have another user called ramccadmin configured to connect to rtc server.
The developer license is given to the ramccadmin user.
Also this issue is intermittent.It usually starts working fine after i save the configuration something like the RAM RTC sync but after sometime the issue comes up again.
One answer
See comment 18. At the time I wrote the comment I didn't have a fix. I put one in a few days later in this defect.
Since 7202 doesn't have the fix you can workaround this by not using devcloud@us.ibm.com for anything other than the ram client stuff. Either that or make sure the ram client session is used at least once every 30 minutes so that it never times out, but in such a case it will never release its license either. The bug is due to the same user being used on both the web and ramclient side and one of the sides times out. If the userid either logsout successfully or never times out or is only ever used on one side but not the other then the problem should go away.
It has absolutely nothing to do with RTC.
Comments
Hi Rich,
We do not use the devcloud user in the web client and we create a new ram session after every 25 mins,but we are still facing this issue.
Is there any other workaround or a solution for this?
Did you ramSession.release() the previous session before doing the new ramSession after 25 minutes? If you did not do the release() then the session would not of logged out. And in 7202 it doesn't automatically refresh the login when a new ramSession is created. It doesn't do anything until the first access to the host. This means the session can still time out. Doing a release() first will cause a logout to occur (assuming that is the only ramSession created in that Java VM instance).
That is the only case we have ever had this happened with. If it is not that then we have no idea what the cause is.
We do release the session before creating a new one.
Hi Rich,
Please find below the details.
We always release the session before creating a new one.
For the very first run when the function getInstance gets called the sessionAge will be 0.
From there on in every subsequent call we check if the session has been active for more than 25 mins,if yes we call the refresh method which first releases the session and then creates a new one.
Code snippet attached.
Please let me know if there is something that is not correct.
Then I have no answer. I don't know why it is happening. The only thing I can think of is because you are still at the ancient 7202 code which did have this problem.
Comments
Gili Mendel
JAZZ DEVELOPER Feb 05 '13, 8:17 a.m.Assume that not lic. shortages (Administration -> License Management link on right hand side).
Is it possible that our RAMSession had timed out?