kboul
kboul

Reputation: 14600

Unable to start apache on Mac High Sierra 10.13.5 after latest update (June 15th 2018)

I did the latest update on Mac High Sierra two days ago and after that I am unable to start apache on port 80. I keep getting

(48)Address already in use: AH00072: make_sock: could not bind to address [::]:8080 (48)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:8080 no listening sockets available, shutting down AH00015: Unable to open logs

I checked what is running on ports 80 using sudo lsof -i TCP:80:

COMMAND   PID USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
httpd   15116 root    4u  IPv6 0xe9c01ec682a44c67      0t0  TCP *:http 
(LISTEN)
httpd   15387 _www    4u  IPv6 0xe9c01ec682a44c67      0t0  TCP *:http 
(LISTEN)
httpd   15388 _www    4u  IPv6 0xe9c01ec682a44c67      0t0  TCP *:http 
(LISTEN)

and sudo lsof -i TCP:8080:

httpd   11689 daemon    4u  IPv6 0xe9c01ec68ff9f6a7      0t0  TCP 
*:http-alt (LISTEN)
httpd   11690 daemon    4u  IPv6 0xe9c01ec68ff9f6a7      0t0  TCP 
*:http-alt (LISTEN)
httpd   11691 daemon    4u  IPv6 0xe9c01ec68ff9f6a7      0t0  TCP 
*:http-alt (LISTEN)
httpd   11744 daemon    4u  IPv6 0xe9c01ec68ff9f6a7      0t0  TCP 
*:http-alt (LISTEN)

When I hit localhost:8080 I get

EnterpriseDB
Apache - version 2.4.12 
PHP - version 5.5.26 
Server is up and running 
The default Apache context is www in the Apache installation folder

and then tried to kill the relevant processes on port 8080 using sudo kill -9 portId but no luck.

Last but not least I want to mention that before the updade on /etc/apache2/httpd.conf I had:

<IfDefine SERVER_APP_HAS_DEFAULT_PORTS>
   Listen 8080
</IfDefine>
<IfDefine !SERVER_APP_HAS_DEFAULT_PORTS>
  Listen 80
</IfDefine>

and everything was fine until the update..

Any help is appreciated.


I attach what I get on 31/07/2018 as indicated by @ Ivan Hušnjak

Running sudo lsof -i TCP:80 I get absolute nothing back

Running sudo lsof -i TCP:8080 returns:

COMMAND  PID   USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
httpd   7470   root    4u  IPv6 0xe7c340f978e197b1      0t0  TCP *:http-alt (LISTEN)
httpd   7481 daemon    4u  IPv6 0xe7c340f978e197b1      0t0  TCP *:http-alt (LISTEN)
httpd   7483 daemon    4u  IPv6 0xe7c340f978e197b1      0t0  TCP *:http-alt (LISTEN)
httpd   7484 daemon    4u  IPv6 0xe7c340f978e197b1      0t0  TCP *:http-alt (LISTEN)

Upvotes: 2

Views: 2767

Answers (1)

Ivan Hušnjak
Ivan Hušnjak

Reputation: 3503

My guess is that MaxOS internal apache server had overtake control of port 80 after the update to 10.13.5, however I solve this issue by unloading it like explained in these older answers found here https://stackoverflow.com/a/46720652/555097 and here https://stackoverflow.com/a/11720851/555097

sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist

Upvotes: 1

Related Questions