Are you using port 5222,
May be you can change the port to 5223
If you are using host name, try changing it to IP address
Check the port is visible or not
You can use RS232 terminal, serial port terminal, udp terminal,tcp/ip client server - Hercules
For checking port is open or not