Creation of a new website doesn't work anymore

Bug Summary

I already used Local few month ago and it was working great. I tried again today and the creation of a new website takes forever, and after restarting local it’s like the site is created, but when i click on the link to open it, i get the error that wp-config.php file doesn’t exist.

Steps to reproduce

  1. click create a new site
  2. give name
  3. set up “preferred” environment
  4. create a wordpress username, a wordpress password, and gives an email (by the way, why a flywheel.local email is proposed ? that’s weird, it’s not my email, i don’t understand)
  5. click on create
  6. section “site host” is loading forever and i can’t click on buttons “admin” and “open site”, unless i restart local (in this case the link doesn’t show me a working site but an error page " There doesn’t seem to be a wp-config.php file. I need this before we can get started.")

Environment Info

  • ubuntu 18.04.5 LTS
  • nginx, PHP 7.3.5, MySQL 8.0.16, WordPress 5.8.2 (all created by Local)
  • local 6.1.8+5621

Supporting info

local-lightning.log (130.7 KB)

Hey @hugogogo – Welcome to the Local Community Forums!

The Bugs channel is meant for topics that are more fleshed out with specific errors as well as detailed replication steps. Because of this, I’ve moved this topic to the more general “Support” category until we zero in on what exactly is going on!

Looking at the Local log, it seems like there’s an issue with there being a PHP process still holding onto a socket:

{"thread":"main","class":"Process","process":"phpFpm","level":"warn","message":"[18-Sep-2021 16:32:55] ERROR: Another FPM instance seems to already listen on %%site.runData%%/php/php-fpm.socket","timestamp":"2021-09-18T14:32:55.013Z"}
{"thread":"main","class":"Process","process":"phpFpm","level":"warn","message":"[18-Sep-2021 16:32:55] ERROR: FPM initialization failed","timestamp":"2021-09-18T14:32:55.014Z"}
{"thread":"main","class":"Process","process":"phpFpm","level":"warn","message":"[18-Sep-2021 16:32:55] ERROR: Another FPM instance seems to already listen on %%site.runData%%/php/php-fpm.socket","timestamp":"2021-09-18T14:32:55.705Z"}
{"thread":"main","class":"Process","process":"phpFpm","level":"warn","message":"[18-Sep-2021 16:32:55] ERROR: FPM initialization failed","timestamp":"2021-09-18T14:32:55.708Z"}
{"thread":"main","class":"Process","process":"phpFpm","level":"warn","message":"[18-Sep-2021 16:32:56] ERROR: Another FPM instance seems to already listen on %%site.runData%%/php/php-fpm.socket","timestamp":"2021-09-18T14:32:56.262Z"}
{"thread":"main","class":"Process","process":"phpFpm","level":"warn","message":"[18-Sep-2021 16:32:56] ERROR: FPM initialization failed","timestamp":"2021-09-18T14:32:56.263Z"}
{"thread":"main","class":"Process","process":"phpFpm","level":"warn","message":"[18-Sep-2021 16:32:56] ERROR: Another FPM instance seems to already listen on %%site.runData%%/php/php-fpm.socket","timestamp":"2021-09-18T14:32:56.809Z"}
{"thread":"main","class":"Process","process":"phpFpm","level":"warn","message":"[18-Sep-2021 16:32:56] ERROR: FPM initialization failed","timestamp":"2021-09-18T14:32:56.810Z"}

Note the parts that look like:

ERROR: Another FPM instance seems to already listen on ...

It’s possible that one of those old PHP processes isn’t closing down fully. As a first step, I’d recommend fully rebooting the computer to see if that cleans things up.

Another thing to try after a full reboot is to create a new site to see if this is happening for all sites in Local, or just one in particular. Let us know what you find out!

Local doesn’t know what email you use, so this one is an easy, throw-away one you can use for development.

If you’d like for new sites to have a specific email used by default, you can configure that under “Preferences > New Site Defaults > Admin E-Mail”

Local doesn’t know what email you use, so this one is an easy, throw-away one you can use for development.

thanx for that info :slight_smile:

thank you for the reply, and for moving my question to the right place :slight_smile:

so i’ve try to reboot the computer, nothing changed (couldn’t create a working site)

i also tried to see what php-fpm process could be running, so i tried the commands :

ps aux | grep php

and

ps aux | grep fpm

but all output seems to be process generated by Local

I wonder how much time the creation of a new site should take ? I mean, after how much time should i conclude it didn’t work ? Because so far i’m waiting 1 hour before i say it didn’t work, but if 5 minutes is enough that would be much easier to perform test ; )

Can you share the output of those commands? I’d be interested in knowing a bit more about those processes.

I wonder if it’s just a matter of manually deleting those old sockets and trying again. To do that:

  1. Stop Local
  2. Open a terminal
  3. Find any php socket files
  4. Delete them!
  5. Start Local, and a site to see if that fixes things!

