No connection could be made because the target machine actively refused it

Hi

I have the following setup Cluster in a Box (Ubuntu VM run inside Hyper V- Network Default switch).
From the Host(Win 10) im able to open VMIPAddres:8080 singlestore studio properly. When i try to connect to port 3306 using MySql.Data.MySqlClient; i get the following error “No connection could be made because the target machine actively refused it.”. I checked the port on the linuxVM, 3306 is open and listening.
I tried the same scenario using bridged network on VMBox and i get the same msg.
Any idea how can i overcome this issue?

Update
Using the memsql-admin tool changed the bindAddress, and now it works

1 Like

Thanks for letting us know you have a solution.

Generally, it happens that something is preventing a connection to the port or hostname. Either there is a firewall blocking the connection or the process that is hosting the service is not listening on that specific port. This may be because it is not running at all or because it is listening on a different port. So, no connection can be established.

Try running netstat -anb from the command line to see if there’s anything listening on the port you were entered. If you get nothing, try changing your port number and see if that works for you. In Windows operating systems, you can use the netstat services via the command line (cmd.exe) . On Linux you may need to do netstat -anp instead.

The target machine actively refused it occasionally , it is likely because the server has a full ‘backlog’ . Regardless of whether you can increase the server backlog , you do need retry logic in your client code, sometimes it cope with this issue; as even with a long backlog the server might be receiving lots of other requests on that port at that time.