Remote-server-timeout exception when I try to connect to the server

When trying to connect to the openfire server through the following code:

Connection connection = new XMPPConnection("https://192.168.0.101:5222");
connection.connect();

I get an exception that states:

https://192.168.0.101:5222:5222 Exception: Could not connect 
to https://192.168.0.101:5222:5222.; : remote-server-timeout(504)

What could be the reason for this?

Note . I enabled firefire firefire FireFlash. I also tried to remove the firewall, but the same result. The server is my own machine. The same computer on which I am trying to run the program.

0
source share
2 answers

you can use

Connection connection = new XMPPConnection("192.168.0.101");
connection.connect();

or if you want to specify a port

ConnectionConfiguration config = new ConnectionConfiguration("192.168.0.101", 5222);
Connection connection = new XMPPConnection(config);   
connection.connect();

or similar, by default for port 5222

ConnectionConfiguration config = new ConnectionConfiguration("192.168.0.101");
Connection connection = new XMPPConnection(config);
connection.connect();
+2
source

try the following:

Connection connection = new XMPPConnection("localhost:5222");
connection.connect();
0
source

Source: https://habr.com/ru/post/1749633/


All Articles