Configurating Machine

I am working on getting my Pi up and running, I am following the instructions on the following page: https://os.ratrig.com/docs/installation I have connected to the pi via ethernet and completed the updates in the order as mentioned in the documentation. I am trying to now configure the machine using the configuration tab, when I click on the configuration tab it takes me to http://ratos.local/configure but the page gives a 502 Bad Gateway error. I have tried this while connecting to the pi through the ratos wifi and without connecting through wifi. Feeling stuck!
Installing RatOS | RatOS
This is preliminary documentation for the upcoming v2.1.0 release. The work is still ongoing and the documentation is not yet complete.
93 Replies
TheTik
TheTik•2mo ago
What url are you using to view the dashboard at all?
hussainsail2002
hussainsail2002OP•2mo ago
This is the URL to view the dashboard: http://ratos.local/config My local IP is 192.168.0.163 I used that initially to connect
TheTik
TheTik•2mo ago
Are you able to open http://192.168.0.163/config?
hussainsail2002
hussainsail2002OP•2mo ago
yes, its takes me to the machine tab
TheTik
TheTik•2mo ago
cool. Don't know why your network name resolution is having troubles with ratos.local for some paths, but that should let you keep moving forward.
hussainsail2002
hussainsail2002OP•2mo ago
yes I completed all the updates on the config but when I go to configuration it gives me the bad gateway error
TheTik
TheTik•2mo ago
sorry, are you able to go to http://192.168.0.163/configure ?
hussainsail2002
hussainsail2002OP•2mo ago
configure does not work for me it gives the error
TheTik
TheTik•2mo ago
that makes no sense. hm
hussainsail2002
hussainsail2002OP•2mo ago
The tabs highlighted give me the bad gateway error
No description
hussainsail2002
hussainsail2002OP•2mo ago
others are working okay
TheTik
TheTik•2mo ago
How did you install ratos to the sd card initially?
hussainsail2002
hussainsail2002OP•2mo ago
I used balena etcher to flash the image then connected pi to power and checked if I was getting the wifi hotspot the connectd my ethernet cable, I used a octopi to get the IP address
TheTik
TheTik•2mo ago
cool, so the login is stll pi / raspberry ?
hussainsail2002
hussainsail2002OP•2mo ago
yes that was the login
TheTik
TheTik•2mo ago
kk did you get the pi connected to your wifi as well?
hussainsail2002
hussainsail2002OP•2mo ago
not sure what the issue is My office does not have wifi I can only use ethernet cables
TheTik
TheTik•2mo ago
I'm wondering if there is something weird like those pages are only looking at the wifi interface
hussainsail2002
hussainsail2002OP•2mo ago
I was able to connect to the ratos hotspot
TheTik
TheTik•2mo ago
@blacksmithforlife I'm out of ideas for now, you have any suggestions? I would like to see the address bar while you're viewing mainsail
hussainsail2002
hussainsail2002OP•2mo ago
My office uses a VPN of some sort could that be causing an issue ? let me send you a screenshot
hussainsail2002
hussainsail2002OP•2mo ago
No description
hussainsail2002
hussainsail2002OP•2mo ago
this is with config
hussainsail2002
hussainsail2002OP•2mo ago
No description
hussainsail2002
hussainsail2002OP•2mo ago
with configure
TheTik
TheTik•2mo ago
SO weird that one page works and another doesn't
hussainsail2002
hussainsail2002OP•2mo ago
that sucks, thanks for your help !
blacksmithforlife
blacksmithforlife•2mo ago
the configurer is hosted on the pi as a separate process than mainsail I believe it uses nginx
hussainsail2002
hussainsail2002OP•2mo ago
is it being blocked by firewall or something?
blacksmithforlife
blacksmithforlife•2mo ago
if you are getting a bad gateway that is usually due to the configurer not running
hussainsail2002
hussainsail2002OP•2mo ago
is there something I can do to get it up and running?
TheTik
TheTik•2mo ago
ohh, interesting! and good to know I'm assuming you've tried rebooting
hussainsail2002
hussainsail2002OP•2mo ago
Yes a few times
TheTik
TheTik•2mo ago
Other thing im curious about is where KlipperScreen came from. Didn't think that came with ratos but I haven't installed 2.1 yet.
hussainsail2002
hussainsail2002OP•2mo ago
I am not sure what that is
TheTik
TheTik•2mo ago
that answers that then 🙂
hussainsail2002
hussainsail2002OP•2mo ago
?
TheTik
TheTik•2mo ago
means you didn't add it, which means it came with ratos
hussainsail2002
hussainsail2002OP•2mo ago
thanks for your response, is there any method to check the root cause of this issue? Should I try with another raspberry pi ? or maybe check on another network
blacksmithforlife
blacksmithforlife•2mo ago
Sorry, I work was busy and I couldn't answer. I believe you can check the status of it running with sudo systemctl status ratos-configurator.service
hussainsail2002
hussainsail2002OP•2mo ago
no issues at all ! Where do I type the sudo systemctl status ratos-configurator.service ? can I type it into the console box ?
blacksmithforlife
blacksmithforlife•2mo ago
no, you will have to ssh into the pi
hussainsail2002
hussainsail2002OP•2mo ago
oh okay, let me try that sorry for the newbie questions, is there a specific way to ssh into the pi? like I need a cable or something ?
blacksmithforlife
blacksmithforlife•2mo ago
you need to connect the pi to your network, and then if using a windows machine you can type in the CMD ssh pi@<YOUR PI'S IP ADDRESS, password by default is raspberry and it will not show you typing the password which is normal
hussainsail2002
hussainsail2002OP•2mo ago
my Pi is already connected by ethernet cable can I use putty to ssh into it ?
hussainsail2002
hussainsail2002OP•2mo ago
No description
hussainsail2002
hussainsail2002OP•2mo ago
this is what I get
blacksmithforlife
blacksmithforlife•2mo ago
@miklschmidt - help
miklschmidt
miklschmidt•2mo ago
So first of all, the screenshot shows old packages, looks like they have not been updated, start there. Refresh the update manager. You may also want to do a hard refresh of mainsail, it's on 2.13 so it should show the custom package descriptions and not the client names. If that does nothing, show me the output of:
cd ratos-configurator
git status
cd ratos-configurator
git status
You may somehow have ended up on the wrong branch.
miklschmidt
miklschmidt•2mo ago
This should not exist on an updated installation.
No description
miklschmidt
miklschmidt•2mo ago
In so far as the ratos-configurator is on v2.1.x-deployment, doing a git pull followed by ratos doctor should get everything into work order. If there are any errors, post them here, i'll get you sorted.
hussainsail2002
hussainsail2002OP•2mo ago
Thank you for your detailed response, I hit the refresh icon on the update manager and it still shows all packages are up to date.
I am not sure what hard refresh of mainsail means or how to do it. I hit refresh on all the buttons that are visible after hitting the power icon on the top right corner. I typed in the code above after ssh-ing into the Pi: see image for details
No description
hussainsail2002
hussainsail2002OP•2mo ago
when I tried git pull I got the following error after a while:
No description
hussainsail2002
hussainsail2002OP•2mo ago
I tried the rat doctor as well after reconnecting to the pi as the connection timed out
No description
miklschmidt
miklschmidt•2mo ago
I am not sure what hard refresh of mainsail means or how to do it.
Ctrl + shift + r .. That clears the cache and reloads the browser, it's a generic browser feature. This explains the crux of your issues, you have network problems. It's still processing in your screenshot, should fix your issues
hussainsail2002
hussainsail2002OP•2mo ago
My office uses a vpn, could that be an issue ?
miklschmidt
miklschmidt•2mo ago
depends on the specifics
hussainsail2002
hussainsail2002OP•2mo ago
can I complete the configuration at another location that does not have a VPN and then bring it back to my office to complete the rest of the setup ?
miklschmidt
miklschmidt•2mo ago
Sure!
hussainsail2002
hussainsail2002OP•2mo ago
okay I think that will be easier for me to try
miklschmidt
miklschmidt•2mo ago
Just run ratos doctor, it'll report the status as it goes (once it's gotten over the initial package installation) Once that's happy you can go ahead and configure 🙂
hussainsail2002
hussainsail2002OP•2mo ago
okay, thanks. the ratos doctor is still at the same spot for the last hour, is that normal ?
hussainsail2002
hussainsail2002OP•2mo ago
No description
hussainsail2002
hussainsail2002OP•2mo ago
I took my pi home and used my wifi to connect to the pi but I get the same issue. I was able to connect to the configure page initially but after doing the updates it stopped working. I am planning to start fresh again. Which img would you recommend flashing on the SD? Thanks!
TheTik
TheTik•2mo ago
2024-07-27-RatOS-2.1.0-RC2-raspberry-rpi32.img.xz Then run the updates in the prescribed order
hussainsail2002
hussainsail2002OP•2mo ago
thank you I flashed a fresh img onto a new SD card and the configuration page is now visible, but I have not yet updated the items on my update manager. I did follow the order last time
hussainsail2002
hussainsail2002OP•2mo ago
No description
hussainsail2002
hussainsail2002OP•2mo ago
as per the online guide I need to do ratos first and then ratos configurator
hussainsail2002
hussainsail2002OP•2mo ago
This is my configuration page currently before any updates
No description
hussainsail2002
hussainsail2002OP•2mo ago
I have completed the 2 updates first for Ratos and then ratos configurator
No description
hussainsail2002
hussainsail2002OP•2mo ago
My configuration page has stopped working again.....
No description
hussainsail2002
hussainsail2002OP•2mo ago
what did I do wrong ???
PetrT
PetrT•2mo ago
Same issue here. Also VAOC and RealTime Analysis don't work edit: fixed. I had to delete chopper_tune.cfg -> ../../chopper-resonance-tuner/chopper_tune.cfg . I tried Chopper_tune months ago and after tests, I deleted it. But this .cfg file remains somewhere and made this issues.
No description
No description
hhes
hhes•2mo ago
Had the same 502 Bad Gateway after installing RatOS 2.1. ratos doctor solved the issue
hussain
hussain•2mo ago
When I use ratos doctor nothing happens I ssh into the pi and use ratos doctor and it did not do anything for the whole day Is there a previous more stable version that does not have this issue ?? Cause I am having this issues only after updating
DemetriKarakashev
DemetriKarakashev•2mo ago
I have the exact same issue down to every detail. Did you manage to fix it?
LEO_CNC
LEO_CNC•2mo ago
same issue here ! after update Ratos-Configurator "ratos doctor" command not found
hussainsail2002
hussainsail2002OP•4w ago
No I could not fix it, @miklschmidt need your help !
jdfs😶🌫
Same issue... With another internet conection (my phone as hotspot) update like is supose and no more 502 message. For me is good now.
miklschmidt
miklschmidt•4w ago
Hey guys, because of the monorepo merge the updates have to be done in a 2-step process, and if you run "hard recovery" on the configurator before you have updated moonraker, you'll get yourself into this situation. If ratos doctor returns command not found, that's likely the issue, there are some more convoluted ways to get yourself into that situation as well, but that one is the most common. The fix is this (do not run this on 2.0 installations):
cd ~/ratos-configurator
git fetch
git switch -f v2.1.x-deployment
ratos doctor
cd ~/ratos-configurator
git fetch
git switch -f v2.1.x-deployment
ratos doctor
jams2799
jams2799•3w ago
Seeing this error:
> [email protected] start /home/jams/ratos-configurator/app
> sleep 1 && curl -s -o /dev/null --retry 20 --retry-all-errors --retry-delay 1 --retry-max-time 60 "http://localhost:3000/configure" &> /dev/null &
next start

