Opened 21 months ago
Last modified 15 months ago
#67015 assigned defect
apache2 will not restart
Reported by: | jasimon9 | Owned by: | ryandesign (Ryan Carsten Schmidt) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | Schamschula (Marius Schamschula), yugaego (YE) | |
Port: | apache2 |
Description (last modified by jasimon9)
I have had a MacPorts install of apache2 for many years. To restart apache, I would use the sequence "sudo port unload apache2" and then "sudo port load apache2". It no longer works, and I have to reboot my Mac to get apache running again.
When the load command is executed, the normal message is displayed.
iMac3:php81 jas$ sudo vi php.ini iMac3:php81 jas$ sudo port unload apache2 Password: ---> Unloading startupitem 'apache2' for apache2 iMac3:php81 jas$ sudo port load apache2 ---> Loading startupitem 'apache2' for apache2 iMac3:php81 jas$
However, the browser at this point gives the following error for every website:
Safari cannot open the page ... because it cannot connect to the server
This never used to occur.
Checking the process list shows only the following:
iMac3:~ jas$ ps aux|grep httpd jas 80804 0.0 0.0 34133068 908 s001 S+ 4:24PM 0:00.00 grep httpd _www 80728 0.0 0.0 34153188 944 ?? S 4:21PM 0:00.00 /usr/sbin/httpd -D FOREGROUND root 80724 0.0 0.0 34153328 3368 ?? Ss 4:21PM 0:00.20 /usr/sbin/httpd -D FOREGROUND iMac3:~ jas$
However, when apache is running normally, in addition to those two httpd processes, the are about six more processes waiting on input.
So I believe something has happened with the Macports instal that prevents the normal apache restart procedure.
In addition, checking error_log shows that the attempt to restart apache using the "load" sub-command does not cause any entry in that log. So it seems that apache is not getting the message to restart.
Change History (5)
comment:1 Changed 21 months ago by jasimon9
Description: | modified (diff) |
---|
comment:2 Changed 21 months ago by ryandesign (Ryan Carsten Schmidt)
comment:3 Changed 21 months ago by jmroot (Joshua Root)
Cc: | Schamschula added |
---|---|
Owner: | set to ryandesign |
Status: | new → assigned |
comment:4 Changed 21 months ago by jasimon9
- I am not intentionally running two apache servers. However, your comment gives me an idea--what happens if I use the stop command for the natively installed apache?
So I issued "sudo /usr/sbin/apachectl stop". After that the ps command no longer shows those two heels processes. Unfortunately, the port load apache2 still has no effect, and there are no httpd processes running after it executes.
- I have checked console.app and there are no entries showing related to attempting to restart apache.
comment:5 Changed 15 months ago by yugaego (YE)
Cc: | yugaego added |
---|
As far as I know, nothing has changed in MacPorts or the apache2 port that would account for this no longer working.
Regarding those /usr/sbin/httpd processes, are you intentionally trying to run two different web servers? If so, I assume they are configured to bind to different ports or IP addresses? Otherwise they would conflict and only one of them would be able to start.
If loading the MacPorts apache2 launchd plist doesn't cause anything to appear in the apache log, check if Console.app tells you any reason why it could not start it.