Frequent but unpredictable "401 Unauthorized" responses during initial RatOS configuration

I'm building a V-Minion from a refurbished Fabreeko kit using a Raspberry Pi 3A and BTT SKR 2 for controls. After flashing the latest pre-built RatOS image (RatOS-v1.2.4-buster-lite.img.xz), I get frequent but irregular "401 Unauthorized" HTTP responses that are preventing me from using the RatOS web interface. I've included the steps I followed this morning, and also attached Moonraker and Klippy logs (these logs were a pain to obtain, because of the aforementioned 401 responses! 😅 ) Thank you! Steps I followed: - Remove MicroSD card from SKR2 and from Raspberry Pi - Flash RatOS-v1.2.4-buster-lite.img.xz using Raspberry Pi Imager - Manually edit ratos-wpa-supplicant.txt to provide my Wi-Fi SSID and PSK (they have whitespace and special characters, configurator doesn't work with it) - Insert flashed MicroSD card into Raspberry Pi, power on the Ratrig power supply, wait 60-ish seconds - Browse to http://ratos.local; the site mostly loads but I still receive some 401 Unauthorized responses, for example when trying to load http://ratos.local/server/files/config/.theme/sidebar-logo.svg - Use the "Compile Firmware" macro button, wait for it to finish - In the "Machine" tab, browse to config/firmware_binaries/ - Attempt to download firmware-btt-skr-2-429.bin, receive 401 unauthorized error - Attempt to download klipper and moonraker log files, receive 401 unauthorized error - Refresh page; site loads same as before (majority of page loads but a few 401 unauthorized errors, e.g. the logo) - Update ratos-configurator - Refresh page; receive 401 Unauthorized errors when trying to load ws://ratos.local/websocket - Refresh page; everything loads including logo, but still can't download the firmware .bin or log files. - Refresh page; everything loads; I download the log and bin files. - Refresh page; receive several 401 unauthorized errors but after some retries, most of the page loads (no logo again) - Shut down RatOS, power down PSU, make Discord post
13 Replies
fair-rose
fair-rose•2y ago
Addendum--my local network IP addresses are: IPv6 address: 2600:1700:5d80:1970::3e 2600:1700:5d80:1970:101d:596f:b258:2657 Link-local IPv6 address: fe80::27f:52ba:bc77:e8f4%13 IPv4 address: 192.168.1.117
miklschmidt
miklschmidt•2y ago
Ipv6 is probably the issue. 3 ways to solve: 1) use ipv4 address instead of ratos.local 2) add your local ipv6 range to the authorization section in moonraker.conf 3) update to RatOS 2.0 Beta 🙂
fair-rose
fair-rose•2y ago
Thanks! Using ipv4 address 192.168.50.1 didn't resolve, I could probably keep attemtping it but I'm eager to try the 2.0 beta so I'm going to do that next 🙂
miklschmidt
miklschmidt•2y ago
192.168.50.1 is the hotspot (which isn't running when connected to wifi) You need to use 192.168.1.117 (if that was the address of your pi and not your local machine) Beta 2 works too 🙂
fair-rose
fair-rose•2y ago
Ahhhh, I see! 192.168.1.117 was the address of my local machine. Beta 2 is nearly finished flashing, excited to see how it goes
miklschmidt
miklschmidt•2y ago
remember to use the temporary v2 docs at https://rat-os.vercel.app the setup process is quite a bit different (and simpler).
Home | RatOS
The easy way to run klipper on your 3D printer.
fair-rose
fair-rose•2y ago
RatOS support for the Voron V0? 👀 👀 That'll be handy for the other printer I'm assembling right now, haha Unfortunately I can't get past the initial Wi-Fi configuration step on the beta. In the latest stable release, using ratos.local/configuration it would fail (I think because there's whitespace and special characters in my Wifi SSID and PSK). It would try to connect, fail, and revert to generating a hotspot named RatOS. I worked around this by manually editing ratos-wpa-supplicant.txt before booting the RPI. In this 2.0 beta, I've tried both the configurator at ratos.local/configuration and manually editing ratos-wpa-supplicant.txt. In both cases, I'm unable to reach ratos.local on my local network, and it never tries to generate a hotspot again. I assume there are some logs I could recover off of the SD Card somewhere? I don't see a klipper_logs folder like I saw previously (/home/pi/klipper_logs/ on the stable RatOS install). I got some logs out of the /var/ folder. I've attached daemon.log and ratos-configurator.log, would any others be useful to include as well? For now I'll try going back to the stable OS and trying to add my ipv6 address to the trusted clients list. But I do want to try the Beta if I can! Adding my IP 2600:1700:5d80:1970::3e to Moonraker's trusted client list didn't change the 401 responses 😭 It still happens often, but unpredictably. Thanks again 🙂
fair-rose
fair-rose•2y ago
miklschmidt
miklschmidt•2y ago
White space should work, special characters might be a problem though, will fix this.
In both cases, I'm unable to reach ratos.local on my local network, and it never tries to generate a hotspot again:
Are you using an IPv6 only network? What happens exactly? It doesn't resolve, or is it just moonraker that won't connect? will take a look at the logs tonight
fair-rose
fair-rose•2y ago
It's not an IPv6-only network, I believe. The URL ratos.local never resolves. In the morning, I will try looking for the IP address of the pi and connecting to that instead of using the mDNS. Thank you for doing all this! Let me know if I can help test the fix for special characters in the WiFi credentials.
miklschmidt
miklschmidt•2y ago
So following your logs everything seems to be working as intended. All i can think of is some local network configuration at your end that doesn't do what it's supposed to do. If you have something like a pihole set up, that could be the issue.
fair-rose
fair-rose•2y ago
No Pihole here, but your message got me to try restarting my router. Now the Beta 2.0 is resolving just fine! Both ratos.local and the ipv4 address. Time to start configuring my printer 🥳 Thank you!!
miklschmidt
miklschmidt•2y ago
Great to hear! 🙂
Want results from more Discord servers?
Add your server