Linux Process Troubleshooting

Rajesh
3 min readApr 3, 2023

KODEKLOUD-ENGINEER TASK

Scenario:

The production support team of xFusionCorp Industries has deployed some of the latest monitoring tools to keep an eye on every service, application, etc. running on the systems. One of the monitoring systems reported about Apache service unavailability on one of the app servers in Stratos DC.



Identify the faulty app host and fix the issue. Make sure Apache service is up and running on all app hosts. They might not hosted any code yet on these servers so you need not to worry about if Apache isn't serving any pages or not, just make sure service is up and running. Also, make sure Apache is running on port 5001 on all app servers.

First, I am going to check which app servers are working and which are not working.

  • From the above image we can see app server 1 is not working or not properly configured. Now, Logging in to the app server 1 and troubleshoot the problem.

Troubleshooting the app server 1

  • First, checking httpd is active or not.
  • From the above command, we can see httpd is not active . So, Enabling the httpd in next step.
  • From the above image, systemctl cannot start httpd . By using journalctl, we can see there is some problem with pid.
  • From httpd.conf file, making sure httpd configured to listen on port 5001.
  • Further analyse the listening port 5001, which is used by another process or not by using netstat.
  • We can see some process is using the port 5001.
  • Kill the process through pid using kill command with signal 9.
  • Finally, Successfully troubleshooted the problem in the app server 1. Making sure httpd run on restart by using systemctl enable command.
  • Now testing the app server 1 is working by calling from jumphost.

Thank you for seeing the article!!! Have a nice day !!!

--

--