Apache Troubleshooting


Please i dont understand why i failed this task


everything seems ok but i still failed

You should resolve the error H00558 by adding IP address of the app server in ServerName section along with port in httpd.conf file.

Thanks,
Pradip

@nobleaxis Seems like you restarted Iptables service without saving the rule you added so that rule was washed out. Due to that Apache was not reachable from jump host at all which made it to fail.

After stop sendmail service which take the port on apache service, i found a way to flush iptables
“iptables -F” This command flushes i.e. clears the firewall rules that are setup inside the Linux system

@Inderpreet @player001…I did all the requred changes in conf file and httpd is running on all 3 app servers …also, changed the port for all the app servers as mentioned in the statement…After curl command, I am able to connect to only 1 and 2 app servers and not 3…Please suggest…

I will suggest you, first do curl in same app server then go for other servers to avoid casualties and issues.

@player001…I tried it multiple times got the success at end…

1 Like

Failed here too…

The port for me was like var {{LISTEN_PORT}} - the default in the config was 8080 and I didnt not touched it.

So why failed?

Sorry for this issue, this tasks is marked as Pending for you. Please try again now.

1 Like

can you give me exact steps for Apache Troubleshooting?

You can validate config file like below :

httpd -t -f /etc/httpd/conf/httpd.conf

To chekc logs like below
journalctl -xe

journalctl -xe | grep httpd

My Solution: Apache troubleshooting KodeKloud

I am still working on this lab with 15 mins remaining before environment automatically closed and marked my task as failed without even clicking finished button myself, kindly review for me please.

@whaleyboi001 Do you mean if environment expires without submitting the task it gets marked as failed ?

Yes, the environment got timed out due to glitches from your side, while I still have time left for the task.

Are you able to curl http://:8085 ? You should be able to see “Welcome …” message if you set up correctly

I spent a lot of time for this lab too.
The trick is to read the errors provided when getting info for the service.
For starters, I was with the ubuntu mindset, and was looking for apache2 whereas in CentOS the service is different.

Find the appropriate service and follow the error messages!
Godd luck!

I was stuck and opened your solution, was in a total wrong path -trying to enable networking and list all the services- fortunately didn’t go through the spoiler, cause my eyes caught the correct service I should have been looking for, and everything came into place!!
Thanks!

1 Like

You can also check Apache configuration for an AH00558 message ‘sudo apachectl configtest’