#Ratos gives "connection denied" error even when connected with wifi

310 messages · Page 1 of 1 (latest)

strange skiff
#

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.

shell lark
#

Did you want to try a clean flash to be sure now and we can troubleshoot as we go?

strange skiff
#

sd card is formatted as FAT32 with clustersize of 2048bytes

shell lark
#

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)

strange skiff
strange skiff
shell lark
light idol
#

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)
shell lark
#

@light idol to aid some things quickly:

I got @strange skiff to connect via ssh, test connection via ping from windows on the old flash

light idol
#

ssh via hostname or ip address?

shell lark
light idol
#

was he on wifi or ethernet at the time?

shell lark
#

192.168.50.1 was the IP

light idol
#

that was the IP of the ratos host?

light idol
#

root?

shell lark
#

Yeah the user was wrong

#

I think

#

But it got the certificate/fp added as expected

light idol
#

normally the .1 is reserved for the gateway or DHCP server, and you'd also need root to log in to to that

shell lark
#

192.168.50.168 was the ipv4 I think

light idol
#

you should be using pi as the user for the ratos host regardless of what IP it's at

shell lark
light idol
#

there's no way he was establishing ssh connection to ratos host at 192.168.50.1

#

that was the router

shell lark
light idol
#

that address is ipv4

shell lark
#

Figured you guys had done some magic in the routing

shell lark
light idol
#

that sort of thing is impossible

shell lark
light idol
#

for a device IP to present itself over the IP of the gateway to another device on the same subnet

shell lark
light idol
#

it would bring down DHCP altogether

shell lark
light idol
#

not possible, they'd be unable to get a lease

shell lark
#

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

strange skiff
strange skiff
#

never unplugged that

#

ok now I'll firstly connect to the ratos network via my phone

shell lark
light idol
#

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

shell lark
light idol
#

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

strange skiff
#

ok I think it already passed the 5 min mark

light idol
#

yep, try http://ratos.local in your browser

strange skiff
#

its saying site not available (DNS_probe_finished_NXDOMAIN error)

light idol
#

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 part

strange skiff
light idol
#

or at least your phones brwser

strange skiff
#

do I keep trying on my phone or should I switch back to my laptop?

light idol
#

your laptop

#

phone is really difficult since it can tranparently switch between wifi and data

strange skiff
#

ok phone is unconnected to the ratos network and the laptop is connected now

light idol
#

and NXDOMAIN indicates it wasn't even trying to use your wifi network adapter to resolve

strange skiff
#

same nxdomain error

light idol
#

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?

strange skiff
light idol
#

disconnect your laptop from the ratos wifi netwok, and reconnect it to your router's network

strange skiff
light idol
strange skiff
strange skiff
shell lark
light idol
#

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

strange skiff
light idol
#

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

strange skiff
light idol
#

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

shell lark
#

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

strange skiff
light idol
#

no

#

just unplug ethernet from the pi without powering off

#

then connect your laptop to ratos network

strange skiff
#

Ok now its giving ERR_CONNECTION_REFUSED

light idol
#

is your laptop on a VPN?

strange skiff
light idol
#

and it didn't auto-switch to a different wifi signal when it found out the ratos network didn't have internet access?

strange skiff
light idol
#

does your laptop have dual wifi radios?

strange skiff
strange skiff
light idol
#

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

strange skiff
light idol
#

yeah, it would have the safety symbol in the address bar

wild sedge
#

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

light idol
#

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

strange skiff
light idol
#

there's a really hacky approach you can take here

strange skiff
light idol
#

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

strange skiff
light idol
#

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

strange skiff
wild sedge
strange skiff
#

And the router/network provider at home is a basic paid provider

shell lark
#

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

light idol
#

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

strange skiff
#

And would unplugging end replugging the main router do something?

strange skiff
#

I always do that if something doesnt want to connect via wifi

shell lark
#

As it'll connect phone to the pi

light idol
#

Got to run, sorry

shell lark
strange skiff
shell lark
#

I'm hoping the phone with WiFi to the pi hotspot works

light idol
#

I think your problem is your local switch

strange skiff
shell lark
shell lark
strange skiff
#

That I should connect my phone to ratos and check http...

shell lark
#

Make sure no Ethernet is connected

#

Just phones WiFi to pi WiFi

light idol
#

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

strange skiff
shell lark
#

Just connect to the ratos hotspot.

