G
G
Gregory2016-09-08 10:18:31
Java
Gregory, 2016-09-08 10:18:31

Tomcat 9 WebSocket. How to connect to the server?

The bottom line:
There are examples of chat and echo.
If you run it on the server, everything is fine, but when you try to connect remotely, it gives a 1006 (101) error.
What could be the problem?
Ordinary servlets work flawlessly.
In the chat example, you can see that it is trying to connect but immediately disconnects.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Cheremisin, 2016-09-08
@leahch

Most likely, the tomcat sticks out only on localhost. Look in the server.xml
settings of the tomcat and change from 127.0.0.1 to 0.0.0.0 lines with Connector
<Connector address="127.0.0.1" ......

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question