Cannot access/log in to FreedomBox

I have set up a Pioneer Edition FreedomBox running Debian stable. I had just flashed the SD card three days ago and the box was updated manually immediately after. If the automatic updates were successfully completed I do not know.

The box runs for about 1 day, after which I can no longer log in. This is the third day in a row this has happened.

If I open freedombox.local in my browser, I get the expected warning about an insecure connection, but when I accept the risk and continue, I eventually get a “502 Proxy Error”:

Proxy Error

The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request

Reason: Error reading from remote server

Apache/2.4.52 (Debian) Server at freedombox.local Port 443

I tried to ssh into my box. It gives me the prompt for my username and password, but after I type my password and hit Enter nothing happens. It just hangs there as if it were trying to log it.

I connected a monitor to my box, but nothing happens at all when I type my username and hit Enter.

None of the other ways of accessing the box work (DDNS, Tor): nothing happens when I load the URLs, the connection times out.

I can ping freedombox.local, but not the DDNS address.

The only way to get my FreedomBox back online is to unplug the box and plug it back in (the battery is not connected), which I did the past two days.

Any help debugging this issue? Which log files should I look at? Anyone else have this problem?

I stopped using the Pioneer Edition a year or so ago because it did not stay online (probably same issue as above). Now I would like to figure out what the problem is.

Perhaps related to this issue: Attacks on FreedomBox from Around the World? - #2 by mtinman

I briefly explored my router’s system logs and I do not see any indication of a DDOS attack.

What image did you use to flash?

It may not be the problem but when you unplug the box, it may be good to put the SD card in another machine to run a check of the file system, before putting it back to your Pioneer box.

If you lose access after one day, it could be because of a daily task that runs into a problem. In my case, failure to backup, e.g. as the external backup machine was no up, resulted in big problems.

For logs, I ssh into my box and use “sudo journalctl”. If you can’t ssh to your box, I guess you need to put the SD card in another machine, but I am not sure how to do then. Perhaps chroot and use “sudo journalctl” then.

I used the freedombox-stable-free_pioneer_a20-olinuxino-lime2-armhf.img

Thank you for the suggestions!

Which commands would you use to check the SD card? fsck? btrfs check? From the Internet (e.g., Btrfs - ArchWiki) it seems the latter is to be used with caution.

I checked sudo journalctl and there is a lot of information there. I can see that at a certain date and time (in this case Feb 11 13:09:01) the log stops … until today when I unplugged the box and plugged it back in. I had left it plugged in to see if I could solve the problem without such a hard shutdown, but I was unable to. I do not see anything in the log around that that is obviously a problem. One thing I do see is this:

Feb 11 13:08:10 freedombox Tor-plinth[534]: Your server has not managed to confirm reachability for its ORPort(s) at XX.XXX.XXX.X:9001. Relays do not publish descriptors until their ORPort and DirPort are reachable. Please check your firewalls, ports, address, /etc/hosts file, etc.
Feb 11 13:08:19 freedombox Tor-plinth[534]: Unable to find IPv6 address for ORPort 9001. You might want to specify IPv4Only to it or set an explicit address or set Address. [60 similar message(s) suppressed in last 3540 seconds]
Feb 11 13:09:01 freedombox slapd[733]: slap_global_control: unrecognized control: 1.3.6.1.4.1.4203.666.5.16

Right before the log stops there is one line (the final one below) that does not have a date or time:

Feb 11 13:09:01 freedombox CRON[31577]: pam_unix(cron:session): session opened for user root(uid=0) by (uid=0)
Feb 11 13:09:01 freedombox CRON[31580]: (root) CMD ( [ -x /usr/lib/php/sessionclean ] && if [ ! -d /run/systemd/system ]; then /usr/lib/php/sessionclean; fi)
Feb 11 13:09:01 freedombox CRON[31577]: pam_unix(cron:session): session closed for user root
– Boot 955c8e47160e4d21aa65206795fca798 –

To be very cautious, you can first make a full copy of your SD card with ddrescue. Read the info pages for it. It is a bit long it but very insightful for broken disk situations (maybe not your case now, but some day).

In my recollection, btrfs check (as root) will just do some checking, which is safe as long as the disk is not already dying. btrfs check --repair is what will do the repair if needed, it has some risks, but if you have made a copy first, no worry.

This is normally followed by everything starting. At the beginning of boot, the clock may not be set, so date and time may be a bit inconsistent in what just follows. If you have just this line and then nothing, it looks like it failed to boot or to start logging at boot.

Ok, that makes sense regarding boot process starting – that line is right after I plugged the FreedomBox back in.

So the last line before I could no longer access the box was at Feb 11 13:09:01 (see above), even though I did not unplug the box until Feb 15. So something stopped working at that moment and only started working again when unplugging the box and plugging it back in.