-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Site not coming online after rebooting host: 502 Bad Gateway and PHP Socket Error (Workaround available) #29
Comments
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:
Let me poke around in that area and see why it's not forcing nginx to run as |
OK, can at least recover from this state while I figure out the greater cause:
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 |
[edited for clarity in wording!] I have had a play with
|
@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:
|
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.
The text was updated successfully, but these errors were encountered: