Question

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

Posted February 18, 2018 35.3k views
DebianNetworking

When I try to connect to my vncserver it gives me the Error:

Error in TightVNC Viewer: No connection could be made because the target machine actively refused it.

I initially solved this by adding ::5901 to the end of my ip address.. After being unable to open the browser trouble i “rebooted” server and since then I have not able to connect to the vnc server.

I can see the server is running when i type vncserver -list and have tried killing that server and starting a new one. How do I know what port my server is running on or how can I change it?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

To find out what port it’s listening on, and just as importantly which network interface, run:

sudo netstat -plutn

If it’s running on 127.0.0.1 or ::1, it won’t be accessible outside of the Droplet.

Submit an Answer