Gladys container keeps restarting in a loop since the latest update

I suppose Gladys did its update around 4:48 and since then its container has been restarting in a loop; it’s installed on a Pi3.

pi@gladys:~ $ docker ps
CONTAINER ID   IMAGE                       COMMAND                  CREATED        STATUS                         PORTS                                         NAMES
dc36cd76ba57   koenkk/zigbee2mqtt:latest   "docker-entrypoint.s…"   2 hours ago    Up 8 minutes                                                                 gladys-z2m-zigbee2mqtt
45c6501c15e0   gladysassistant/gladys:v4   "docker-entrypoint.s…"   2 hours ago    Restarting (1) 8 seconds ago                                                 gladys
86998c2a1efc   nodered/node-red:3.1        "./entrypoint.sh"        27 hours ago   Up 20 minutes (healthy)        0.0.0.0:1881-\u003e1880/tcp, [::]:1881-\u003e1880/tcp   gladys-node-red
d93671a3a9d9   eclipse-mosquitto:2.0.15    "/docker-entrypoint.…"   3 months ago   Up 20 minutes                                                                gladys-z2m-mqtt
8d5d3be6e46f   eclipse-mosquitto:2.0.15    "/docker-entrypoint.…"   9 months ago   Up 20 minutes                                                                eclipse-mosquitto
04d1f47def90   containrrr/watchtower       "/watchtower --clean…"   9 months ago   Up 20 minutes (healthy)        8080/tcp                                      watchtower

I have this at the end of Gladys’ logs:

Node.js v18.20.4
/src/server/node_modules/lodash/_Symbol.js:1



SyntaxError: Invalid or unexpected token
    at internalCompileFunction (node:internal/vm:76:18)
    at wrapSafe (node:internal/modules/cjs/loader:1283:20)
    at Module._compile (node:internal/modules/cjs/loader:1328:27)
    at Module._extensions..js (node:internal/modules/cjs/loader:1422:10)
    at Module.load (node:internal/modules/cjs/loader:1203:32)
    at Module._load (node:internal/modules/cjs/loader:1019:12)
    at Module.require (node:internal/modules/cjs/loader:1231:19)
    at require (node:internal/modules/helpers:177:18)
    at Object.<anonymous> (/src/server/node_modules/lodash/_baseGetTag.js:1:14)
    at Module._compile (node:internal/modules/cjs/loader:1364:14)

Node.js v18.20.4

It looks completely broken ^^, what can I do?

Not sure how effective this is, but have you tried removing, pulling, and restarting?

docker stop gladys \u0026\u0026 docker rm gladys
docker pull gladysassistant/gladys:v4

Then the command from the site to relaunch the image

docker run -d \\
--log-driver json-file \\
--log-opt max-size=10m \\
--cgroupns=host \\
--restart=always \\
--privileged \\
--network=host \\
--name gladys \\
-e NODE_ENV=production \\
-e SERVER_PORT=80 \\
-e TZ=Europe/Paris \\
-e SQLITE_FILE_PATH=/var/lib/gladysassistant/gladys-production.db \\
-v /var/run/docker.sock:/var/run/docker.sock \\
-v /var/lib/gladysassistant:/var/lib/gladysassistant \\
-v /dev:/dev \\
-v /run/udev:/run/udev:ro \\
gladysassistant/gladys:v4

I just tried and the Gladys container keeps restarting in a loop with the same error in the logs…

Hi @Xenicle,

Are you running Gladys on a 64-bit installation, with an image compiled for arm64?

We no longer support armv6/v7 in Gladys.

If you want to check which image you’re running, I mentioned it here:

It is indeed an arm64 image:

 "Architecture": "arm64",

on an aarch64 installation:

pi@gladys:~ $ uname -m
aarch64

I suppose that docker pull --platform linux/amd64 gladysassistant/gladys:v4 won’t be enough; do I need to change the OS?

Ok so the architecture is good !

I looked up your error online a bit, try updating Docker/your system !

It seems I have the latest version on my system:

pi@gladys:~ $ sudo apt update
Hit:1 http://deb.debian.org/debian bullseye InRelease
Hit:2 http://security.debian.org/debian-security bullseye-security InRelease
Get:3 http://deb.debian.org/debian bullseye-updates InRelease [44.1 kB]
Hit:4 http://archive.raspberrypi.org/debian bullseye InRelease
Get:5 https://download.docker.com/linux/debian bullseye InRelease [43.3 kB]
Fetched 87.4 kB in 9s (9,743 B/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
pi@gladys:~ $ docker -v
Docker version 27.3.1, build ce12230

The apt update command only updates the list of existing packages and the version of those packages :slight_smile:

To then update the system packages, you need to run:

sudo apt upgrade -y

You can also do:

sudo apt full-upgrade

Afterwards, that only updates the packages.

To update the system, you can follow tutorials like these:

Official Raspberry Pi site: https://www.raspberrypi.com/documentation/computers/os.html#rpi-update

Alternatively, a tutorial in French:

I didn’t run apt upgrade because it said All packages are up to date.

I’ll try rpi-update

I think I’m going to switch to a mini PC…

Always a good solution :smiley: You’ll gain a lot in stability and power!