用websocket写聊天室时遇到的问题

java.lang.IllegalArgumentException: Invalid character found in method name [0x160x030x030x000x880x010x000x000x840x030x03a.0xb0+0xbc[0xc3Qk0x1a0xcfH0x930xb00xdd0xef30x8b80x9c[0x810x84#0x950xa7O0xd2 0 x d 10 x d 2 j 0 x 000 x 000 x 160 x c 00 x 140 x 0050 x c 00 x 130 x 00 / 0 x c 0 , 0 x c 0 + 0 x c 000 x 000 x 9 d 0 x c 0 / 0 x 000 x 9 c 0 x 000 x 0 a 0 x 010 x 000 x 00 E 0 x 000 x 0 a 0 x 000 x 160 x 000 x 140 x 000 x 170 x 000 x 180 x 000 x 190 x 000 x 090 x 000 x 0 a 0 x 000 x 0 b 0 x 000 x 0 c 0 x 000 x 0 d 0 x 000 x 0 e 0 x 000 x 160 x 000 x 0 b 0 x 000 x 020 x 010 x 000 x 000 x 0 d 0 x 000 x 1 c 0 x 000 x 1 a 0 x 060 x 030 x 060 x 010 x 050 x 030 x 050 x 010 x 040 x 030 x 040 x 010 x 040 x 020 x 030 x 030 x 030 x 010 x 030 x 020 x 020 x 030 x 020 x 010 x 020 x 020 x f f 0 x 010 x 000 x 010 x 00... ] . H T T P m e t h o d n a m e s m u s t b e t o k e n s a t o r g . a p a c h e . c o y o t e . h t t p 11. H t t p 11 I n p u t B u f f e r . p a r s e R e q u e s t L i n e ( H t t p 11 I n p u t B u f f e r . j a v a : 419 )   [ t o m c a t − e m b e d − c o r e − 9.0.50. j a r ! / : n a ] a t o r g . a p a c h e . c o y o t e . h t t p 11. H t t p 11 P r o c e s s o r . s e r v i c e ( H t t p 11 P r o c e s s o r . j a v a : 269 )   [ t o m c a t − e m b e d − c o r e − 9.0.50. j a r ! / : n a ] a t o r g . a p a c h e . c o y o t e . A b s t r a c t P r o c e s s o r L i g h t . p r o c e s s ( A b s t r a c t P r o c e s s o r L i g h t . j a v a : 65 ) [ t o m c a t − e m b e d − c o r e − 9.0.50. j a r ! / : n a ] a t o r g . a p a c h e . c o y o t e . A b s t r a c t P r o t o c o l 0xd10xd2j0x000x000x160xc00x140x0050xc00x130x00/0xc0,0xc0+0xc000x000x9d0xc0/0x000x9c0x000x0a0x010x000x00E0x000x0a0x000x160x000x140x000x170x000x180x000x190x000x090x000x0a0x000x0b0x000x0c0x000x0d0x000x0e0x000x160x000x0b0x000x020x010x000x000x0d0x000x1c0x000x1a0x060x030x060x010x050x030x050x010x040x030x040x010x040x020x030x030x030x010x030x020x020x030x020x010x020x020xff0x010x000x010x00...]. HTTP method names must be tokens at org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:419) ~[tomcat-embed-core-9.0.50.jar!/:na] at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:269) ~[tomcat-embed-core-9.0.50.jar!/:na] at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) [tomcat-embed-core-9.0.50.jar!/:na] at org.apache.coyote.AbstractProtocol 0xd10xd2j0x000x000x160xc00x140x0050xc00x130x00/0xc0,0xc0+0xc000x000x9d0xc0/0x000x9c0x000x0a0x010x000x00E0x000x0a0x000x160x000x140x000x170x000x180x000x190x000x090x000x0a0x000x0b0x000x0c0x000x0d0x000x0e0x000x160x000x0b0x000x020x010x000x000x0d0x000x1c0x000x1a0x060x030x060x010x050x030x050x010x040x030x040x010x040x020x030x030x030x010x030x020x020x030x020x010x020x020xff0x010x000x010x00...].HTTPmethodnamesmustbetokensatorg.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:419) [tomcatembedcore9.0.50.jar!/:na]atorg.apache.coyote.http11.Http11Processor.service(Http11Processor.java:269) [tomcatembedcore9.0.50.jar!/:na]atorg.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)[tomcatembedcore9.0.50.jar!/:na]atorg.apache.coyote.AbstractProtocolConnectionHandler.process(AbstractProtocol.java:893) [tomcat-embed-core-9.0.50.jar!/:na]
at org.apache.tomcat.util.net.NioEndpoint S o c k e t P r o c e s s o r . d o R u n ( N i o E n d p o i n t . j a v a : 1723 ) [ t o m c a t − e m b e d − c o r e − 9.0.50. j a r ! / : n a ] a t o r g . a p a c h e . t o m c a t . u t i l . n e t . S o c k e t P r o c e s s o r B a s e . r u n ( S o c k e t P r o c e s s o r B a s e . j a v a : 49 ) [ t o m c a t − e m b e d − c o r e − 9.0.50. j a r ! / : n a ] a t j a v a . u t i l . c o n c u r r e n t . T h r e a d P o o l E x e c u t o r . r u n W o r k e r ( T h r e a d P o o l E x e c u t o r . j a v a : 1149 ) [ n a : 1.8. 0 3 02 ] a t j a v a . u t i l . c o n c u r r e n t . T h r e a d P o o l E x e c u t o r SocketProcessor.doRun(NioEndpoint.java:1723) [tomcat-embed-core-9.0.50.jar!/:na] at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-9.0.50.jar!/:na] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_302] at java.util.concurrent.ThreadPoolExecutor SocketProcessor.doRun(NioEndpoint.java:1723)[tomcatembedcore9.0.50.jar!/:na]atorg.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)[tomcatembedcore9.0.50.jar!/:na]atjava.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)[na:1.8.0302]atjava.util.concurrent.ThreadPoolExecutorWorker.run(ThreadPoolExecutor.java:624) [na:1.8.0_302]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-9.0.50.jar!/:na]
at java.lang.Thread.run(Thread.java:748) [na:1.8.0_302]

在这里插入图片描述
原因是websocket的host的ip地址后面没跟端口号

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值