Ratos gives "connection denied" error even when connected with wifi
So I'm setting up my ratos on my RPI (which is connected with ethernet) and it sends off a network wich you can connect to (as it should be). But after connecting and searching ratos.local, http://RatOS.local/configure or http://192.168.50.1/configure it just gives the "ERR_CONNECTION_REFUSED" error.
Solution:Jump to solution
Im coming in late to this, and only skimmed, but I've heard from others that the rpi imager is okay as long as you don't change any of the defaults, and to use balena etcher 1.18 or earlier.
203 Replies
Did you want to try a clean flash to be sure now and we can troubleshoot as we go?
yes ofc I'll use the rpi imager
sd card is formatted as FAT32 with clustersize of 2048bytes
Cool when its done, let's try using your phone for the initial connection
We'll see if anything different happens haha (sometimes certificate issues and a bunch of other things can cause issues so I like to debug on several devices to narrow it down)
just adding this to be sure its done correctly
okay I'll give you a message when its done
Easy, hopefully we can get it sorted!
a clean flash is a good place to start. Do you happen to have a monitor you can hook up to the rpi as it boots as well?
and while you're doing that a few pieces of information that could help:
- what wifi band are you connecting to when you're attempting wifi? (2.4?, 5?)
- is your wifi set to use smart band/Multi-Link (combines multiple bands under same SSID)
- is your wifi using WPA3 for password security?
For ethernet, questions are:
- is your router adding LAN ports to a different VLAN? (when you connect other devices using that ethernet cable can you ping them from your computer)
@CHIEFdotJS to aid some things quickly:
I got @Jobbe| V-core 4.0 500 Hybrid to connect via ssh, test connection via ping from windows on the old flash
ssh via hostname or ip address?
IP, ping couldn't locate hostname
was he on wifi or ethernet at the time?
That's a good question, I think WiFi
192.168.50.1 was the IP
that was the IP of the ratos host?
Yep
Ssh root@192.168.50.1
root?
Yeah the user was wrong
I think
But it got the certificate/fp added as expected
normally the
.1
is reserved for the gateway or DHCP server, and you'd also need root to log in to to that192.168.50.168 was the ipv4 I think
you should be using
pi
as the user for the ratos host regardless of what IP it's atYeah I couldn't remember the user at the time haha, just wanted to check it could find it and port 22 was accessible from windows
there's no way he was establishing ssh connection to ratos host at
192.168.50.1
that was the routerAh, well that makes more sense, I thought it was weird the ipv4 wasn't used
that address is ipv4
Figured you guys had done some magic in the routing
I meant the adapter ip (via windows network property screen)
that sort of thing is impossible
What is?
for a device IP to present itself over the IP of the gateway to another device on the same subnet
Yes obviously it'd conflict with the DHCP
it would bring down DHCP altogether
Haha I know, had a few devices on our workstation boards do this
not possible, they'd be unable to get a lease
Correct, couldn't ever see the device
For reference was our workstation boards with the external management consoles. Didn't get DHCP lease, couldn't find it, had to manually change address using the bare metal
unfortunately I cant hook up my pi onto a screen
no my rpi is connected to an ethernet
never unplugged that
ok now I'll firstly connect to the ratos network via my phone
Might want to hold out for @CHIEFdotJS
give it a shot. It will depend on the router. Some of them don't allow mDNS resolution between wired and wireless connections, but there's no harm in trying it to see what happens. Make sure you've waited a good 5 minutes after firing up the pi before we make the attempt though
The 5min wait is a gooooood point
the first boot can take a while for the network manager to get configured, and then technically it will reboot itself a 2nd time so it can start up the network services in a different order and finish some of the final first boot stuff
ok I think it already passed the 5 min mark
yep, try
http://ratos.local
in your browserits saying site not available (DNS_probe_finished_NXDOMAIN error)
in this case, since you're using a phone, there could also be issues where the browser you're using automatically blocks non-TLS addresses, so you my have to figure out how to disable that setting, or you'll have to get the IP address of your ratos host from your router's network list
yeah, that means your phone isn't resolving the
.local
partatm its pretty hard to get the routers network lis
or at least your phones brwser
do I keep trying on my phone or should I switch back to my laptop?
your laptop
phone is really difficult since it can tranparently switch between wifi and data
ok phone is unconnected to the ratos network and the laptop is connected now
and NXDOMAIN indicates it wasn't even trying to use your wifi network adapter to resolve
http://ratos.local also doesnt work on laptop
same nxdomain error
wait...
you're saying you are connecting the PI to ethernet, but then you're connecting your phone and laptop to the ratos wifi network?
disconnect your laptop from the ratos wifi netwok, and reconnect it to your router's network
yes my pi is connected to my router via an ethernet cable and then I connect to ratos wifi via my laptop as followed
then go to http://RatOS.local/configure
this is my current setup
unfortunately it still doesnt work
Connect laptop to router wifi
the whole point of connecting to the ratos wifi network is so that you can configure the network manager service on the pi
if you connect to ethernet, it will automatically configure that service when it boots, so you skip that step entirely
no even with the wifi switched it still doesnt work
what you're getting now is that mDNS isn't working yet, so ratos.local won't resolve, and for this you need the IP address of the pi on your routers network
that's because that address is only valid on the ratos wifi network
since you're connecting the pi to ethernet, you will never use that address
Can we try removing the Ethernet and trying from laptop to pi?
Since I don't think we've actually done that on this thread yet
ok so I remove the ethernet from the pi and unplug the power, and replug the power back in afther 5 sec?
no
just unplug ethernet from the pi without powering off
then connect your laptop to ratos network
then go to http://192.168.50.1/configure
Ok now its giving ERR_CONNECTION_REFUSED
is your laptop on a VPN?
Nope double checked that
and it didn't auto-switch to a different wifi signal when it found out the ratos network didn't have internet access?
No I turned off the auto switch
That one gives "DNS_PROBE_NO_INTERNET"
I dont know for certain, but i think not
i'm thinking that your network properties aren't using 192.168.50.1 for DNS
for the ratos wifi network connection properties
either that or your browser is blocking the connection due to unsafe, and you need to override it
unfortunately i havea meeting in 3 minutes and I'm going to be busy for the next 4 hours, so i can't continue to help until later
Ill try another browser but qi think its not the browser blocking it bcs you would see it in chrome
yeah, it would have the safety symbol in the address bar
Can you connect both Pi and laptop to the modem with cable? I am beginning to think this modem doesn't allow local access between devices over WiFi so even if we get the WiFi to connect it may still be an issue unless this is a different modem then when you were in the dorm
I had that thought too
also, if it's a school issued laptop, there could be a GPO that sets the DNS server for all network adapters
No problem I really apriciate your help and effort atm 🙂
there's a really hacky approach you can take here
It is another modem then my dorm for sure, as for cables I'll check if I have a spare ethernet
you could power off the pi, mount the root partition, and manually edit the network manager details, then put the sd card back in the pi, boot it up, and you would hopefully be good to go
i can help you with that later this afternoon if no one else can before then
Its not a school laptop for sure
but if your network admin doesn't allow machine to machine connections, nothing will work unless you get a local switch installed
and if I was a network admin for a dorm wifi network, I definitely wouldn't allow that
Well ive got a swictch modem here so we can try that this evening
It's the WiFi suplicant file as RatOS doesn't use network manager
Nono a year ago I had my vcore at my dorm, but now I moved it to my home
And the router/network provider at home is a basic paid provider
Technically if you were able to ensure the phone doesn't switch WiFi, try the phone again making sure the pi isn't connected to the Ethernet
Just to be safe, can isolate everything else other than those two devices
The part that is odd to me is that you are unable to establish a connection even when using the raspberry pi as your Wi-Fi AP
And would unplugging end replugging the main router do something?
And ping to 50.1 works
I always do that if something doesnt want to connect via wifi
Not for the WiFi test with the phone
As it'll connect phone to the pi
I forgot about the Wi-Fi hotspot part when you were telling me about logging in to the 50.1 address earlier
Got to run, sorry
Plenty of fun later haha 😉
Np good luck with your meeting
I'm hoping the phone with WiFi to the pi hotspot works
I think your problem is your local switch
hat do you mean with that
Am I correct in thinking the wifi hotspot to phone eliminates the switch out the equation? As it should initially fetch the config page
Just connect phone to ratos hotspot
That I should connect my phone to ratos and check http...
Make sure no Ethernet is connected
Just phones WiFi to pi WiFi
If you were able to SSH into the pie earlier when connected to its hotspot, that would indicate that your local switch is blocking traffic between devices on http ports
Ok and then turn on personal hotspot on phone?
Don't turn on hotspot
Just connect to the ratos hotspot.
Yeah that's the thought as 22 worked seemingly
ok and now?
pi is connected to phone and laptop not
Yep
Make sure laptop WiFi isn't connected to pi too
Just to be safe
Technically, as chief mentioned, your phone should now try to resolve ratos.local
(hopefully through the pi)
dammed my phone doesnt want to connect (DNS_probe_finished_no_internet error)
Okay go-to phone network connection settings
Check what it says the IP is
IPv4 is 192.168.50.153
so the last number has changed
Kk go-to try http://192.168.50.153/configure
(on phone)
Also try http://192.168.50.1/configure
(on phone)
both http says ERR_connection_refused
Cool same as the laptop now
Timezone issue maybe?
It's concerning as im not sure if we even set the WiFi settings via the SD card it'll make a difference
Something seems odd
The pi and ratos seem to be doing its thing correctly enough to broadcast the ssid
would It help to try connecting with another rasberry pi? I can get another (even with another sd card) in 40 minutes
At this stage anything is helpful
It's a good sign the laptop and phone now give the error though
As they're now 1:1 (relatively lol)
yeah isnt their a file on the sd card where you can manually typ the wifi you want to connect and password?
Yeah
yeah Its kinda a tricky one I'm going to get the other pi
That'll rule out some things, it's more so weird that the both devices show the same error.
I get these errors sometimes when the time zone is out on my devices, but that's a real shot in the dark
Yep grab the other one and we'll try that, failing that we'll try the card
Found this as well:
https://www.answeroverflow.com/m/1199775450860368016
Check power to the pi just to be safe.
Errors connecting to ratos.local, no hotspot for new RatOS image - ...
A few days ago my browser would no longer connect to ratos.local which I had been using steadily since I built the V-core 9 months ago. The printer has been on my company's wifi, while my computer has been hardwired, and there have been no problems.
When I configured everything to begin with, I don't think I changed any of the SSH information, ...
Also how to do the SD card method with supplicant file
https://www.answeroverflow.com/m/1094972702718173245
RATOS won't let use wifi after configuration - Rat Rig Community [U...
Hi, I was using RatOS 2.0 Alpha5 and all was fine. I was able to connect my PI4 using wifi . after the update to the 2.0 the wifi doesn't connect anymore. Looking around I saw the suggestion to run the wizard configurator again (trough the eth or wifi hotspot) configure the wifi, disconnect the hotspot and, eventually, the eth and connect to the...
Make sure the country and timezone are set correctly in the imager if it's set there, or your devices are set correctly too with time
(phone, laptop)
I'm just thinking about the options is it usefull to test te connection from another router?
Not really if the phone and laptop both have the same connection
bcs my other pi is laying at another home, so maby I can test the connection from there
It's connecting okay it seems
Just you're not getting the web server
So the webserver ip and port (http is 80) are not being used correctly by the phone
The server will communicate directly with your phone when you connect phone to ratos hotspot
I'll read it afther I get the other pi, I'm now in my car
(eliminating any routers for this step)
Easy dude, no rush I'm training models all day so take your time lol
We'll try sshing if all else fails and then checking if we can get access to the URL, also a few other things like ports etc
Okay I'm back with another pi and sd card, and I even have a second screen to read the pi
Fantastic
ok everything is set up. do I firstly go further with the original RPI or should I try the other rpi?
both are same models (model 4b)
Try the new one
Same deal, use laptop or phone wifi adapter to connect to hotspot
(ratos hotspot)
well guess I'm not lucky today, the pi is not going on
it was from an old ender 3 octoprint setup but for some reason it doesnt turn on when plugged in
Haha these things happen
Same power supply?
yup and when I insert the psu into the other rpi it works
Yeah that'd be something weird on the other pi. No worries, it should work with the other one
idk how its broken bcs 2 months ago it worked and I did nothing else with it
When you do the flash, is there a time zone or country that gets set? I ask because I used balenaetcher and there's no OS config stuff, but generally if you didn't apply any customization on the image it should be set by ratos
Not sure on that one, if it's got 5v on the 5v pin and ground you should have power, other wise that pi is broked
well do I reflash the sd card again? I also have balenaetcher but it always gave me an error afther validating
Probably no point reflashing imo
okay I'll leave it be
Let's try the sd card method
okay so I insert the sd card into my laptop and search for the file?
Link should be just above
RATOS won't let use wifi after configuration - Rat Rig Community [U...
Hi, I was using RatOS 2.0 Alpha5 and all was fine. I was able to connect my PI4 using wifi . after the update to the 2.0 the wifi doesn't connect anymore. Looking around I saw the suggestion to run the wizard configurator again (trough the eth or wifi hotspot) configure the wifi, disconnect the hotspot and, eventually, the eth and connect to the...
Let's try ssh
@Jobbe| V-core 4.0 500 Hybrid go-to your laptop, connect the laptop WiFi to the ratos hotspot
Goto command prompt and type ipconfig -all
okay give me a sec the pi is booting up again. do I connect my second screen onto it?
Yep
Forgot the second screen was there
There's some folks saying rpi imager can ruin the supplicant file
We'll have to try balena etcher as well just in case
I had to extract the actual image from the .xz file using balena etcher I think
And I didn't get an error after that
well also forget about that. the screen seems not to connect with the pi (tried both ports). connecting with laptop still works

