Foris: 503 - Service Not Available

/# pkgupdate
WARN:Couldn’t read the status file: [string “backend”]:1195: [string “backend”]:1186: Failed to lock the lock file /var/lock/opkg.lock: Resource temporarily unavailable

Run command as root and wait.

root@turris:/# pkgupdate
WARN:Couldn’t read the status file: [string “backend”]:1195: [string “backend”]:1186: Failed to lock the lock file /var/lock/opkg.lock: Resource temporarily unavailable
line not found
line not found
line not found
ERROR:
unreachable: https://repo.turris.cz/omnia/lists/base.lua: Operation timed out after 30000 milliseconds with 0 out of 0 bytes received
line not found
line not found
line not found
ERROR:
unreachable: https://repo.turris.cz/omnia/lists/base.lua: Operation timed out after 30000 milliseconds with 0 out of 0 bytes received

I can reach URL without colon “:” from my desktop browser https://repo.turris.cz/omnia/lists/base.lua

File with script is available.

OK, thanks. How is available? Could you send it by email?

I am thinking how it could happen, that my Turris Omnia is not up to date, but there is still old Turris OS version 3.11.2. This router was long time (many months) switched off, so for long time OS was not updated. In the meantime updater.sh become probably unable to do it’s job - to update, and here we are. Of course, it’s just my guess. I can not believe coincidence with CVE-2020–7982. Oh, well…

@viktor Any idea how to upgrade to the latest version? Thx.

Did you run updater.sh or pkgupdate commands as root?

Yes, I ran updater.sh as well as pkgupdate already, see above @viktor
Could you point me to the source code of the pkgupdate, please?

Just my 5 cents: Can you check whether the date and time are set correctly on the router?

I had similar issue in the past. The date and time was out of sync due to empty onboard battery. This caused issues with the certificates and the router was unable to retrieve new updates.

I’d also try nslookup turris.cz or something. I don’t remember when new root DNSSEC keys were included in Turris OS.

This is a good point but the following report shows among other things on the lack of permissions.

I don’t think so. It says “resource temporarily unavailable” and it was executed as root.

From what I saw this message meant that updater is running already at that moment.

It could be, but it’s all weird.

root@turris:~# ls -l /var/lock/opkg.lock
-rw-------    1 root     root             0 Mar 27 05:50 /var/lock/opkg.lock
root@turris:~# crontab -l
no crontab for root

So there is probably some other process which tried access it at 5:50. It was not me.

I tried again pkgupdate with the same result like above (timed out after 30000 milliseconds with 0 out of 0 bytes received) but command
curl https://repo.turris.cz/omnia/lists/base.lua
works just fine, no problem

Time and date is OK, as expected…

root@turris:~# nslookup turris.cz
Server:         127.0.0.1
Address:        127.0.0.1#53

Name:      turris.cz
Address 1: 217.31.192.69
Address 2: 2001:1488:ac15:ff80::69
1 Like

@vcunat Thank you for your nslookup suggestion, see my previous post. From another network I double checked IPv4 address and I guessed that IPv6 is maybe valid as well. Then came “Eureka effect”, and I’ve realized, that IPv6 could be a problem. At http://192.168.1.1/cgi-bin/luci/admin/network/network I stopped WAN6 and tried again pkgupdate from CLI. It worked!
File /etc/turris-version now has value 3.11.15 !

I forgot Foris password, so at /etc/config/foris for config config 'auth' I set empty password: `option password ‘’ - and I was able to login and set my new password.
Foris has now version 100.5, I guess it’s latest and greatest version, right?

Even now, I still see "updater.sh is obsoleted. Is it correct? It will be removed in future?

Thank you @viktor and @dkomrska for you help and suggestions!

Yes, updater.sh is obsoleted, but still avaliable and functional in TOS 3.x branch.

OK, good to know. Thanks!

Oh, that’s surprising to me, but I don’t know the updater well. Generally both v4 and v6 connections should be attempted in parallel (with slight v6 preference), but it’s not easy to implement that well.