By: Zhikai Chen user 13 Nov 2020 at 1:39 p.m. CST

1 Response
Zhikai Chen gravatar
The server cannot be accessed after deployed a CDN. It works well if you are not using the CDN service. ## Expected Behavior Successful logined. ## Actual Behavior The Browser reloaded the page and ask me to log in again. Once you tried to login again, it will return something like this: ``` OOPS An unexpected error has occurred at null Failed to authenticate. Authentication session has expired. Please navigate back to the original page and try again. ``` ## Logs: ``` 2020-11-13 14:27:20,351 ERROR [qtp2051853139-16] [org.gluu.oxauth.service.SessionIdService] (SessionIdService.java:758) - Failed to get session by dn: oxId=b393be39-4e4d-4d54-9458-95119763f149,ou=sessions,o=gluu org.gluu.persist.exception.EntryPersistenceException: Failed to find entry: oxId=b393be39-4e4d-4d54-9458-95119763f149,ou=sessions,o=gluu at org.gluu.persist.ldap.impl.LdapEntryManager.find(LdapEntryManager.java:412) ~[oxcore-persistence-ldap-4.2.1.Final.jar:?] at org.gluu.persist.impl.BaseEntryManager.find(BaseEntryManager.java:624) ~[oxcore-persistence-core-4.2.1.Final.jar:?] at org.gluu.persist.impl.BaseEntryManager.find(BaseEntryManager.java:504) ~[oxcore-persistence-core-4.2.1.Final.jar:?] at org.gluu.persist.impl.BaseEntryManager.find(BaseEntryManager.java:491) ~[oxcore-persistence-core-4.2.1.Final.jar:?] at jdk.internal.reflect.GeneratedMethodAccessor50.invoke(Unknown Source) ~[?:?] at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?] at org.jboss.weld.bean.proxy.AbstractBeanInstance.invoke(AbstractBeanInstance.java:38) ~[weld-core-impl-3.1.4.Final.jar:3.1.4.Final] at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:106) ~[weld-core-impl-3.1.4.Final.jar:3.1.4.Final] at org.gluu.persist.EntityManager$PersistenceEntryManager$1948487569$Proxy$_$$_WeldClientProxy.find(Unknown Source) ~[weld-core-impl-3.1.4.Final.jar:?] at org.gluu.oxauth.service.SessionIdService.getSessionByDn(SessionIdService.java:752) ~[classes/:?] at org.gluu.oxauth.service.SessionIdService.getSessionById(SessionIdService.java:724) ~[classes/:?] at org.gluu.oxauth.service.SessionIdService.getSessionId(SessionIdService.java:785) ~[classes/:?] at org.gluu.oxauth.service.SessionIdService.getSessionId(SessionIdService.java:776) ~[classes/:?] at org.gluu.oxauth.service.SessionIdService.getSessionId(SessionIdService.java:772) ~[classes/:?] at org.gluu.oxauth.service.SessionIdService$Proxy$_$$_WeldClientProxy.getSessionId(Unknown Source) ~[classes/:?] at org.gluu.oxauth.auth.Authenticator.getSessionId(Authenticator.java:798) ~[classes/:?] at org.gluu.oxauth.auth.Authenticator.userAuthenticationInteractive(Authenticator.java:282) ~[classes/:?] at org.gluu.oxauth.auth.Authenticator.authenticateImpl(Authenticator.java:205) ~[classes/:?] at org.gluu.oxauth.auth.Authenticator.authenticate(Authenticator.java:128) ~[classes/:?] at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?] at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?] at org.apache.el.parser.AstValue.invoke(AstValue.java:247) ~[org.mortbay.jasper.apache-el-8.5.54.jar:8.5.54] at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:267) ~[org.mortbay.jasper.apache-el-8.5.54.jar:8.5.54] at org.jboss.weld.module.web.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:40) ~[weld-web-3.1.4.Final.jar:3.1.4.Final] at org.jboss.weld.module.web.el.WeldMethodExpression.invoke(WeldMethodExpression.java:50) ~[weld-web-3.1.4.Final.jar:3.1.4.Final] at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:65) ~[jakarta.faces-2.3.14.jar:2.3.14] at com.sun.faces.application.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:66) ~[jakarta.faces-2.3.14.jar:2.3.14] at com.sun.faces.application.ActionListenerImpl.getNavigationOutcome(ActionListenerImpl.java:82) ~[jakarta.faces-2.3.14.jar:2.3.14] at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:71) ~[jakarta.faces-2.3.14.jar:2.3.14] at javax.faces.component.UICommand.broadcast(UICommand.java:222) ~[jakarta.faces-2.3.14.jar:2.3.14] at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:847) ~[jakarta.faces-2.3.14.jar:2.3.14] at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1396) ~[jakarta.faces-2.3.14.jar:2.3.14] at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:58) ~[jakarta.faces-2.3.14.jar:2.3.14] at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:76) ~[jakarta.faces-2.3.14.jar:2.3.14] at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:177) ~[jakarta.faces-2.3.14.jar:2.3.14] at javax.faces.webapp.FacesServlet.executeLifecyle(FacesServlet.java:707) ~[jakarta.faces-2.3.14.jar:2.3.14] at javax.faces.webapp.FacesServlet.service(FacesServlet.java:451) ~[jakarta.faces-2.3.14.jar:2.3.14] at org.eclipse.jetty.servlet.ServletHolder$NotAsyncServlet.service(ServletHolder.java:1411) ~[jetty-servlet-9.4.31.v20200723.jar:9.4.31.v20200723] at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:763) ~[jetty-servlet-9.4.31.v20200723.jar:9.4.31.v20200723] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1651) ~[jetty-servlet-9.4.31.v20200723.jar:9.4.31.v20200723] at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:226) ~[websocket-server-9.4.31.v20200723.jar:9.4.31.v20200723] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1638) ~[jetty-servlet-9.4.31.v20200723.jar:9.4.31.v20200723] at org.gluu.oxauth.audit.debug.ServletLoggingFilter.doFilter(ServletLoggingFilter.java:67) ~[classes/:?] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1630) ~[jetty-servlet-9.4.31.v20200723.jar:9.4.31.v20200723] at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:567) ~[jetty-servlet-9.4.31.v20200723.jar:9.4.31.v20200723] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) ~[jetty-server-9.4.31.v20200723.jar:9.4.31.v20200723] at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:602) ~[jetty-security-9.4.31.v20200723.jar:9.4.31.v20200723] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[jetty-server-9.4.31.v20200723.jar:9.4.31.v20200723] at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235) ~[jetty-server-9.4.31.v20200723.jar:9.4.31.v20200723] at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1610) ~[jetty-server-9.4.31.v20200723.jar:9.4.31.v20200723] at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233) ~[jetty-server-9.4.31.v20200723.jar:9.4.31.v20200723] at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1377) ~[jetty-server-9.4.31.v20200723.jar:9.4.31.v20200723] at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188) ~[jetty-server-9.4.31.v20200723.jar:9.4.31.v20200723] at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:507) ~[jetty-servlet-9.4.31.v20200723.jar:9.4.31.v20200723] at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1580) ~[jetty-server-9.4.31.v20200723.jar:9.4.31.v20200723] at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186) ~[jetty-server-9.4.31.v20200723.jar:9.4.31.v20200723] at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1292) ~[jetty-server-9.4.31.v20200723.jar:9.4.31.v20200723] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) ~[jetty-server-9.4.31.v20200723.jar:9.4.31.v20200723] at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:234) ~[jetty-server-9.4.31.v20200723.jar:9.4.31.v20200723] at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146) ~[jetty-server-9.4.31.v20200723.jar:9.4.31.v20200723] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[jetty-server-9.4.31.v20200723.jar:9.4.31.v20200723] at org.eclipse.jetty.server.Server.handle(Server.java:501) ~[jetty-server-9.4.31.v20200723.jar:9.4.31.v20200723] at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:383) ~[jetty-server-9.4.31.v20200723.jar:9.4.31.v20200723] at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:556) [jetty-server-9.4.31.v20200723.jar:9.4.31.v20200723] at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:375) [jetty-server-9.4.31.v20200723.jar:9.4.31.v20200723] at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:273) [jetty-server-9.4.31.v20200723.jar:9.4.31.v20200723] at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) [jetty-io-9.4.31.v20200723.jar:9.4.31.v20200723] at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105) [jetty-io-9.4.31.v20200723.jar:9.4.31.v20200723] at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104) [jetty-io-9.4.31.v20200723.jar:9.4.31.v20200723] at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336) [jetty-util-9.4.31.v20200723.jar:9.4.31.v20200723] at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313) [jetty-util-9.4.31.v20200723.jar:9.4.31.v20200723] at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171) [jetty-util-9.4.31.v20200723.jar:9.4.31.v20200723] at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129) [jetty-util-9.4.31.v20200723.jar:9.4.31.v20200723] at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:375) [jetty-util-9.4.31.v20200723.jar:9.4.31.v20200723] at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806) [jetty-util-9.4.31.v20200723.jar:9.4.31.v20200723] at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938) [jetty-util-9.4.31.v20200723.jar:9.4.31.v20200723] at java.lang.Thread.run(Thread.java:834) [?:?] 2020-11-13 14:27:20,355 INFO [qtp2051853139-16] [org.gluu.oxauth.auth.Authenticator] (Authenticator.java:225) - Authentication failed for 'admin' ``` I also checked the openDJ logs, it looks the gluu removed the session once authenicated. ``` [13/Nov/2020:14:51:34 -0500] ADD REQ conn=266 op=173 msgID=174 dn="oxId=b00a5640-adcd-4c94-998b-224be16cc151,ou=sessions,o=gluu" [13/Nov/2020:14:51:34 -0500] SEARCH REQ conn=326 op=28 msgID=29 base="oxId=b00a5640-adcd-4c94-998b-224be16cc151,ou=sessions,o=gluu" scope=base filter="(objectClass=*)" attrs="oxAuthUserDN,oxAuthPermissionGranted,oxState,del,authnTime,creationDate,oxJwt,oxAsJwt,sid,oxId,oxLastAccessTime,oxSessionState,oxAuthPermissionGrantedMap,exp,oxAuthSessionAttribute,objectClass" [13/Nov/2020:14:51:34 -0500] MODIFY REQ conn=339 op=5 msgID=6 dn="oxId=b00a5640-adcd-4c94-998b-224be16cc151,ou=sessions,o=gluu" [13/Nov/2020:14:51:42 -0500] SEARCH REQ conn=326 op=29 msgID=30 base="oxId=b00a5640-adcd-4c94-998b-224be16cc151,ou=sessions,o=gluu" scope=base filter="(objectClass=*)" attrs="oxAuthUserDN,oxAuthPermissionGranted,oxState,del,authnTime,creationDate,oxJwt,oxAsJwt,sid,oxId,oxLastAccessTime,oxSessionState,oxAuthPermissionGrantedMap,exp,oxAuthSessionAttribute" [13/Nov/2020:14:51:42 -0500] SEARCH REQ conn=266 op=175 msgID=176 base="oxId=b00a5640-adcd-4c94-998b-224be16cc151,ou=sessions,o=gluu" scope=base filter="(objectClass=*)" attrs="oxAuthUserDN,oxAuthPermissionGranted,oxState,del,authnTime,creationDate,oxJwt,oxAsJwt,sid,oxId,oxLastAccessTime,oxSessionState,oxAuthPermissionGrantedMap,exp,oxAuthSessionAttribute,objectClass" [13/Nov/2020:14:51:42 -0500] MODIFY REQ conn=326 op=30 msgID=31 dn="oxId=b00a5640-adcd-4c94-998b-224be16cc151,ou=sessions,o=gluu" [13/Nov/2020:14:51:42 -0500] DELETE REQ conn=339 op=7 msgID=8 dn="oxId=b00a5640-adcd-4c94-998b-224be16cc151,ou=sessions,o=gluu" [13/Nov/2020:14:51:42 -0500] ADD REQ conn=266 op=176 msgID=177 dn="oxId=6995953b-2c3a-4464-b6c5-8293bac5a1f0,ou=sessions,o=gluu" ``` ## Example Try intstall a gluu server then login to the server though CDN service such as cloudflare. It looks like some kind of session management or ip related problem

By Michael Schwartz Account Admin 13 Nov 2020 at 2:04 p.m. CST

Michael Schwartz gravatar
Make sure you use the internet facing hostname when you run setup. Looks like it could be a cookie problem. I'm closing the issue because it's outside the scope of community support.