ok I'll try this now

Okay it gives me this
Cool
Ssh pi@192.168.50.186
Use raspberry as the password

Unknown error nice
Retrying also doesnt work
Sometimes security stuff on the ssh connection end prevents repeated attempts
Interesting
Kk shut down the pi and put sd card in computer and we'll have to track down the supplicant file on disk
etc/wpa_supplicant/wpa_supplicant.conf when on pi, through ssh
boot/ratos-wpa-supplicant.txt via SD
hmhh strange the only thing I found is this one
Everything is looking like it's something to do with the rpi imager

boot/ratos-wpa-supplicant.txt?
That's correct
okay and then put my wifi username and pasword here?

Yeah
Is there country settings in there?
yes
Is it correct
ok just to be sure I need to put in the things into 1 and remove the hastags right?

note: my wifi is secured
Just the network for the wpa/wpa2
Remove the hashtags from network, ssid, psk, terminating bracket
Then after that, save it if course, put into pi and power pi on
Hopefully you'll be able to find ratos.local then when you connect the laptop WiFi back to the normal WiFi for your house
double checked the save and its on there
I do that too haha
If this doesn't work we'll try balena etcher
when I'm connected to my home wifi and try ratos.local it still doesnt work (DNS_PROBE_FINISHED_NXDOMAIN again)
That's all good, it's if it's on the network that we need to work out
Try pinging 192.168.50.1
do I use the latest version of balena or do I use an older version?
(check other address with ipconfig -all)
I recently used the latest
I had to unzip the .xz
Then use that with balena
I heard the latest version didnt really worked
ok I'll install the latest while looking for the config
(I used Linux balena etcher)
But it should be okay
wait did you download the whole github codes or just this one

