How can I get ERPNext running under docker for a quick look?

Hi,

So I want to see what docker looks like on my VM. Ubuntu 22.04 LTS.
I have tried following @revant_one instructions from here:

git clone GitHub - frappe/frappe_docker: Docker images for production and development setups of the Frappe framework and ERPNext
cd frappe_docker
cp example.env .env
nano .env # make changes to environment variables
docker-compose -f compose.yaml
-f overrides/compose.erpnext.yaml
-f overrides/compose.mariadb.yaml
-f overrides/compose.redis.yaml
-f overrides/compose.https.yaml
up -d

Now I have this running on my LAN, and the current network config won’t allow letsencrypt through, so I modified the docker-compose to:

docker compose -f compose.yaml
-f overrides/compose.erpnext.yaml
-f overrides/compose.mariadb.yaml
-f overrides/compose.redis.yaml
config > ~/gitops/compse.yaml
cd ~/gitops
docker compose up

Then eventually websocket-1 throws an unhandled ‘error’ event.

Is there a walkthrough that explains each of the steps to get this running? Am I supposed to ignore the errors then continue with bench commands?

Lost and confused.

there is a pwd.yml file that’s used for play with docker button.

it sets up latest stable release (right now v13)

pwd link Play with Docker

this compose should setup everything. it’s simplest setup for trying out ERPNext. Generally people start asking multi bench, multi site, multi server setup. All complex steps are for that.

Awesome. Thanks @revant_one.
I’ll try that in the morning.

OK, So I’m having trouble with that also.

erp:~/frappe_docker$ docker compose -f pwd.yml up

results in the four volumes being created and this output:
(Full output log is at the end of this post if required)

frappe_docker-backend-1        | [2022-05-28 23:55:40 +0000] [10] [INFO] Booting worker with pid: 10
frappe_docker-create-site-1    | wait-for-it: timeout occurred after waiting 120 seconds for db:3306
frappe_docker-create-site-1    | wait-for-it: waiting 120 seconds for redis:6379
frappe_docker-websocket-1      | node:events:505
frappe_docker-websocket-1      |       throw er; // Unhandled 'error' event
frappe_docker-websocket-1      |       ^
frappe_docker-websocket-1      |
frappe_docker-websocket-1      | Error: connect ETIMEDOUT 172.20.0.3:6379
frappe_docker-websocket-1      |     at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1195:16)
frappe_docker-websocket-1      | Emitted 'error' event on RedisClient instance at:
frappe_docker-websocket-1      |     at RedisClient.on_error (/home/frappe/frappe-bench/apps/frappe/node_modules/redis/index.js:342:14)
frappe_docker-websocket-1      |     at Socket.<anonymous> (/home/frappe/frappe-bench/apps/frappe/node_modules/redis/index.js:223:14)
frappe_docker-websocket-1      |     at Socket.emit (node:events:527:28)
frappe_docker-websocket-1      |     at emitErrorNT (node:internal/streams/destroy:164:8)
frappe_docker-websocket-1      |     at emitErrorCloseNT (node:internal/streams/destroy:129:3)
frappe_docker-websocket-1      |     at processTicksAndRejections (node:internal/process/task_queues:83:21) {
frappe_docker-websocket-1      |   errno: -110,
frappe_docker-websocket-1      |   code: 'ETIMEDOUT',
frappe_docker-websocket-1      |   syscall: 'connect',
frappe_docker-websocket-1      |   address: '172.20.0.3',
frappe_docker-websocket-1      |   port: 6379
frappe_docker-websocket-1      | }
frappe_docker-websocket-1      |
frappe_docker-websocket-1      | Node.js v17.9.0
frappe_docker-websocket-1 exited with code 1

Where have I gone wrong?
Do I need to leave the containers running at this stage and run a command in a container (bench?) ?

This is all being attempted on a new ubuntu 22.04 LTS with nothing else installed.

Full log.

[+] Running 11/11
 ⠿ Container frappe_docker-websocket-1      Recreated                                                                                                                                                                                   0.6s
 ⠿ Container frappe_docker-queue-short-1    Recreated                                                                                                                                                                                   0.6s
 ⠿ Container frappe_docker-frontend-1       Recreated                                                                                                                                                                                   0.6s
 ⠿ Container frappe_docker-db-1             Recreated                                                                                                                                                                                   0.5s
 ⠿ Container frappe_docker-queue-default-1  Recreated                                                                                                                                                                                   0.5s
 ⠿ Container frappe_docker-scheduler-1      Recreated                                                                                                                                                                                   0.6s
 ⠿ Container frappe_docker-configurator-1   Recreated                                                                                                                                                                                   0.6s
 ⠿ Container frappe_docker-backend-1        Recreated                                                                                                                                                                                   0.6s
 ⠿ Container frappe_docker-create-site-1    Recreated                                                                                                                                                                                   0.5s
 ⠿ Container frappe_docker-queue-long-1     Recreated                                                                                                                                                                                   0.6s
 ⠿ Container frappe_docker-redis-1          Recreated                                                                                                                                                                                   0.6s
