Closed zl6536 closed 3 years ago
Sorry @zl6536 I cannot offer a lot of help, as I do not have a Docker installation here to test, but perhaps someone else will.
You could try setting entrypoint to /bin/ash and looking into the containers to see if there is anything wrong (assuming you are familiar with Netdisco operation).
I just gave this a shot and it works fine here with the latest version (on the latest version of Docker for OS X).
However there is currently an issue that affects a bunch of people trying to run stuff in the latest Alpine (which we use) on an old docker version:
https://wiki.alpinelinux.org/wiki/Release_Notes_for_Alpine_3.14.0#faccessat2 https://github.com/opencontainers/runc/issues/2151
@zl6536 The issue manifests a bit like you describe, random files not found or permission denied even they should work. Can you check your environment and make sure you have Docker 20.10.0 and everything else described on the alpinelinux page?
Closing, assuming this is the issue and also because we have someone verified the containers do work. Will reopen if necessary.
@zl6536 I was looking at another problem on Ubuntu, and I see what the issue is here now. Most likely the container can not copy the deployment.yml to the mounted volume due to permissions. If you look at the instructions in netdisco-docker/README.md it says:
groupadd netdisco -g 901
useradd -u 901 -p x -g netdisco netdisco
sudo mkdir -p ~netdisco/{logs,bin,environments,config,nd-site-local}
sudo chown -R netdisco:netdisco ~netdisco
and then
# become the user running docker
curl -Ls -o docker-compose.yml https://tinyurl.com/nd2-dockercompose
docker-compose up
What is not written clearly in the README is that you need to be in that directory structure (cd ~netdisco), place the docker-compose there and run it from there, otherwise the process in the container can not create some files it needs.
I hope that fixes it for you. However watch out there is another issue currently going on, for the time being you need to remote the two dns_opt sections from docker-compose.yml to run the latest version successfully. (corrected by now)
1.error: cannot find Netdisco config at /home/netdisco/perl5/lib/perl5/auto/share/dist/App-Netdisco/environments/deployment.yml or /home/netdisco/environments/deployment.yml The web page does not work after deployment Help me please! thinks! [root@netdisco netdisco]# docker-compose up Creating network "netdisco_default" with the default driver Pulling netdisco-postgresql (netdisco/netdisco:latest-postgresql)... latest-postgresql: Pulling from netdisco/netdisco a0d0a0d46f8b: Pull complete 5034a66b99e6: Pull complete 82e9eb77798b: Pull complete 314b9347faf5: Pull complete 2625be9fae82: Pull complete 5ec8358e2a99: Pull complete 2e9ccfc29d86: Pull complete 2a4d94e5dde0: Pull complete 735d352b6a9a: Pull complete af17e2d1dedf: Pull complete 22b886963589: Pull complete 5ef4c6f45a6c: Pull complete cd271c9442e6: Pull complete 0fc5cbc85f05: Pull complete Digest: sha256:a4d7e01922e01cfa47c4bbddfc66ebacb45121883c27baf2f4996524d2b57627 Status: Downloaded newer image for netdisco/netdisco:latest-postgresql Pulling netdisco-backend (netdisco/netdisco:latest-backend)... latest-backend: Pulling from netdisco/netdisco a0d0a0d46f8b: Already exists 787ad7a3a90e: Pull complete bb6aff50ac1e: Pull complete dd3a7658879f: Pull complete 822ef5168396: Pull complete 4debde758714: Pull complete 7856e0475bcd: Pull complete d9d0901d7b5d: Pull complete d73fd52796a8: Pull complete 627a0fef4c1b: Pull complete 5341c13eb994: Pull complete Digest: sha256:b640501c5e9cbfddb32265972f9f794ec79589a09fa5497980fa46a40c19ddf8 Status: Downloaded newer image for netdisco/netdisco:latest-backend Pulling netdisco-web (netdisco/netdisco:latest-web)... latest-web: Pulling from netdisco/netdisco a0d0a0d46f8b: Already exists 787ad7a3a90e: Already exists bb6aff50ac1e: Already exists dd3a7658879f: Already exists 822ef5168396: Already exists 4debde758714: Already exists 7856e0475bcd: Already exists d9d0901d7b5d: Already exists Digest: sha256:27ad4933948211daf7c9d6952b60453c3fe327c00c41dbc716350713ea9a9ada Status: Downloaded newer image for netdisco/netdisco:latest-web Creating netdisco_netdisco-postgresql_1 ... done Creating netdisco_netdisco-web_1 ... done Creating netdisco_netdisco-backend_1 ... done Attaching to netdisco_netdisco-postgresql_1, netdisco_netdisco-backend_1, netdisco_netdisco-web_1 netdisco-postgresql_1 | The files belonging to this database system will be owned by user "postgres". netdisco-postgresql_1 | This user must also own the server process. netdisco-postgresql_1 | netdisco-postgresql_1 | The database cluster will be initialized with locale "en_US.utf8". netdisco-postgresql_1 | The default database encoding has accordingly been set to "UTF8". netdisco-postgresql_1 | The default text search configuration will be set to "english". netdisco-postgresql_1 | netdisco-postgresql_1 | Data page checksums are disabled. netdisco-postgresql_1 | netdisco-postgresql_1 | fixing permissions on existing directory /var/lib/postgresql/data ... ok netdisco-postgresql_1 | creating subdirectories ... ok netdisco-postgresql_1 | selecting dynamic shared memory implementation ... posix netdisco-postgresql_1 | selecting default max_connections ... 100 netdisco-postgresql_1 | selecting default shared_buffers ... 128MB netdisco-postgresql_1 | selecting default time zone ... UTC netdisco-postgresql_1 | creating configuration files ... ok netdisco-postgresql_1 | running bootstrap script ... ok netdisco-postgresql_1 | performing post-bootstrap initialization ... sh: locale: not found netdisco-postgresql_1 | 2021-09-29 08:08:52.336 UTC [36] WARNING: no usable system locales were found netdisco-backend_1 | Attempting to create directory /home/netdisco/perl5 netdisco-backend_1 | error: cannot find Netdisco config at /home/netdisco/perl5/lib/perl5/auto/share/dist/App-Netdisco/environments/deployment.yml or /home/netdisco/environments/deployment.yml netdisco-web_1 | Attempting to create directory /home/netdisco/perl5 netdisco-web_1 | error: cannot find Netdisco config at /home/netdisco/perl5/lib/perl5/auto/share/dist/App-Netdisco/environments/deployment.yml or /home/netdisco/environments/deployment.yml netdisco-postgresql_1 | ok netdisco_netdisco-backend_1 exited with code 2 netdisco_netdisco-web_1 exited with code 2 netdisco-postgresql_1 | syncing data to disk ... ok netdisco-postgresql_1 | netdisco-postgresql_1 | netdisco-postgresql_1 | Success. You can now start the database server using: netdisco-postgresql_1 | netdisco-postgresql_1 | pg_ctl -D /var/lib/postgresql/data -l logfile start netdisco-postgresql_1 | netdisco-postgresql_1 | initdb: warning: enabling "trust" authentication for local connections netdisco-postgresql_1 | You can change this by editing pg_hba.conf or using the option -A, or netdisco-postgresql_1 | --auth-local and --auth-host, the next time you run initdb. netdisco-postgresql_1 | waiting for server to start....2021-09-29 08:08:55.738 UTC [41] LOG: starting PostgreSQL 13.4 on x86_64-pc-linux-musl, compiled by gcc (Alpine 10.3.1_git20210424) 10.3.1 20210424, 64-bit netdisco-postgresql_1 | 2021-09-29 08:08:55.786 UTC [41] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" netdisco-postgresql_1 | 2021-09-29 08:08:55.934 UTC [42] LOG: database system was shut down at 2021-09-29 08:08:53 UTC netdisco-postgresql_1 | 2021-09-29 08:08:55.990 UTC [41] LOG: database system is ready to accept connections netdisco-postgresql_1 | done netdisco-postgresql_1 | server started netdisco-postgresql_1 | netdisco-db-entrypoint: configuring Netdisco user and db netdisco-postgresql_1 | netdisco-postgresql_1 | /usr/local/bin/docker-entrypoint.sh: sourcing /docker-entrypoint-initdb.d/netdisco-initdb.sh netdisco-postgresql_1 | CREATE ROLE netdisco-postgresql_1 | netdisco-db-entrypoint: restarting pg privately to container netdisco-postgresql_1 | waiting for server to shut down....2021-09-29 08:08:57.380 UTC [41] LOG: received fast shutdown request netdisco-postgresql_1 | 2021-09-29 08:08:57.436 UTC [41] LOG: aborting any active transactions netdisco-postgresql_1 | 2021-09-29 08:08:57.438 UTC [41] LOG: background worker "logical replication launcher" (PID 48) exited with exit code 1 netdisco-postgresql_1 | 2021-09-29 08:08:57.438 UTC [43] LOG: shutting down netdisco-postgresql_1 | 2021-09-29 08:08:57.695 UTC [41] LOG: database system is shut down netdisco-postgresql_1 | done netdisco-postgresql_1 | server stopped netdisco-postgresql_1 | waiting for server to start....2021-09-29 08:08:57.962 UTC [59] LOG: starting PostgreSQL 13.4 on x86_64-pc-linux-musl, compiled by gcc (Alpine 10.3.1_git20210424) 10.3.1 20210424, 64-bit netdisco-postgresql_1 | 2021-09-29 08:08:57.963 UTC [59] LOG: listening on IPv4 address "127.0.0.1", port 5432 netdisco-postgresql_1 | 2021-09-29 08:08:57.964 UTC [59] LOG: could not bind IPv6 address "::1": Address not available netdisco-postgresql_1 | 2021-09-29 08:08:57.964 UTC [59] HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry. netdisco-postgresql_1 | 2021-09-29 08:08:58.052 UTC [59] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" netdisco-postgresql_1 | 2021-09-29 08:08:58.154 UTC [60] LOG: database system was shut down at 2021-09-29 08:08:57 UTC netdisco-postgresql_1 | 2021-09-29 08:08:58.206 UTC [59] LOG: database system is ready to accept connections netdisco-postgresql_1 | done netdisco-postgresql_1 | server started netdisco-postgresql_1 | netdisco-db-entrypoint: bringing schema up-to-date netdisco-postgresql_1 | netdisco-db-entrypoint: importing OUI netdisco-postgresql_1 | COPY 23285 netdisco-postgresql_1 | netdisco-db-entrypoint: marking schema as up-to-date netdisco-postgresql_1 | netdisco-db-entrypoint: adding admin user if none exists netdisco-postgresql_1 | netdisco-db-entrypoint: adding session key if none exists netdisco-postgresql_1 | INSERT 0 1 netdisco-postgresql_1 | INSERT 0 1 netdisco-postgresql_1 | netdisco-db-entrypoint: queueing stats job netdisco-postgresql_1 | INSERT 0 1 netdisco-postgresql_1 | netdisco-postgresql_1 | waiting for server to shut down....2021-09-29 08:09:08.652 UTC [59] LOG: received fast shutdown request netdisco-postgresql_1 | 2021-09-29 08:09:08.722 UTC [59] LOG: aborting any active transactions netdisco-postgresql_1 | 2021-09-29 08:09:08.724 UTC [59] LOG: background worker "logical replication launcher" (PID 66) exited with exit code 1 netdisco-postgresql_1 | 2021-09-29 08:09:08.726 UTC [61] LOG: shutting down netdisco-postgresql_1 | 2021-09-29 08:09:09.386 UTC [59] LOG: database system is shut down netdisco-postgresql_1 | done netdisco-postgresql_1 | server stopped netdisco-postgresql_1 | netdisco-postgresql_1 | PostgreSQL init process complete; ready for start up. netdisco-postgresql_1 | netdisco-postgresql_1 | 2021-09-29 08:09:09.610 UTC [1] LOG: starting PostgreSQL 13.4 on x86_64-pc-linux-musl, compiled by gcc (Alpine 10.3.1_git20210424) 10.3.1 20210424, 64-bit netdisco-postgresql_1 | 2021-09-29 08:09:09.610 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432 netdisco-postgresql_1 | 2021-09-29 08:09:09.610 UTC [1] LOG: listening on IPv6 address "::", port 5432 netdisco-postgresql_1 | 2021-09-29 08:09:09.722 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" netdisco-postgresql_1 | 2021-09-29 08:09:09.819 UTC [290] LOG: database system was shut down at 2021-09-29 08:09:09 UTC netdisco-postgresql_1 | 2021-09-29 08:09:09.872 UTC [1] LOG: database system is ready to accept connections