LibrePhotos / librephotos-docker

You can find here the Dockerfiles for the automated build process of LibrePhotos.
MIT License
157 stars 101 forks source link

Backend startup has 2 failures/warnings #7

Closed trowj closed 3 years ago

trowj commented 3 years ago

I have pulled the latest images, and the docker-compose.yml and .env files (updated only to point to my actual folders), Docker and Docker-Compose also updated to latest stable as of today.

The 2 relevant lines are: backend_1 | statd: unrecognized service and backend_1 | /entrypoint.sh: line 10: 335 Illegal instruction (core dumped) python manage.py clear_cache

here's the full startup logs

db_1        |
db_1        | PostgreSQL Database directory appears to contain a database; Skipping initialization
db_1        |
db_1        | 2021-04-02 03:43:38.074 UTC [1] LOG:  starting PostgreSQL 13.2 (Debian 13.2-1.pgdg100+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 8.3.0-6) 8.3.0, 64-bit
db_1        | 2021-04-02 03:43:38.074 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
db_1        | 2021-04-02 03:43:38.074 UTC [1] LOG:  listening on IPv6 address "::", port 5432
db_1        | 2021-04-02 03:43:38.074 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
db_1        | 2021-04-02 03:43:38.078 UTC [26] LOG:  database system was shut down at 2021-04-02 03:41:38 UTC
backend_1   | statd: unrecognized service
db_1        | 2021-04-02 03:43:38.083 UTC [1] LOG:  database system is ready to accept connections
frontend_1  | installing frontend
proxy_1     | /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
proxy_1     | /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
proxy_1     | /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
redis_1     | 1:C 02 Apr 2021 03:43:36.731 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
redis_1     | 1:C 02 Apr 2021 03:43:36.731 # Redis version=6.2.1, bits=64, commit=00000000, modified=0, pid=1, just started
redis_1     | 1:C 02 Apr 2021 03:43:36.731 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
proxy_1     | 10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf
redis_1     | 1:M 02 Apr 2021 03:43:36.733 * monotonic clock: POSIX clock_gettime
proxy_1     | 10-listen-on-ipv6-by-default.sh: info: Enabled listen on IPv6 in /etc/nginx/conf.d/default.conf
redis_1     | 1:M 02 Apr 2021 03:43:36.733 * Running mode=standalone, port=6379.
redis_1     | 1:M 02 Apr 2021 03:43:36.733 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
redis_1     | 1:M 02 Apr 2021 03:43:36.733 # Server initialized
redis_1     | 1:M 02 Apr 2021 03:43:36.733 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
proxy_1     | /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
redis_1     | 1:M 02 Apr 2021 03:43:36.734 * Loading RDB produced by version 6.2.1
redis_1     | 1:M 02 Apr 2021 03:43:36.734 * RDB age 139 seconds
redis_1     | 1:M 02 Apr 2021 03:43:36.734 * RDB memory usage when created 0.77 Mb
redis_1     | 1:M 02 Apr 2021 03:43:36.734 * DB loaded from disk: 0.000 seconds
redis_1     | 1:M 02 Apr 2021 03:43:36.734 * Ready to accept connections
proxy_1     | /docker-entrypoint.sh: Configuration complete; ready for start up
proxy_1     | 2021/04/02 03:43:42 [notice] 1#1: using the "epoll" event method
proxy_1     | 2021/04/02 03:43:42 [notice] 1#1: nginx/1.19.6
proxy_1     | 2021/04/02 03:43:42 [notice] 1#1: built by gcc 8.3.0 (Debian 8.3.0-6)
proxy_1     | 2021/04/02 03:43:42 [notice] 1#1: OS: Linux 4.15.0-136-generic
proxy_1     | 2021/04/02 03:43:42 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576
proxy_1     | 2021/04/02 03:43:42 [notice] 1#1: start worker processes
proxy_1     | 2021/04/02 03:43:42 [notice] 1#1: start worker process 29
frontend_1  |
frontend_1  | up to date, audited 1642 packages in 11s
frontend_1  |
frontend_1  | 44 vulnerabilities (34 low, 5 moderate, 5 high)
frontend_1  |
frontend_1  | To address issues that do not require attention, run:
frontend_1  |   npm audit fix
frontend_1  |
frontend_1  | To address all issues possible (including breaking changes), run:
frontend_1  |   npm audit fix --force
frontend_1  |
frontend_1  | Some issues need review, and may require choosing
frontend_1  | a different dependency.
frontend_1  |
frontend_1  | Run `npm audit` for details.
frontend_1  | serving frontend
frontend_1  | productions running frontend
frontend_1  | INFO: Accepting connections at http://localhost:3000
backend_1   | /entrypoint.sh: line 10:   335 Illegal instruction     (core dumped) python manage.py clear_cache
backend_1   | Running backend server...
backend_1   | production backend starting
backend_1   | [2021-04-02 03:44:08 +0000] [482] [INFO] Starting gunicorn 20.1.0
derneuere commented 3 years ago

I will look into statd and why it isn't found.

For the other issue: It looks like you use an older CPU. Does this error also happen when you are using LibrePhotos or does this error only happen on startup? Would it be possible for you to build the docker image yourself?

alexislefebvre commented 3 years ago

I have this error too.

How can we debug this?

$ docker-compose exec backend bash -c "python manage.py clear_cache"
Illegal instruction (core dumped)
derneuere commented 3 years ago

I think the breaking change was introduced back in late february when we bumped the torch / torchvision dependencies. Does this sound correct? I think we have to build torch and torchvision from source without avx and sse 4. We could also downgrade to the last torch version that worked across the board, but this would also mean, that we can't upgrade python in the future.

alexislefebvre commented 3 years ago

Would it require much effort to provide 2 different Docker images? Or one image than launch libraries with or without AVX?

derneuere commented 3 years ago

Yes, that would be a possibility. For now, I would just try to make it work again :D

I uploaded a new docker image with a downgraded version of torch. It should work now again I think.

darrepac commented 3 years ago

Doesn't work still on my side, same error happen.

derneuere commented 3 years ago

Both errors are now fixed.