ratos-configurator: 502 bad gateway (RatOS 2.0.2 on a custom Ender)

I cannot access the configurator anymore: it seems it somehow switched to a different version (v0.0.0-67-gc5b78c02-inferred) as that is the only thing different compared to my other 2 printers (they are on v2.0.2 deployment). I have never touched anything other then the printer.cfg file, and only ever updated using the update manager. how can I fix this? Id prefer to not do a re-flash as this particular printer needs a partial electronics disassembly to access the SD card.
26 Replies
DocDoyle
DocDoyleOP2mo ago
thinking about it now, this PI was once configured with a USB accelerometer, so that has changed other then the printer.cfg
Wetson
Wetson2mo ago
"only ever updated using update manager" did you ever use update all or did you always update in the proper order?
MDFPereira
MDFPereira2mo ago
Restart moonraker, do a “hard refresh” with Ctrl+shift+r, check for updates and update (starting with RatOS). You are not on the latest versions. If that does not solve it, ssh do the machine and try running ratos doctor
DocDoyle
DocDoyleOP2mo ago
yeah all in correct order, Ratos and all other Ratos components before any others will try! where am I suposed to run this? all i get is command not found note that I am purposefully on 2.0.2 with this machine, I dont want to update just yet to 2.1
MDFPereira
MDFPereira2mo ago
Oh, ok. This only work on 2.1
DocDoyle
DocDoyleOP2mo ago
i figured something like that, but thanks anyway
MDFPereira
MDFPereira2mo ago
My bad, didn’t see ratos version
DocDoyle
DocDoyleOP2mo ago
np!
MDFPereira
MDFPereira2mo ago
But 2.1 is already way better than 2.0.2
DocDoyle
DocDoyleOP2mo ago
im aware! and i will totally update in the near future but i want to wait till the IDEX mod for the printer is finished and redo the entire machine and electronics together with the 2.1 software for now it just needs to get going again as the control board needs to be reflashed from the configurator i supose the issue is mentioned here in the moonraker log?
2025-01-05 00:50:59,614 [shell_command.py:_check_proc_success()] - Command (git -C /home/pi/ratos-configurator rev-list HEAD --count) successfully finished
2025-01-05 00:50:59,615 [git_deploy.py:_set_versions()] - Git repo ratos-configurator: Failed to detect current version, got 'v2.0.2-deployment-1-gc5b78c02'. Falling back to inferred version: v0.0.0-67-gc5b78c02-inferred
2025-01-05 00:50:59,645 [shell_command.py:_check_proc_success()] - Command (git -C /home/pi/ratos-configurator rev-list c5b78c0297be3f0bcf8821d43fc4c31006235aaa --count) successfully finished
2025-01-05 00:50:59,646 [git_deploy.py:_set_versions()] - Git repo ratos-configurator: Failed to detect upstream version, got 'v2.0.2-deployment-1-gc5b78c02'. Falling back to inferred version: v0.0.0-67-inferred
2025-01-05 00:50:59,646 [git_deploy.py:log_repo_info()] - Git Repo ratos-configurator Detected:
2025-01-05 00:50:59,614 [shell_command.py:_check_proc_success()] - Command (git -C /home/pi/ratos-configurator rev-list HEAD --count) successfully finished
2025-01-05 00:50:59,615 [git_deploy.py:_set_versions()] - Git repo ratos-configurator: Failed to detect current version, got 'v2.0.2-deployment-1-gc5b78c02'. Falling back to inferred version: v0.0.0-67-gc5b78c02-inferred
2025-01-05 00:50:59,645 [shell_command.py:_check_proc_success()] - Command (git -C /home/pi/ratos-configurator rev-list c5b78c0297be3f0bcf8821d43fc4c31006235aaa --count) successfully finished
2025-01-05 00:50:59,646 [git_deploy.py:_set_versions()] - Git repo ratos-configurator: Failed to detect upstream version, got 'v2.0.2-deployment-1-gc5b78c02'. Falling back to inferred version: v0.0.0-67-inferred
2025-01-05 00:50:59,646 [git_deploy.py:log_repo_info()] - Git Repo ratos-configurator Detected:
none of this did anything sadly, still 502
MDFPereira
MDFPereira2mo ago
moment... Try this, line by line: ssh to the machine cd printer_data/config/RatOS git fetch origin git checkout -b v2.1.x origin/v2.1.x sudo ./scripts/ratos-update.sh cd ~/ratos-configurator git fetch origin git checkout -b v2.1.x-deployment origin/v2.1.x-deployment sudo ./scripts/update.sh sudo systemctl restart ratos-configurator sudo systemctl restart klipper sudo systemctl restart moonraker
DocDoyle
DocDoyleOP2mo ago
oh sorry for the ping
MDFPereira
MDFPereira2mo ago
I’m not sure it will work on 2.0 But maybe And you can change directly to 2.1 and later change the configuratir to IDEX. Nothing easier now 🙂
DocDoyle
DocDoyleOP2mo ago
doesnt it have to be 2.0.x versions?
MDFPereira
MDFPereira2mo ago
2.0 is just a short name 😉
DocDoyle
DocDoyleOP2mo ago
yeah that did not work
DocDoyle
DocDoyleOP5w ago
No description
DocDoyle
DocDoyleOP5w ago
No description
MDFPereira
MDFPereira5w ago
Yep. Maybe for only 2.1, sorry @miklschmidt can you give us a hand, please?
miklschmidt
miklschmidt5w ago
You want this https://discord.com/channels/582187371529764864/1325269926126162031/1325847812721606678 but with v2.x-deployment instead of v2.1.x-deployment. Actually probably too late now Was a really bad idea running the 2.1 update script on an uprepared 2.0 machine..
DocDoyle
DocDoyleOP5w ago
yeah i can no longer even connect to mainsail anymore
miklschmidt
miklschmidt5w ago
it seems it somehow switched to a different version (v0.0.0-67-gc5b78c02-inferred)
This happens because you ran hard recovery using a very old version of moonraker which caused it to delete the configurator, reclone it and checkout the development branch.
cd ~/printer_data/config
rm -rf RatOS
git clone https://github.com/Rat-OS/RatOS-configuration.git RatOS
cd RatOS
git checkout -b v2.x origin/v2.x
cd ~/ratos-configurator
git checkout -b v2.x-deployment origin/v2.x-deployment
sudo ./scripts/update.sh
sudo ~/printer_data/config/RatOS/scripts/ratos-update.sh
cd ~/printer_data/config
rm -rf RatOS
git clone https://github.com/Rat-OS/RatOS-configuration.git RatOS
cd RatOS
git checkout -b v2.x origin/v2.x
cd ~/ratos-configurator
git checkout -b v2.x-deployment origin/v2.x-deployment
sudo ./scripts/update.sh
sudo ~/printer_data/config/RatOS/scripts/ratos-update.sh
The above should restore 2.0..
DocDoyle
DocDoyleOP5w ago
i will try this now, thankyou!
miklschmidt
miklschmidt5w ago
Actually that won’t be enough. There’s no easy way to rollback all the system changes that was done when you ran the v2.1.x update script. I’m afraid it’s a bit of a lost cause. I don’t have time to help you undo it all. I suggest copying your configuration and reinstall 2.0 (i would encourage you to update to 2.1 though).
DocDoyle
DocDoyleOP5w ago
for as far as I can see it seems to be running again in the state of before the 2.1 update scripts, with configurator resolving to the 502 again, but I suppose I wouldnt notice any deeper system changes? alright, ill go for the teardown and reflash it with a clean 2.0 so I dont need to rebuild any configs, im going to update all machines to 2.1 when i have more time available, the features look amazing. thanks for your efforts people!
miklschmidt
miklschmidt5w ago
Most of them revolves around the configurator, that won't run again without undoing those changes.
alright, ill go for the teardown and reflash it with a clean 2.0 so I dont need to rebuild any configs,
There's a lot less to worry about config wise in 2.1 though, 95% is auto generated from the hardware selection 🙂

Did you find this page helpful?