Step 3 and 4 will likely look something like this:

find ~/.config/Local/run -name '*.socket'
find ~/.config/Local/run -name '*.socket' -exec rm {} \;

That first command is mostly a sanity check to make sure you’re getting the right files – and ONLY those files since we’ll be using rm in the second command. Here’s a screenshot when I run it on my Ubuntu machine:

hi, here is the output of ps aux | grep php when local is running and trying to create a new site :

simplon+  8753  0.0  0.1  55388  9100 pts/7    Ss+  déc.10   0:00 vim -n /home/simplonco/config/php.txt
simplon+ 11729  0.0  0.3 339376 24316 ?        Ss   07:37   0:00 php-fpm: master process (/home/simplonco/.config/Local/run/FAgiOmlFu/conf/php/php-fpm.conf)
simplon+ 11748  0.0  0.2 339508 17404 ?        S    07:37   0:00 php-fpm: pool www
simplon+ 11749  0.0  0.1 339508 16012 ?        S    07:37   0:00 php-fpm: pool www
simplon+ 12266  0.0  0.2 339376 24076 ?        Ss   07:42   0:00 php-fpm: master process (/home/simplonco/.config/Local/run/FAgiOmlFu/conf/php/php-fpm.conf)
simplon+ 12270  0.0  0.1 339508 15988 ?        S    07:42   0:00 php-fpm: pool www
simplon+ 12271  0.0  0.2 339508 17416 ?        S    07:42   0:00 php-fpm: pool www
simplon+ 13181  0.0  0.0   4632   860 ?        S    07:45   0:00 /bin/sh /opt/Local/resources/extraResources/lightning-services/php-7.3.5+11/bin/linux/sbin/php-fpm -F --prefix /home/simplonco/.config/Local/run/IFMMCAbDQ/conf/php --fpm-config /home/simplonco/.config/Local/run/IFMMCAbDQ/conf/php/php-fpm.conf -c /home/simplonco/.config/Local/run/IFMMCAbDQ/conf/php
simplon+ 13185  0.0  0.3 339376 24608 ?        Ss   07:45   0:00 php-fpm: master process (/home/simplonco/.config/Local/run/IFMMCAbDQ/conf/php/php-fpm.conf)
simplon+ 13191  0.0  0.0 339376  7064 ?        S    07:45   0:00 php-fpm: pool www
simplon+ 13192  0.0  0.0 339376  7064 ?        S    07:45   0:00 php-fpm: pool www
simplon+ 13529  0.0  0.0  14440  1100 pts/12   S+   07:46   0:00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --exclude-dir=.idea --exclude-dir=.tox php

(ps aux | grep fpm has the same output, without the first vim line)

and i get the same output after closing local, which i don’t undestand ?

I did the five steps you suggested, it didn’t change anything unfortunately. the ouptput of find is the following :

/home/simplonco/.config/Local/run/IFMMCAbDQ/php/php-fpm.socket

another thing, i don’t remember how i got the “local_lightning.log” file the last time, but this time i downloaded the one found under support > local connect help > download local log, and contain a folder “router-logs” with a log file “error.log” with this error going in loop :

2021/08/07 15:16:32 [emerg] 5636#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2021/08/07 15:16:32 [emerg] 5636#0: bind() to [::]:80 failed (98: Address already in use)
2021/08/07 15:16:32 [emerg] 5636#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2021/08/07 15:16:32 [emerg] 5636#0: bind() to [::]:80 failed (98: Address already in use)
2021/08/07 15:16:32 [emerg] 5636#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2021/08/07 15:16:32 [emerg] 5636#0: bind() to [::]:80 failed (98: Address already in use)
2021/08/07 15:16:32 [emerg] 5636#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2021/08/07 15:16:32 [emerg] 5636#0: bind() to [::]:80 failed (98: Address already in use)
2021/08/07 15:16:32 [emerg] 5636#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2021/08/07 15:16:32 [emerg] 5636#0: bind() to [::]:80 failed (98: Address already in use)
2021/08/07 15:16:32 [emerg] 5636#0: still could not bind()

so the problem might not be the php process anymore, but an adress already in use (maybe it’s another aspect of the same problem ?)

Are you able to delete that file? You might have to quit Local in order to delete it successfully.

As for the errors in the Router Log – those definitely cause issues, but looking at those timestamps, those seem like from a time in August and are likely not the issue at this time.

This might be the issue then – it sounds like Local isn’t cleaning up those processes when it’s quitting.

Are you able to kill those processes and try again with creating a site? The terminal command to kill a process looks like this:

kill -9 <process-ids>

So looking at the output from your last post, you would kill the “master processes” with something like:

kill -9 11729 12266 13185

I think that should clear up the other processes, but if not, you might try killing the other PHP-FPM processes just to be sure.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.