Attaching to frappe_docker-backend-1, frappe_docker-configurator-1, frappe_docker-create-site-1, frappe_docker-db-1, frappe_docker-frontend-1, frappe_docker-queue-default-1, frappe_docker-queue-long-1, frappe_docker-queue-short-1, frappe_docker-redis-1, frappe_docker-scheduler-1, frappe_docker-websocket-1
frappe_docker-create-site-1    | wait-for-it: waiting 120 seconds for db:3306
frappe_docker-db-1             | 2022-05-28 23:55:34+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.6.8+maria~focal started.
frappe_docker-frontend-1       | /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
frappe_docker-frontend-1       | /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
frappe_docker-frontend-1       | /docker-entrypoint.sh: Launching /docker-entrypoint.d/frappe-entrypoint.sh
frappe_docker-frontend-1       | /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
frappe_docker-frontend-1       | 10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf
frappe_docker-frontend-1       | 10-listen-on-ipv6-by-default.sh: info: /etc/nginx/conf.d/default.conf differs from the packaged version
frappe_docker-frontend-1       | /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
frappe_docker-frontend-1       | 20-envsubst-on-templates.sh: Running envsubst on /etc/nginx/templates/default.conf.template to /etc/nginx/conf.d/default.conf
frappe_docker-frontend-1       | /docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
frappe_docker-frontend-1       | /docker-entrypoint.sh: Configuration complete; ready for start up
frappe_docker-frontend-1       | 2022/05/28 23:55:34 [notice] 1#1: using the "epoll" event method
frappe_docker-frontend-1       | 2022/05/28 23:55:34 [notice] 1#1: nginx/1.21.6
frappe_docker-frontend-1       | 2022/05/28 23:55:34 [notice] 1#1: built by gcc 10.3.1 20211027 (Alpine 10.3.1_git20211027)
frappe_docker-frontend-1       | 2022/05/28 23:55:34 [notice] 1#1: OS: Linux 5.15.0-33-generic
frappe_docker-frontend-1       | 2022/05/28 23:55:34 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1024:524288
frappe_docker-frontend-1       | 2022/05/28 23:55:34 [notice] 1#1: start worker processes
frappe_docker-frontend-1       | 2022/05/28 23:55:34 [notice] 1#1: start worker process 40
frappe_docker-db-1             | 2022-05-28 23:55:35+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
frappe_docker-db-1             | 2022-05-28 23:55:35+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.6.8+maria~focal started.
frappe_docker-websocket-1      | listening on *: 9000
frappe_docker-redis-1          | 1:C 28 May 2022 23:55:36.123 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
frappe_docker-redis-1          | 1:C 28 May 2022 23:55:36.123 # Redis version=6.2.7, bits=64, commit=00000000, modified=0, pid=1, just started
frappe_docker-redis-1          | 1:C 28 May 2022 23:55:36.123 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
frappe_docker-redis-1          | 1:M 28 May 2022 23:55:36.124 * Increased maximum number of open files to 10032 (it was originally set to 1024).
frappe_docker-redis-1          | 1:M 28 May 2022 23:55:36.124 * monotonic clock: POSIX clock_gettime
frappe_docker-redis-1          | 1:M 28 May 2022 23:55:36.124 # A key '__redis__compare_helper' was added to Lua globals which is not on the globals allow list nor listed on the deny list.
frappe_docker-redis-1          | 1:M 28 May 2022 23:55:36.124 * Running mode=standalone, port=6379.
frappe_docker-redis-1          | 1:M 28 May 2022 23:55:36.124 # Server initialized
frappe_docker-redis-1          | 1:M 28 May 2022 23:55:36.124 # 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.
frappe_docker-redis-1          | 1:M 28 May 2022 23:55:36.144 * Loading RDB produced by version 6.2.7
frappe_docker-redis-1          | 1:M 28 May 2022 23:55:36.144 * RDB age 10808 seconds
frappe_docker-redis-1          | 1:M 28 May 2022 23:55:36.144 * RDB memory usage when created 0.77 Mb
frappe_docker-redis-1          | 1:M 28 May 2022 23:55:36.144 # Done loading RDB, keys loaded: 0, keys expired: 0.
frappe_docker-redis-1          | 1:M 28 May 2022 23:55:36.144 * DB loaded from disk: 0.020 seconds
frappe_docker-redis-1          | 1:M 28 May 2022 23:55:36.144 * Ready to accept connections
frappe_docker-configurator-1 exited with code 0
frappe_docker-db-1             | 2022-05-28 23:55:37+00:00 [Note] [Entrypoint]: MariaDB upgrade not required
frappe_docker-db-1             | 2022-05-28 23:55:37 0 [Note] mariadbd (server 10.6.8-MariaDB-1:10.6.8+maria~focal) starting as process 1 ...
frappe_docker-db-1             | 2022-05-28 23:55:37 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
frappe_docker-db-1             | 2022-05-28 23:55:37 0 [Note] InnoDB: Number of pools: 1
frappe_docker-db-1             | 2022-05-28 23:55:37 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
frappe_docker-db-1             | 2022-05-28 23:55:37 0 [Note] mariadbd: O_TMPFILE is not supported on /tmp (disabling future attempts)
frappe_docker-db-1             | 2022-05-28 23:55:37 0 [Note] InnoDB: Using Linux native AIO
frappe_docker-db-1             | 2022-05-28 23:55:37 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
frappe_docker-db-1             | 2022-05-28 23:55:37 0 [Note] InnoDB: Completed initialization of buffer pool
frappe_docker-db-1             | 2022-05-28 23:55:37 0 [Note] InnoDB: 128 rollback segments are active.
frappe_docker-db-1             | 2022-05-28 23:55:37 0 [Note] InnoDB: Creating shared tablespace for temporary tables
frappe_docker-db-1             | 2022-05-28 23:55:37 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
frappe_docker-db-1             | 2022-05-28 23:55:37 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
frappe_docker-db-1             | 2022-05-28 23:55:37 0 [Note] InnoDB: 10.6.8 started; log sequence number 42487; transaction id 14
frappe_docker-db-1             | 2022-05-28 23:55:37 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
frappe_docker-db-1             | 2022-05-28 23:55:37 0 [Note] Plugin 'FEEDBACK' is disabled.
frappe_docker-db-1             | 2022-05-28 23:55:37 0 [Note] InnoDB: Buffer pool(s) load completed at 220528 23:55:37
frappe_docker-db-1             | 2022-05-28 23:55:37 0 [Warning] You need to use --log-bin to make --expire-logs-days or --binlog-expire-logs-seconds work.
frappe_docker-db-1             | 2022-05-28 23:55:37 0 [Note] Server socket created on IP: '0.0.0.0'.
frappe_docker-db-1             | 2022-05-28 23:55:37 0 [Note] Server socket created on IP: '::'.
frappe_docker-db-1             | 2022-05-28 23:55:37 0 [Note] mariadbd: ready for connections.
frappe_docker-db-1             | Version: '10.6.8-MariaDB-1:10.6.8+maria~focal'  socket: '/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution
frappe_docker-backend-1        | [2022-05-28 23:55:40 +0000] [1] [INFO] Starting gunicorn 20.1.0
frappe_docker-backend-1        | [2022-05-28 23:55:40 +0000] [1] [INFO] Listening at: http://0.0.0.0:8000 (1)
frappe_docker-backend-1        | [2022-05-28 23:55:40 +0000] [1] [INFO] Using worker: gthread
frappe_docker-backend-1        | [2022-05-28 23:55:40 +0000] [9] [INFO] Booting worker with pid: 9
frappe_docker-backend-1        | [2022-05-28 23:55:40 +0000] [10] [INFO] Booting worker with pid: 10
frappe_docker-create-site-1    | wait-for-it: timeout occurred after waiting 120 seconds for db:3306
frappe_docker-create-site-1    | wait-for-it: waiting 120 seconds for redis:6379
frappe_docker-websocket-1      | node:events:505
frappe_docker-websocket-1      |       throw er; // Unhandled 'error' event
frappe_docker-websocket-1      |       ^
frappe_docker-websocket-1      |
frappe_docker-websocket-1      | Error: connect ETIMEDOUT 172.20.0.3:6379
frappe_docker-websocket-1      |     at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1195:16)
frappe_docker-websocket-1      | Emitted 'error' event on RedisClient instance at:
frappe_docker-websocket-1      |     at RedisClient.on_error (/home/frappe/frappe-bench/apps/frappe/node_modules/redis/index.js:342:14)
frappe_docker-websocket-1      |     at Socket.<anonymous> (/home/frappe/frappe-bench/apps/frappe/node_modules/redis/index.js:223:14)
frappe_docker-websocket-1      |     at Socket.emit (node:events:527:28)
frappe_docker-websocket-1      |     at emitErrorNT (node:internal/streams/destroy:164:8)
frappe_docker-websocket-1      |     at emitErrorCloseNT (node:internal/streams/destroy:129:3)
frappe_docker-websocket-1      |     at processTicksAndRejections (node:internal/process/task_queues:83:21) {
frappe_docker-websocket-1      |   errno: -110,
frappe_docker-websocket-1      |   code: 'ETIMEDOUT',
frappe_docker-websocket-1      |   syscall: 'connect',
frappe_docker-websocket-1      |   address: '172.20.0.3',
frappe_docker-websocket-1      |   port: 6379
frappe_docker-websocket-1      | }
frappe_docker-websocket-1      |
frappe_docker-websocket-1      | Node.js v17.9.0
frappe_docker-websocket-1 exited with code 1
frappe_docker-websocket-1      | listening on *: 9000
frappe_docker-queue-long-1     | Traceback (most recent call last):
frappe_docker-queue-long-1     |   File "/home/frappe/frappe-bench/env/lib/python3.9/site-packages/redis/connection.py", line 559, in connect
frappe_docker-queue-long-1     |     sock = self._connect()
frappe_docker-queue-long-1     |   File "/home/frappe/frappe-bench/env/lib/python3.9/site-packages/redis/connection.py", line 615, in _connect
frappe_docker-queue-long-1     |     raise err
frappe_docker-queue-long-1     |   File "/home/frappe/frappe-bench/env/lib/python3.9/site-packages/redis/connection.py", line 603, in _connect
frappe_docker-queue-long-1     |     sock.connect(socket_address)
frappe_docker-queue-long-1     | TimeoutError: [Errno 110] Connection timed out
frappe_docker-queue-long-1     |
frappe_docker-queue-long-1     | During handling of the above exception, another exception occurred:
frappe_docker-queue-long-1     |
frappe_docker-queue-long-1     | Traceback (most recent call last):
frappe_docker-queue-long-1     |   File "/usr/local/bin/patched_bench_helper.py", line 48, in <module>
frappe_docker-queue-long-1     |     raise SystemExit(main())
frappe_docker-queue-long-1     |   File "/usr/local/bin/patched_bench_helper.py", line 43, in main
frappe_docker-queue-long-1     |     frappe.utils.bench_helper.main()
frappe_docker-queue-long-1     |   File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 20, in main
frappe_docker-queue-long-1     |     click.Group(commands=commands)(prog_name="bench")
frappe_docker-queue-long-1     |   File "/home/frappe/frappe-bench/env/lib/python3.9/site-packages/click/core.py", line 829, in __call__
frappe_docker-queue-long-1     |     return self.main(*args, **kwargs)
frappe_docker-queue-long-1     |   File "/home/frappe/frappe-bench/env/lib/python3.9/site-packages/click/core.py", line 782, in main
frappe_docker-queue-long-1     |     rv = self.invoke(ctx)
frappe_docker-queue-long-1     |   File "/home/frappe/frappe-bench/env/lib/python3.9/site-packages/click/core.py", line 1259, in invoke
frappe_docker-queue-long-1     |     return _process_result(sub_ctx.command.invoke(sub_ctx))
frappe_docker-queue-long-1     |   File "/home/frappe/frappe-bench/env/lib/python3.9/site-packages/click/core.py", line 1259, in invoke
frappe_docker-queue-long-1     |     return _process_result(sub_ctx.command.invoke(sub_ctx))
frappe_docker-queue-long-1     |   File "/home/frappe/frappe-bench/env/lib/python3.9/site-packages/click/core.py", line 1066, in invoke
frappe_docker-queue-long-1     |     return ctx.invoke(self.callback, **ctx.params)
frappe_docker-queue-long-1     |   File "/home/frappe/frappe-bench/env/lib/python3.9/site-packages/click/core.py", line 610, in invoke
frappe_docker-queue-long-1     |     return callback(*args, **kwargs)
frappe_docker-queue-long-1     |   File "/home/frappe/frappe-bench/apps/frappe/frappe/commands/scheduler.py", line 203, in start_worker
frappe_docker-queue-long-1     |     start_worker(queue, quiet=quiet)
frappe_docker-queue-long-1     |   File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/background_jobs.py", line 186, in start_worker
frappe_docker-queue-long-1     |     Worker(queues, name=get_worker_name(queue)).work(logging_level=logging_level)
frappe_docker-queue-long-1     |   File "/home/frappe/frappe-bench/env/lib/python3.9/site-packages/rq/worker.py", line 550, in work
frappe_docker-queue-long-1     |     self.register_birth()
frappe_docker-queue-long-1     |   File "/home/frappe/frappe-bench/env/lib/python3.9/site-packages/rq/worker.py", line 286, in register_birth
frappe_docker-queue-long-1     |     if self.connection.exists(self.key) and \
frappe_docker-queue-long-1     |   File "/home/frappe/frappe-bench/env/lib/python3.9/site-packages/redis/client.py", line 1581, in exists
frappe_docker-queue-long-1     |     return self.execute_command('EXISTS', *names)
frappe_docker-queue-long-1     |   File "/home/frappe/frappe-bench/env/lib/python3.9/site-packages/redis/client.py", line 898, in execute_command
frappe_docker-queue-short-1    | Traceback (most recent call last):
frappe_docker-queue-short-1    |   File "/home/frappe/frappe-bench/env/lib/python3.9/site-packages/redis/connection.py", line 559, in connect
frappe_docker-queue-short-1    |     sock = self._connect()
frappe_docker-queue-short-1    |   File "/home/frappe/frappe-bench/env/lib/python3.9/site-packages/redis/connection.py", line 615, in _connect
frappe_docker-queue-short-1    |     raise err
frappe_docker-queue-short-1    |   File "/home/frappe/frappe-bench/env/lib/python3.9/site-packages/redis/connection.py", line 603, in _connect
frappe_docker-queue-short-1    |     sock.connect(socket_address)
frappe_docker-queue-short-1    | TimeoutError: [Errno 110] Connection timed out
frappe_docker-queue-short-1    |
frappe_docker-queue-short-1    | During handling of the above exception, another exception occurred:
frappe_docker-queue-short-1    |
frappe_docker-queue-short-1    | Traceback (most recent call last):
frappe_docker-queue-short-1    |   File "/usr/local/bin/patched_bench_helper.py", line 48, in <module>
frappe_docker-queue-short-1    |     raise SystemExit(main())
frappe_docker-queue-short-1    |   File "/usr/local/bin/patched_bench_helper.py", line 43, in main
frappe_docker-queue-short-1    |     frappe.utils.bench_helper.main()
frappe_docker-queue-short-1    |   File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 20, in main
frappe_docker-queue-short-1    |     click.Group(commands=commands)(prog_name="bench")
frappe_docker-queue-short-1    |   File "/home/frappe/frappe-bench/env/lib/python3.9/site-packages/click/core.py", line 829, in __call__
frappe_docker-queue-short-1    |     return self.main(*args, **kwargs)
frappe_docker-queue-short-1    |   File "/home/frappe/frappe-bench/env/lib/python3.9/site-packages/click/core.py", line 782, in main
frappe_docker-queue-short-1    |     rv = self.invoke(ctx)
frappe_docker-queue-short-1    |   File "/home/frappe/frappe-bench/env/lib/python3.9/site-packages/click/core.py", line 1259, in invoke
frappe_docker-queue-short-1    |     return _process_result(sub_ctx.command.invoke(sub_ctx))
frappe_docker-queue-short-1    |   File "/home/frappe/frappe-bench/env/lib/python3.9/site-packages/click/core.py", line 1259, in invoke
frappe_docker-queue-short-1    |     return _process_result(sub_ctx.command.invoke(sub_ctx))
frappe_docker-queue-short-1    |   File "/home/frappe/frappe-bench/env/lib/python3.9/site-packages/click/core.py", line 1066, in invoke
frappe_docker-queue-short-1    |     return ctx.invoke(self.callback, **ctx.params)
frappe_docker-queue-short-1    |   File "/home/frappe/frappe-bench/env/lib/python3.9/site-packages/click/core.py", line 610, in invoke
frappe_docker-queue-short-1    |     return callback(*args, **kwargs)
frappe_docker-queue-short-1    |   File "/home/frappe/frappe-bench/apps/frappe/frappe/commands/scheduler.py", line 203, in start_worker
frappe_docker-queue-short-1    |     start_worker(queue, quiet=quiet)
frappe_docker-queue-short-1    |   File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/background_jobs.py", line 186, in start_worker
frappe_docker-queue-short-1    |     Worker(queues, name=get_worker_name(queue)).work(logging_level=logging_level)
frappe_docker-queue-short-1    |   File "/home/frappe/frappe-bench/env/lib/python3.9/site-packages/rq/worker.py", line 550, in work
frappe_docker-queue-short-1    |     self.register_birth()
frappe_docker-queue-short-1    |   File "/home/frappe/frappe-bench/env/lib/python3.9/site-packages/rq/worker.py", line 286, in register_birth
frappe_docker-queue-short-1    |     if self.connection.exists(self.key) and \
frappe_docker-queue-short-1    |   File "/home/frappe/frappe-bench/env/lib/python3.9/site-packages/redis/client.py", line 1581, in exists
frappe_docker-queue-short-1    |     return self.execute_command('EXISTS', *names)
frappe_docker-queue-short-1    |   File "/home/frappe/frappe-bench/env/lib/python3.9/site-packages/redis/client.py", line 898, in execute_command
frappe_docker-queue-short-1    |     conn = self.connection or pool.get_connection(command_name, **options)
frappe_docker-queue-long-1     |     conn = self.connection or pool.get_connection(command_name, **options)
frappe_docker-queue-long-1     |   File "/home/frappe/frappe-bench/env/lib/python3.9/site-packages/redis/connection.py", line 1192, in get_connection
frappe_docker-queue-long-1     |     connection.connect()
frappe_docker-queue-short-1    |   File "/home/frappe/frappe-bench/env/lib/python3.9/site-packages/redis/connection.py", line 1192, in get_connection
frappe_docker-queue-short-1    |     connection.connect()
frappe_docker-queue-long-1     |   File "/home/frappe/frappe-bench/env/lib/python3.9/site-packages/redis/connection.py", line 563, in connect
frappe_docker-queue-short-1    |   File "/home/frappe/frappe-bench/env/lib/python3.9/site-packages/redis/connection.py", line 563, in connect
frappe_docker-queue-short-1    |     raise ConnectionError(self._error_message(e))
frappe_docker-queue-long-1     |     raise ConnectionError(self._error_message(e))
frappe_docker-queue-short-1    | redis.exceptions.ConnectionError: Error 110 connecting to redis:6379. Connection timed out.
frappe_docker-queue-long-1     | redis.exceptions.ConnectionError: Error 110 connecting to redis:6379. Connection timed out.
frappe_docker-queue-long-1 exited with code 1
frappe_docker-queue-default-1  | Traceback (most recent call last):
frappe_docker-queue-default-1  |   File "/home/frappe/frappe-bench/env/lib/python3.9/site-packages/redis/connection.py", line 559, in connect
frappe_docker-queue-default-1  |     sock = self._connect()
frappe_docker-queue-default-1  |   File "/home/frappe/frappe-bench/env/lib/python3.9/site-packages/redis/connection.py", line 615, in _connect
frappe_docker-queue-default-1  |     raise err
frappe_docker-queue-default-1  |   File "/home/frappe/frappe-bench/env/lib/python3.9/site-packages/redis/connection.py", line 603, in _connect
frappe_docker-queue-default-1  |     sock.connect(socket_address)
frappe_docker-queue-default-1  | TimeoutError: [Errno 110] Connection timed out
frappe_docker-queue-default-1  |
frappe_docker-queue-default-1  | During handling of the above exception, another exception occurred:
frappe_docker-queue-default-1  |
frappe_docker-queue-default-1  | Traceback (most recent call last):
frappe_docker-queue-default-1  |   File "/usr/local/bin/patched_bench_helper.py", line 48, in <module>
frappe_docker-queue-default-1  |     raise SystemExit(main())
frappe_docker-queue-default-1  |   File "/usr/local/bin/patched_bench_helper.py", line 43, in main
frappe_docker-queue-default-1  |     frappe.utils.bench_helper.main()
frappe_docker-queue-default-1  |   File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 20, in main
frappe_docker-queue-default-1  |     click.Group(commands=commands)(prog_name="bench")
frappe_docker-queue-default-1  |   File "/home/frappe/frappe-bench/env/lib/python3.9/site-packages/click/core.py", line 829, in __call__
frappe_docker-queue-default-1  |     return self.main(*args, **kwargs)
frappe_docker-queue-default-1  |   File "/home/frappe/frappe-bench/env/lib/python3.9/site-packages/click/core.py", line 782, in main
frappe_docker-queue-default-1  |     rv = self.invoke(ctx)
frappe_docker-queue-default-1  |   File "/home/frappe/frappe-bench/env/lib/python3.9/site-packages/click/core.py", line 1259, in invoke
frappe_docker-queue-default-1  |     return _process_result(sub_ctx.command.invoke(sub_ctx))
frappe_docker-queue-default-1  |   File "/home/frappe/frappe-bench/env/lib/python3.9/site-packages/click/core.py", line 1259, in invoke
frappe_docker-queue-default-1  |     return _process_result(sub_ctx.command.invoke(sub_ctx))
frappe_docker-queue-default-1  |   File "/home/frappe/frappe-bench/env/lib/python3.9/site-packages/click/core.py", line 1066, in invoke
frappe_docker-queue-default-1  |     return ctx.invoke(self.callback, **ctx.params)
frappe_docker-queue-default-1  |   File "/home/frappe/frappe-bench/env/lib/python3.9/site-packages/click/core.py", line 610, in invoke
frappe_docker-queue-default-1  |     return callback(*args, **kwargs)
frappe_docker-queue-default-1  |   File "/home/frappe/frappe-bench/apps/frappe/frappe/commands/scheduler.py", line 203, in start_worker
frappe_docker-queue-default-1  |     start_worker(queue, quiet=quiet)
frappe_docker-queue-default-1  |   File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/background_jobs.py", line 186, in start_worker
frappe_docker-queue-default-1  |     Worker(queues, name=get_worker_name(queue)).work(logging_level=logging_level)
frappe_docker-queue-default-1  |   File "/home/frappe/frappe-bench/env/lib/python3.9/site-packages/rq/worker.py", line 550, in work
frappe_docker-queue-default-1  |     self.register_birth()
frappe_docker-queue-default-1  |   File "/home/frappe/frappe-bench/env/lib/python3.9/site-packages/rq/worker.py", line 286, in register_birth
frappe_docker-queue-default-1  |     if self.connection.exists(self.key) and \
frappe_docker-queue-default-1  |   File "/home/frappe/frappe-bench/env/lib/python3.9/site-packages/redis/client.py", line 1581, in exists
frappe_docker-queue-default-1  |     return self.execute_command('EXISTS', *names)
frappe_docker-queue-default-1  |   File "/home/frappe/frappe-bench/env/lib/python3.9/site-packages/redis/client.py", line 898, in execute_command
frappe_docker-queue-default-1  |     conn = self.connection or pool.get_connection(command_name, **options)
frappe_docker-queue-default-1  |   File "/home/frappe/frappe-bench/env/lib/python3.9/site-packages/redis/connection.py", line 1192, in get_connection
frappe_docker-queue-default-1  |     connection.connect()
frappe_docker-queue-default-1  |   File "/home/frappe/frappe-bench/env/lib/python3.9/site-packages/redis/connection.py", line 563, in connect
frappe_docker-queue-default-1  |     raise ConnectionError(self._error_message(e))
frappe_docker-queue-default-1  | redis.exceptions.ConnectionError: Error 110 connecting to redis:6379. Connection timed out.
frappe_docker-queue-short-1 exited with code 0
frappe_docker-queue-default-1 exited with code 0
^CGracefully stopping... (press Ctrl+C again to force)
[+] Running 11/11
 ⠿ Container frappe_docker-websocket-1      Stopped                                                                                                                                                                                    11.4s
 ⠿ Container frappe_docker-queue-short-1    Stopped                                                                                                                                                                                    11.4s
 ⠿ Container frappe_docker-frontend-1       Stopped                                                                                                                                                                                     0.9s
 ⠿ Container frappe_docker-configurator-1   Stopped                                                                                                                                                                                     0.0s
 ⠿ Container frappe_docker-create-site-1    Stopped                                                                                                                                                                                    11.1s
 ⠿ Container frappe_docker-backend-1        Stopped                                                                                                                                                                                     1.6s
 ⠿ Container frappe_docker-db-1             Stopped                                                                                                                                                                                     1.0s
 ⠿ Container frappe_docker-queue-long-1     Stopped                                                                                                                                                                                    11.4s
 ⠿ Container frappe_docker-scheduler-1      Stopped                                                                                                                                                                                    11.3s
 ⠿ Container frappe_docker-queue-default-1  Stopped                                                                                                                                                                                    11.4s
 ⠿ Container frappe_docker-redis-1          Stopped                                                                                                                                                                                     0.7s
