-
Notifications
You must be signed in to change notification settings - Fork 63
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
502 Bad Gateway / SERVER COMM ERROR CODE 7 #307
Comments
this to me is signaling that the python+flask process Without logs from the device I can't be certain what is happening. After powering on did you leave the device for 10-45minutes before trying? If you are connected to the internet / home wifi it can take a while to update if you truly haven't restarted in over 9 months due to the number of changes that might be ready to pull to your device upon startup. If you still can't get it to function backup the samba share (really only recipes, but could also backup sessions) and start all over again as the SD card may have been corrupted when powered off. |
I too am getting this error. My setup is uses a separate DD-WRT router for dnsmasq. The error I see in picobrew.error.log
I don't know if it's my setup with router or something in nginx configuration. Will keep you all posted as I investigate. |
Can either of you access the raspberrypi web interface normally from chrome/safari/edge/etc. Also what version are you running? How frequently does this error occur? |
Can normally access the pi from the web interface on multiple browsers. The server then crashes and I get the same 502 error as above upon refreshing web page. If I restart the server and refresh the browser, all is good until it crashes again anywhere from 30 minutes to a couple of hours later. Always get the upstream prematurely closed connection in the picobrew.error.log. I’m testing something now which appears to work. |
When the server crashes what is at the end of the logs when viewing them This is the same or similar to what the UI would give you, however if you need to restart the log files (in memory) are wiped out and not available. Best to grab from ssh or terminal session if you can, as you are making custom changes I'm sure you can 😉. |
Ok - reverted the changes I was testing late last night and restarted. Got a crash some time overnight. Here is the contents of rc.local status. Loaded: loaded (/lib/systemd/system/rc-local.service; enabled-runtime; vendor preset: enabled) Dec 31 14:00:47 raspberrypi systemd[1]: Starting /etc/rc.local Compatibility... |
By "crash" what do you mean? Simply it was working before and then started 502ing? That rc.local log doesn't have anything is rc.local where you have the process name for picobrew_pico setup (this is the process we use in the RaspberryPi image provided, but I know you are a custom setup...)? Did you access the webserver at all? |
Sorry - l need to be clearer. I’ve got a dedicated router doing dnsmasq and I’m just running the code from the pi’s command line - python3 server.py 0.0.0.0 8080 When I get the 502, the python process has ended. Confirmed that using ps. I recently generated the SSL certificate and added symbolic link to the picobrew.com.conf to nginx whereas previously I was just running on port 80 (just python3 server.py). Thanks. |
What do you get as the python output when you experience the 502? After the 502 the server isn't running anymore? |
Here is the rc.local that the built raspberrypi image uses if interested to compare python startup differences. https://github.com/chiefwigms/picobrew_pico/blob/master/scripts/pi/00-run-chroot.sh#L296-L324 |
If one starts python via Anyways if you start the python server via
There could be a case where too much data is being attempted to be sent to the frontend (# of simultaneous graphs / # of active devices). I found this to be the case with the archive view which loaded ALL data for ALL sessions ALL the time... when most of the time the user only cares about a recently run session... so switched to max of 10 loaded at a time (but depending on how long one fermentation or brew session was and how much data was contained within it even just one could overwhelm the system enough to drag performance to a halt... I have some ideas there to reduce the overall size of a session log, but haven't done anything with that idea yet). Anyways if size of the response is an issue try changing the buffer size for nginx (default 1024m).
|
Thanks. I'll give it a shot and let you know results. Appreciate the support! |
@BuckoWA any update here? |
@tmack8001 Thanks for the ping. I tried the following within the nginx conf file: On my latest brew sessions, it ran smoothly during the brew session on two brews, but had an issue during fermentation running two Picoferms and two iSpindels. Checking the logs shows this error: I did not try increasing the nginx buffer size but will try that next. Looking back on some old error logs I do see some "worker process exited on signal 9" errors which I believe is memory.? I did update my rc.local to be similar to the chroot.sh script but forgot to systemctl the output after it failed. |
Hi, using a Pi ZeroW here. Have successfully done a couple of brews with the server in Jan and March this year.
Got the Pi back out again today to do a deep clean on the machine and having trouble connecting.
Picobrew machine shows:
SERVER COMMUNICATION ERROR CODE 7
on the screenConnecting to PICOBREW AP and accessing https://picobrew.com or 192.168.72.1
or
Connecting to my home wifi, and accessing https://192.168.0.88/ (Pi IP)
all give:
I can access the picobrew_server share via samba fine.
I'm not sure where to go from here, can someone advise please?
Because I'd love to get the machine brewing again!
thanks very much
The text was updated successfully, but these errors were encountered: