Local Community

Linux Issue: Heads-up! Local's router is having trouble starting

Thanks for the Local Lighting. I created 2 test sites and both time local give this error “Heads-up! Local’s router is having trouble starting.”

Also when I open the local site link in browser. It gives me 404 error.

Hey @burhandodhy, thanks for testing out Local Lightning on Linux with us! We’re super excited about this release and we appreciate you trying it out and helping us work through some of these issues!

If you would be so kind, will you check out a couple things? It’s looking like nginx isn’t binding to port 80 correctly (there might be another process already running). One way you can check into this is to dig into the Local router log to see if there’s an error trying to bind to this port? You can find more information on that here. In addition, would you check out if anything is running on port 80 through via one of these commands?

Thanks and please let us know what you find.

local-lightning.log (132.1 KB) Here is the log file

Hi @burhandodhy,

Thanks for that!

Based off of the info in the log file, the router is failing to bind on port 80 (HTTP) due to another process using it. Can you please go through the steps in this article and let us know what you find?

Also, what Linux distribution/version are you running?

Hi @clay

I run the command and here are the output.

tcp6       0      0 :::80                   :::*                    LISTEN      1410/apache2     

I’m using the “Linux Mint 19.1 Cinnamon”

A post was split to a new topic: Windows Issue: Local’s router is having trouble starting

Thanks! That’s very helpful.

Based on the output, Apache appears to be running. Heads-up, if you’re using it for another project, the commands below will temporarily stop Apache.

Can you try the following?

  1. Try running sudo service apache2 stop. If it results in an error, you may need to find a different stop command for Apache from this blog post: http://www.learn4master.com/programming-language/shell/start-restart-and-stop-apache-on-linux

  2. Run netstat -ltnp | grep -w ':80' again after a few seconds and see if Apache stops listening on port 80.

  3. If 1 and 2 look good, try creating a new site in Local and see if you can access it.

Is it not possible to run Local and Flywheel on the same time? I use to run the xampp and local on my Windows machine at same time.

Hey @burhandodhy, the previous versions of Local used a virtual machine in VirtualBox to navigate around the ports that XAMPP would have used simultaneously. Local v5 (which is the first version that supports Linux) does away with needing VirtualBox. This has a lot of performance and development advantages but it does introduce port conflicts that were side-stepped before. I know the team is working on making this easier to navigate in future releases but right now, you will have to shut down Local or XAMPP because they will conflict in the ports that they need.

I experience this same issue whenever Local is not shut down correctly. Running the commands:
sudo fuser -k 80/tcp
sudo fuser -k 443/tcp
And then starting a site will fix it. Perhaps Local can check to see if Apache is running on startup and issue a restart so that the router can bind correctly?

1 Like