Redhat Linux after httpd port change, service could not start

Skumar_CCSA
Skumar_CCSA used Ask the Experts™
on
Hi,

need help...
i am having two servers,  web reverse proxy and tomcat application server.

1. tomcat Application server is 120.121.25.16 default port number changed in server.xml file, port number is 28056. I checked the tomcat application server, it works after port change and verified application.

2. RH7.7 reverse proxy server 10.38.11.26
i installed httpd.
/etc/httpd/conf/httpd.conf edited and changed the default port 80 to 29081 in listener.
restartng the httpd, it is failing

After port change the httpd service not coming up...

Error below...
Oct 18 23:04:34 webpxy1httpd[19252]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 10.250.245.6. Set the 'ServerNa
Oct 18 23:04:34 webpxy1 httpd[19252]: (13)Permission denied: AH00072: make_sock: could not bind to address [::]:8011
Oct 18 23:04:34 webpxy1 httpd[19252]: (13)Permission denied: AH00072: make_sock: could not bind to address 0.0.0.0:8011
Oct 18 23:04:34 webpxy1 httpd[19252]: no listening sockets available, shutting down
Oct 18 23:04:34 webpxy1 httpd[19252]: no listening sockets available, shutting down
Oct 18 23:04:34 webpxy1 httpd[19252]: AH00015: Unable to open logs
Oct 18 23:04:34 webpxy1 systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Oct 18 23:04:34 webpxy1 kill[19253]: kill: cannot find process ""
Oct 18 23:04:34 webpxy1 systemd[1]: httpd.service: control process exited, code=exited status=1
Oct 18 23:04:34 webpxy1 systemd[1]: Failed to start The Apache HTTP Server.
-- Subject: Unit httpd.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

can help...
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Dr. KlahnPrincipal Software Engineer

Commented:
make_sock: could not bind to address 0.0.0.0:8011

This suggests that something is already listening on port 8011.  Run netstat at command level and see if this is in fact the case.

Author

Commented:
I did tried netstat and could not found any other service using the custom port. finally I noticed the selinux not allowing to change the httpd known port and I followed the steps from another site and able to add the custom port for httpd. now httpd service restart is successful and able to see the new custom port in listening list.
Software Engineer
Distinguished Expert 2018
Commented:
selinux will cause system calls to fail if they pass requests that are not explicitely allowed.
A failure to bind()  will cause the webserver to assume the known issue:  if bind() fails the address is already in use.

The webserver has no knowledge on selinux being used or not.  (it operates on the Linux syscall API.

Author

Commented:
thanks for help.
i added the port in selinux, and able to restart the httpd services.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial