Error DK0031: Port 80 and 443 is used

Hello,

The problem
During the initial installation I get the following error:
“Error DK0031: Port 80 and 443 is used”

Screenshot below:

I am only given the opportunity to “Retry”, but cannot do anything else about it.

Computer information:
This is a macOS v11.1. I do have Local by Flywheel also installed, which I suspect may be conflicting with the ports.

Closing notes:
I noticed another post about this:

Thank you.

1 Like

Update: I managed to complete the installation by killing all processes on port 80, however, I have no idea if this is a long-term fix (presumably not).

Mac:

# find & kill processes which are using port 80
sudo lsof -i tcp:80 | grep LISTEN | awk '{print $2}' | xargs kill -9

Windows:

# find processes which are using port 80
netstat -ano | findstr :80

# kill process by PID. replace "<PID>" with result from the above command.
taskkill /PID <PID> /F

Support: DevKinsta Error Codes - Kinsta

Best,

Thanks again for posting a workaround! :slight_smile:
We’ll have more information on this soon!

Thanks for sharing! Alas I came across and tried this solution but to no avail. There’s something (2 things actually) running on my machine over port 80 that cannot be killed.

I followed the same advise given by the online documentation and still have the same issue whenever I close DevKinsta and re-open it. Everytime I start the app I have to use the terminal to kill all tasks using port 80 before it will run properly. Too bad I was not able to test it as I wanted to.

Hi @jhcruzr . Welcome to DevKinsta and apologies for the trouble you’re having. There’s a feature request to be able to change the ports. We hope to have a fix for this soon. Stay tuned!

failed to work.
I look forward to a solution.
keep up the good work.

To those who have had trouble killing certain tasks, try putting “sudo” in front of xargs - this worked for me

Thanks for the suggestion. I’m not a coder by trade, do you mean:

sudo lsof -i tcp:80 | grep LISTEN | awk ‘{print $2}’ | sudo xargs kill -9

@michael any updates that can be shared getting this basic addressed?

@kadso We’ll have an update on this available shortly. Sorry for the wait!

The source of this error is having apache running.

Use the following command:
sudo apachectl stop

That’s why DevKinsta worked on a different machine with a clean install. Apache wasn’t already running.

2 Likes

Thanks for the quick update.

Nice Work Chris! That did it for me.
Thank you!

2 Likes

Has this update been done yet?

@jhcruzr Not yet I’m afraid. Sorry for the wait!

This did the trick for me:
sudo lsof -i tcp:80 | grep LISTEN | awk '{print $2}' | sudo xargs kill -9

1 Like

Are you installing on a windows machine or apple?

On Mac

For windows there are the following instructions which I am not sure if they solve the issue:

# find processes which are using port 80
netstat -ano | findstr :80

# kill process by PID. replace "<PID>" with result from the above command.
taskkill /PID <PID> /F