You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Robert McNamara (JIRA)" <ji...@apache.org> on 2013/02/26 15:36:12 UTC
[jira] [Updated] (VYSPER-340) Problems Performing WebSocket
Handshake
[ https://issues.apache.org/jira/browse/VYSPER-340?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert McNamara updated VYSPER-340:
-----------------------------------
Description:
I’m having an issue performing a successful handshake. Weather running Vysper from the batch file or embedded in a simple Java Server (my own or one of the prepackaged examples), I get the same error condition upon attempting to connect from a JavaScript client (my own or one of the prepackaged examples). The error the returns is a HTTP 405 Response, reported in Chrome's console as “Unexpected response code: 405”.
CONFIGURATION OF STANDALONE SERVER:
‘spring-config.xml’ has the following additions:
<bean id="websocketEndpoint" class="org.apache.vysper.xmpp.extension.websockets.WebSocketEndpoint">
<property name="port" value="8080" />
<property name="contextPath" value="/ws" />
</bean>
And in the server constructor:
<ref bean="websocketEndpoint"/>
POSSIBLE START ERROR CONDITION:
The Server appears to start properly, only with the following possible problem reported (on both standalone and embedded servers):
org.eclipse.jetty.server.Server@2af081 STOPPED
+-SelectChannelConnector@0.0.0.0:8080
+-qtp29384701{8<=6<=8/254,0}
+-ServletContextHandler@32efa7@32efa7/ws,null started
+-{}
+-{}
+-SessionHandler@1fbfd6 started
+-ServletHandler@6b9c84 started
+-[/ws]=>org.apache.vysper.xmpp.extension.websockets.XmppWebSocketServlet-23860799{}
ATTEMPTING CONNECTION ERRORS:
When attempting to connect from the client the following is logged in both types of server instance:
17:04:02,137 | DEBUG | org.eclipse.jetty.util.log | REQUEST /ws/ws on org.eclipse.jetty.server.nio.SelectChannelConnector$3@c3615b
17:04:02,137 | DEBUG | org.eclipse.jetty.util.log | sessionManager=org.eclipse.jetty.server.session.HashSessionManager@1767f84
17:04:02,137 | DEBUG | org.eclipse.jetty.util.log | session=null
17:04:02,137 | DEBUG | org.eclipse.jetty.util.log | servlet=org.apache.vysper.xmpp.extension.websockets.XmppWebSocketServlet-29347786
17:04:02,137 | DEBUG | org.eclipse.jetty.util.log | servlet holder=
17:04:02,137 | DEBUG | org.eclipse.jetty.util.log | chain=
17:04:02,137 | DEBUG | org.eclipse.jetty.util.log | RESPONSE /ws/ws 405
17:04:02,137 | DEBUG | org.eclipse.jetty.util.log | EOF
And to the Chrome console on the client side:
Unexpected response code: 405
Event {clipboardData: undefined, cancelBubble: false, returnValue: true, srcElement: WebSocket, defaultPrevented: false…}
CloseEvent {reason: "", code: 1006, wasClean: false, clipboardData: undefined, cancelBubble: false…}
Any suggestions on how to proceed?
Thanks, Rob
was:
I’m having an issue performing a successful handshake. Weather running Vysper from the batch file or embedded in a simple Java Server (my own or one of the prepackaged examples), I get the same error condition upon attempting to connect from a JavaScript client (my own or one of the prepackaged examples). The error the returns is a HTTP 405 Response, reported in Chrome's console as “Unexpected response code: 405”.
CONFIGURATION OF SERVER:
‘spring-config.xml’ has the following additions:
<bean id="websocketEndpoint" class="org.apache.vysper.xmpp.extension.websockets.WebSocketEndpoint">
<property name="port" value="8080" />
<property name="contextPath" value="/ws" />
</bean>
And in the server constructor:
<ref bean="websocketEndpoint"/>
(OR) CONFIGURATION OF EMBEDDED SERVER:
The embedded server, developed with Eclipse Juno and coded as per the example on the Vysper homepage (and as per the packaged examples):
org.eclipse.jetty.server.Server@1f8ec00 STOPPED
+-SelectChannelConnector@0.0.0.0:8080
+-qtp8256952{8<=6<=8/254,0}
+-HandlerCollection@148fb3f started
+-ResourceHandler@191ce2a started
+-ServletContextHandler@1f05ce9@1f05ce9/ws,null started
+-{}
+-{}
+-SessionHandler@11f25f3 started
+-ServletHandler@1f4899c started
+-[/ws]=>org.apache.vysper.xmpp.extension.websockets.XmppWebSocketServlet-29347786{}
POSSIBLE START ERROR CONDITION:
The Server appears to start properly, only with the following possible problem reported (on both standalone and embedded servers):
org.eclipse.jetty.server.Server@2af081 STOPPED
+-SelectChannelConnector@0.0.0.0:8080
+-qtp29384701{8<=6<=8/254,0}
+-ServletContextHandler@32efa7@32efa7/ws,null started
+-{}
+-{}
+-SessionHandler@1fbfd6 started
+-ServletHandler@6b9c84 started
+-[/ws]=>org.apache.vysper.xmpp.extension.websockets.XmppWebSocketServlet-23860799{}
ATTEMPTING CONNECTION ERRORS:
When attempting to connect from the client the following is logged in both types of server instance:
17:04:02,137 | DEBUG | org.eclipse.jetty.util.log | REQUEST /ws/ws on org.eclipse.jetty.server.nio.SelectChannelConnector$3@c3615b
17:04:02,137 | DEBUG | org.eclipse.jetty.util.log | sessionManager=org.eclipse.jetty.server.session.HashSessionManager@1767f84
17:04:02,137 | DEBUG | org.eclipse.jetty.util.log | session=null
17:04:02,137 | DEBUG | org.eclipse.jetty.util.log | servlet=org.apache.vysper.xmpp.extension.websockets.XmppWebSocketServlet-29347786
17:04:02,137 | DEBUG | org.eclipse.jetty.util.log | servlet holder=
17:04:02,137 | DEBUG | org.eclipse.jetty.util.log | chain=
17:04:02,137 | DEBUG | org.eclipse.jetty.util.log | RESPONSE /ws/ws 405
17:04:02,137 | DEBUG | org.eclipse.jetty.util.log | EOF
And to the Chrome console on the client side:
Unexpected response code: 405
Event {clipboardData: undefined, cancelBubble: false, returnValue: true, srcElement: WebSocket, defaultPrevented: false…}
CloseEvent {reason: "", code: 1006, wasClean: false, clipboardData: undefined, cancelBubble: false…}
Any suggestions on how to proceed?
Thanks, Rob
> Problems Performing WebSocket Handshake
> ---------------------------------------
>
> Key: VYSPER-340
> URL: https://issues.apache.org/jira/browse/VYSPER-340
> Project: VYSPER
> Issue Type: Question
> Components: extension
> Affects Versions: 0.7
> Environment: Windows Server 2008 R2
> Reporter: Robert McNamara
> Labels: javascript, websocket
>
> I’m having an issue performing a successful handshake. Weather running Vysper from the batch file or embedded in a simple Java Server (my own or one of the prepackaged examples), I get the same error condition upon attempting to connect from a JavaScript client (my own or one of the prepackaged examples). The error the returns is a HTTP 405 Response, reported in Chrome's console as “Unexpected response code: 405”.
> CONFIGURATION OF STANDALONE SERVER:
> ‘spring-config.xml’ has the following additions:
> <bean id="websocketEndpoint" class="org.apache.vysper.xmpp.extension.websockets.WebSocketEndpoint">
> <property name="port" value="8080" />
> <property name="contextPath" value="/ws" />
> </bean>
> And in the server constructor:
> <ref bean="websocketEndpoint"/>
> POSSIBLE START ERROR CONDITION:
> The Server appears to start properly, only with the following possible problem reported (on both standalone and embedded servers):
> org.eclipse.jetty.server.Server@2af081 STOPPED
> +-SelectChannelConnector@0.0.0.0:8080
> +-qtp29384701{8<=6<=8/254,0}
> +-ServletContextHandler@32efa7@32efa7/ws,null started
> +-{}
> +-{}
> +-SessionHandler@1fbfd6 started
> +-ServletHandler@6b9c84 started
> +-[/ws]=>org.apache.vysper.xmpp.extension.websockets.XmppWebSocketServlet-23860799{}
> ATTEMPTING CONNECTION ERRORS:
> When attempting to connect from the client the following is logged in both types of server instance:
> 17:04:02,137 | DEBUG | org.eclipse.jetty.util.log | REQUEST /ws/ws on org.eclipse.jetty.server.nio.SelectChannelConnector$3@c3615b
> 17:04:02,137 | DEBUG | org.eclipse.jetty.util.log | sessionManager=org.eclipse.jetty.server.session.HashSessionManager@1767f84
> 17:04:02,137 | DEBUG | org.eclipse.jetty.util.log | session=null
> 17:04:02,137 | DEBUG | org.eclipse.jetty.util.log | servlet=org.apache.vysper.xmpp.extension.websockets.XmppWebSocketServlet-29347786
> 17:04:02,137 | DEBUG | org.eclipse.jetty.util.log | servlet holder=
> 17:04:02,137 | DEBUG | org.eclipse.jetty.util.log | chain=
> 17:04:02,137 | DEBUG | org.eclipse.jetty.util.log | RESPONSE /ws/ws 405
> 17:04:02,137 | DEBUG | org.eclipse.jetty.util.log | EOF
> And to the Chrome console on the client side:
> Unexpected response code: 405
> Event {clipboardData: undefined, cancelBubble: false, returnValue: true, srcElement: WebSocket, defaultPrevented: false…}
> CloseEvent {reason: "", code: 1006, wasClean: false, clipboardData: undefined, cancelBubble: false…}
> Any suggestions on how to proceed?
> Thanks, Rob
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira