tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Vomlel <jan.vom...@gmail.com>
Subject Re: HTTPS Invalid character found in method name. HTTP method names must be tokens.
Date Mon, 18 Mar 2019 10:49:20 GMT
Thank you Mark. I enabled the logger org.apache.coyote.http11.

I cannot paste line 
org.apache.coyote.http11.Http11InputBuffer.parseRequestLine here, 
because it contains not printable characters and copy paste doesnot work.

It seems like bug in tomcat or jdk.   ???

Log contains now:

javax.net.ssl|DEBUG|3A|https-jsse-nio-8444-exec-7|2019-03-15 
16:28:59.286 CET|SSLEngineInputRecord.java:177|Raw read (
   0000: 17 03 03 02 36 00 00 00   00 00 00 00 01 D0 92 68 ....6..........h
   0010: 70 28 49 97 60 15 4B C7   47 AB 58 58 58 54 13 94 p(I.`.K.G.XXXT..
   0020: 06 6B 81 4B BA 34 D0 4B   5D 54 53 93 B0 97 C6 93 .k.K.4.K]TS.....
   0030: F0 84 B2 64 DA 35 CB 0F   76 48 68 B2 2D B5 D3 DC ...d.5..vHh.-...
   0040: 26 DC 1F 0C 08 FC FC 14   E4 6B 2C B2 E9 B2 F2 9A &........k,.....
   0050: 16 3D A7 6A 62 E6 21 CB   DE 61 30 24 41 9C E9 E8 .=.jb.!..a0$A...
   0060: 38 4F 12 6F 7A 9C 3F FF   86 6F 3A 7C 3B 8A 8C FA 8O.oz.?..o:.;...
   0070: 84 40 F5 25 3C DF B5 E8   4D 33 02 BE B1 90 65 95 .@.%<...M3....e.
   0080: 64 3B A1 63 E5 5E E9 0F   E5 C4 D0 2B 76 BD 4D 49 d;.c.^.....+v.MI
   0090: CF 3A C1 5D BA D6 BD 5B   B1 0C C9 73 AD 5A DA 6B .:.]...[...s.Z.k
   00A0: CE D0 24 D7 E6 1F A4 23   F6 6A 6A 90 E4 CB AD 36 ..$....#.jj....6
   00B0: 9A A9 27 2F 64 29 D8 8C   6B E0 A8 71 53 E7 68 7C ..'/d)..k..qS.h.
   00C0: 3C 8E EE 33 DE AE B3 93   1E 92 8D C0 44 64 96 0D <..3........Dd..
   00D0: 38 90 78 48 F2 05 5B 86   42 7C A1 88 4B 8A 7B D2 8.xH..[.B...K...
   00E0: 5D 08 18 A9 A5 F5 9D FB   67 2D C9 B9 8B F9 56 68 ].......g-....Vh
   00F0: E4 5C 99 26 C0 68 BB 94   8F 3E F8 85 15 F6 6F 98 .\.&.h...>....o.
   0100: 1C 49 BF 28 1F C6 67 29   69 54 1D 43 11 BC 04 7F .I.(..g)iT.C....
   0110: 9A BE 25 5E 5D 24 EB EA   AA 68 36 F5 02 9F C4 5A ..%^]$...h6....Z
   0120: 83 98 77 FE 65 94 B6 BC   A2 72 44 54 71 29 39 DD ..w.e....rDTq)9.
   0130: 19 EB D0 42 80 DB C0 F5   DF EA 5C 4C EB 63 DD 4E ...B......\L.c.N
   0140: 81 A6 A4 31 1F 6A 91 4E   B1 37 E0 F2 EB 84 A5 3F ...1.j.N.7.....?
   0150: 38 11 F4 7F B2 FE 90 0F   20 EE 33 86 65 B8 98 25 8....... .3.e..%
   0160: D0 81 61 96 AA 16 14 3A   05 68 62 B5 F6 FA 2F A6 ..a....:.hb.../.
   0170: 39 5C 36 26 3C 3C 03 CF   35 5F 44 1E B6 FD B3 36 9\6&<<..5_D....6
   0180: 52 DF 92 D4 DB 2B 30 09   4E FE 80 55 63 12 BF AF R....+0.N..Uc...
   0190: 59 65 09 27 B7 BC 65 97   76 BF 72 C4 7A C9 0F 22 Ye.'..e.v.r.z.."
   01A0: C1 36 FA F3 4A 16 4D B5   A0 47 4F DF 5F 6D 53 8A .6..J.M..GO._mS.
   01B0: 88 C6 F3 08 88 8B 82 18   7D 04 3A AC 6D 52 65 7A ..........:.mRez
   01C0: DD 71 30 14 4C 5E 88 03   BC 1F C8 9F 1A AE 6B B7 .q0.L^........k.
   01D0: 64 A6 AC 5C BD 6B 52 85   7B CE A2 9C 62 D6 26 C2 d..\.kR.....b.&.
   01E0: 53 58 9C F0 72 56 D4 B7   14 D1 C2 16 88 F6 8C A0 SX..rV..........
   01F0: CE C0 31 13 B1 BA CB D1   7D 4F 32 E5 3A C1 1B 1D ..1......O2.:...
   0200: D8 D2 51 29 11 4C C1 39   A1 AE 57 6C 44 20 E6 2C ..Q).L.9..WlD .,
   0210: 4E 7D 4E 19 B0 42 2B D8   AC 48 59 E7 09 78 BC 90 N.N..B+..HY..x..
   0220: 56 C8 B4 A4 CE 6D 55 3C   88 33 7F 97 B2 5D 91 A3 V....mU<.3...]..
   0230: BF A9 EB 66 B3 A0 17 38   34 DA 91 14 03 03 00 01 ...f...84.......
   0240: 01 16 03 03 00 28 00 00   00 00 00 00 00 00 3D 8A .....(........=.
   0250: 2C 0E 70 32 B8 81 A9 5C   32 B6 8C 59 56 89 17 4F ,.p2...\2..YV..O
   0260: 5A FC 3E 79 2C CB F5 2B   1E ED 87 9D CF 5B Z.>y,..+.....[
)
javax.net.ssl|DEBUG|3A|https-jsse-nio-8444-exec-7|2019-03-15 
16:28:59.286 CET|SSLEngineInputRecord.java:214|READ: TLSv1.2 
application_data, length = 566
javax.net.ssl|DEBUG|3A|https-jsse-nio-8444-exec-7|2019-03-15 
16:28:59.286 CET|SSLEngineInputRecord.java:177|Raw read (
   0000: 14 03 03 00 01 01 16 03   03 00 28 00 00 00 00 00 ..........(.....
   0010: 00 00 00 3D 8A 2C 0E 70   32 B8 81 A9 5C 32 B6 8C ...=.,.p2...\2..
   0020: 59 56 89 17 4F 5A FC 3E   79 2C CB F5 2B 1E ED 87 YV..OZ.>y,..+...
   0030: 9D CF 5B                                          
..[
)
javax.net.ssl|DEBUG|3A|https-jsse-nio-8444-exec-7|2019-03-15 
16:28:59.286 CET|SSLEngineInputRecord.java:214|READ: TLSv1.2 
change_cipher_spec, length = 1
javax.net.ssl|DEBUG|3A|https-jsse-nio-8444-exec-7|2019-03-15 
16:28:59.286 CET|ChangeCipherSpec.java:143|Consuming ChangeCipherSpec 
message
javax.net.ssl|DEBUG|3A|https-jsse-nio-8444-exec-7|2019-03-15 
16:28:59.286 CET|SSLEngineInputRecord.java:177|Raw read (
   0000: 16 03 03 00 28 00 00 00   00 00 00 00 00 3D 8A 2C ....(........=.,
   0010: 0E 70 32 B8 81 A9 5C 32   B6 8C 59 56 89 17 4F 5A .p2...\2..YV..OZ
   0020: FC 3E 79 2C CB F5 2B 1E   ED 87 9D CF 5B .>y,..+.....[
)
javax.net.ssl|DEBUG|3A|https-jsse-nio-8444-exec-7|2019-03-15 
16:28:59.286 CET|SSLEngineInputRecord.java:214|READ: TLSv1.2 handshake, 
length = 40
javax.net.ssl|DEBUG|3A|https-jsse-nio-8444-exec-7|2019-03-15 
16:28:59.287 CET|SSLCipher.java:1629|Plaintext after DECRYPTION (
   0000: 14 00 00 0C 3F C5 0C 9D   0E 38 9D 04 97 92 35 D5 ....?....8....5.
)
javax.net.ssl|DEBUG|3A|https-jsse-nio-8444-exec-7|2019-03-15 
16:28:59.287 CET|Finished.java:581|Consuming client Finished handshake 
message (
"Finished": {
   "verify data": {
     0000: 3F C5 0C 9D 0E 38 9D 04   97 92 35 D5
   }'}
)
15-Mar-2019 16:28:59.287 FINE [https-jsse-nio-8444-exec-7] 
org.apache.coyote.AbstractProtocol$ConnectionHandler.process Processing 
socket 
[org.apache.tomcat.util.net.SecureNioChannel@5d7b5d52:java.nio.channels.SocketChannel[connected

local=/192.168.0.199:8444 remote=/192.168.0.149:54438]] with status 
[OPEN_READ]
15-Mar-2019 16:28:59.287 FINE [https-jsse-nio-8444-exec-7] 
org.apache.coyote.AbstractProtocol$ConnectionHandler.process Found 
processor [null] for socket 
[org.apache.tomcat.util.net.SecureNioChannel@5d7b5d52:java.nio.channels.SocketChannel[connected

local=/192.168.0.199:8444 remote=/192.168.0.149:54438]]
15-Mar-2019 16:28:59.287 FINE [https-jsse-nio-8444-exec-7] 
org.apache.coyote.AbstractProtocol$ConnectionHandler.process Popped 
processor [org.apache.coyote.http11.Http11Processor@651076cb] from cache
15-Mar-2019 16:28:59.287 FINE [https-jsse-nio-8444-exec-7] 
org.apache.coyote.http11.Http11InputBuffer.parseRequestLine Received [

Non printable characters, in hexa, somethink like: 00000000 00000000 
00000000 00000100 D0009200 6800700 28004900 ..., i think that 566 
characters. ]

15-Mar-2019 16:28:59.288 INFO [https-jsse-nio-8444-exec-7] 
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. HTTP method names must be tokens
     at 
org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:414)
     at 
org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:294)
     at 
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
     at 
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:834)
     at 
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1415)
     at 
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
     at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
     at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
     at 
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
     at java.base/java.lang.Thread.run(Thread.java:834)

Dne 14.03.2019 v 16:19 Mark Thomas napsal(a):
> On 13/03/2019 14:41, Jan Vomlel wrote:
>> We use selenium for our application testing. Our tests sometime fail
>> with message "Invalid character found in method name...." Error occures
>> only on https and on on firefox 60 and internet explorer 11. Chrome,
>> edge is OK.
>>
>> We use Tomcat 9.0.16, Java 11 (Adopt Open JDK 11.0.2+9) on Linux,
>> browsers are on windows 10.
>>
>> We think, that there must be some error in https implementation. Log in
>> these situations always contains request with application_data and
>> change_cipher_spec together. But we do not understand https in these
>> details.
> That sounds like the previous request did not complete correctly leading
> to the next request not being started at the correct point. You can try
> enabling debug logging for:
>
> org.apache.coyote.http11.Http11InputBuffer
>
> That should tell you what request lines are being parsed.
>
> Mark
>
>> Thanks for any advice, Jan Vomlel
>>
>> javax.net.ssl|DEBUG|37|https-jsse-nio-8444-exec-6|2019-02-27
>> 18:03:16.326 CET|SSLEngineInputRecord.java:177|Raw read (
>>    0000: 17 03 03 02 74 00 00 00   00 00 00 00 01 E5 6A 79 ....t.........jy
>>    0010: CF D2 7A 6E 53 FB B3 97   3B 82 92 E5 7B A8 A2 EA ..znS...;.......
>>    0020: 4B B5 70 11 DE CD 7E 8C   89 08 AD 67 47 82 E1 16 K.p........gG...
>>    0030: FE 09 9A 1B F6 77 6C 67   80 0E CA 5F 55 4E 2C 2D .....wlg..._UN,-
>>    0040: D8 7B D2 71 2E 66 B4 0A   DA 8D 8F 11 C6 C3 27 1B ...q.f........'.
>>    0050: 18 82 16 FE 82 7C 83 B4   3B 43 D8 81 71 9E 27 22 ........;C..q.'"
>>    0060: 76 50 EB C6 4C 11 C1 BE   01 8E B9 6A 3A 0B 6C 6F vP..L......j:.lo
>>    0070: 01 03 74 F1 C4 90 C7 52   A6 8D 4A A8 8D AC EF A0 ..t....R..J.....
>>    0080: 62 03 3D C7 6E F9 FB 39   C5 FA A6 95 FD 46 C3 51 b.=.n..9.....F.Q
>>    0090: FE 67 2E 76 44 7B B1 B6   8C 34 F4 30 EC 93 EC 1D .g.vD....4.0....
>>    00A0: A1 5B 01 2B C1 DA D3 AA   88 EC E8 31 66 5F 59 CA .[.+.......1f_Y.
>>    00B0: 38 9A 53 C5 89 31 FB FF   1D 59 6D 90 08 66 DB 6C 8.S..1...Ym..f.l
>>    00C0: 6F 4A 9C F7 3A BE D8 5D   5C 3C AA 3E 2B A5 A8 E2 oJ..:..]\<.>+...
>>    00D0: 54 50 65 7B 9A BA 92 71   0F 7B AA 58 DF B2 AC 3E TPe....q...X...>
>>    00E0: 5B 4E A1 29 9C F2 C6 1A   5E 6B 6A 85 19 DE 1C 73 [N.)....^kj....s
>>    00F0: EF D2 AC 06 48 50 8D DD   66 F7 78 87 50 00 28 26 ....HP..f.x.P.(&
>>    0100: FB A7 C1 87 30 67 5B FA   C8 B5 C7 41 4A 27 8E 6D ....0g[....AJ'.m
>>    0110: D8 99 89 BA 32 8A 94 7F   79 2D 66 53 8D F4 6E 82 ....2...y-fS..n.
>>    0120: 95 22 FF C6 E1 5E 8F B2   AA 44 25 33 14 F4 35 A1 ."...^...D%3..5.
>>    0130: 50 84 F5 EE 5D 66 B6 AC   5A 21 72 5B 56 A3 32 07 P...]f..Z!r[V.2.
>>    0140: 83 DF 3B A4 85 A9 3F E9   7B E6 4F 7C 73 F9 87 F5 ..;...?...O.s...
>>    0150: 16 83 E7 24 CD 50 41 F9   43 37 CD 9D DF BE 69 E4 ...$.PA.C7....i.
>>    0160: AE 2D 81 BC 24 81 04 42   72 CE AA 76 5D 63 B4 98 .-..$..Br..v]c..
>>    0170: A7 B4 AB 77 F2 6C 42 4A   75 04 06 BB 19 5A 19 A5 ...w.lBJu....Z..
>>    0180: CA E6 FE 04 61 8B 90 B4   E5 D1 B5 9D C1 49 27 5C ....a........I'\
>>    0190: 41 92 DE 7B 91 AB 7D 3B   21 B9 60 A5 A2 C7 92 19 A......;!.`.....
>>    01A0: 2F 3D 82 17 FB C0 20 7A   E6 79 7C B6 2E CD 50 A9  /=.... z.y....P.
>>    01B0: 6B 8E 7E 04 E9 32 EC 29   22 EC BB 58 C5 5F 8C A6 k....2.)"..X._..
>>    01C0: 1D 76 CB 4E 5A 56 C7 83   C2 74 AC D5 83 70 05 80 .v.NZV...t...p..
>>    01D0: 19 8B E8 CF 09 98 32 D1   8B 4A 93 7B 38 F0 8A 7B ......2..J..8...
>>    01E0: AB 88 D5 99 E3 42 76 1B   C9 EB 62 94 0C F6 DA EF .....Bv...b.....
>>    01F0: 9F 4D DB F0 30 CA 34 13   E7 1A 07 39 FD 92 F5 08 .M..0.4....9....
>>    0200: F4 E5 62 26 94 BF 3C 6A   82 4D 06 C8 96 57 12 F3 ..b&..<j.M...W..
>>    0210: 07 03 09 0B 04 F9 C6 0E   D2 AD 85 DC C4 09 2D 5A ..............-Z
>>    0220: 44 0D 37 42 57 44 C6 05   F6 F7 4E 9E A7 79 BC F3 D.7BWD....N..y..
>>    0230: 94 F5 67 96 B9 6C 2D 9E   E2 C4 77 23 11 20 F7 4A ..g..l-...w#. .J
>>    0240: AE 73 B3 28 20 C7 1F 92   99 C8 55 A3 18 24 85 54  .s.( .....U..$.T
>>    0250: 19 90 1F 24 73 91 A7 3F   15 BA 83 D3 39 03 8C 89 ...$s..?....9...
>>    0260: D5 70 72 97 AF 91 4B 11   3B 72 E4 91 B5 6D BC 29 .pr...K.;r...m.)
>>    0270: 51 C6 47 5C 73 58 84 A7   26 14 03 03 00 01 01 16 Q.G\sX..&.......
>>    0280: 03 03 00 28 00 00 00 00   00 00 00 00 17 E8 48 1B ...(..........H.
>>    0290: 07 8D 8A E9 98 CA 25 1F   AD D5 02 FC 0A C9 8E 4D ......%........M
>>    02A0: F6 C6 EA 2E D6 24 8C D0   11 DA 78 D3 .....$....x.
>> )
>> javax.net.ssl|DEBUG|37|https-jsse-nio-8444-exec-6|2019-02-27
>> 18:03:16.326 CET|SSLEngineInputRecord.java:214|READ: TLSv1.2
>> application_data, length = 628
>> javax.net.ssl|DEBUG|37|https-jsse-nio-8444-exec-6|2019-02-27
>> 18:03:16.326 CET|SSLEngineInputRecord.java:177|Raw read (
>>    0000: 14 03 03 00 01 01 16 03   03 00 28 00 00 00 00 00 ..........(.....
>>    0010: 00 00 00 17 E8 48 1B 07   8D 8A E9 98 CA 25 1F AD .....H.......%..
>>    0020: D5 02 FC 0A C9 8E 4D F6   C6 EA 2E D6 24 8C D0 11 ......M.....$...
>>    0030: DA 78 D3                                          
.x.
>> )
>> javax.net.ssl|DEBUG|37|https-jsse-nio-8444-exec-6|2019-02-27
>> 18:03:16.326 CET|SSLEngineInputRecord.java:214|READ: TLSv1.2
>> change_cipher_spec, length = 1
>> javax.net.ssl|DEBUG|37|https-jsse-nio-8444-exec-6|2019-02-27
>> 18:03:16.326 CET|ChangeCipherSpec.java:143|Consuming ChangeCipherSpec
>> message
>> javax.net.ssl|DEBUG|37|https-jsse-nio-8444-exec-6|2019-02-27
>> 18:03:16.327 CET|SSLEngineInputRecord.java:177|Raw read (
>>    0000: 16 03 03 00 28 00 00 00   00 00 00 00 00 17 E8 48 ....(..........H
>>    0010: 1B 07 8D 8A E9 98 CA 25   1F AD D5 02 FC 0A C9 8E .......%........
>>    0020: 4D F6 C6 EA 2E D6 24 8C   D0 11 DA 78 D3 M.....$....x.
>> )
>> javax.net.ssl|DEBUG|37|https-jsse-nio-8444-exec-6|2019-02-27
>> 18:03:16.327 CET|SSLEngineInputRecord.java:214|READ: TLSv1.2 handshake,
>> length = 40
>> javax.net.ssl|DEBUG|37|https-jsse-nio-8444-exec-6|2019-02-27
>> 18:03:16.327 CET|SSLCipher.java:1629|Plaintext after DECRYPTION (
>>    0000: 14 00 00 0C 0C 1D 2A A3   97 60 B3 E4 72 E3 31 10 ......*..`..r.1.
>> )
>> javax.net.ssl|DEBUG|37|https-jsse-nio-8444-exec-6|2019-02-27
>> 18:03:16.327 CET|Finished.java:581|Consuming client Finished handshake
>> message (
>> "Finished": {
>>    "verify data": {
>>      0000: 0C 1D 2A A3 97 60 B3 E4   72 E3 31 10
>>    }'}
>> )
>> 27-Feb-2019 18:03:16.328 INFO [https-jsse-nio-8444-exec-6]
>> 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. HTTP method names must be tokens
>>      at
>> org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:414)
>>
>>      at
>> org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:294)
>>      at
>> org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
>>
>>      at
>> org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:834)
>>
>>      at
>> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1415)
>>
>>      at
>> org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
>>
>>      at
>> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
>>
>>      at
>> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
>>
>>      at
>> org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
>>
>>      at java.base/java.lang.Thread.run(Thread.java:834)
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>

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


Mime
View raw message