How to fix errors where a program cannot connect to the server.