Test connectivity for the web service: Difference between revisions

Jump to navigation Jump to search
m
mNo edit summary
Tags: Mobile edit Mobile web edit
Line 45: Line 45:
* More on [[Network problem]]
* More on [[Network problem]]


=== Is the web service alive ===
=== Check if web service has started successfully? ===
* Apache {{kbd | key = /etc/init.d/httpd status}} on CentOS7 <ref>[https://www.e2enetworks.com/help/knowledge-base/how-to-check-running-status-of-lamp-stack/ How to check running status of LAMP stack | E2E Networks Knowledgebase]</ref>
* Apache {{kbd | key = /etc/init.d/httpd status}} on CentOS7 <ref>[https://www.e2enetworks.com/help/knowledge-base/how-to-check-running-status-of-lamp-stack/ How to check running status of LAMP stack | E2E Networks Knowledgebase]</ref>
* nginx {{kbd | key = sudo service nginx status}} on CentOS7  
* nginx {{kbd | key = sudo service nginx status}} on CentOS7  
* Docker container {{kbd | key = docker ps}} to check if the container is running & expose the port<ref>[https://docs.docker.com/engine/reference/commandline/ps/ docker ps | Docker Documentation]</ref>
* Docker container {{kbd | key = docker ps}} to check if the container is running & expose the port<ref>[https://docs.docker.com/engine/reference/commandline/ps/ docker ps | Docker Documentation]</ref>
=== Check if MySQL has started successfully? ===
* {{kbd | key = lsof -i:3306}} on {{Mac}} or {{Linux}}
The command lsof -i:3306 is used in Unix-like operating systems to list open files and the processes that opened them. Let's break down the command:
lsof: This stands for "List Open Files". It's a command-line utility that displays information about files opened by processes. In Unix and Linux, everything is treated as a file (including hardware devices, sockets, and directories), so lsof is a powerful tool for system administrators to monitor and troubleshoot system behavior.
-i: This option tells lsof to show only network files. In Unix and Linux, network connections are treated as files. The -i option can be used to filter connections based on the Internet address or network protocol.
:3306: This specifies the port number. Port 3306 is commonly used by MySQL, a popular database management system. By including :3306, you are asking lsof to list all network files (which includes socket connections) that are associated with port 3306.


=== Check if a port was occupied by other process? ===
=== Check if a port was occupied by other process? ===
Anonymous user

Navigation menu