Devices recognized by server but always offline

Hey there,
Thanks to the openbalena team for a great product. I’ve setup an openbalena server, can login to it, setup apps, and configure OS images, but I’m stuck on getting devices to show up as online once they boot up. Whether prod or dev images, the devices boots, provisions and registers with my openbalena server. I can see them when I run balena devices for example. But they always show up as offline, and are basically inaccessible.

I’ve read a couple other threads where this seems to be about the server’s self-signed certificates, and that there may have been a recent release that fixes this. I’ve stopped my server and confirmed my clone is current with the master branch, and then restarted the server, but same result. If this issue was resolved with the recent release, are there special steps to take to ensure my server functions as expected? Maybe I’m missing something.

If others have had success getting devices to show up as connected, can ssh to them, and push releases, did you encounter this issue? and if so did you find a workaround?

Thanks

Hi @critzo thanks for the feedback. The devices showing offline and disabled SSH access is something we are aware of and are currently working to solve.

Despite the device showing as offline you should still be able to create applications and push releases, let me know if this works for you.

@critzo just wanted to let you know that devices running balenaOS version 2.29 and above should be properly appearing online.

Hi. I am using BalenaOS 2.29.2+rev1 development image on an RPi 3 B and it is also constantly showing as offline but I am able to push releases etc.

@duncan that sounds like you might be running an outdated openBalena installation – the fix involved changes to the backend as well. You’ll need to git pull and then ./scripts/compose pull to get the latest.

If you do run the latest however, you can check VPN and API service logs with ./scripts/compose exec SERVICE_NAME journalctl -fn100 and see if there are any pointers as to what might be going wrong. Please do post them here if so.

Thanks for getting back to me!

Hmm. It seems I am on the latest version (v0.1.4).

Here is the log for the api.

And here is the log for the vpn.

Do you have devices that appear offline and are in your local network? Can you try SSH’ing into one them and getting their logs?

To SSH:

ssh -A -p 22222 root@DEVICE_IP

and then:

journalctl -fn100

Note that the device needs to be running a development variant of the OS: https://www.balena.io/docs/reference/OS/overview/2.x/#variants-of-balenaos

1 Like

Yes. I have a single Raspberry Pi 3 B device running a development version of 2.29.2+rev1 and I can successfully push from balena-cli, but it appears offline and is on my local network at home.

Thanks, I will run through those when I get home later in the day and I will let you know! :sweat_smile:

@dfunckt I completed the above steps and here is the output.

Logs show the VPN on the device is restarting:

Jan 22 16:04:06 8c2d7b1 openvpn[1131]: Tue Jan 22 16:04:06 2019 SIGUSR1[connection failed(soft),init_instance] received, process restarting
Jan 22 16:04:06 8c2d7b1 openvpn[1131]: Tue Jan 22 16:04:06 2019 Restart pause, 120 second(s)

I don’t know why is that, but it seems it just can’t connect to the server. How did you configure DNS? Can you reprovision the device on a new application with no pushed code and see if the device gets online eventually?

Ahh. It turns out the Cloudflare proxy was not being very nice to openvpn.

Disabling the proxy for vpn.[domain].[tld] seems to work as it now reports the device as online. :slight_smile:

Thanks for the help!

I got the same issue. Proxy behind a proxy.

The problem is the HAProxy of openbalena use HTTP on port 80 and TCP on port 443. So the first proxy has to listen on TCP for the port 443 too. But in almost all cases, 443 is already used for HTTPS. https://github.com/balena-io/open-balena/blob/master/haproxy/haproxy.cfg

I cannot change my configuration so I will try to figure out how to change openbalena’s ports.

1 Like