Payara icon indicating copy to clipboard operation
Payara copied to clipboard

Bug Report: HTTP Access Logging using SSE broadcaster prints warnings / FISH-6294

Open marcreichman opened this issue 3 years ago • 6 comments

Description


When using an SSE broadcaster, with an @ApplicationScoped JAX-RS resource, as is needed to maintain the broadcaster state, warnings show up in the log only if access logging is enabled.

This appears to be similar to #2261. However, that fix does not seem to affect this.

Expected Outcome

It's expected that warnings are not logged in a way that differs only if access logging is turned on.

Current Outcome

With access logging on, the following shows in the log:

.....

'payara-sse-access-log-issue' REST Endpoints:
GET	/payara-sse-access-log-issue/api/application.wadl
GET	/payara-sse-access-log-issue/api/sse
POST	/payara-sse-access-log-issue/api/sse



[2022-05-10T11:56:36.795-0500] [] [INFO] [] [PayaraMicro] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1652201796795] [levelValue: 800] Payara Micro  5.2022.2 #badassmicrofish (build 306) ready in 15,742 (ms)

[2022-05-10T11:56:52.218-0500] [] [WARN] [] [org.jboss.weld.Servlet] [tid: _ThreadID=88 _ThreadName=http-thread-pool::http-listener(2)] [timeMillis: 1652201812218] [levelValue: 900] WELD-000714: HttpContextLifecycle guard leak detected. The Servlet container is not fully compliant. The value was 1

[2022-05-10T11:56:52.219-0500] [] [WARN] [] [org.jboss.weld.Context] [tid: _ThreadID=88 _ThreadName=http-thread-pool::http-listener(2)] [timeMillis: 1652201812219] [levelValue: 900] WELD-000225: Bean store leak detected during org.jboss.weld.module.web.context.http.HttpRequestContextImpl association: org.apache.catalina.connector.RequestFacade@23de2e01

[2022-05-10T11:56:52.219-0500] [] [WARN] [] [org.jboss.weld.Context] [tid: _ThreadID=88 _ThreadName=http-thread-pool::http-listener(2)] [timeMillis: 1652201812219] [levelValue: 900] WELD-000225: Bean store leak detected during org.jboss.weld.module.web.context.http.HttpSessionContextImpl association: org.apache.catalina.connector.RequestFacade@23de2e01

[2022-05-10T11:56:52.223-0500] [] [WARN] [] [org.jboss.weld.Conversation] [tid: _ThreadID=88 _ThreadName=http-thread-pool::http-listener(2)] [timeMillis: 1652201812223] [levelValue: 900] WELD-000335: Conversation context is already active, most likely it was not cleaned up properly during previous request processing: org.apache.catalina.connector.RequestFacade@23de2e01

With access logging off, the latter lines do not show up.

Steps to reproduce

Here is a sample project which can reproduce this easily. I have tested with Payara Micro Community 5.2022.2 but this has shown up in Payara Server as well, including a previous version 5.201.

https://gitlab.com/mreichman/payara-sse-access-log-issue

The README.md file shows the different command lines and reproduction steps once built.

Environment

  • Distribution: Micro
  • JDK Version: 11, 17
  • Operating System: Windows

marcreichman avatar May 10 '22 17:05 marcreichman

Hi @marcreichman,

I am able to successfully reproduce this issue, thank you very much for your detailed reproducer. I have raised an internal issue FISH-6294 to address this bug. We always encourage you to contribute, so if you wish you can submit a PR with a fix and we will gladly review it. Otherwise, we will pick up the issue at some point in the future.

Thanks, James

JamesHillyard avatar May 11 '22 09:05 JamesHillyard

Appreciate the attention. I am not qualified enough to work on a fix!

marcreichman avatar May 11 '22 20:05 marcreichman

I tried using @Singleton annotation instead of @ApplicationScoped. No WELD warnings and application worked the same way as with @ApplicationScoped

saikumar1607 avatar Oct 26 '23 18:10 saikumar1607