â–² Next.js 13.5.6
- Local: http://localhost:3000

✓ Ready in 4.2s
ReferenceError: location is not defined
at /home/jams/ratos-configurator/app/build/server/chunks/2828.js:81:6623
at /home/jams/ratos-configurator/app/build/server/chunks/2828.js:81:8214
at t.startTransition (/home/jams/ratos-configurator/app/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:59:6499)
> [email protected] start /home/jams/ratos-configurator/app
> sleep 1 && curl -s -o /dev/null --retry 20 --retry-all-errors --retry-delay 1 --retry-max-time 60 "http://localhost:3000/configure" &> /dev/null &
next start

â–² Next.js 13.5.6
- Local: http://localhost:3000

✓ Ready in 4.2s
ReferenceError: location is not defined
at /home/jams/ratos-configurator/app/build/server/chunks/2828.js:81:6623
at /home/jams/ratos-configurator/app/build/server/chunks/2828.js:81:8214
at t.startTransition (/home/jams/ratos-configurator/app/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:59:6499)
ratos doctor is good with no errors
blacksmithforlife
blacksmithforlife•3w ago
@miklschmidt
miklschmidt
miklschmidt•3w ago
Wrong user. Supposed to be pi Don’t change the defaults if you don’t know what you’re doinh
hussainsail2002
hussainsail2002OP•4d ago
This is what I am getting when I try the above code. It just gets stuck here for hours
No description
miklschmidt
miklschmidt•4d ago
try cd ~/ratos-configurator/app and then pnpm install, show me the output if it fails or hangs.
hussainsail2002
hussainsail2002OP•4d ago
This is what I get
No description
miklschmidt
miklschmidt•4d ago
Ah, someone ran sudo ratos doctor it seems. Will add a check for that. Here's how you fix your situation:
cd ~/ratos-configurator/app
sudo rm -rf node_modules
ratos doctor
cd ~/ratos-configurator/app
sudo rm -rf node_modules
ratos doctor
hussainsail2002
hussainsail2002OP•4d ago
This is what I get now, I will wait for it to do its thing
No description
miklschmidt
miklschmidt•3d ago
if it still hangs, something isn't right. You can try installing the packages yourself firs:t
cd ~/ratos-configurator/app
sudo rm -rf node_modules
pnpm install
ratos doctor
cd ~/ratos-configurator/app
sudo rm -rf node_modules
pnpm install
ratos doctor
hussainsail2002
hussainsail2002OP•5h ago
No description
hussainsail2002
hussainsail2002OP•5h ago
No description
hussainsail2002
hussainsail2002OP•5h ago
This is my output, waiting for ratos doctor now
TheTik
TheTik•5h ago
node:internal/errors:496 sure is interesting 😄 Hopefully the doctor will get you set

Did you find this page helpful?