Uh-Oh! Unable to start / provision site

What issue or error are you experiencing?

Error: Command failed:
C:\Users\User\AppData\Roaming\Local\lightning-services\mysql-8.0.16+6.…\mysqladmin.exe
ping
•mysqladmin: connect to server at ‘::1’ failed
error: ‘Can’t connect to MySQL server on ‘::1’ (10061)’
Check that mysqld is running on ::1 and that the port is 10005
You can check this by doing ‘telnet ::1 10005’

 at ChildProcess.exithandler (node:child_process:422:12)
 at ChildProcess.emit (node:events:517:28)
 at ChildProcess.emit (node:domain:489:12)
 at maybeClose (node:internal/child_process:1098:16)
 at ChildProcess._handle.onexit (node:internal/child_process:303:5)

Explanation: I’m very new to Local and have been trying to create my first site. Whenever I try to create a new, blank site, two messages pop up displaying content I pasted above.

I’ve read similar topics and tried these solutions, but to no avail:

 1. I switched my Router Mode to Localhost and vice versa; and
 2. I let the Local application through my firewall.

I attached screenshots of the error message and notification below. Please send help!


What steps can be taken to replicate the issue? Feel free to include screenshots, videos, etc


image


Local Logs

Attach your Local Logs here (Help Doc - Retrieving Local’s Log)


Security Reminder
Local does a pretty good job of scrubbing private info from the logs and the errors it produces, however there’s always the possibility that something private can come through. Because these are public forums, always review the screenshots you are sharing to make sure there isn’t private info like passwords being displayed.

Hi @zongyuan

To fix this you should be able to go into your Task Manager and find MySQL and then select End Task. After that you can start fresh. It’s likely some processes are getting hung up there.

Hi Nick! Thanks for the reply!

I went into my Task Manager and did not find any MySQL processes. Attached is a screenshot for your reference.

I tried creating a site again while my Task Manager was open, and I saw that MySQL processes happen, but they blink on and off. I timed a screenshot while the processes were seen below:

When you created a site again did you get the same error? If so did you try killing MySQL to see if it would start?

Yes, I did get the same error. I didn’t have to kill the MySQL processes because they did so themselves.

In the Task Manager, they blink on and off the screen when I try to create a new site. This happens for about 15 seconds until the error messages (uh oh! unable…) pop up. When the error messages do pop up, the MySQL processes stop flashing in the Task Manager and they cannot be found via search.

Hi @zongyuan

Can you share a Local Log with us so we can take a look at that? There are some different ways to access and share Local Logs. For us to be able to troubleshoot thoroughly, please click the Download Local Logs button from the Support tab in Local. This will generate a zip archive that contains the Local log along with some other diagnostic information to help quickly zero in on any issues that Local is encountering.

local-logs.zip (8.3 KB)

@zongyuan

Do you have any other antivirus or security applications running? I know you mentioned that you “allowed” Local through the firewall but it seems like something is still killing those MySQL processes likely because they are getting flagged as malicious.

How do I make sure that Local and its subsequent processes all get through the firewall?

Did you check to see if you have any other antivirus running? Defender, Kaspersky, etc?

You said in your post you allowed Local through your Firewall. Where did you do that?

This might be helpful too for other checks: Help! I'm running into an EPERM error with the hosts file on Windows


I allowed Local through my Firewall via Windows Security. Attached is a screenshot showing so. I have Microsoft Defender running, but it does not notify me of anything (no blocks or app preventions) when Local fails to create a site.

Here is another screenshot showing that the problem still happens even when my Microsoft Defender is turned off.

I’ve tried performing the suggested actions found in the link you sent me ↑, but to no avail. When I try to create a site, it still shows the same error messages.

@zongyuan In order to refresh here and start with a clean slate could you give the below troubleshooting steps a try?

  • Export any sites that you have on Local and save them to a folder somewhere on your computer: Backup a Local Site - Local

  • Fully uninstall Local from your computer: Uninstall Local - Local

  • Install the latest version of Local on this link: Releases - Local

  • Once installed, please restart the computer.

  • When the computer is restarted and turned on, close any applications that automatically run in the background (AntiVirus, Firewall, and other Developer applications included).

  • Check and see if the issue still persists. If so, please provide us with an updated log: Retrieve Local’s Log File - Local

local-logs.zip (5.8 KB)

I followed all troubleshooting steps but to no avail. I attached my latest log above.

Hi @zongyuan

It’s tough to say what exactly, but something still seems to be blocking Local and these processes on your machine. Do you have another machine you can test with by chance?

Unfortunately, I don’t have any other device I can test Local with. Is there a way to check what seems to be blocking Local and its subsequent processes from my current device?

You could see if anything else stands out in your Task Manager that you may be missing. Ensuring everything else is either completely closed/shut down or isn’t interfering in some way like a security blocker.

Another thing you could try are these steps:

  • Stop all sites that are running in Local

  • Force quit Local

  • Run the command netstat -ano in your Site Shell

What you’ll be looking for here is to see when sites are stopped and Local is properly shut down if there are still programs running on ports 80 and 443. These may be conflicting with Local or the system may be reporting Local is still running.

Once you run that command you should see a list of listening ports. If you see a particular program making use of those ports, you can then kill that process by running sudo kill -9 XXX where XXX is the PID number of that process. (On Windows you will use taskkill /F /pid XXX where XXX is the PID number of that process)

I don’t see any programs that have a listening status on my 80 and 443 ports.

Would factory resetting my device be of any solution to this issue?

I’ve also tried killing the processes shown in the screenshot above, but to no avail. Some of these processes appear when I run the netstat -ano command again, but under a different PID.