Talk to the NOC, IST hours — +91 75994 50220 support@bigdomainhost.com
Guide

Couldn't open connection to server: fixes for telnet, FTP, MySQL, Minecraft and Tally

The same failure shows up as "could not open connection to the host" in telnet, "could not connect to server" in FileZilla and PostgreSQL, and error 2003 in MySQL. Here is how to test the port and fix it in each program.

Short answer: "Couldn't open connection to server" means your computer could not open a TCP connection to that address and port: nothing is listening, a firewall blocks it, or the host or port is wrong. Test the port with Test-NetConnection host -Port 3306 on Windows or nc -zv host 3306 on Linux, then check the service and firewall.

What "couldn't open connection to server" means

"Couldn't open connection to server" and "could not connect to server" mean your computer never completed a TCP connection to the address and port it tried. The program has not reached the login stage, so your password is not the problem. One of three things is wrong: nothing is listening on that port, a firewall is in the way, or the host name or port is wrong.

The wording varies by program, but the underlying error is usually one of three:

Underlying errorCodeWhat it meansLook at first
Connection refused111 on Linux (ECONNREFUSED), 10061 on Windows (WSAECONNREFUSED)The server was reached, but nothing accepted the connection on that portIs the service running, and on that port and address?
Connection timed out110 on Linux (ETIMEDOUT), 10060 on Windows (WSAETIMEDOUT)No reply at all: packets were dropped on the wayFirewalls, the wrong IP, or the server being down
Host not foundVaries by programThe name did not resolve to an IP addressDNS and spelling of the host name

Microsoft's Winsock reference explains that a refusal "usually results from trying to connect to a service that is inactive on the foreign host". PostgreSQL's documentation makes the same point: "Connection refused" does not mean the server received your request and turned it down. In a web browser these errors appear as ERR_CONNECTION_REFUSED and ERR_CONNECTION_TIMED_OUT. A connection that opens and is then cut off is a different problem, covered in connection reset.

The error message for each app, in one table

ProgramTypical messageDefault portUsual cause
Telnet on WindowsCould not open connection to the host, on port 23: Connect failed23, or the port you typeNothing listening, or a firewall
Telnet on Linuxtelnet: Unable to connect to remote host: Connection refused23, or the port you typeNothing listening on that port
FileZilla (FTP)Error: Could not connect to server, often after Connection timed out after 20 seconds of inactivity21 (FTP), 22 (SFTP)Wrong protocol or port, or a firewall
MySQL and MariaDBERROR 2003 (HY000): Can't connect to MySQL server on '...' (111)3306Server only listening on 127.0.0.1, or the port is closed
PostgreSQLcould not connect to server: Connection refused (older) or connection to server at "..." failed (newer)5432listen_addresses or the firewall
Minecraft JavaFailed to connect to the server with a "Connection refused" or "timed out" lineTCP 25565Server stopped, wrong port, or firewall
Minecraft BedrockA connection error (wording varies by device)UDP 19132UDP port not open
TallyPrimeUnable to access the configured Tally Gateway ServerSet in TallyPrimeGateway Server not running on the network
SSHssh: connect to host ... port 22: Connection refused22See our SSH connection refused guide

Step 1: test the port from your own computer

First find out whether the port answers at all. This tells you whether to look at the network or the application.

Windows (PowerShell):

Test-NetConnection db.example.in -Port 3306

Look at the last line. TcpTestSucceeded : True means the port is open and the problem is in the application, such as the username, password or database settings. False means the connection itself fails. Add -InformationLevel Quiet to get a plain True or False.

Linux and macOS:

nc -zv -w 5 db.example.in 3306

In the OpenBSD netcat that Ubuntu ships, -z only checks whether something is listening, -v prints the result and -w 5 gives up after 5 seconds. "succeeded" means the port is open. "Connection refused" comes back at once. A wait followed by a timeout means packets are being dropped.

If the host name may be stale, compare nslookup db.example.in with the server's real IP; a stale answer is fixed by clearing the DNS cache.

Step 2: check that the service is listening on the server

On the server, check whether the program is listening, and on which address.

Linux:

sudo ss -tlnp
sudo ss -ulnp    # UDP, for Minecraft Bedrock

Here -t shows TCP sockets, -u UDP, -l only listening ones, -n numeric ports and -p the process. The Local Address column matters most. 127.0.0.1:3306 accepts connections only from the server itself. 0.0.0.0:3306 or *:3306 accepts them on every interface. If the port is missing, start the service, for example with sudo systemctl status mysql and then start.