That one
Xz is a compression type
Open with WinRAR
ok wait do I firstly try pinging the rpi with the current sd card or do I go on with the xz file?
Mmmm you can try pinging it to get the actual device ip, but honestly if just go through with balena
That way we can be sure it's all good from the get go
I'm gonna have to head to the beach soon with the dog, should be good for 5-10 min more
ok just did pinging test and it seems to respond

Perfect
Try http://192.168.50.186/configure
still doesnt work ok balena it is
ok np
oh its kinda too late sorry
Haha all good
Go through with balena
I have a feeling the balena will do the trick
Yeah man, I'll be back in an hr or so, will check the status when back in haha
Don't forget to unzip the xz
Your laptop now plugged into the modem with a cable as well as the Pi? Seems like you're running into domain isolation security
so I opened the file with winrar and Im packing it out. then I should put that file onto the sd card with balena and then it should work right?
Yep
Ok I'll try that enjoy the walk with your doge
Yeah some weird security thing I think is being caused by rpi imager
Easy dude, good luck!
havent tried that one yet, but firstly I'll reflash again using balena etcher
goddam it finally worked
conclusion: don't use rpi imager even when balena doesn't work the first time
Big thanks to you all! I wouldn't have figured it out without y'all
Yoohoooooo
I think something happens to the supplicant file or some of those files with rpi imager.
It's an interesting issue however, I'm going to do some digging when I get some free time, knowing exactly why and what it changes should be found
That shouldn't have stopped Ethernet though
Yeah so the issue must be some change elsewhere then between the two imagers.
Weird it works with some peoples rpi imager and some folks have these issues
Solution
Im coming in late to this, and only skimmed, but I've heard from others that the rpi imager is okay as long as you don't change any of the defaults, and to use balena etcher 1.18 or earlier.
So potentially a previous default config change on the rpi imager app then that transfers to the new image?
its possible to use the latest balena etcher to flash your sd, but you firstly need to unpack your img.xz file
rpi imager is great for images using cloud-init modules. For any other image, you'll have mixed results.