jetty - Atmosphere.js 501 Websocket protocol not supported -
on atmosphere 2.2.0 running on jetty python websocket-client-0.20.0 client, sometimes, although rarely, situation our logs fill following:
12:18:01.105 warn org.atmosphere.websocket.websocket: unable write 501 websocket protocol not supported 12:18:01.106 warn o.a.w.protocol.simplehttpprotocol: status code higher or equal 400. unable deliver websocket messages installed component. status 501 message websocket protocol not supported
this spamming happens fast, @ 5ms intervals, , if occurs in production there no other way take system down. need avoid this.
it may issue in our client, i'm wondering if there way recognize these kinds of errors @ server back-end , close connection, if can't come fix root cause?
... edit, 6 months later: issue seems arise earlier jetty exception:
11:05:54.363 error o.a.container.jetty9websockethandler: {} org.eclipse.jetty.websocket.api.websockettimeoutexception: timeout on read @ org.eclipse.jetty.websocket.common.io.abstractwebsocketconnection.onreadtimeout(abstractwebsocketconnection.java:521) [devi ce-interaction-service-1.0.jar:na] @ org.eclipse.jetty.io.abstractconnection.onfillinterestedfailed(abstractconnection.java:258) [device-interaction-service-1.0 .jar:na] @ org.eclipse.jetty.websocket.common.io.abstractwebsocketconnection.onfillinterestedfailed(abstractwebsocketconnection.java:4 97) [device-interaction-service-1.0.jar:na] @ org.eclipse.jetty.io.abstractconnection$readcallback$1.run(abstractconnection.java:420) [device-interaction-service-1.0.jar :na] @ org.eclipse.jetty.util.thread.queuedthreadpool.runjob(queuedthreadpool.java:601) [device-interaction-service-1.0.jar:na] @ org.eclipse.jetty.util.thread.queuedthreadpool$3.run(queuedthreadpool.java:532) [device-interaction-service-1.0.jar:na] @ java.lang.thread.run(thread.java:745) [na:1.8.0_51] 11:05:54.365 debug o.a.w.defaultwebsocketprocessor: unable complete 2d48f7ce-6150-42c2-b815-93acf94bdb93 11:05:55.156 warn org.atmosphere.websocket.websocket: unable write 501 websocket protocol not supported 11:05:55.157 warn o.a.w.protocol.simplehttpprotocol: status code higher or equal 400. unable deliver websocket messages installed component. status 501 message websocket protocol not supported 11:05:55.201 warn org.atmosphere.websocket.websocket: unable write 501 websocket protocol not supported 11:05:55.202 warn o.a.w.protocol.simplehttpprotocol: status code higher or equal 400. unable deliver websocket messages installed component. status 501 message websocket protocol not supported 11:05:55.203 warn org.atmosphere.websocket.websocket: unable write 501 websocket protocol not supported ...
it seem me connection left hanging, , no @disconnect method gets called on @managedservice.
i wonder how intercept , shut down connection, forcing client reconnect.
write own websocketprotocol or extends simplehttpprotocol#onerror https://github.com/atmosphere/atmosphere/wiki/writing-websocket-sub-protocol
Comments
Post a Comment