Linux Process Troubleshooting-start service issue

Hi ,
I have been asked to check apache in all 3 app servers,all should have running httpd.
While checking,i found in one app server it is inactive.
when i am trying to execute-
stsyemctl start httpd.service or service start httpd It is showing some error.

can anyone guide me what could be wrong.

Hi @bhkarma the command should be run via root user, that is why it’s throwing this error. Also you can run using sudo privileges.

Hi @akshayyw i have tried with root user.

i have tried same commands in my local,its working fine.

See if there are any corrections to be made in configuration file once.

@akshayyw can you guide files and location if possible?

Check the configuration file /etc/httpd/httpd.conf.

Starting service is not a solution as usually there is the reason why it is not started.
You have to check various things but most common are ports and permissions.
Install netstat tool (yum install -y net-tools) and check netstat -tulpen whats going on with ports.

@andrzej @akshayyw
Hi Andrzej, Akshay,
I am assigned this task.
I logged into stapp01, stapp02 and stapp03 servers.
I checked the status of Apache service on all three servers.
on app2:


on app3:

on app1:
The Apache service was not running here.



so now, the service is up and running on all 3 servers. only this much was required as part of this task?
As part of this task, are we required to enable to httpd service to start on boot? It is not mentioned in the question.

2 Likes

@Tej-Singh-Rana

Hi Tej,
Please check and advise.

thanks
Swaroop

They have not mentioned as such that the service should be persistent after boot, hence not required , did you submit the task or yet to do just confirming whether all steps are done right?

1 Like

Hello, swaroopcs88
Yeah, Everything is fine along with enable the service as well for better security. In next boot up we don’t know what will happened.

Hi Akshay,
I was confirming before as I did not want to miss any requirements of the task.
Thank you buddy. Completed the task successfully :slight_smile:
Swaroop

1 Like

Hi Tej,
I completed the task, I din’t enable the service to run on boot as it was not asked in question. Thanks for your help brother.
Swaroop

1 Like

Can you explain me why we killed sendmail process?
what’s the reason?

Hi @Mederbek , because the port needed for apache was being used by sendmail process , hence we need to free that port for apache httpd .

2 Likes