Repetier Server keeps failing, bad gateway 502

I've been trying for days to get Repetier Server working on my Raspberry Pi 3 B+. Pi has been running great for 2 years with OctoPrint but I have 2 more printers now and I want to manage them. I set Repetier Server up on a Pi a year ago for a school and it's been working flawlessly with 3 printers. However, now I can't even get it to run with 1.

My issue is that as soon as I have 2 printers connected, I can't connect the third. As soon as I do, I get the "Connection Lost" and then eventually "Bad Gateway502". I restart the Pi, same bad gateway. The only way to fix it is to reimage the Pi. Then as soon as I get the second printer set up, I get connection lost. Sometimes I get it when I'm trying to install the 3rd printer, sometimes I get it with just two. This last time, I had one printer on and connected, and connected the second printer by USB but had not turned it on yet. LCD on printer lit up and then RS lost connection. 

I'm not sure where to go from here. I've upgraded RS to the latest version, switched USB cables. I tried restarting the web server from the command line and it loaded and then said "Connection Lost" again. Here's the log from the last attempt:
2020-08-10 18:35:04: Webserver started.
2020-08-10 18:35:05: Connection started: WALL-E
2020-08-10 18:35:05: Reset printer WALL-E
2020-08-10 18:35:05: Connection started: Number 5
2020-08-10 18:35:05: Reset printer Number 5
2020-08-10 18:35:05: Register LUA cloud services
2020-08-10 18:35:05: add G-Code-Renderer
2020-08-10 18:35:05: LUA initalization finished.
2020-08-10 18:35:05: Websocket opened
2020-08-10 18:35:06: New SSID BierleinNetwork
2020-08-10 18:35:04: Reading printer config /var/lib/Repetier-Server/configs/Number_5.xml
2020-08-10 18:35:04: Starting printjob manager thread for Number_5
2020-08-10 18:35:04: Starting printer threads ...
2020-08-10 18:35:04: Starting printer thread for WALL-E
2020-08-10 18:35:04: Starting printer thread for Number 5
2020-08-10 18:35:04: Starting work dispatcher subsystem ...
2020-08-10 18:35:04: Starting user database ...
2020-08-10 18:35:04: Importing projects ...
2020-08-10 18:35:04: Importing wifi connections from /var/lib/Repetier-Server/database/repetier-network.xml
2020-08-10 18:35:04: Importing wifi connections from /var/lib/Repetier-Server/database/repetier-network-stored.xml
2020-08-10 18:35:04: Initializing LUA ...
2020-08-10 18:35:04: Register LUA cloud services
2020-08-10 18:35:04: add G-Code-Renderer
2020-08-10 18:35:04: LUA initalization finished.
2020-08-10 18:35:04: Work dispatcher thread started.
2020-08-10 18:35:04: Starting web server ...
2020-08-10 18:35:04: Internal work dispatcher thread started.
2020-08-10 18:35:04: Starting wifi watcher ...
2020-08-10 18:35:04: Webserver started.
2020-08-10 18:35:05: Connection started: WALL-E
2020-08-10 18:35:05: Reset printer WALL-E
2020-08-10 18:35:05: Connection started: Number 5
2020-08-10 18:35:05: Reset printer Number 5
2020-08-10 18:35:05: Register LUA cloud services
2020-08-10 18:35:05: add G-Code-Renderer
2020-08-10 18:35:05: LUA initalization finished.
2020-08-10 18:35:05: Websocket opened
2020-08-10 18:35:06: New SSID BierleinNetwork
2020-08-10 18:35:05: Register LUA cloud services
2020-08-10 18:35:05: add G-Code-Renderer
2020-08-10 18:35:05: LUA initalization finished.
2020-08-10 18:35:05: Websocket opened
2020-08-10 18:35:06: New SSID BierleinNetwork
Then it loses connection and goes to bad gateway. Please help!

Comments

  • Update. If I shut down the server and unplug all the printers, I can get it to reboot without having to reimage. Then, if I plug the printers in, it seems I now can home all 3 printers and view temperature. But it does stop working to control printers after a certain amount of time. Still messing with it. 
  • Well, I happened to find an old RS image with 0.93 v19 on one of my computers from a year ago. Loaded it up on the RPi and it works perfect, no issues. So I guess I'm just stuck with the old version. At least it's not that old.
  • What you describe sounds like the typical undervoltage problem of the pi. Maybe the linux kernel on new image is more sensitive here. Have a look here:
    https://www.repetier-server.com/knowledgebase/undervoltage-and-throtteling-of-pi/

    Especially try taping the 5V line as you described you power the printers 5V line over the pi which can easily draw 400mA per printer in addition.

    Also even with older images you still can update the server version using the auto updater. This just updates the server version and not the linux kernel/packages.
  • UGH! YES! Now I remember on the server I built a year ago I covered up the 5v pins on the USB cables! I've now done it again to my printers and none of them "turn on" when I start the server. I'm going to go ahead and take a chance and update the server to latest now. I'm sure that was the issue after reading the link. Thank you!
Sign In or Register to comment.