MAMP Pro: Apache cannot be started because the port is already in use

When I try to start my servers, Apache won't start and MAMP claims that the port ([::]: 8888) is already in use.

I've tried almost every way to find out which process is using that port (as have many of the previously mentioned SO solutions), but I don't get any results. Neither lsof nor netstat list anything about port 8888. Nothing seems to be using this port.

I need to either improve my search, or find that (if anything) is actually using the port, or somehow convince MAMP that the port is not actually being used. Any suggestions?

EDIT: Changing the port to 8887 allows Apache to start. This does not change the fact that nothing is using port 8888 and it should work with that port.

+3


source to share


6 answers


Try to go to Activity Monitor and find Mysqld and Httpd and kill any processes for them. Then restart Mamp.



+9


source


Killing all httpd and Mysqld processes fixed the problem for me. I had about 10 instances of httpd. I do not know why.



+4


source


After upgrading to bash -4.3.27-10.4u I also noticed that apache does not start on port 8889 using MAMPS 1.7.2 running on Mac OS X 10.6.8 on Intel Core Duo. Sigh. The solution seems to have to go back to older versions of bash and sh.

Subsequent research confirms that a new SH OR a new bash OR both will prevent apache from starting.

0


source


Sorry for the late reply. This command will tell you which process or daemon 8888 is using:

sudo lsof -P -n -iTCP -sTCP:LISTEN

      

If you don't like it, you can kill the process id using kill (or killall for the Process name)

0


source


Open => MAMP => Settings => Port => Change Apache Port 8888 to 8080

Restart MAMP. It will work.

0


source


Shutdown my Mac Apache while installing the PHP extension which will later be used with MAMP. Then I just stopped it. Then MAMP started working again.

sudo apachectl stop

      

0


source







All Articles