Windows Server:

netstat -ano | findstr :3306

Here -a includes listening ports, -n keeps them numeric and -o adds the process ID. A LISTENING line means the program is up.

Step 3: open the firewall, and only to who needs it

If the service is listening but Step 1 still fails, a firewall is blocking it, either on the server or in your provider's network.

# Ubuntu and Debian (ufw)
sudo ufw allow 25565/tcp
sudo ufw allow proto tcp from 203.0.113.5 to any port 3306

# AlmaLinux and Rocky (firewalld)
sudo firewall-cmd --permanent --add-port=25565/tcp
sudo firewall-cmd --reload

# Windows Server (PowerShell as administrator)
New-NetFirewallRule -DisplayName "MySQL from office" -Direction Inbound -Protocol TCP -LocalPort 3306 -RemoteAddress 203.0.113.5 -Action Allow

Ubuntu's ufw manual notes that deny drops traffic silently while reject tells the sender, which is why one blocked port times out and another is refused. Game ports can be open to everyone; open database and admin ports only to fixed addresses, as in the second and last lines.

Telnet: "Could not open connection to the host"

Most people see this while using Telnet to test a port, not to log in. Microsoft's documentation for the message lists two causes: the server is listening on a different port, or the service is not running at all.

  • Give the port. telnet example.in tries port 23. To test a mail or web port, type it after the host: telnet example.in 587.
  • "'telnet' is not recognized as an internal or external command": the client is not installed. Microsoft's telnet reference notes that the client must be installed before the command works. Install it from an elevated prompt with dism /online /Enable-Feature /FeatureName:TelnetClient, or use Test-NetConnection from Step 1, which needs no install.
  • Port 25: "Could not open connection to the host, on port 25" from a server or a home connection usually means outbound port 25 is blocked by the network you are on. That is normal on most hosts and ISPs. Read why port 25 is closed and send mail on 587 instead; the ports are listed in email port numbers.

FTP: "Could not connect to server" in FileZilla

FileZilla writes the attempt in its message log, and the last line is Error: Could not connect to server. The lines above it give the reason:

  • ECONNREFUSED: nothing accepts connections on that port. The usual cause is a protocol and port mismatch: SFTP sent to port 21, or FTP sent to port 22. Set the protocol explicitly in Site Manager instead of typing a bare host name.
  • Connection timed out after 20 seconds of inactivity, before login: a firewall is dropping the control connection, or the host name points at the wrong server.
  • Login works, then the directory listing times out: FTP uses a second connection for data. FileZilla's network configuration guide recommends passive mode. If the client is already passive, the server's passive port range is closed in its firewall.

Our guide to FTP vs SFTP vs FTPS covers the ports and the cPanel settings, and cPanel port numbers lists the rest.

MySQL: "Can't connect to MySQL server" (error 2003 and 2002)

MySQL's manual separates two errors. Error 2002 means the client could not reach a local server through its Unix socket: mysqld is not running, or the client is looking for the socket file in the wrong place. Error 2003 means a network connection was refused. The number in brackets is the operating system's code: (111) on Linux, (10061) on Windows.

For error 2003, the manual lists these server settings:

  • skip_networking turned on: the server accepts no TCP/IP connections at all.
  • bind_address = 127.0.0.1: the server listens only on the loopback interface, so remote clients are refused.
  • port: the client must use the same port, 3306 by default.
  • A firewall blocking 3306.
# on the server
sudo ss -tlnp | grep 3306
mysqladmin -h 127.0.0.1 --port=3306 version

Do not open 3306 to the whole internet just to make the error go away. Allow only the addresses that need it, or keep MySQL on 127.0.0.1 and connect through an SSH tunnel. If WordPress shows "Error establishing a database connection", follow that guide, which also covers wrong credentials.

PostgreSQL reports the same failure as could not connect to server: Connection refused in older versions and connection to server at "..." failed: Connection refused in current ones, followed by "Is the server running on that host and accepting TCP/IP connections?". The documented common cause is listen_addresses not allowing remote TCP connections. Change it, allow the client in pg_hba.conf, and restart PostgreSQL.

Minecraft: can't connect to the server