canceled
erp:~/frappe_docker$ 

In my humble mind, all looks well until websocket-1

can you check the logs of frappe_docker-configurator-1, I want to confirm common_site_config.json is being created with correct values or not.

You can also check it in sites volume by attaching a container to it.

check this issue Sites volume permission error · Issue #803 · frappe/frappe_docker · GitHub

can you edit the pwd.yml and add user: "1000:1000" like this PR: Fix volumes permissions by timemaster5 · Pull Request #804 · frappe/frappe_docker · GitHub

try again with edited pwd.yml. Clear all volumes so the sites and db can be created fresh. Or it will error with “site already exist”

It somehow works on pwd nodes.

I’ve also added a video of pwd working locally here: 803#issuecomment-1140397114

Hi @revant_one, what is the correct command for running frappe_docker-configurator-1?

I can see that the compose file runs it, but it exits without logging anything.

Here is the first part of my compose up output.

colin@erp:~/pwd$ docker compose -p pwd -f pwd.yml up
[+] Running 15/15
 ⠿ Volume "pwd_db-data"           Created                                                                                                                                                                                                                                                                               0.0s
 ⠿ Volume "pwd_assets"            Created                                                                                                                                                                                                                                                                               0.0s
 ⠿ Volume "pwd_redis-data"        Created                                                                                                                                                                                                                                                                               0.0s
 ⠿ Volume "pwd_sites"             Created                                                                                                                                                                                                                                                                               0.0s
 ⠿ Container pwd-backend-1        Created                                                                                                                                                                                                                                                                               0.2s
 ⠿ Container pwd-websocket-1      Created                                                                                                                                                                                                                                                                               0.1s
 ⠿ Container pwd-redis-1          Created                                                                                                                                                                                                                                                                               0.1s
 ⠿ Container pwd-create-site-1    Created                                                                                                                                                                                                                                                                               0.1s
 ⠿ Container pwd-queue-default-1  Created                                                                                                                                                                                                                                                                               0.1s
 ⠿ Container pwd-configurator-1   Created                                                                                                                                                                                                                                                                               0.2s
 ⠿ Container pwd-scheduler-1      Created                                                                                                                                                                                                                                                                               0.2s
 ⠿ Container pwd-db-1             Created                                                                                                                                                                                                                                                                               0.1s
 ⠿ Container pwd-queue-long-1     Created                                                                                                                                                                                                                                                                               0.1s
 ⠿ Container pwd-frontend-1       Created                                                                                                                                                                                                                                                                               6.7s
 ⠿ Container pwd-queue-short-1    Created                                                                                                                                                                                                                                                                               0.1s
