0

I just configured configured tomcat on centos 7 and no applications have been deployed. When I execute ./startup.sh I get the error below in the logs. Anyone who knows why this is happening at start up stage and how can the error be resolved.

03-Jan-2022 20:02:42.625 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in [967] milliseconds
03-Jan-2022 20:02:42.662 INFO [http-nio-8080-exec-1] 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.IllegalArgumentException: Invalid character found in method name [0x160x030x010x000xa00x010x000x000x9c0x030x030x8fy0xc20xb30xf20xcf0x9b0xe10x0e0x8b0x800x0e0xf70x175W0xae-0x7f0xa80x8c0x8d0xe80x0fG0xd5A0xd20x98~0xbc9 ]. HTTP method names must be tokens
                at org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:419)
                at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:269)
                at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
                at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:895)
                at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1732)
                at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
                at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
                at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
                at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
                at java.lang.Thread.run(Unknown Source)```
Baguma
  • 173
  • 1
  • 2
  • 15
  • Or better: [Tomcat: java.lang.IllegalArgumentException: Invalid character found in method name. HTTP method names must be tokens](https://stackoverflow.com/q/42218237/11748454). – Piotr P. Karwasz Jan 03 '22 at 18:51
  • @PiotrP.Karwasz the answer shared on those links does not help. For my case Tomcat is still in its default start and nothing has been changed other than giving it execution permissions. So I expected it to start normally by default – Baguma Jan 03 '22 at 19:05
  • 1
    It does start normally (your first log line). Soon after a client sends an invalid request. If this is deterministic, you need to identify which client does that. – Piotr P. Karwasz Jan 03 '22 at 20:44
  • 1
    In particular, this is definitely something trying to do HTTPS on your HTTP port. The older Qs had to guess when this was the case, but now Tomcat displays the offending 'method' and the (poorly-formatted) byte sequence 0x16 0x03 0x01 0x00 0xa0 0x01 0x00 0x00 0x9c 0x03 0x03 ... is absolutely and exactly the beginning of a TLS1.2 or possibly TLS1.3 ClientHello. – dave_thompson_085 Jan 03 '22 at 21:17

0 Answers0