By: Doug Harris named 01 Mar 2022 at 1:45 p.m. CST

3 Responses
Doug Harris gravatar
Example call stack: ``` org.gluu.persist.exception.EntryPersistenceException: Failed to find entry: oxId=bfe367b2-6200-4b67-9980-e62727149f64,ou=sessions,o=gluu at org.gluu.orm.couchbase.impl.CouchbaseEntryManager.find(CouchbaseEntryManager.java:376) at org.gluu.persist.impl.BaseEntryManager.find(BaseEntryManager.java:713) at org.gluu.persist.impl.BaseEntryManager.find(BaseEntryManager.java:592) at org.gluu.persist.impl.BaseEntryManager.find(BaseEntryManager.java:579) at jdk.internal.reflect.GeneratedMethodAccessor112.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.jboss.weld.bean.proxy.AbstractBeanInstance.invoke(AbstractBeanInstance.java:38) at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:106) at org.gluu.persist.PersistenceEntryManager$EntityManager$1948487569$Proxy$_$$_WeldClientProxy.find(Unknown Source) at org.gluu.oxauth.service.SessionIdService.getSessionByDn(SessionIdService.java:787) at org.gluu.oxauth.service.SessionIdService.getSessionById(SessionIdService.java:746) at org.gluu.oxauth.service.SessionIdService.getSessionId(SessionIdService.java:820) at org.gluu.oxauth.service.SessionIdService.getSessionId(SessionIdService.java:811) at org.gluu.oxauth.service.SessionIdService$Proxy$_$$_WeldClientProxy.getSessionId(Unknown Source) at org.gluu.oxauth.auth.AuthenticationFilter.doFilter(AuthenticationFilter.java:199) at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193) at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601) at org.gluu.oxauth.audit.debug.ServletLoggingFilter.doFilter(ServletLoggingFilter.java:67) at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:201) at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601) at org.gluu.oxauth.filter.CorsFilter.doFilter(CorsFilter.java:121) at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193) at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:548) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:600) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1434) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1349) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:234) at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) at org.eclipse.jetty.server.Server.handle(Server.java:516) at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:400) at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:645) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:392) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105) at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131) at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:409) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883) at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034) at java.base/java.lang.Thread.run(Thread.java:829) Caused by: Failed to lookup entry at org.gluu.orm.couchbase.operation.impl.CouchbaseOperationServiceImpl.lookupImpl(CouchbaseOperationServiceImpl.java:454) at org.gluu.orm.couchbase.operation.impl.CouchbaseOperationServiceImpl.lookup(CouchbaseOperationServiceImpl.java:388) at org.gluu.orm.couchbase.impl.CouchbaseEntryManager.find(CouchbaseEntryManager.java:370) ... 56 more ``` I see most of the work to reduce this log noise was committed with [Do not print stacktraces when we expect object to not be found.](https://github.com/GluuFederation/oxAuth/commit/e48902bac59f3769d3f58f87429e7400e857bbb0), but there are a few places remainig where the new `silently` parameter to `getSessionId` is not yet being used, e.g. [here](https://github.com/GluuFederation/oxAuth/blob/9523eb2ed86d46d69cb39d3c79262444d0ab3157/Server/src/main/java/org/gluu/oxauth/auth/Authenticator.java#L698), maybe also [here](https://github.com/GluuFederation/oxAuth/blob/9523eb2ed86d46d69cb39d3c79262444d0ab3157/Server/src/main/java/org/gluu/oxauth/auth/AuthenticationFilter.java#L199), [here](https://github.com/GluuFederation/oxAuth/blob/9523eb2ed86d46d69cb39d3c79262444d0ab3157/Server/src/main/java/org/gluu/oxauth/authorize/ws/rs/AuthorizeRestWebServiceImpl.java#L912) ...

By Aliaksandr Samuseu staff 01 Mar 2022 at 2:29 p.m. CST

Aliaksandr Samuseu gravatar
Hi, Doug. Thanks for the feedback. @Yuriy.Zabrovarnyy will look at your suggestions at first opportunity, and will share his thoughts.

By Yuriy Zabrovarnyy staff 02 Mar 2022 at 5:13 a.m. CST

Yuriy Zabrovarnyy gravatar
I agree, in places where it is expected to get no object we should print message without strack trace. In this way avoid "noise" in logs. Scheduled ticket on github for it: https://github.com/GluuFederation/oxAuth/issues/1646

By Yuriy Zabrovarnyy staff 07 Mar 2022 at 6:08 a.m. CST

Yuriy Zabrovarnyy gravatar
Issue is solved in oxauth and will be available with next release.