Attaching to pwd-backend-1, pwd-configurator-1, pwd-create-site-1, pwd-db-1, pwd-frontend-1, pwd-queue-default-1, pwd-queue-long-1, pwd-queue-short-1, pwd-redis-1, pwd-scheduler-1, pwd-websocket-1
pwd-db-1             | 2022-05-30 04:45:59+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.6.8+maria~focal started.
pwd-db-1             | 2022-05-30 04:45:59+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
pwd-db-1             | 2022-05-30 04:45:59+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.6.8+maria~focal started.
pwd-db-1             | 2022-05-30 04:46:00+00:00 [Note] [Entrypoint]: Initializing database files
pwd-configurator-1 exited with code 0
pwd-frontend-1       | /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
pwd-frontend-1       | /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
pwd-frontend-1       | /docker-entrypoint.sh: Launching /docker-entrypoint.d/frappe-entrypoint.sh
pwd-frontend-1       | /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
pwd-frontend-1       | 10-listen-on-ipv6-by-default.sh: info: can not modify /etc/nginx/conf.d/default.conf (read-only file system?)
pwd-frontend-1       | /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
pwd-frontend-1       | 20-envsubst-on-templates.sh: ERROR: /etc/nginx/templates exists, but /etc/nginx/conf.d is not writable
pwd-frontend-1       | /docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
pwd-frontend-1       | /docker-entrypoint.sh: Configuration complete; ready for start up
pwd-frontend-1       | 2022/05/30 04:46:00 [notice] 1#1: using the "epoll" event method
pwd-frontend-1       | 2022/05/30 04:46:00 [notice] 1#1: nginx/1.21.6

It seems the command exited successfully with exit code 0.

Configurator just sets the common_site_config.json for the bench.

I think you are facing volume permission error, did you try adding user: to docker-compose like the PR? That worked for the person who sent the PR.

Yes.

My pwd.yml is attached at the end.

this is from pwd-frontend-1 with user: “1000:1000” in the pwd.yml file:

colin@erp:~/pwd$ docker exec -it pwd-frontend-1 /bin/sh
/ $ cd /etc/nginx
/etc/nginx $ ls -la
total 44
drwxrwxr-x    1 nginx    root          4096 May 27 06:51 .
drwxr-xr-x    1 root     root          4096 May 31 00:01 ..
drwxrwxr-x    1 nginx    root          4096 May 25 12:39 conf.d
-rw-rw-r--    1 nginx    root          1077 Jan 25 15:26 fastcgi.conf
-rw-rw-r--    1 nginx    root          1007 Jan 25 15:26 fastcgi_params
-rw-rw-r--    1 nginx    root          5349 Jan 25 15:26 mime.types
lrwxrwxrwx    1 nginx    root            22 May 25 12:39 modules -> /usr/lib/nginx/modules
-rw-rw-r--    1 nginx    root           826 May 25 12:39 nginx.conf
-rw-rw-r--    1 nginx    root           636 Jan 25 15:26 scgi_params
drwxr-xr-x    2 root     root          4096 May 27 06:51 templates
-rw-rw-r--    1 nginx    root           664 Jan 25 15:26 uwsgi_params
/etc/nginx $

Clearly nginx files are owned by nginx (uid: 101)

If I remove the user “1000:1000” lines, I dont get the previous permission error. I get this output (To first error):

