There is a VPS with a running Java application that is tied to port 4444. There is a client program that connects to port 4444 of the server (by its IP), but there is no result - no connection is made.
VPS on Ubuntu 14.04. What can be wrong? Maybe I need some more VPS ports to take into account in the client application?
Socket socket = new Socket(ip, 4444); //строка в клиенте, отвечающая за подключение ServerSocket srvSocket = new ServerSocket(4444); //строка в приложении на сервере On localhost, everything works fine.
serverSocket = new ServerSocket(PORT_NUMBER);on the serverserverSocket = new ServerSocket(PORT_NUMBER);followed bySocket clientSocket = serverSocket.accept();, and on one of the clientssocket = new Socket(serverIP, serverPort);and it still works fine. Especially if your code on the localhost-e works properly, then the matter is unlikely in the code. Perhaps the server is standing and blocking incoming firewall connections? - Regent