Nico640 / docker-unms

All-in-one docker image for Ubiquiti UISP (formerly UNMS). Supports x86_64 and ARM (Raspberry Pi).
https://hub.docker.com/r/nico640/docker-unms
204 stars 26 forks source link

Container won't fully start (seems like a clock issue?) with workaround #69

Open zeddski opened 2 years ago

zeddski commented 2 years ago

After running for a year or two, without problems, the container crashed on me. After some fruitless debugging, removed container and images, trying to start over with default config (from github) using docker-compose . Doesn't work. Errors remain. Please see below (workaround below logs).

unms_1 | [s6-init] making user provided files available at /var/run/s6/etc...exited 0. unms_1 | [s6-init] ensuring user provided files have correct perms...exited 0. unms_1 | [fix-attrs.d] applying ownership & permissions fixes... unms_1 | [fix-attrs.d] done. unms_1 | [cont-init.d] executing container initialization scripts... unms_1 | [cont-init.d] 10-set-timezone: executing... unms_1 | [cont-init.d] 10-set-timezone: exited 0. unms_1 | [cont-init.d] 20-adduser: executing... unms_1 | unms_1 | ------------------------------------- unms_1 | GID/UID unms_1 | ------------------------------------- unms_1 | User uid: 911 unms_1 | User gid: 911 unms_1 | ------------------------------------- unms_1 | unms_1 | [cont-init.d] 20-adduser: exited 0. unms_1 | [cont-init.d] 30-prepare: executing... unms_1 | [cont-init.d] 30-prepare: exited 0. unms_1 | [cont-init.d] 40-permissions: executing... unms_1 | [cont-init.d] 40-permissions: exited 0. unms_1 | [cont-init.d] 50-postgres: executing... unms_1 | The files belonging to this database system will be owned by user "unms". unms_1 | This user must also own the server process. unms_1 | unms_1 | The database cluster will be initialized with locales unms_1 | COLLATE: C unms_1 | CTYPE: C.UTF-8 unms_1 | MESSAGES: C unms_1 | MONETARY: C unms_1 | NUMERIC: C unms_1 | TIME: C unms_1 | The default database encoding has accordingly been set to "UTF8". unms_1 | The default text search configuration will be set to "english". unms_1 | unms_1 | Data page checksums are disabled. unms_1 | unms_1 | creating directory /config/postgres ... ok unms_1 | creating subdirectories ... ok unms_1 | selecting dynamic shared memory implementation ... posix unms_1 | selecting default max_connections ... 100 unms_1 | selecting default shared_buffers ... 128MB unms_1 | selecting default time zone ... Australia/Sydney unms_1 | creating configuration files ... ok unms_1 | running bootstrap script ... ok unms_1 | performing post-bootstrap initialization ... sh: locale: not found unms_1 | 1970-05-01 16:13:04.010 AEST [327] WARNING: no usable system locales were found unms_1 | ok unms_1 | syncing data to disk ... ok unms_1 | unms_1 | unms_1 | Success. unms_1 | unms_1 | initdb: warning: enabling "trust" authentication for local connections unms_1 | You can change this by editing pg_hba.conf or using the option -A, or unms_1 | --auth-local and --auth-host, the next time you run initdb. unms_1 | [cont-init.d] 50-postgres: exited 0. unms_1 | [cont-init.d] done. unms_1 | [services.d] starting services unms_1 | Starting rabbitmq-server... unms_1 | Starting nginx... unms_1 | Starting siridb-server... unms_1 | Waiting for rabbitmq to start... unms_1 | [services.d] done. unms_1 | Running entrypoint.sh unms_1 | /tmp:5432 - no response unms_1 | /tmp:5432 - no response unms_1 | Waiting for postgres to come up... unms_1 | Waiting for postgres to come up... unms_1 | Starting postgres... unms_1 | Creating nginx configuration unms_1 | Enabling UNMS https and wss connections on port 443 unms_1 | 1970-05-06 05:26:40.010 AEST [426] LOG: starting PostgreSQL 13.5 on armv7-alpine-linux-musleabihf, compiled by gcc (Alpine 10.2.1_pre1) 10.2.1 20201203, 32-bit unms_1 | 1970-05-06 05:26:40.010 AEST [426] LOG: listening on IPv4 address "127.0.0.1", port 5432 unms_1 | 1970-05-06 05:26:40.010 AEST [426] LOG: could not bind IPv6 address "::1": Address not available unms_1 | 1970-05-06 05:26:40.010 AEST [426] HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry. unms_1 | 1970-05-06 05:26:40.010 AEST [426] LOG: listening on Unix socket "/run/postgresql/.s.PGSQL.5432" unms_1 | 1970-05-06 05:26:40.010 AEST [426] LOG: listening on Unix socket "/tmp/.s.PGSQL.5432" unms_1 | clock_gettimclock_gee(CLOCKMONtOtTONIC, )ime(CLOCKM fONOTONICa, ) failied: Operaled: Operattiioonn nnoott ppeerrmmiitttteedd ((11)) unms_1 | unms_1 | Generating self-signed certificate for 'localhost'. unms_1 | Aborted (core dumped) unms_1 | Aborted (core dumped) unms_1 | /tmp:5432 - no response unms_1 | Waiting for postgres to come up... unms_1 | 1970-05-06 05:26:40.010 AEST [588] FATAL: the database system is starting up unms_1 | 1970-05-06 05:26:40.010 AEST [588] LOG: could not send data to client: Broken pipe unms_1 | Starting rabbitmq-server... unms_1 | clock_gettime(CLOCKMONOTONIC, ) failed: Operation not permitted (1) unms_1 | Aborted (core dumped) unms_1 | Starting rabbitmq-server... unms_1 | clock_gettime(CLOCKMONOTONIC, ) failed: Operation not permitted (1) unms_1 | Aborted (core dumped) unms_1 | /tmp:5432 - no response unms_1 | Waiting for postgres to come up... unms_1 | /tmp:5432 - no response unms_1 | Waiting for postgres to come up... unms_1 | 1970-05-06 05:26:40.010 AEST [768] FATAL: the database system is starting up unms_1 | 1970-05-06 05:26:40.010 AEST [768] LOG: could not send data to client: Broken pipe unms_1 | 1970-05-06 05:26:40.010 AEST [770] FATAL: the database system is starting up unms_1 | 1970-05-06 05:26:40.010 AEST [770] LOG: could not send data to client: Broken pipe unms_1 | /tmp:5432 - no response unms_1 | Waiting for postgres to come up... unms_1 | 1970-05-06 05:26:40.010 AEST [773] FATAL: the database system is starting up unms_1 | 1970-05-06 05:26:40.010 AEST [773] LOG: could not send data to client: Broken pipe unms_1 | Starting rabbitmq-server... unms_1 | clock_gettime(CLOCKMONOTONIC, ) failed: Operation not permitted (1) unms_1 | 1970-05-06 05:26:40.010 AEST [426] LOG: startup process (PID 584) was terminated by signal 11: Segmentation fault unms_1 | 1970-05-06 05:26:40.010 AEST [426] LOG: aborting startup due to startup process failure unms_1 | 1970-05-06 05:26:40.010 AEST [426] LOG: database system is shut down unms_1 | Aborted (core dumped) unms_1 | /tmp:5432 - no response unms_1 | Waiting for postgres to come up... unms_1 | /tmp:5432 - no response unms_1 | Waiting for postgres to come up... unms_1 | /tmp:5432 - no response unms_1 | Waiting for postgres to come up... unms_1 | Starting rabbitmq-server... unms_1 | Starting postgres... unms_1 | 1970-04-29 09:36:16.010 AEST [879] LOG: starting PostgreSQL 13.5 on armv7-alpine-linux-musleabihf, compiled by gcc (Alpine 10.2.1_pre1) 10.2.1 20201203, 32-bit unms_1 | 1970-04-29 09:36:16.010 AEST [879] LOG: listening on IPv4 address "127.0.0.1", port 5432 unms_1 | 1970-04-29 09:36:16.010 AEST [879] LOG: could not bind IPv6 address "::1": Address not available unms_1 | 1970-04-29 09:36:16.010 AEST [879] HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry. unms_1 | 1970-04-29 09:36:16.010 AEST [879] LOG: listening on Unix socket "/run/postgresql/.s.PGSQL.5432" unms_1 | 1970-04-29 09:36:16.010 AEST [879] LOG: listening on Unix socket "/tmp/.s.PGSQL.5432" unms_1 | clock_gettime(CLOCKMONOTONIC, ) failed: Operation not permitted (1) unms_1 | Aborted (core dumped) unms_1 | Starting rabbitmq-server... unms_1 | clock_gettime(CLOCKMONOTONIC, ) failed: Operation not permitted (1) unms_1 | Aborted (core dumped) unms_1 | /tmp:5432 - no response unms_1 | Waiting for postgres to come up... unms_1 | 1970-04-29 09:36:16.010 AEST [1053] FATAL: the database system is starting up unms_1 | 1970-04-29 09:36:16.010 AEST [1053] LOG: could not send data to client: Broken pipe unms_1 | /tmp:5432 - no response unms_1 | Waiting for postgres to come up... unms_1 | 1970-04-29 09:36:16.010 AEST [1056] FATAL: the database system is starting up unms_1 | 1970-04-29 09:36:16.010 AEST [1056] LOG: could not send data to client: Broken pipe unms_1 | Starting rabbitmq-server... unms_1 | /tmp:5432 - no response unms_1 | Waiting for postgres to come up... unms_1 | 1970-04-29 09:36:16.010 AEST [1081] FATAL: the database system is starting up unms_1 | 1970-04-29 09:36:16.010 AEST [1081] LOG: could not send data to client: Broken pipe unms_1 | clock_gettime(CLOCKMONOTONIC, ) failed: Operation not permitted (1) unms_1 | Aborted (core dumped) unms_1 | /tmp:5432 - no response unms_1 | Waiting for postgres to come up... unms_1 | 1970-04-29 09:36:16.010 AEST [1150] FATAL: the database system is starting up unms_1 | 1970-04-29 09:36:16.010 AEST [1150] LOG: could not send data to client: Broken pipe unms_1 | /tmp:5432 - no response unms_1 | Waiting for postgres to come up... unms_1 | 1970-04-29 09:36:16.010 AEST [1155] FATAL: the database system is starting up unms_1 | 1970-04-29 09:36:16.010 AEST [1155] LOG: could not send data to client: Broken pipe unms_1 | Starting rabbitmq-server... unms_1 | 1970-04-29 09:36:16.010 AEST [879] LOG: startup process (PID 949) was terminated by signal 11: Segmentation fault unms_1 | 1970-04-29 09:36:16.010 AEST [879] LOG: aborting startup due to startup process failure unms_1 | 1970-04-29 09:36:16.010 AEST [879] LOG: database system is shut down unms_1 | clock_gettime(CLOCKMONOTONIC, ) failed: Operation not permitted (1) unms_1 | /tmp:5432 - no response unms_1 | Waiting for postgres to come up... unms_1 | Aborted (core dumped) unms_1 | Starting rabbitmq-server... unms_1 | Starting postgres...

Ad Infinitum

What stands out:

Workaround: "privileged: true" in docker-compose configuration. But this is too open, but I have no clue how to really fix this. Any clues?

Nico640 commented 2 years ago

These clock errors sound like the same issue as in https://github.com/Nico640/docker-unms/issues/59. Are you running this on a Raspberry Pi with a 32-Bit OS (Raspbian)?

If so, then this is most likely the libseccomp issue that occurs with an older libseccomp version (Debian Buster), 32bit ARM and Alpine Linux 3.13 which causes these time issues inside the container. Check if your libseccomp version is below 2.4.2. If it is, you'll need to update it. You can either update libseccomp manually, add buster-backports to your apt sources and update it that way, or update to Raspberry Pi OS 11 (Debian Bullseye), which has a newer libseccomp version.

This seems to be a pretty good explanation: https://docs.linuxserver.io/faq#libseccomp