colin@erp:~/pwd$   more ~/compose.tail
pwd-frontend-1       | 2022-05-31T00:09:24.127903341Z /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
pwd-frontend-1       | 2022-05-31T00:09:24.127988128Z /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
pwd-frontend-1       | 2022-05-31T00:09:24.129126670Z /docker-entrypoint.sh: Launching /docker-entrypoint.d/frappe-entrypoint.sh
pwd-frontend-1       | 2022-05-31T00:09:24.130777738Z /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
pwd-frontend-1       | 2022-05-31T00:09:24.142291669Z 10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf
pwd-frontend-1       | 2022-05-31T00:09:24.199200460Z 10-listen-on-ipv6-by-default.sh: info: /etc/nginx/conf.d/default.conf differs from the packaged version
pwd-frontend-1       | 2022-05-31T00:09:24.199238028Z /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
pwd-frontend-1       | 2022-05-31T00:09:24.211740423Z 20-envsubst-on-templates.sh: Running envsubst on /etc/nginx/templates/default.conf.template to /etc/nginx/conf.d/default.conf
pwd-frontend-1       | 2022-05-31T00:09:24.219145774Z /docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
pwd-frontend-1       | 2022-05-31T00:09:24.222606404Z /docker-entrypoint.sh: Configuration complete; ready for start up
pwd-frontend-1       | 2022-05-31T00:09:24.237677036Z 2022/05/31 00:09:24 [notice] 1#1: using the "epoll" event method
pwd-frontend-1       | 2022-05-31T00:09:24.237696844Z 2022/05/31 00:09:24 [notice] 1#1: nginx/1.21.6
pwd-frontend-1       | 2022-05-31T00:09:24.237702947Z 2022/05/31 00:09:24 [notice] 1#1: built by gcc 10.3.1 20211027 (Alpine 10.3.1_git20211027)
pwd-frontend-1       | 2022-05-31T00:09:24.237708289Z 2022/05/31 00:09:24 [notice] 1#1: OS: Linux 5.15.0-33-generic
pwd-frontend-1       | 2022-05-31T00:09:24.237742771Z 2022/05/31 00:09:24 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1024:524288
pwd-frontend-1       | 2022-05-31T00:09:24.237750432Z 2022/05/31 00:09:24 [notice] 1#1: start worker processes
pwd-frontend-1       | 2022-05-31T00:09:24.237755696Z 2022/05/31 00:09:24 [notice] 1#1: start worker process 38
pwd-frontend-1       | 2022-05-31T00:09:24.237760803Z 2022/05/31 00:09:24 [notice] 1#1: start worker process 39
pwd-frontend-1       | 2022-05-31T00:09:24.237765906Z 2022/05/31 00:09:24 [notice] 1#1: start worker process 40
pwd-frontend-1       | 2022-05-31T00:09:24.237771008Z 2022/05/31 00:09:24 [notice] 1#1: start worker process 41
pwd-db-1             | 2022-05-31T00:09:24.304502114Z 2022-05-31 00:09:24+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.6.8+maria~focal started.
pwd-websocket-1      | 2022-05-31T00:09:22.369550432Z listening on *: 9000
pwd-redis-1          | 2022-05-31T00:09:22.845977364Z 1:C 31 May 2022 00:09:22.844 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
pwd-redis-1          | 2022-05-31T00:09:22.846025881Z 1:C 31 May 2022 00:09:22.844 # Redis version=6.2.7, bits=64, commit=00000000, modified=0, pid=1, just started
pwd-redis-1          | 2022-05-31T00:09:22.846032716Z 1:C 31 May 2022 00:09:22.844 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
pwd-redis-1          | 2022-05-31T00:09:22.846038978Z 1:M 31 May 2022 00:09:22.844 * Increased maximum number of open files to 10032 (it was originally set to 1024).
pwd-redis-1          | 2022-05-31T00:09:22.846044121Z 1:M 31 May 2022 00:09:22.844 * monotonic clock: POSIX clock_gettime
pwd-redis-1          | 2022-05-31T00:09:22.846058820Z 1:M 31 May 2022 00:09:22.845 # A key '__redis__compare_helper' was added to Lua globals which is not on the globals allow list nor listed on the deny list.
pwd-redis-1          | 2022-05-31T00:09:22.846065941Z 1:M 31 May 2022 00:09:22.845 * Running mode=standalone, port=6379.
pwd-redis-1          | 2022-05-31T00:09:22.846070909Z 1:M 31 May 2022 00:09:22.845 # Server initialized
pwd-redis-1          | 2022-05-31T00:09:22.846076109Z 1:M 31 May 2022 00:09:22.845 # 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.
pwd-redis-1          | 2022-05-31T00:09:22.846081854Z 1:M 31 May 2022 00:09:22.845 * Ready to accept connections
pwd-create-site-1    | 2022-05-31T00:09:23.667530177Z wait-for-it: waiting 120 seconds for db:3306
pwd-db-1             | 2022-05-31T00:09:24.845802732Z 2022-05-31 00:09:24+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
pwd-db-1             | 2022-05-31T00:09:24.890242326Z 2022-05-31 00:09:24+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.6.8+maria~focal started.
pwd-db-1             | 2022-05-31T00:09:25.343305819Z 2022-05-31 00:09:25+00:00 [Note] [Entrypoint]: Initializing database files
pwd-backend-1        | 2022-05-31T00:09:25.774824781Z [2022-05-31 00:09:25 +0000] [1] [INFO] Starting gunicorn 20.1.0
pwd-backend-1        | 2022-05-31T00:09:25.775473003Z [2022-05-31 00:09:25 +0000] [1] [INFO] Listening at: http://0.0.0.0:8000 (1)
pwd-backend-1        | 2022-05-31T00:09:25.775756142Z [2022-05-31 00:09:25 +0000] [1] [INFO] Using worker: gthread
pwd-backend-1        | 2022-05-31T00:09:25.779750561Z [2022-05-31 00:09:25 +0000] [7] [INFO] Booting worker with pid: 7
pwd-backend-1        | 2022-05-31T00:09:25.807645647Z [2022-05-31 00:09:25 +0000] [8] [INFO] Booting worker with pid: 8
pwd-db-1             | 2022-05-31T00:09:26.234198072Z
pwd-db-1             | 2022-05-31T00:09:26.234256104Z
pwd-db-1             | 2022-05-31T00:09:26.234290407Z PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !
pwd-db-1             | 2022-05-31T00:09:26.234304935Z To do so, start the server, then issue the following command:
pwd-db-1             | 2022-05-31T00:09:26.234328952Z
pwd-db-1             | 2022-05-31T00:09:26.234358629Z '/usr/bin/mysql_secure_installation'
pwd-db-1             | 2022-05-31T00:09:26.234438009Z
pwd-db-1             | 2022-05-31T00:09:26.234467781Z which will also give you the option of removing the test
pwd-db-1             | 2022-05-31T00:09:26.234606960Z databases and anonymous user created by default.  This is
pwd-db-1             | 2022-05-31T00:09:26.234642207Z strongly recommended for production servers.
pwd-db-1             | 2022-05-31T00:09:26.234956482Z
pwd-db-1             | 2022-05-31T00:09:26.234980253Z See the MariaDB Knowledgebase at https://mariadb.com/kb
pwd-db-1             | 2022-05-31T00:09:26.234993911Z
pwd-db-1             | 2022-05-31T00:09:26.235027529Z Please report any problems at https://mariadb.org/jira
pwd-db-1             | 2022-05-31T00:09:26.235042000Z
pwd-db-1             | 2022-05-31T00:09:26.235218620Z The latest information about MariaDB is available at https://mariadb.org/.
pwd-db-1             | 2022-05-31T00:09:26.235240402Z
pwd-db-1             | 2022-05-31T00:09:26.235253967Z Consider joining MariaDB's strong and vibrant community:
pwd-db-1             | 2022-05-31T00:09:26.235281727Z https://mariadb.org/get-involved/
pwd-db-1             | 2022-05-31T00:09:26.235311457Z
pwd-db-1             | 2022-05-31T00:09:26.240527609Z 2022-05-31 00:09:26+00:00 [Note] [Entrypoint]: Database files initialized
pwd-db-1             | 2022-05-31T00:09:26.242683648Z 2022-05-31 00:09:26+00:00 [Note] [Entrypoint]: Starting temporary server
pwd-db-1             | 2022-05-31T00:09:26.245783267Z 2022-05-31 00:09:26+00:00 [Note] [Entrypoint]: Waiting for server startup
pwd-db-1             | 2022-05-31T00:09:26.276817784Z 2022-05-31  0:09:26 0 [Note] mariadbd (server 10.6.8-MariaDB-1:10.6.8+maria~focal) starting as process 110 ...
pwd-db-1             | 2022-05-31T00:09:26.318581266Z 2022-05-31  0:09:26 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
pwd-db-1             | 2022-05-31T00:09:26.322370449Z 2022-05-31  0:09:26 0 [Note] InnoDB: Number of pools: 1
pwd-db-1             | 2022-05-31T00:09:26.322490307Z 2022-05-31  0:09:26 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
pwd-db-1             | 2022-05-31T00:09:26.322555435Z 2022-05-31  0:09:26 0 [Note] mariadbd: O_TMPFILE is not supported on /tmp (disabling future attempts)
pwd-db-1             | 2022-05-31T00:09:26.355614776Z 2022-05-31  0:09:26 0 [Note] InnoDB: Using Linux native AIO
pwd-db-1             | 2022-05-31T00:09:26.356299062Z 2022-05-31  0:09:26 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
pwd-db-1             | 2022-05-31T00:09:26.358014041Z 2022-05-31  0:09:26 0 [Note] InnoDB: Completed initialization of buffer pool
pwd-db-1             | 2022-05-31T00:09:26.401313675Z 2022-05-31  0:09:26 0 [Note] InnoDB: 128 rollback segments are active.
pwd-db-1             | 2022-05-31T00:09:26.402012328Z 2022-05-31  0:09:26 0 [Note] InnoDB: Creating shared tablespace for temporary tables
pwd-db-1             | 2022-05-31T00:09:26.402184668Z 2022-05-31  0:09:26 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
pwd-db-1             | 2022-05-31T00:09:26.402312330Z 2022-05-31  0:09:26 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
pwd-db-1             | 2022-05-31T00:09:26.405129334Z 2022-05-31  0:09:26 0 [Note] InnoDB: 10.6.8 started; log sequence number 41361; transaction id 14
pwd-db-1             | 2022-05-31T00:09:26.405358717Z 2022-05-31  0:09:26 0 [Note] Plugin 'FEEDBACK' is disabled.
pwd-db-1             | 2022-05-31T00:09:26.412254948Z 2022-05-31  0:09:26 0 [Warning] 'user' entry 'root@fb2300815403' ignored in --skip-name-resolve mode.
pwd-db-1             | 2022-05-31T00:09:26.412804202Z 2022-05-31  0:09:26 0 [Warning] 'proxies_priv' entry '@% root@fb2300815403' ignored in --skip-name-resolve mode.
pwd-db-1             | 2022-05-31T00:09:26.421000569Z 2022-05-31  0:09:26 0 [Note] mariadbd: ready for connections.
pwd-db-1             | 2022-05-31T00:09:26.421043586Z Version: '10.6.8-MariaDB-1:10.6.8+maria~focal'  socket: '/run/mysqld/mysqld.sock'  port: 0  mariadb.org binary distribution
pwd-db-1             | 2022-05-31T00:09:26.530375945Z 2022-05-31  0:09:26 3 [Warning] Access denied for user 'root'@'localhost' (using password: YES)
pwd-db-1             | 2022-05-31T00:09:27.274992548Z 2022-05-31 00:09:27+00:00 [Note] [Entrypoint]: Temporary server started.
pwd-db-1             | 2022-05-31T00:09:27.663113711Z 2022-05-31  0:09:27 6 [Warning] Access denied for user 'root'@'localhost' (using password: YES)
pwd-db-1             | 2022-05-31T00:09:28.791706945Z 2022-05-31  0:09:28 7 [Warning] Access denied for user 'root'@'localhost' (using password: YES)
pwd-db-1             | 2022-05-31T00:09:28.794543333Z Warning: Unable to load '/usr/share/zoneinfo/leap-seconds.list' as time zone. Skipping it.
pwd-db-1             | 2022-05-31T00:09:28.794582961Z Warning: Unable to load '/usr/share/zoneinfo/leapseconds' as time zone. Skipping it.
pwd-db-1             | 2022-05-31T00:09:29.924298497Z 2022-05-31  0:09:29 8 [Warning] Access denied for user 'root'@'localhost' (using password: YES)
pwd-db-1             | 2022-05-31T00:09:31.055757819Z 2022-05-31  0:09:31 9 [Warning] Access denied for user 'root'@'localhost' (using password: YES)
pwd-db-1             | 2022-05-31T00:09:31.173837515Z Warning: Unable to load '/usr/share/zoneinfo/tzdata.zi' as time zone. Skipping it.
pwd-db-1             | 2022-05-31T00:09:32.160656988Z 2022-05-31 00:09:32+00:00 [Note] [Entrypoint]: Securing system users (equivalent to running mysql_secure_installation)
pwd-db-1             | 2022-05-31T00:09:32.181743107Z
pwd-db-1             | 2022-05-31T00:09:32.185198735Z 2022-05-31 00:09:32+00:00 [Note] [Entrypoint]: Stopping temporary server
pwd-db-1             | 2022-05-31T00:09:32.200027114Z 2022-05-31  0:09:32 0 [Note] mariadbd (initiated by: root[root] @ localhost []): Normal shutdown
pwd-db-1             | 2022-05-31T00:09:32.222091209Z 2022-05-31  0:09:32 0 [Note] InnoDB: FTS optimize thread exiting.
pwd-db-1             | 2022-05-31T00:09:32.230714394Z 2022-05-31  0:09:32 0 [Note] InnoDB: Starting shutdown...
pwd-db-1             | 2022-05-31T00:09:32.230914639Z 2022-05-31  0:09:32 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool
pwd-db-1             | 2022-05-31T00:09:32.231409776Z 2022-05-31  0:09:32 0 [Note] InnoDB: Buffer pool(s) dump completed at 220531  0:09:32
pwd-db-1             | 2022-05-31T00:09:32.465477644Z 2022-05-31  0:09:32 0 [Note] InnoDB: Removed temporary tablespace data file: "./ibtmp1"
pwd-db-1             | 2022-05-31T00:09:32.465524599Z 2022-05-31  0:09:32 0 [Note] InnoDB: Shutdown completed; log sequence number 42335; transaction id 15
pwd-db-1             | 2022-05-31T00:09:32.473664747Z 2022-05-31  0:09:32 0 [Note] mariadbd: Shutdown complete
pwd-db-1             | 2022-05-31T00:09:32.473724142Z
pwd-db-1             | 2022-05-31T00:09:33.207245495Z 2022-05-31 00:09:33+00:00 [Note] [Entrypoint]: Temporary server stopped
pwd-db-1             | 2022-05-31T00:09:33.207296840Z
pwd-db-1             | 2022-05-31T00:09:33.212009457Z 2022-05-31 00:09:33+00:00 [Note] [Entrypoint]: MariaDB init process done. Ready for start up.
pwd-db-1             | 2022-05-31T00:09:33.212057884Z
pwd-db-1             | 2022-05-31T00:09:33.242146323Z 2022-05-31  0:09:33 0 [Note] mariadbd (server 10.6.8-MariaDB-1:10.6.8+maria~focal) starting as process 1 ...
pwd-db-1             | 2022-05-31T00:09:33.288773118Z 2022-05-31  0:09:33 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
pwd-db-1             | 2022-05-31T00:09:33.293298694Z 2022-05-31  0:09:33 0 [Note] InnoDB: Number of pools: 1
pwd-db-1             | 2022-05-31T00:09:33.293346239Z 2022-05-31  0:09:33 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
pwd-db-1             | 2022-05-31T00:09:33.293363739Z 2022-05-31  0:09:33 0 [Note] mariadbd: O_TMPFILE is not supported on /tmp (disabling future attempts)
pwd-db-1             | 2022-05-31T00:09:33.331831681Z 2022-05-31  0:09:33 0 [Note] InnoDB: Using Linux native AIO
pwd-db-1             | 2022-05-31T00:09:33.333837599Z 2022-05-31  0:09:33 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
pwd-db-1             | 2022-05-31T00:09:33.335686480Z 2022-05-31  0:09:33 0 [Note] InnoDB: Completed initialization of buffer pool
pwd-db-1             | 2022-05-31T00:09:33.386789619Z 2022-05-31  0:09:33 0 [Note] InnoDB: 128 rollback segments are active.
pwd-db-1             | 2022-05-31T00:09:33.388042462Z 2022-05-31  0:09:33 0 [Note] InnoDB: Creating shared tablespace for temporary tables
pwd-db-1             | 2022-05-31T00:09:33.388098882Z 2022-05-31  0:09:33 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
pwd-db-1             | 2022-05-31T00:09:33.388397070Z 2022-05-31  0:09:33 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
pwd-db-1             | 2022-05-31T00:09:33.391570775Z 2022-05-31  0:09:33 0 [Note] InnoDB: 10.6.8 started; log sequence number 42335; transaction id 14
pwd-db-1             | 2022-05-31T00:09:33.391992644Z 2022-05-31  0:09:33 0 [Note] Plugin 'FEEDBACK' is disabled.
pwd-db-1             | 2022-05-31T00:09:33.392298656Z 2022-05-31  0:09:33 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
pwd-db-1             | 2022-05-31T00:09:33.394908347Z 2022-05-31  0:09:33 0 [Warning] You need to use --log-bin to make --expire-logs-days or --binlog-expire-logs-seconds work.
pwd-db-1             | 2022-05-31T00:09:33.396472311Z 2022-05-31  0:09:33 0 [Note] InnoDB: Buffer pool(s) load completed at 220531  0:09:33
pwd-db-1             | 2022-05-31T00:09:33.397613359Z 2022-05-31  0:09:33 0 [Note] Server socket created on IP: '0.0.0.0'.
pwd-db-1             | 2022-05-31T00:09:33.397695641Z 2022-05-31  0:09:33 0 [Note] Server socket created on IP: '::'.
pwd-db-1             | 2022-05-31T00:09:33.404726540Z 2022-05-31  0:09:33 0 [Note] mariadbd: ready for connections.
pwd-db-1             | 2022-05-31T00:09:33.404757719Z Version: '10.6.8-MariaDB-1:10.6.8+maria~focal'  socket: '/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution
pwd-create-site-1    | 2022-05-31T00:11:23.648033362Z wait-for-it: timeout occurred after waiting 120 seconds for db:3306
pwd-create-site-1    | 2022-05-31T00:11:23.675344608Z wait-for-it: waiting 120 seconds for redis:6379
pwd-websocket-1      | 2022-05-31T00:11:32.058289946Z node:events:505
pwd-websocket-1      | 2022-05-31T00:11:32.058351943Z       throw er; // Unhandled 'error' event
pwd-websocket-1      | 2022-05-31T00:11:32.058462742Z       ^
pwd-websocket-1      | 2022-05-31T00:11:32.058479114Z
pwd-websocket-1      | 2022-05-31T00:11:32.058491117Z Error: connect ETIMEDOUT 172.28.0.7:6379
pwd-websocket-1      | 2022-05-31T00:11:32.058502902Z     at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1195:16)
pwd-websocket-1      | 2022-05-31T00:11:32.058514793Z Emitted 'error' event on RedisClient instance at:
pwd-websocket-1      | 2022-05-31T00:11:32.058526446Z     at RedisClient.on_error (/home/frappe/frappe-bench/apps/frappe/node_modules/redis/index.js:342:14)
pwd-websocket-1      | 2022-05-31T00:11:32.058540314Z     at Socket.<anonymous> (/home/frappe/frappe-bench/apps/frappe/node_modules/redis/index.js:223:14)
pwd-websocket-1      | 2022-05-31T00:11:32.058552881Z     at Socket.emit (node:events:527:28)
pwd-websocket-1      | 2022-05-31T00:11:32.058564624Z     at emitErrorNT (node:internal/streams/destroy:164:8)
pwd-websocket-1      | 2022-05-31T00:11:32.058576605Z     at emitErrorCloseNT (node:internal/streams/destroy:129:3)
pwd-websocket-1      | 2022-05-31T00:11:32.058588473Z     at processTicksAndRejections (node:internal/process/task_queues:83:21) {
pwd-websocket-1      | 2022-05-31T00:11:32.058600311Z   errno: -110,
pwd-websocket-1      | 2022-05-31T00:11:32.058613951Z   code: 'ETIMEDOUT',
pwd-websocket-1      | 2022-05-31T00:11:32.058625473Z   syscall: 'connect',
pwd-websocket-1      | 2022-05-31T00:11:32.058636840Z   address: '172.28.0.7',
pwd-websocket-1      | 2022-05-31T00:11:32.058648232Z   port: 6379
pwd-websocket-1      | 2022-05-31T00:11:32.058659571Z }
pwd-websocket-1      | 2022-05-31T00:11:32.058670936Z
pwd-websocket-1      | 2022-05-31T00:11:32.058682132Z Node.js v17.9.0
pwd-websocket-1 exited with code 1

