On Thu, Oct 24, 2024 at 2:36 PM Lucian Jurj <lj...@neverfailgroup.com> wrote:
>
> Hi,
>
> I've searched for a solution on wiki, web, apache pony mail lists. Tried 
> various experinetns to isolate the cause... but unsuccessful. I've seen this 
> 3 months ago with 9.0.93 then waited to more tomcat releases and retry 
> thinking it is maybe something temporary. It isn't. Currently, an experienced 
> webdev is investing this but we have no clue what causes this.
>
> We have a mature product called Continuity Engine which bundles tomcat 9 for 
> quite a few years. We perform quarterly tomcat 9 updates. And all were 
> successful until and including tomcat 9.0.91.
>
> Issue:
>
> - during first start of tomcat 9.0.96 while our hbws.war webapp is deployed, 
> following error is thrown.
>
> 24-Oct-2024 11:53:15.217 INFO [main] 
> org.apache.catalina.startup.Catalina.load Server initialization in [1871] 
> milliseconds
> 24-Oct-2024 11:53:15.280 INFO [main] 
> org.apache.catalina.core.StandardService.startInternal Starting service 
> [Catalina]
> 24-Oct-2024 11:53:15.280 INFO [main] 
> org.apache.catalina.core.StandardEngine.startInternal Starting Servlet 
> engine: [Apache Tomcat/9.0.96]
> 24-Oct-2024 11:53:15.311 INFO [main] 
> org.apache.catalina.startup.HostConfig.deployWAR Deploying web application 
> archive [C:\Program 
> Files\Neverfail\tomcat\apache-tomcat-9.0.96\webapps\hbws.war]

Ok, more or less. But you're starting the server, then adding to it
while it's running. That's risky.

> 24-Oct-2024 11:53:37.514 INFO [main] org.apache.coyote.AbstractProtocol.stop 
> Stopping ProtocolHandler ["https-openssl-nio-9727"]
> 24-Oct-2024 11:53:42.519 INFO [main] org.apache.coyote.AbstractProtocol.start 
> Starting ProtocolHandler ["https-openssl-nio-9727"]

That's not normal.

> 24-Oct-2024 11:53:42.519 INFO [main] 
> org.apache.tomcat.util.net.AbstractEndpoint.logCertificate Connector 
> [https-openssl-nio-9727], TLS virtual host [default], certificate type 
> [UNDEFINED] configured from keystore [../ssl/NFKeyStore.jks] using alias 
> [nfhb_private_certificate] with trust store [null]
>
> 24-Oct-2024 11:53:44.566 INFO [https-openssl-nio-9727-exec-3] 
> org.apache.coyote.http11.Http11Processor.service Error parsing HTTP request 
> header
>  Note: further occurrences of HTTP request parsing errors will be logged at 
> DEBUG level.
>         java.lang.NullPointerException
>                 at 
> org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:483)

That request came in on port 9727. So the HTTP parser would be null
because init was not called ?

>                 at 
> org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:256)
>                 at 
> org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
>                 at 
> org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:937)
>                 at 
> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1791)
>                 at 
> org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
>                 at 
> org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1190)
>                 at 
> org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
>                 at 
> org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63)
>                 at java.lang.Thread.run(Thread.java:750)
> SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
> SLF4J: Defaulting to no-operation (NOP) logger implementation
> SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder  for further 
> details.
> 24-Oct-2024 11:53:47.227 INFO [main] 
> org.apache.catalina.startup.HostConfig.deployWAR Deployment of web 
> application archive [C:\Program 
> Files\Neverfail\tomcat\apache-tomcat-9.0.96\webapps\hbws.war] has finished in 
> [31,916] ms

Now the webapp is deployed.

> 24-Oct-2024 11:53:47.227 INFO [main] org.apache.coyote.AbstractProtocol.start 
> Starting ProtocolHandler ["http-nio-9728"]

A second connector, this one starts without oddities.

> 24-Oct-2024 11:53:47.227 INFO [main] 
> org.apache.catalina.util.LifecycleBase.start The start() method was called on 
> component [Connector["https-openssl-nio-9727"]] after start() had already 
> been called. The second call will be ignored.

Another clue that the lifecycle of the connector on 9727 is wrong.

> 24-Oct-2024 11:53:47.227 INFO [main] 
> org.apache.catalina.startup.Catalina.start Server startup in [32008] 
> millisecondsa
> --------------------
>
> - This causes webserver not being able to process requests:
>
> HTTP Status 400 - Bad Request
> Type Exception Report
> Description The server cannot or will not process the request due to 
> something that is perceived to be a client error (e.g., malformed request 
> syntax, invalid request message framing, or deceptive request routing).
> - without changes on our code side, the Engine product works with tomcat 
> 9.0.91 (last version which
>
> -------------
>
> A subsequent restart fixes the situation. But or our product bundling tomcat, 
> restart is an showstopper.
>
> -----------
> - last version that worked at our end was 9.0.91
> - since then we've seen this with 9.0.93, 9.0.96, without doing any changes 
> to our side of the code. In other words,
>
> Something seemed to be changed in releases post 9.0.93 which causes this 
> behavior at our end.

There's something relevant in the changelog: "Refactor creation of
HttpParser instances from the Processor level to the Protocol level
since the parser configuration depends on the protocol and the parser
is, otherwise, stateless."
https://github.com/apache/tomcat/commit/e00735c3f672c19b6a0190be65f6e97f4747d04b

The lifecycle you're using could use some double checking, and that's
probably the best way to resolve this. We'll examine the Tomcat
behavior to see if there is a way to improve the robustness, of
course.

Rémy

>
> -------------
>
> Would somebody provide a pointer or a direction I should start looking into? 
> Your help would be really appreciated.
> Please reply to lj...@neverfailgroup.com.
>
> Thanks,
> /Lucian Jurj
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to