Closed remingm closed 3 years ago
Hi @remingm,
Thanks for using it! There's only a few people I've talked to so far who have tried it out, so this is great to hear from another one!
Let's see if we can figure out what's going on.
I'm just going to spin up a new PHP 7 image and try to replicate, then come back with more info or steps to try and figure this out on your machine.
@remingm, good news, I was able to reproduce the issue! Bad news, looks like a bug of some kind. I'm playing around with it now to pinpoint, with a few ideas...
This looks like the result of the issue:
tail -f /usr/logs/php-fpm/php-fpm.log
[23-Feb-2021 11:06:32] ERROR: [pool www] please specify user and group other than root
[23-Feb-2021 11:06:32] ERROR: FPM initialization failed
Let me poke around in that area and see why it's not forcing nginx to run as root
user as during other times...
OK, can at least recover from this state while I figure out the greater cause:
php-fpm7 -R
mysqld -u root
Site should now load fine in browser.
I'll double check above workaround in a brand new image to be sure and then will need some more time to look at fixing the issue properly.
@remingm, confirmed the above mentioned workaround works. The second line won't return control back to the terminal when run, so can close that terminal window after running and confirming site loads in your browser.
Please let me know if any issues applying that workaround and await a proper fix from me.
I didn't check the same thing on the php8 images, but if you try before me, please report back. I am pretty sure I had checked the images after rebooting before I published that last release, but maybe I changed something that broke things after last complete test. Anyway, I'll should have that sorted next session I spend on Lokl's development.
Thanks for the quick response. The workaround works.
I just spun up a new php8 image. After docker restart [container]
I experienced the same issue, but the workaround restored browser access again.
[edited for clarity in wording!] Confirmed here too - php8, no funny settings etc. Works fine on creation, needs workaround after restart of docker container.
I have had a play with /run.sh
, which appears to start nginx
but nothing else on third and subsequent runs. Inserting the following before the call to nginx appears to fix the issue:
php-fpm8 -R
/usr/bin/mysqld --user=root &
@phlash great fix. Worked for me very fine. I used vim to edit, so, how can I get back to the terminal?
@insign - how to exit Vim is a very common meme, so forgive me if you're joking, but:
:
+ wq
to write and quit
Thanks everyone for their patience with this major issue!
And thanks @phlash for supplying the fix. I've stop/started a new site a few times, including rebooting and looks good.
I'll close this issue once new release published and Lokl homepage updated with new command using latest release
Hi Leon, thanks for making this. I found Lokl via reddit and it's perfect for my use case. Using lokl-cli I created a site, exported it to static files, and hosted it. After a computer reboot I attempted to edit the site with the cli, but received "502 Bad Gateway" in the browser. Examining the docker logs, i found this error:
2021/02/23 03:37:47 [crit] 9#9: *1 connect() to unix:/var/run/php7-fpm.sock failed (2: No such file or directory) while connecting to upstream, client: 172.17.0.1, server: , request: "HEAD / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php7-fpm.sock:", host: "localhost:4935"
I'm using the PHP 7 image because of the Lokl release notes: "Static HTML Output not working for the PHP 8 image".
lokl/lokl:php7-5.0.0-rc1, Docker 20.10.2, MacOS Catalina.
I'm looking at potential solutions on StackOverflow, but I'm a ML developer and web dev/PHP is not my area of expertise. https://stackoverflow.com/questions/51158830/nginx-connect-to-unix-var-run-php7-2-fpm-sock-failed-2-no-such-file-or-dir/51159313
Should I just use the PHP8 image instead? Thanks for your time.