Network info (I can confirm that this is an unused subnet on my LAN):

colin@erp:~/pwd$ docker inspect -f '{{.Name}} - {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $(docker ps -aq)
/pwd-queue-default-1 - 172.28.0.8
/pwd-db-1 - 172.28.0.6
/pwd-frontend-1 - 172.28.0.3
/pwd-configurator-1 -
/pwd-scheduler-1 - 172.28.0.5
/pwd-queue-short-1 - 172.28.0.4
/pwd-websocket-1 - 172.28.0.2
/pwd-queue-long-1 - 172.28.0.9
/pwd-redis-1 - 172.28.0.7
/pwd-create-site-1 - 172.28.0.10
/pwd-backend-1 - 172.28.0.12
colin@erp:~/pwd$

Every 2.0s: docker ps -a                                                                                                                                                                                           erp: Tue May 31 01:05:13 2022

CONTAINER ID   IMAGE                             COMMAND                  CREATED          STATUS                      PORTS                                       NAMES
24a1dba40c46   frappe/erpnext-worker:v13.31.1    "bench worker --queu…"   56 minutes ago   Up 17 seconds                                                           pwd-queue-default-1
fb2300815403   mariadb:10.6                      "docker-entrypoint.s…"   56 minutes ago   Up 55 minutes (healthy)     3306/tcp                                    pwd-db-1
ea9dedb7c1fc   frappe/erpnext-nginx:v13.31.1     "/docker-entrypoint.…"   56 minutes ago   Up 55 minutes               0.0.0.0:8080->8080/tcp, :::8080->8080/tcp   pwd-frontend-1
8e30c8e2cdad   frappe/erpnext-worker:v13.31.1    "configure.py"           56 minutes ago   Exited (0) 55 minutes ago                                               pwd-configurator-1
b9ff95947c20   frappe/erpnext-worker:v13.31.1    "bench schedule"         56 minutes ago   Up 55 minutes                                                           pwd-scheduler-1
353730e58732   frappe/erpnext-worker:v13.31.1    "bench worker --queu…"   56 minutes ago   Up 22 seconds                                                           pwd-queue-short-1
06e35991cb47   frappe/frappe-socketio:v13.30.0   "docker-entrypoint.s…"   56 minutes ago   Up About a minute                                                       pwd-websocket-1
ec77e383e5fe   frappe/erpnext-worker:v13.31.1    "bench worker --queu…"   56 minutes ago   Up 18 seconds                                                           pwd-queue-long-1
7fa9b20d1a0c   redis:6.2-alpine                  "docker-entrypoint.s…"   56 minutes ago   Up 55 minutes               6379/tcp                                    pwd-redis-1
b82075e45f91   frappe/erpnext-worker:v13.31.1    "bash -c 'wait-for-i…"   56 minutes ago   Up 4 minutes                                                            pwd-create-site-1
7b57d19520a5   frappe/erpnext-worker:v13.31.1    "/home/frappe/frappe…"   56 minutes ago   Up 55 minutes                                                           pwd-backend-1

