I just tested this, the proxy is working fine, for some reason your site is closing the connection (probably because the URL that is sent over the connection does not match?).

If you open up Wireshark and look at what actually gets sent it looks like:

Browser text frame:
::json::{\"type\":\"init\",\"pageId\":\"f00f144d9ac5fd206e6304087148d345\",\"url\":\"http://localhost:8080/example/realtime/chat.html\"}

Browser text frame:
::json::{\"id\":\"chatMessage\",\"type\":\"change\",\"target\":\"chatMessage\",\"value\":\"test3\"}

Server close frame:
Close: Internal Server (1011)
Reason: RuntimeException

I would suggest that the "url" pointing to localhost is breaking something in your server side code, but the proxy is working 100% as expected.

Stuart



On Fri, Jun 3, 2016 at 5:01 PM, Hicks, Matt <matt@matthicks.com> wrote:
Hi Stuart, any updates on this?  Sorry to pester, I'm just hoping to use Undertow for a project I'm working on, but it's contingent on being able to proxy websockets.


On Wed, May 25, 2016 at 9:39 AM Stuart Douglas <sdouglas@redhat.com> wrote:
I am traveling and in meetings all week, I will look into it next week.

Stuart

On Wed, May 25, 2016 at 3:54 PM, Hicks, Matt <matt@matthicks.com> wrote:
Stuart, is there anything else you need from me to look into this further?

On Mon, May 23, 2016 at 11:29 AM Hicks, Matt <matt@matthicks.com> wrote:

Yes, I do. You can run the example code and it runs against hyperscala.org.  If you go to http://hyperscala.org/example/realtime/chat.html or http://localhost:8080/example/realtime/chat.html you can test the Chat example that uses WebSockets.  If you connect directly it works fine, if you connect via the Proxy it doesn't.


On Mon, May 23, 2016, 11:17 AM Stuart Douglas <sdouglas@redhat.com> wrote:
Do you have a reproduce I can run (complete with JS etc so I can see exactly what is going on)?

Stuart

On Mon, May 23, 2016 at 3:24 PM, Hicks, Matt <matt@matthicks.com> wrote:
Stuart, I created a ticket with all the information I know to provide:


I'm not positive which side is closing the connection, but looking at the JavaScript console it's showing the connection is being closed almost immediately after any message is sent from the browser to the server.

On Mon, May 23, 2016 at 2:48 AM Stuart Douglas <sdouglas@redhat.com> wrote:
When you say it does not work exactly what behaviour are you seeing? Does the connection get established? If it gets established and then fails which side drops the connection?

We have extensive tests for this in the test suite, as web socket tests are run through the proxy server, we need more info to see why it is not working for you.

Stuart

On Fri, May 20, 2016 at 1:18 AM, Hicks, Matt <matt@matthicks.com> wrote:
I did some additional testing with 2.0.0.Alpha1 and got the exact same results.  If there is some way to accomplish proper proxying with Undertow I'm not seeing it.

Should I file a bug report?


_______________________________________________
undertow-dev mailing list
undertow-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/undertow-dev