Apache Troubleshooting Failed Test

Hi All,

I am still facing issue & not able to resolve the error “httpd[331]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:3003” when trying to restart the httpd service. Any help/pointers will be appreciated.

I tried the following to resolve the issue:

  1. In httpd.conf uncommented the ServerName & added the App Server IP:Port Number. Output of sudo httpd -t is giving Syntax OK but restart is failing due to above error.

  2. Even I tried the steps uninstalling & reinstalling Apache but no success.

Thanks,
Pradip

Hi @pmpcert2013,

I haven’t encountered that error on KodeKloud Engineer, yet(?), but I’d suggest trying the tips found in https://www.cyberciti.biz/faq/unix-linux-check-if-port-is-in-use-command/ to determine what’s causing the port conflict.

Hope that helps,
Peter

Thanks @peterwhite for the hint. I was working on the similar line & even after after following the given article it didn’t resolve. I was not able to kill the process listening to the same port but Apache restarted after this try. So, at the end I was able to restart Apache. I was able to successfully complete the task. Thanks once again for help.

Thanks,
Pradip

1 Like

@pmpcert2013, I’m glad to hear that everything worked out!

Along those lines, I’ve encountered similar issues (only once, IIRC) where a service failed to restart the first time, but succeeded the second without making and configuration changes…

Here is my one i was able to access all the there URL’s however task still failed not sure why

image

@bkodekloud what is your KKE user name ?

Bipin is my username , my maild id is [email protected]

sudo httpd -t gave error message: set the servername directive globally to suppress this message.

This task is killing me from past 4 hrs and no success in bringing the apache service in 1 app server yet.

This is marked Success for you.

Thanks Inderjeet , much appreciated

Hi, here you show the curl of server 2, but we don’t see the results of servers 1 and 3. You may have forgotten to configure servers 1 and 3.

I was able to troubleshoot the Apache severs and curl to the endpoints from jump server successful.

Solution: Apache troubleshooting KodeKloud

Hello Team,

I am not sure about the result. No where it was mentioned about static website.

@naveensrivatsa Static website is nothing, you just need to make sure Apache is serving content from default document root as the task is to troubleshoot the issue so make sure not to change any valid default settings. We can mark it Pending for you. Can you please let us know if you got assigned today’s task already ?

@Inderpreet I correct all of the configurations with double-checking. But, App01 and App03 error is “refused connection”. How do I solve this error? I tried double time for this Apache Trouble Shooting. Give me a light!

@thaw make sure Apache service is up on all hosts.

1 Like

Yes, all apache service is running by checking, systemctl status httpd. It’s working and active. But, when I connect from Jump_Host, an error is “refused connection”. Please, advice me!

@thaw

Could you please send the screenshots ?

Also try to test from app server itself as well to make sure its accessible from localhost, the other reason can be some kind of firewall that is blocking access from outside i.e jump host.

1 Like