here is my pwd.yml with user: “1000:1000” entries :

colin@erp:~/pwd$ cat pwd.yml
version: "3"

services:
  backend:
    image: frappe/erpnext-worker:v13.31.1
    deploy:
      restart_policy:
        condition: on-failure
    volumes:
      - sites:/home/frappe/frappe-bench/sites
      - assets:/home/frappe/frappe-bench/sites/assets

  configurator:
    image: frappe/erpnext-worker:v13.31.1
    command:
      - configure.py
    environment:
      DB_HOST: db
      DB_PORT: "3306"
      REDIS_CACHE: redis:6379/0
      REDIS_QUEUE: redis:6379/1
      REDIS_SOCKETIO: redis:6379/2
      SOCKETIO_PORT: "9000"
    user: "1000:1000"
    volumes:
      - sites:/home/frappe/frappe-bench/sites

  create-site:
    image: frappe/erpnext-worker:v13.31.1
    deploy:
      restart_policy:
        condition: on-failure
    volumes:
      - sites:/home/frappe/frappe-bench/sites
      - assets:/home/frappe/frappe-bench/sites/assets
    entrypoint:
      - bash
      - -c
    command:
      - >
        wait-for-it -t 120 db:3306;
        wait-for-it -t 120 redis:6379;
        export start=`date +%s`;
        until [[ -n `grep -hs ^ common_site_config.json | jq -r ".db_host // empty"` ]] && \
          [[ -n `grep -hs ^ common_site_config.json | jq -r ".redis_cache // empty"` ]] && \
          [[ -n `grep -hs ^ common_site_config.json | jq -r ".redis_queue // empty"` ]];
        do
          echo "Waiting for common_site_config.json to be created";
          sleep 5;
          if (( `date +%s`-start > 120 )); then
            echo "could not find common_site_config.json with required keys";
            exit 1
          fi
        done;
        echo "common_site_config.json found";
        bench new-site frontend --admin-password=admin --db-root-password=admin --install-app erpnext --set-default;

  db:
    image: mariadb:10.6
    healthcheck:
      test: mysqladmin ping -h localhost --password=admin
      interval: 1s
      retries: 15
    deploy:
      restart_policy:
        condition: on-failure
    command:
      - --character-set-server=utf8mb4
      - --collation-server=utf8mb4_unicode_ci
      - --skip-character-set-client-handshake
      - --skip-innodb-read-only-compressed # Temporary fix for MariaDB 10.6
    environment:
      MYSQL_ROOT_PASSWORD: admin
    volumes:
      - db-data:/var/lib/mysql

  frontend:
    image: frappe/erpnext-nginx:v13.31.1
    deploy:
      restart_policy:
        condition: on-failure
    environment:
      BACKEND: backend:8000
      FRAPPE_SITE_NAME_HEADER: frontend
      SOCKETIO: websocket:9000
      UPSTREAM_REAL_IP_ADDRESS: 127.0.0.1
      UPSTREAM_REAL_IP_HEADER: X-Forwarded-For
      UPSTREAM_REAL_IP_RECURSIVE: "off"
    user: "1000:1000"
    volumes:
      - sites:/usr/share/nginx/html/sites
      - assets:/usr/share/nginx/html/assets
    ports:
      - "8080:8080"

  queue-default:
    image: frappe/erpnext-worker:v13.31.1
    deploy:
      restart_policy:
        condition: on-failure
    command:
      - bench
      - worker
      - --queue
      - default
    user: "1000:1000"
    volumes:
      - sites:/home/frappe/frappe-bench/sites

  queue-long:
    image: frappe/erpnext-worker:v13.31.1
    deploy:
      restart_policy:
        condition: on-failure
    command:
      - bench
      - worker
      - --queue
      - long
    user: "1000:1000"
    volumes:
      - sites:/home/frappe/frappe-bench/sites

  queue-short:
    image: frappe/erpnext-worker:v13.31.1
    deploy:
      restart_policy:
        condition: on-failure
    command:
      - bench
      - worker
      - --queue
      - short
    user: "1000:1000"
    volumes:
      - sites:/home/frappe/frappe-bench/sites

  redis:
    image: redis:6.2-alpine
    deploy:
      restart_policy:
        condition: on-failure
    volumes:
      - redis-data:/data

  scheduler:
    image: frappe/erpnext-worker:v13.31.1
    deploy:
      restart_policy:
        condition: on-failure
    command:
      - bench
      - schedule
    user: "1000:1000"
    volumes:
      - sites:/home/frappe/frappe-bench/sites

  websocket:
    image: frappe/frappe-socketio:v13.30.0
    deploy:
      restart_policy:
        condition: on-failure
    user: "1000:1000"
    volumes:
      - sites:/home/frappe/frappe-bench/sites

