Failed to detect NetworkManager Service

My printer decided today to stop showing the web interface and when i checked on the kipper screen, it shows that it failed to detect network service. So now i can't view mainsail web interface nor i can SSH into my printer. I'm not sure how i managed to break the network as i properly shutdown klipper before turning the printer off and I always update Ratos first if available. Is there other way to fix this issue without reinstalling Ratos? I'm running latest Ratos 2.1 Thank you
No description
49 Replies
TheTik
TheTik4mo ago
klipperscreen broke/changed some stuff, if you do a search in here you'll see lots of posts. You should still be able to navigate to ratos.local from your computer or phone though
Yathani
YathaniOP4mo ago
I was able to initially access SSH through [email protected] but then i reinstalled klipper screen and now even rato.local does not work 😅
The GP's
The GP's4mo ago
I have the exact same issue. If I unplug the screen and reboot the printer, the printer connects to my wifi. If I turn the printer on with the screen connected I get the same network manager issue and the printer doesn't connect. Network manager is installed and up to date aswell
blacksmithforlife
Network manager doesn't work with Rat-OS wifi @miklschmidt didn't you pin the specific version of klipper screen that works?
The GP's
The GP's4mo ago
So do we know why it's asking for it and why it's installed on my ratrig from a default install of ratos
blacksmithforlife
See the post by thetik above
The GP's
The GP's4mo ago
So are we saying in the newer versions of klipperscreen and we should revert back to an older version?
miklschmidt
miklschmidt4mo ago
Newest should work. I have no idea how klipperscreen affects network connectivity when NetworkManager is not available, that would be a klipperscreen bug. FWIW i can't reproduce that on my machines, but i'm running 2.1. Klipperscreen dropped support for everything but NetworkManager. We don't use NetworkManager, so the klipperscreen network panel doesn't work. That's intentional by the klipperscreen author (and i prefer it like this as it always killed the wpa-supplicant symlink before, imo you should not use it for networking, use the configurator). It should not kill your network connection though.
The GP's
The GP's4mo ago
So I'm completely up to date on ratos and all the other programmes. Still running 2.0.x version not 2.1 I know you mentioned the configurator, but where would this be fixed in that? Little lost in this as I don't use it for networking. On first boot I logged into ratos and gave it my wifi, screen came later. When screen is connected it works fine, but stops the printer connecting to WiFi. If I unplug it, it connects to my wifi
miklschmidt
miklschmidt4mo ago
That might be the issue. I believe klipperscreen force installed network manager at one point. If network manager exists, klipperscreen probably tries to start it, killing everything else in the process. You can try this:
sudo systemctl disable NetworkManager
sudo systemctl mask NetworkManager
sudo reboot now
sudo systemctl disable NetworkManager
sudo systemctl mask NetworkManager
sudo reboot now
I know you mentioned the configurator, but where would this be fixed in that?
Nothing about klipperscreen is fixed in the configurator, but the wifi configuration should be done through the configurator, just like instructed in the docs.
The GP's
The GP's4mo ago
Thinking about this, a while back I did have connection issues where I was able to see my router from the network tab on the screen and reconnected through that wonder if this caused it to use the screen for connection
miklschmidt
miklschmidt4mo ago
Yep this is bad sec
The GP's
The GP's4mo ago
OK, I understand this now. Will deleted network manager and rerun the wifi connection via ratos local. Cheers for your help
miklschmidt
miklschmidt4mo ago
Klipperscreen would have broken that functionality if you used that to connect to a network You can restore it like this:
sudo rm -f /etc/wpa_supplicant/wpa_supplicant.conf
sudo ln -s /boot/ratos-wpa-supplicant.txt /etc/wpa_supplicant/wpa_supplicant.conf
sudo rm -f /etc/wpa_supplicant/wpa_supplicant.conf
sudo ln -s /boot/ratos-wpa-supplicant.txt /etc/wpa_supplicant/wpa_supplicant.conf
The GP's
The GP's4mo ago
One of these problems, where it being sometimes working doesn't help debug the problem.
miklschmidt
miklschmidt4mo ago
indeed
The GP's
The GP's4mo ago
Should I only run this, or run this after uninstalling network manager Uninstalling
miklschmidt
miklschmidt4mo ago
first disable network manager:
sudo systemctl stop NetworkManager
sudo systemctl disable NetworkManager
sudo systemctl mask NetworkManager
sudo systemctl stop NetworkManager
sudo systemctl disable NetworkManager
sudo systemctl mask NetworkManager
then restore the symlink
sudo rm -f /etc/wpa_supplicant/wpa_supplicant.conf
sudo ln -s /boot/ratos-wpa-supplicant.txt /etc/wpa_supplicant/wpa_supplicant.conf
sudo rm -f /etc/wpa_supplicant/wpa_supplicant.conf
sudo ln -s /boot/ratos-wpa-supplicant.txt /etc/wpa_supplicant/wpa_supplicant.conf
Then reboot (that's what sudo reboot now does). That should restore the ratos configurator wifi setup functionality and stop klipperscreen from busting the wifi connection.
The GP's
The GP's4mo ago
Awesome. Thanks for you help on this. Been driving me mad
miklschmidt
miklschmidt4mo ago
You don't need the second ssh [email protected] if you're already connected via ssh obviously, i just copy pasted the previous stuff 😄 Np, hopefully it works too.. 😅
The GP's
The GP's4mo ago
Haha. Yeah I understood that bit Ran the commands via shh, which has made it go to the ratos configurator, unfortunately it keeps on saying my credentials are invalid. Any clue why this maybe as its the correct password. I did see in the root directory on the sd card their is a wpa txt file I can manually add my credentials? Thinking I might start from scratch with ratos 2.1 and see if this fixes everything
Yathani
YathaniOP4mo ago
My Pi started a wifi with Ratos and when I tried to join the network to configure my home network, it says incorrect password for "raspberry". I think i will just reinstalled Ratos again at this point and I hope this issue won't come back again from klipper screen.
miklschmidt
miklschmidt4mo ago
did see in the root directory on the sd card their is a wpa txt file I can manually add my credentials?
That'll work yes, that's essentially what the configurator does.
unfortunately it keeps on saying my credentials are invalid
That means it can't save the password to the ratos-wpa-supplicant.txt file, most likely because the password isn't accepted by the wpa_passphrase command. Could be a special character thing for the SSID or Password, earlier versions of 2.0 didn't properly escape/quote the strings.
it says incorrect password for "raspberry"
Then you've somehow changed it, or you didn't enter it correctly?
miklschmidt
miklschmidt4mo ago
GitHub
RatOS/src/modules/hotspot/config at 2d118e8fa4d4d9f1cf1bdd128bd9df6...
The preconfigured Raspberry Pi image that makes it easy to run Klipper + Moonraker + Mainsail on your printer. - Rat-OS/RatOS
The GP's
The GP's4mo ago
That makes sense as my password for the WiFi does use special characters. I can access that file from the sd card, if I changed it in their and plug in my sd card would you think it would work? Don't particularly want to change my password as that's alot of updating other devices
miklschmidt
miklschmidt4mo ago
Yep that should work
Yathani
YathaniOP4mo ago
Then likely it got changed when i reinstalled klipper screen which prompt me to install Network Manager at the end. I clicked Yes thinking it will fix the issue but apeparently not
miklschmidt
miklschmidt4mo ago
Yeah that breaks everything
The GP's
The GP's4mo ago
Just to let you know, installed ratos 2.1 which had the same issue with special characters in my wifi password. Edited the wpa text file on the sd card and manually added my details under WPA and it works perfectly. Thanks for your help
miklschmidt
miklschmidt4mo ago
hmmm... that's annoying. Did the password written to the wpa file by the configurator look correct? Or did it not actually get that far?
The GP's
The GP's4mo ago
It wouldn't get that far as it said invalid credentials. I did try the normal way first then reverted to inputing them manually directly on the sd card. You need to take the sd card out and write it from your PC as that text file is locked while in the pi
miklschmidt
miklschmidt4mo ago
You need to take the sd card out and write it from your PC as that text file is locked while in the pi
Just sudo nano /boot/ratos-wpa-supplicant.txt. It's not locked it's just not modifiable by anyone but root 🙂 Can you construct a password using the problematic characters (that is obviously very different from your actual password) so i have something to test with?
The GP's
The GP's4mo ago
Ahh OK. That's my lack of knowledge on Linux. Other than that ratos 2.1 works beautifully. I won my printer from the formnext giveaway you did so hadn't gone through the configurator before. It's very well thought out
miklschmidt
miklschmidt4mo ago
Aah nice! congratulations on the win 🙂 Appreciate it
The GP's
The GP's4mo ago
So my password just has an @ in it. The rest is just normal upper and lower case letters
miklschmidt
miklschmidt4mo ago
got it, thank you, will look into what's happening 👍
The GP's
The GP's4mo ago
Happy to help.
Godzilla_Bill_K4IBC
Can you also please check the "!" character as well?
miklschmidt
miklschmidt4mo ago
i reckon both require the same fix, but yes will include a test for that 👍
TheTik
TheTik4mo ago
TDD?
miklschmidt
miklschmidt4mo ago
It's bash, and though there are bash testing libraries, it's really awful to use 😂 But i might be able to write them from typescript. I'm not big on TDD (i never get anything done), but i do regression tests and integration tests.
TheTik
TheTik4mo ago
Yeah, I'm trying it out in a personal project, wish we did more at work. Anyway, sorry to derail the thread 😄
Godzilla_Bill_K4IBC
If I have to I can change password. It was assigned to me by ISP but I can change it if necessary. Means updating every device in house but no big deal.
The GP's
The GP's4mo ago
You can input the password manually via a txt file on the sd card
Godzilla_Bill_K4IBC
Y'all are making this old man dig deep as RPi and Bullseye are my biggest weaknesses. I can do this. I will do this.
miklschmidt
miklschmidt4mo ago
fortunately you don't need to know any of those, just put your pi's SD card in a card reader and edit the ratos-wpa-supplicant.txt file with a simple text editor (ie notepad or preferably vscode or notepad++, but not wordpad) on windows.
Godzilla_Bill_K4IBC
Yeah I do use Notepad++. I assume I do this after first boot of RPi not before.
miklschmidt
miklschmidt4mo ago
either works
The GP's
The GP's4mo ago
Haha, hope it works. I didn't fancy changing my wifi password, so this way is easier
Want results from more Discord servers?
Add your server