Java Edition shows "Failed to connect to the server" with a longer line underneath. "Connection refused" means you reached the machine but the game server is not listening on that port. "Connection timed out" means the packets never got an answer.

  • Port and protocol: the Minecraft Wiki lists Java Edition's server-port as TCP 25565 by default. Bedrock Dedicated Server uses UDP, with 19132 as the default IPv4 port. Opening the TCP port does nothing for Bedrock players.
  • Address: if the server runs on another port, players must type it as ip:port. Leave server-ip in server.properties empty, as the wiki recommends, so the server listens on every interface.
  • Is it running? Check the server console or sudo ss -tlnp | grep 25565.
  • Firewall: open the port in ufw and in your provider's firewall. A server on a home PC also needs port forwarding on the router, which some connections behind carrier-grade NAT cannot do.

nc -zv -w 5 your-ip 25565 tests a Java server from another machine. UDP has no handshake, so test a Bedrock server by joining from a phone on mobile data. The full setup is in how to make a Minecraft server, and sizing is in Minecraft server RAM.

Tally: could not connect to the server or Tally Gateway

TallyPrime has several connection paths, and each fails with its own message:

  • "Unable to access the configured Tally Gateway Server": TallyHelp says this appears when the Tally Gateway Server is not running on the network, or cannot connect to TallyPrime. Its fix is to reactivate the licence, or choose Use License from Network on the Start-up or Manage License screen.
  • "Activation/reactivation failed due to Gateway Server installation failure": for this separate error, TallyHelp says to make sure TallyPrime and TallyPrime Server have their inbound and outbound rules enabled in Windows Defender Firewall.
  • Integrations, Excel or ODBC cannot connect: TallyPrime listens for these on a port you configure, 9000 by default. If another program already uses that port, TallyHelp says to set a different one. TallyHelp shows it under Help > About (its ODBC page opens Help with Alt+F1), in the Client/Server and ODBC Services section.
  • Data synchronisation fails: the server and port are set under Alt+Z (Exchange) > Configure > Client/Server Configuration, and the connection log is under F1 (Help) > Troubleshooting > Event Log.
  • Remote users cannot reach a shared data folder: never expose Windows file sharing or Remote Desktop to the internet. Our guides on Tally multi user setup and Tally remote access cover the safer options.

Connection problems on a Bigdomainhost server

Every Bigdomainhost KVM VPS in Mumbai or Delhi NCR comes with full root access and a dedicated IPv4 address, so you control which services listen and which ports are open. Game servers and Tally on Cloud are set up on request: enquire about an application server or about Tally on Cloud. If a connection still fails, WhatsApp us at +91 75994 50220 at any time with the error and the port test output, or call in IST working hours.

This guide was written by the Bigdomainhost team with AI assistance; messages, commands and options were checked against the linked sources on 25 November 2026.

Sources (checked )

Answers

Frequently asked questions

Still unsure? Call +91 75994 50220 or write to support@bigdomainhost.com — a human replies in IST hours.

What does "couldn't open connection to server" mean?

It means your computer could not open a TCP connection to that address and port. Nothing is listening on the port, a firewall is blocking it, or the host name or port is wrong. It happens before any login, so your password is not the cause.

How do I fix "Could not open connection to the host, on port 23: Connect failed"?

Type the port you actually want after the host, for example telnet example.in 587, because telnet uses port 23 by default. If the port is right, the service is not running or a firewall blocks it. On Windows you can test the same port with Test-NetConnection example.in -Port 587.

Why does MySQL say Can't connect to MySQL server on port 3306?

Error 2003 means the network connection was refused. MySQL's manual lists skip_networking being on, bind_address set to 127.0.0.1, a different port, or a firewall. Allow only the addresses that need 3306, or use an SSH tunnel instead of opening it to everyone.

Why can't my friends connect to my Minecraft server?

Check that the server is running, that Java players use TCP 25565 (or the port you set, typed as ip:port) and Bedrock players UDP 19132, and that the port is open in the server's firewall and your provider's firewall. A home PC also needs port forwarding on the router.

What does Unable to access the configured Tally Gateway Server mean?

TallyHelp says the Tally Gateway Server is not running on the network or cannot connect to TallyPrime. Its fix is to reactivate the licence, or choose Use License from Network on the Start-up or Manage License screen so TallyPrime uses the licence served on your network.

Support that picks up the phone.

In IST hours, in Hindi or English, and WhatsApp replies fastest at any time. Sales, migration and emergencies all reach the same engineers. No offshore queue, no 48-hour first reply.

Need cPanel or WHM with the ports already sorted?

Web & cPanel hosting comes with cPanel ready to log in to, reseller hosting adds white-label WHM, and a KVM VPS can have cPanel & WHM pre-installed. Call +91 75994 50220 or email support@bigdomainhost.com.