N
N
Nodar2015-10-19 13:38:26
System administration
Nodar, 2015-10-19 13:38:26

How to find out why a port is not available on the server?

Colleagues, hello.
Question from a system administration noob - I have a virtual machine on Digital Ocean, I run a regular web application, it starts without errors and works, I checked it locally via curl. I knock on it directly on ip:port - and nothing. The browser says that the service is not available. I start on other port, application becomes available from everywhere. How can you find out what is wrong with this port?
Ports: 6000 - not accessible from the browser, but can be reached via curl
4000 - works fine
Maybe port 6000 is not as simple as I think?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
alexxandr, 2015-10-19
@alexxandr

ssh to the virtual machine and lsof, also look at the rules in iptables

P
Puma Thailand, 2015-10-19
@opium

look at the firewall
iptables -vxnL
Well, check that the application started on the right port and the right ip
netstat -apn|grep 6000

A
Alexey Ostin, 2015-10-19
@nitso

If you can reach curl from the same machine, but you can't reach it with a browser - the server has nothing to do with it, you need to look for the problem in the browser. Try another browser, check proxy settings, antivirus, etc.
If nothing can be reached, the problem is in the server (or in intermediate links). Try to log in from another machine, check that the service is listening to the correct IP address (not just localhost) and everything described by previous commentators

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question