Network troubleshoot
What to check if 2 servers can not communicate on ports.
How to check network connectivity between 2 servers:
open a port on one server:
- CODE
nc -l PORT
from the second server test the connectivity:
check if there is direct connection on tcp:
CODEnc -zv IP PORT
check if there is any proxy setup (tcp might work but http or https will not work).
CODEwget -T 5 -t 1 --spider http://${to}:${port} wget -T 5 -t 1 --spider https://${to}:${port}
please also try to run, without installing it, try to install a package; if there are errors, then it needs to be fixed, based on the case…
CODEyum install zip
What can go wrong:
there is a network issues - needs to be fixed by client
there is routing issues - needs to be fixed by client
there is firewall on host, so please stop/disable:
- CODE
systemctl stop firewalld; systemctl disable firewalld
there are proxies on the servers, so local http and https traffic is routed:
http_proxy setup for the system: /etc/environment → please comment it.
http_proxy setup for repos: /etc/yum.conf → please comment it
http_proxy at user level: /etc/profile.d/proxy.conf → please comment it
you can do a general search: grep -ri http_proxy /etc/ → there are many places where on one env, this parameter can be set (also check in /home for http_proxy)