volumes:
  assets:
  db-data:
  redis-data:
  sites:
colin@erp:~/pwd$

At this point websocket had started. It shows this message means connection to redis was successfully established.

I’m not able to figure out why it suddenly restarted and couldn’t establish connection to redis again?

I guess same could be happening with db connection and workers?

Are all the containers restarting? at least redis and mariadb need to be running stable?

From here you can see that redis and mariadb are stable

Every 2.0s: docker ps -a                                                                                                                                                                                           erp: Tue May 31 06:56:20 2022

CONTAINER ID   IMAGE                             COMMAND                  CREATED             STATUS                         PORTS                                       NAMES
b099e6440d08   frappe/erpnext-worker:v13.31.1    "bench worker --queu…"   About an hour ago   Up 21 seconds                                                              pwd-queue-short-1
78f7a201a405   frappe/erpnext-worker:v13.31.1    "bench worker --queu…"   About an hour ago   Up 18 seconds                                                              pwd-queue-default-1
5bb39d8bd37e   frappe/erpnext-worker:v13.31.1    "bench schedule"         About an hour ago   Up About an hour                                                           pwd-scheduler-1
7b44c05dc009   frappe/erpnext-nginx:v13.31.1     "/docker-entrypoint.…"   About an hour ago   Up About an hour               0.0.0.0:8080->8080/tcp, :::8080->8080/tcp   pwd-frontend-1
84d6b748c131   frappe/erpnext-worker:v13.31.1    "bash -c 'wait-for-i…"   About an hour ago   Up 12 minutes                                                              pwd-create-site-1
4cb6651d718a   frappe/erpnext-worker:v13.31.1    "/home/frappe/frappe…"   About an hour ago   Up About an hour                                                           pwd-backend-1
9c35930df798   frappe/frappe-socketio:v13.30.0   "docker-entrypoint.s…"   About an hour ago   Up 21 seconds                                                              pwd-websocket-1
f1e4c9127e63   frappe/erpnext-worker:v13.31.1    "configure.py"           About an hour ago   Exited (0) About an hour ago                                               pwd-configurator-1
fdb70ccef7c5   redis:6.2-alpine                  "docker-entrypoint.s…"   About an hour ago   Up About an hour               6379/tcp                                    pwd-redis-1
e26db31e32dc   frappe/erpnext-worker:v13.31.1    "bench worker --queu…"   About an hour ago   Up 16 seconds                                                              pwd-queue-long-1
f3f8cc09c478   mariadb:10.6                      "docker-entrypoint.s…"   About an hour ago   Up About an hour (healthy)     3306/tcp                                    pwd-db-1

I’m looking to see if it is a Docker networking issue.
I note that common_site_config.json has a DB host of “db”. I can’t see how this resolves to pwd-db-1

it resolves by the service name mentioned in docker compose YAML. It picks up the services using redis and db.

you can try it in pwd, enter the container and try wait-for-it or (echo >/dev/tcp/{host}/{port}) &>/dev/null && echo "open" || echo "closed" on the redis and db service. It should work using the service name instead of full container name.

Hmmmm…

corrected type by changing & to 2 in your echo command and I get these results:

colin@erp:~/pwd$ docker exec -it pwd-create-site-1 /bin/sh
$ wait-for-it --host=redis:6379
wait-for-it: waiting 15 seconds for --host=redis:6379
wait-for-it: timeout occurred after waiting 15 seconds for --host=redis:6379
$ wait-for-it --host=db:3306
wait-for-it: waiting 15 seconds for --host=db:3306
wait-for-it: timeout occurred after waiting 15 seconds for --host=db:3306
$ wait-for-it --host=db --port=3306
wait-for-it: waiting 15 seconds for db:3306
wait-for-it: timeout occurred after waiting 15 seconds for db:3306
$ (echo >/dev/tcp/db/3306) 2>/dev/null && echo "open" || echo "closed"
closed
$
colin@erp:~/pwd$ docker exec -it pwd-db-1 /bin/sh
# hostname
6b23e014a5ec
#
colin@erp:~/pwd$ docker exec -it pwd-create-site-1 /bin/sh
$ wait-for-it --host=6b23e014a5ec:3306
wait-for-it: waiting 15 seconds for --host=6b23e014a5ec:3306
wait-for-it: timeout occurred after waiting 15 seconds for --host=6b23e014a5ec:3306
$ wait-for-it --host=pwd-db-1:3306
wait-for-it: waiting 15 seconds for --host=pwd-db-1:3306
wait-for-it: timeout occurred after waiting 15 seconds for --host=pwd-db-1:3306
$

Thats all I can try for the next few hours.

Looks like while the port 3306 is exposed, it may not be listening - I’ll investigate after work

I tried following command on Play with Docker and it got connection

wait-for-it db:3306
wait-for-it redis:6379

Note I did not use --host and it worked. Using --host somehow didn’t work.

OK. Still struggling here.
What version of docker are you using? Desktop or Engine?

I have installed docker engine using the the guide on this page:

Mine:

colin@erp:~/pwd$ cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
colin@erp:~/pwd$ uname -a
Linux erp 5.15.0-33-generic #34-Ubuntu SMP Wed May 18 13:34:26 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
colin@erp:~/pwd$ docker -v
Docker version 20.10.16, build aa7e414
colin@erp:~/pwd$ docker compose version
Docker Compose version v2.5.0
colin@erp:~/pwd$ dpkg -l docker-ce docker-ce-cli containerd.io docker-compose-plugin
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                  Version                     Architecture Description
+++-=====================-===========================-============-========================================================
ii  containerd.io         1.6.4-1                     amd64        An open and reliable container runtime
ii  docker-ce             5:20.10.16~3-0~ubuntu-jammy amd64        Docker: the open-source application container engine
ii  docker-ce-cli         5:20.10.16~3-0~ubuntu-jammy amd64        Docker CLI: the open-source application container engine
ii  docker-compose-plugin 2.5.0~ubuntu-jammy          amd64        Docker Compose (V2) plugin for the Docker CLI.

Oh bucket full of four letter words.

I’m not saying it is fully sorted yet, but I have got further than previously.
I finally see:

pwd-create-site-1    | 2022-06-02T07:16:15.755567484Z wait-for-it: db:3306 is available after 10 seconds
pwd-create-site-1    | 2022-06-02T07:16:15.782090020Z wait-for-it: waiting 120 seconds for redis:6379
pwd-create-site-1    | 2022-06-02T07:16:15.790662706Z wait-for-it: redis:6379 is available after 0 seconds
pwd-create-site-1    | 2022-06-02T07:16:16.043356720Z common_site_config.json found
pwd-db-1             | 2022-06-02T07:16:17.414732325Z 2022-06-02  7:16:17 5 [Warning] Access denied for user 'frappe'@'172.20.0.8' (using password: NO)
pwd-db-1             | 2022-06-02T07:16:17.556869376Z 2022-06-02  7:16:17 7 [Warning] Aborted connection 7 to db: '_9ecc8459ea5f39f9' user: '_9ecc8459ea5f39f9' host: '172.20.0.8' (Got an error reading communication packets)
pwd-create-site-1    | 2022-06-02T07:16:20.265322501Z
pwd-create-site-1    | 2022-06-02T07:16:20.265409931Z Installing frappe...
Updating DocTypes for frappe        : [========================================] 100%=========                ] 61%
Updating country info               : [========================================] 100%================         ] 77%
pwd-create-site-1    | 2022-06-02T07:17:17.225525296Z
pwd-create-site-1    | 2022-06-02T07:17:17.225552144Z Installing erpnext...

My investigation of docker versions proved that I had the snap and apt/dpkg packages installed.

I am rather disappointed that I have wasted all your time (and mine) on this simple solution. The ubuntu install script offered installing docker. I assumed (I know - NEVER assume) that it was using apt/dpkg, but no, it used snap.

OK, It works.

Now the fun finally begins!!

Thanks @revant_one for all your awesome help.

TL;DR:

Multiple versions of docker installed. Uninstalled snap version. uninstalled apt/dpkg version.
reboot
Install apt/dpkg version

Viola!!

image

1 Like

I had faced issues with snap! :sweat_smile:

Well, this issue is documented here, and if anyone else has it, here is the answer :slight_smile:

I wonder if your issues #803 and #804 are related to multiple docker versions.

Hello @Colin_Manning

I trust you’re enjoying exploring ERPNext and Frappe in general.

For anyone else reading this far, who would like to set up a quick Docker image, here’s a link to my steps Installing the Docker image on a local machine without Letsencrypt so we can access it with http://localhost

1 Like