The “Connection Refused” error occurs when a server refuses to establish a connection with a client. This can happen for a variety of reasons:
The server is not running.
The server is overloaded and cannot accept new connections.
The client is trying to connect to the wrong port.
The client’s IP address is blocked by the server.