This is a sequence of TCP tests
Check the network card configuration:
Linux:
ifconfig or nmcli
Windows:
ipconfig/all
Do the following ping tests:
Check the hostname where you are on, using ping, nslookup:
Note: When you do a ping test without using -w, it uses the default value which is 4000 ms.
This ping test checks for Network latency, also network disconnection
Finally verify the following settings:
Other port connectivity checks:
On Linux run:
netstat -an
netstat -an │ grep 5985
or
nc -z -w 1 monitoredhost 5985; echo $?
Note:This uses netcat available on most lLnux versions. Assuming using the default HTTP based WinRM port 5985, if the above returns 0, you know you are getting through to a listening WinRM connectiont on the other side.
or
netstat -tlnp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 25934/mysqld
tcp6 0 0 :::8080 :::* LISTEN 1369/Foglight 5.9.4
tcp6 0 0 :::8443 :::* LISTEN 1369/Foglight 5.9.4
tcp6 0 0 :::45441 :::* LISTEN 1668/FoglightAgentM
Example of success:
nc -zv servername.com 5985
Connection to hostname.com port [tcp/http] succeeded!
Example for failure:
nc -zv sername.com 5985
nc: connect to hostname.com port 5985 (tcp) failed: Connection refused
or
Telnet monitoredhost 5985
On Windows run:
netstat -an
netstat -an | findstr ":8080"
netstat -an | find "TCP" | findstr ":8080"
Note: when applying netstat -an, check the TCP port that you are looking for, where it says LISTENING, and do netstat -an | findstr ":xxxx" , then see how it displays information.
Example:
C:\Users\user> netstat -an | findstr ":8080"
TCP 0.0.0.0:8080 0.0.0.0:0 LISTENING
TCP 192.168.0.1:65300 192.168.0.2:8080 ESTABLISHED
TCP [::]:8080 [::]:0 LISTENING
If it does not display anything it is because it is not listening.
Note: Do the netstat test described above on both the Agent Manager and the Monitored Host
or
Telnet monitoredhost 8080
Check which application is running on specific port:
Check which process or application uses a particular port on Windows:
Syntax
netstat -aon | findstr YourPortnumber
How to find which process or application name is used based on the process id:
Syntax
tasklist | findstr YourPid
Examples:
C:\>netstat -aon | findstr 8080
TCP 192.168.0.1:65529 192.168.0.2:8080 ESTABLISHED 2832
C:\>tasklist | findstr /i 2832
chrome.exe 2832 Console 2 27,404 K
Note: In these examples ports 5985 and 8080 were used but you can use any other desired port for testing.
Note: Some manual entry when “DNS” is not working at all can be added on Windows(host file) and Linux(hosts file) to fix the issue, but this is not a solution for a Domain “DNS” issue.
Windows path
Windows\System32\drivers\etc\hosts
Linux path
/etc/hosts
© 2024 Quest Software Inc. ALL RIGHTS RESERVED. 使用条款 隐私 Cookie Preference Center