shell lark
strange skiff
shell lark
strange skiff
#

pi is connected to phone and laptop not

shell lark
#

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)

strange skiff
#

dammed my phone doesnt want to connect (DNS_probe_finished_no_internet error)

shell lark
#

Check what it says the IP is

strange skiff
#

IPv4 is 192.168.50.153

#

so the last number has changed

shell lark
#

(on phone)

#

(on phone)

strange skiff
shell lark
#

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

strange skiff
#

would It help to try connecting with another rasberry pi? I can get another (even with another sd card) in 40 minutes

shell lark
#

It's a good sign the laptop and phone now give the error though

#

As they're now 1:1 (relatively lol)

strange skiff
strange skiff
shell lark
#

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

shell lark
#

Found this as well:
https://www.answeroverflow.com/m/1199775450860368016

Check power to the pi just to be safe.

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

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)

strange skiff
shell lark
strange skiff
#

bcs my other pi is laying at another home, so maby I can test the connection from there

shell lark
#

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

strange skiff
shell lark
#

(eliminating any routers for this step)

shell lark
#

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

strange skiff
strange skiff
#

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)

shell lark
#

Try the new one

#

Same deal, use laptop or phone wifi adapter to connect to hotspot

#

(ratos hotspot)

strange skiff
#

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

shell lark
#

Haha these things happen

#

Same power supply?

strange skiff
#

yup and when I insert the psu into the other rpi it works

shell lark
#

Yeah that'd be something weird on the other pi. No worries, it should work with the other one

strange skiff
#

idk how its broken bcs 2 months ago it worked and I did nothing else with it

shell lark
#

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

shell lark
strange skiff
strange skiff
shell lark
#

Let's try the sd card method

strange skiff
#

okay so I insert the sd card into my laptop and search for the file?

shell lark
#

Link should be just above

#

Let's try ssh

#

@strange skiff go-to your laptop, connect the laptop WiFi to the ratos hotspot

#

Goto command prompt and type ipconfig -all

strange skiff
#

okay give me a sec the pi is booting up again. do I connect my second screen onto it?

shell lark
#

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

strange skiff
strange skiff
#

Okay it gives me this

shell lark
#

Cool

#

Use raspberry as the password

strange skiff
#

Unknown error nice

#

Retrying also doesnt work

shell lark
shell lark
#

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

strange skiff
#

hmhh strange the only thing I found is this one

shell lark
#

Everything is looking like it's something to do with the rpi imager

strange skiff
shell lark
#

boot/ratos-wpa-supplicant.txt?

#

That's correct

strange skiff
#

okay and then put my wifi username and pasword here?

shell lark
#

Yeah

#

Is there country settings in there?

strange skiff
#

yes

shell lark
#

Is it correct

strange skiff
#

ok just to be sure I need to put in the things into 1 and remove the hastags right?

#

note: my wifi is secured

shell lark
#

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

strange skiff
shell lark
#

If this doesn't work we'll try balena etcher

strange skiff
#

when I'm connected to my home wifi and try ratos.local it still doesnt work (DNS_PROBE_FINISHED_NXDOMAIN again)

shell lark
#

That's all good, it's if it's on the network that we need to work out

#

Try pinging 192.168.50.1

strange skiff
#

do I use the latest version of balena or do I use an older version?

shell lark
#

(check other address with ipconfig -all)

shell lark
#

I had to unzip the .xz

#

Then use that with balena

strange skiff
#

I heard the latest version didnt really worked

strange skiff
shell lark
#

But it should be okay

strange skiff
shell lark
#

Xz is a compression type

#

Open with WinRAR

strange skiff
#

ok wait do I firstly try pinging the rpi with the current sd card or do I go on with the xz file?

shell lark
#

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

strange skiff
#

ok just did pinging test and it seems to respond

shell lark
#

Perfect

strange skiff
#

still doesnt work ok balena it is

shell lark
strange skiff
shell lark
#

Haha all good

#

Go through with balena

strange skiff
#

I have a feeling the balena will do the trick

shell lark
wild sedge
strange skiff
shell lark
#

Yep

strange skiff
#

Ok I'll try that enjoy the walk with your doge

shell lark
shell lark
strange skiff
strange skiff
#

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

shell lark
#

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

wild sedge
#

That shouldn't have stopped Ethernet though

shell lark
misty mantle
#

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.

shell lark
strange skiff
trim reefBOT