Need Help with this Error:

sudo systemctl start httpd
Job for httpd.service failed because the control process exited with error code.
**See “systemctl status httpd.service” and “journalctl -xeu httpd.service” foudo systemctl status httpd.service && sudo journalctl -xeu httpd.service
× httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; preset: disabled)
Drop-In: /usr/lib/systemd/system/httpd.service.d
└─php-fpm.conf
Active: failed (Result: exit-code) since Fri 2024-01-05 17:21:59 PST; 4min 26s ago
Docs: man:httpd.service(8)
Process: 9033 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 9033 (code=exited, status=1/FAILURE)
Status: “Reading configuration…”
CPU: 100ms

Jan 05 17:21:58 Root9 systemd[1]: Starting The Apache HTTP Server…
Jan 05 17:21:59 Root9 httpd[9033]: AH00558: httpd: Could not reliably determine the server’s fully qualified domain name, using 143>
Jan 05 17:21:59 Root9 httpd[9033]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
Jan 05 17:21:59 Root9 httpd[9033]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
Jan 05 17:21:59 Root9 httpd[9033]: no listening sockets available, shutting down
Jan 05 17:21:59 Root9 httpd[9033]: AH00015: Unable to open logs
Jan 05 17:21:59 Root9 systemd[1]: httpd.service: Main process exited, code=exited, status=1/FAILURE
Jan 05 17:21:59 Root9 systemd[1]: httpd.service: Failed with result ‘exit-code’.
Jan 05 17:21:59 Root9 systemd[1]: Failed to start The Apache HTTP Server.
r details.**

This means the port 80 is already in use by another process. Close the application that is using this port, it could be nginx or maybe another web server you have installed.

I will try it today. Thank you so much for the feedback.

I didn’t work. I’m going to reach out to RedHat support to see if I can get help from them.

To show all the listening and connected ports, run sudo netstat -nap
Scroll to the top and look at the process that is listening on port 80. You could also pipe that to grep 80.

Hey Big A,

I just want to thank you for all your help thus far. I truly appreciate it. Once, I pass this stage the project is done because I already installed everything else. With that being said, this is the only thing listening on port 80, should I close it out? Pending your response…

tcp6 0 0 :::80 :::* LISTEN 1176/nginx: master

Yes you need to stop nginx if you want to run apache. Both will want port 80 but you cannot share ports between processes directly. You should be able to run sudo systemctl stop nginx

Good Morning Big A,

I didn’t get the error anymore due to the fact that I stop NGINX. Thank you so much… Can I add you to my linkedin please…

One final issue - I can see the php page that I created but it’s not showing the database/inventory. What am I doing wrong?

If you post your code and database schema we might be able to help.

I followed the same exact steps as Mumshad Mannambeth followed by your explanations. Other than that I didn’t do anything different/

I was not aware you were following another guide. You should start over again, being careful to follow the steps outlined exactly as given.

That is what I’m seeing in my screen - product list won’t display

Do you have a link to the Lab?

Wipe you VM and start from the beginning. Take care to look at the result of each step to make sure you are not getting an error. When you get an error, stop, fix it and then carry on.

There has to be a better way to do it than distroying the VM.