Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker-compose up fails with DB error and I can't access web GUI #73

Open
thatlostboy opened this issue Sep 3, 2024 · 10 comments
Open

Comments

@thatlostboy
Copy link

Provide a general summary of the issue in the Title above

when including netdisco config snippets, whitespace matters since it's a yaml file
for github issues it really helps if you include the relevant config parts in a codeblock (code fencing)
see the "code" subject on https://guides.github.com/features/mastering-markdown/ for that)
this should preserve spaces in the issue tracker and make troubleshooting quicker
-->

Expected Behavior

When i run docker-compose up, the containers should come up and i shoudl be able to access the web interface.

Current Behavior

When I run docker-compose up, I get the following error. And I cannot acess the website at https://localhost:5000

netdisco-test docker-compose up
[+] Running 3/0
 ✔ Container netdisco-test-netdisco-postgresql-1  Created                                                                                                                                                                       0.0s
 ✔ Container netdisco-test-netdisco-backend-1     Created                                                                                                                                                                       0.0s
 ✔ Container netdisco-test-netdisco-web-1         Created                                                                                                                                                                       0.0s
Attaching to netdisco-backend-1, netdisco-postgresql-1, netdisco-web-1
netdisco-postgresql-1  | chown: /var/lib/postgresql/data: Permission denied
netdisco-postgresql-1 exited with code 1
netdisco-backend-1     | config watcher: watching /home/netdisco/environments for updates.
netdisco-web-1         | config watcher: watching /home/netdisco/environments for updates.
netdisco-web-1         | 2024/09/03-17:45:53 Starman::Server (type Net::Server::PreFork) starting! pid(13)
netdisco-web-1         | Binding to TCP port 5000 on host * with IPv4
netdisco-web-1         | [21] 2024-09-03 17:46:00  warn App::Netdisco 2.078000 web
netdisco-web-1         | [20] 2024-09-03 17:46:00  warn App::Netdisco 2.078000 web
netdisco-web-1         | [16] 2024-09-03 17:46:00  warn App::Netdisco 2.078000 web
netdisco-web-1         | [17] 2024-09-03 17:46:00  warn App::Netdisco 2.078000 web
netdisco-web-1         | [22] 2024-09-03 17:46:00  warn App::Netdisco 2.078000 web
netdisco-web-1         | DBIx::Class::Schema::Versioned::_on_connect(): Your DB is currently unversioned. Please call upgrade on your schema to sync the DB. at /home/netdisco/perl5/lib/perl5/DBICx/Sugar.pm line 121
netdisco-web-1         | DBIx::Class::Schema::Versioned::_on_connect(): Your DB is currently unversioned. Please call upgrade on your schema to sync the DB. at /home/netdisco/perl5/lib/perl5/DBICx/Sugar.pm line 121
netdisco-web-1         | DBIx::Class::Schema::Versioned::_on_connect(): Your DB is currently unversioned. Please call upgrade on your schema to sync the DB. at /home/netdisco/perl5/lib/perl5/DBICx/Sugar.pm line 121
netdisco-web-1         | Error while loading /home/netdisco/perl5/bin/netdisco-web-fg: The setting session_cookie_key must be defined at /home/netdisco/perl5/lib/perl5/Dancer/Session/Cookie.pm line 38.
netdisco-web-1         | Compilation failed in require at /home/netdisco/perl5/bin/netdisco-web-fg line 59.
netdisco-web-1         | BEGIN failed--compilation aborted at /home/netdisco/perl5/bin/netdisco-web-fg line 59.
netdisco-web-1         | Child process 16 exited with status 22
netdisco-web-1         | Error while loading /home/netdisco/perl5/bin/netdisco-web-fg: The setting session_cookie_key must be defined at /home/netdisco/perl5/lib/perl5/Dancer/Session/Cookie.pm line 38.
netdisco-web-1         | Compilation failed in require at /home/netdisco/perl5/bin/netdisco-web-fg line 59.
netdisco-web-1         | BEGIN failed--compilation aborted at /home/netdisco/perl5/bin/netdisco-web-fg line 59.

Possible Solution

Steps to Reproduce (for bugs)

I following the steps in: https://hub.docker.com/r/netdisco/netdisco

  1. mkdir netdisco-test
  2. cd netdisco-test
  3. curl -Ls -o docker-compose.yml https://tinyurl.com/nd2-dockercompose\ndocker-compose up\n
  4. mkdir -p netdisco/{logs,config,nd-site-local}
  5. docker-compose up

Context

I cannot test netdisco for our environment.

Your Environment

  • netdisco container versions:
    • netdisco-postgresql:
    • netdisco-backend:
    • netdisco-web:
  • docker engine version: Docker version 26.1.0-rd, build cca8e72
  • docker-compose version: Docker Compose version v2.27.1
  • host operating system: mac os x: sonoma 14.5

I am not sure how to check the postgresql and backend versions. Here is the relevant output from the docker image ls

(t4i-wired-mac-scripts) ➜  switch_mac_config_info git:(IEDV-2461) ✗ docker image ls
REPOSITORY                                          TAG                    IMAGE ID       CREATED         SIZE
netdisco/netdisco                                   latest-backend         e303ceacaffc   7 days ago      837MB
netdisco/netdisco                                   latest-web             4e8cfcff6652   7 days ago      324MB
netdisco/netdisco                                   latest-postgresql      83f0962f18ae   7 days ago      199MB
## Config info (deployment.yml and docker env settings)
<!--- if possible include all options you added to your deployment.yml file and -->
<!--- your docker environment, since some options can change the behaviour in drastic ways -->

Device information

@thatlostboy
Copy link
Author

I am using rancher 1.14.2 on my laptop (not docker directly) as we are not allowed to use docker at our company. Is this issue on netdisco related to:
rancher-sandbox/rancher-desktop#1209

@benjofalanga
Copy link

benjofalanga commented Sep 18, 2024

Hello Im having a similar issue asking for upgrade of db

followed the instructions as per README

cd $directory_of_your_choice
mkdir -p netdisco/{logs,config,nd-site-local} 
sudo chown -R 901:901 netdisco
~ ls -al
total 16
drwxr-xr-x 6      901      901 4096 Sep 18 11:46 netdisco
netdisco-web_1         | DBIx::Class::Schema::Versioned::_on_connect(): Your DB is currently unversioned. Please call upgrade on your schema to sync the DB. at /home/netdisco/perl5/lib/perl5/DBICx/Sugar.pm line 121
netdisco-web_1         | Error while loading /home/netdisco/perl5/bin/netdisco-web-fg: The setting session_cookie_key must be defined at /home/netdisco/perl5/lib/perl5/Dancer/Session/Cookie.pm line 38.
netdisco-web_1         | Compilation failed in require at /home/netdisco/perl5/bin/netdisco-web-fg line 59.
netdisco-web_1         | BEGIN failed--compilation aborted at /home/netdisco/perl5/bin/netdisco-web-fg line 59.
netdisco-web_1         | Child process 9 exited with status 115
netdisco-web_1         | DBIx::Class::Schema::Versioned::_on_connect(): Your DB is currently unversioned. Please call upgrade on your schema to sync the DB. at /home/netdisco/perl5/lib/perl5/DBICx/Sugar.pm line 121
netdisco-web_1         | Error while loading /home/netdisco/perl5/bin/netdisco-web-fg: The setting session_cookie_key must be defined at /home/netdisco/perl5/lib/perl5/Dancer/Session/Cookie.pm line 38.
netdisco-web_1         | Compilation failed in require at /home/netdisco/perl5/bin/netdisco-web-fg line 59.
netdisco-web_1         | BEGIN failed--compilation aborted at /home/netdisco/perl5/bin/netdisco-web-fg line 59.
netdisco-web_1         | Child process 12 exited with status 115
netdisco-web_1         | DBIx::Class::Schema::Versioned::_on_connect(): Your DB is currently unversioned. Please call upgrade on your schema to sync the DB. at /home/netdisco/perl5/lib/perl5/DBICx/Sugar.pm line 121
netdisco-web_1         | Error while loading /home/netdisco/perl5/bin/netdisco-web-fg: The setting session_cookie_key must be defined at /home/netdisco/perl5/lib/perl5/Dancer/Session/Cookie.pm line 38.
netdisco-web_1         | Compilation failed in require at /home/netdisco/perl5/bin/netdisco-web-fg line 59.
netdisco-web_1         | BEGIN failed--compilation aborted at /home/netdisco/perl5/bin/netdisco-web-fg line 59.
netdisco-web_1         | Child process 10 exited with status 115
netdisco-web_1         | DBIx::Class::Schema::Versioned::_on_connect(): Your DB is currently unversioned. Please call upgrade on your schema to sync the DB. at /home/netdisco/perl5/lib/perl5/DBICx/Sugar.pm line 121
netdisco-web_1         | Error while loading /home/netdisco/perl5/bin/netdisco-web-fg: The setting session_cookie_key must be defined at /home/netdisco/perl5/lib/perl5/Dancer/Session/Cookie.pm line 38.

I can actually enter the web gui ,seems to be working .

Any clue how to solve this?

@bergernetch
Copy link

I got the same issue.

@rc9000
Copy link
Member

rc9000 commented Dec 18, 2024

@thatlostboy : the root cause is netdisco-postgresql-1 | chown: /var/lib/postgresql/data: Permission denied, please try the sudo chown -R 901:901 netdisco that you seem to have missed from the instructions

@benjofalanga : yours seems to be a different issue, if it persists can you also post the output from the netdisco-postgresql container?

@bergernetch : please also post logs, preferably in a new issues since there's already a lot going on here.

Sorry nobody got around to look at this for multiple months, Netdisco volunteers are spread quite thin.

@benjofalanga
Copy link

@thatlostboy : the root cause is netdisco-postgresql-1 | chown: /var/lib/postgresql/data: Permission denied, please try the sudo chown -R 901:901 netdisco that you seem to have missed from the instructions

@benjofalanga : yours seems to be a different issue, if it persists can you also post the output from the netdisco-postgresql container?

@bergernetch : please also post logs, preferably in a new issues since there's already a lot going on here.

Sorry nobody got around to look at this for multiple months, Netdisco volunteers are spread quite thin.

Hey yes here are the logs from the netdisco-postgresql container

docker logs 8b7dbb5826e5
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale "en_US.utf8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".

Data page checksums are disabled.

fixing permissions on existing directory /var/lib/postgresql/data ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default time zone ... UTC
creating configuration files ... ok
running bootstrap script ... ok
sh: locale: not found
2024-12-20 11:30:56.178 UTC [36] WARNING:  no usable system locales were found
performing post-bootstrap initialization ... ok
syncing data to disk ... ok


Success. You can now start the database server using:

    pg_ctl -D /var/lib/postgresql/data -l logfile start

initdb: warning: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.
waiting for server to start....2024-12-20 11:30:57.525 UTC [42] 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
2024-12-20 11:30:57.531 UTC [42] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2024-12-20 11:30:57.551 UTC [43] LOG:  database system was shut down at 2024-12-20 11:30:56 UTC
2024-12-20 11:30:57.559 UTC [42] LOG:  database system is ready to accept connections
 done
server started

/usr/local/bin/docker-entrypoint.sh: sourcing /docker-entrypoint-initdb.d/netdisco-initdb.sh
netdisco-db-entrypoint: configuring Netdisco user and db
CREATE ROLE
netdisco-db-entrypoint: restarting pg privately to container
waiting for server to shut down...2024-12-20 11:30:57.946 UTC [42] LOG:  received fast shutdown request
.2024-12-20 11:30:57.952 UTC [42] LOG:  aborting any active transactions
2024-12-20 11:30:57.954 UTC [42] LOG:  background worker "logical replication launcher" (PID 49) exited with exit code 1
2024-12-20 11:30:57.954 UTC [44] LOG:  shutting down
2024-12-20 11:30:57.999 UTC [42] LOG:  database system is shut down
 done
server stopped
waiting for server to start....2024-12-20 11:30:58.170 UTC [60] 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
2024-12-20 11:30:58.170 UTC [60] LOG:  listening on IPv4 address "127.0.0.1", port 5432
2024-12-20 11:30:58.170 UTC [60] LOG:  could not bind IPv6 address "::1": Address not available
2024-12-20 11:30:58.170 UTC [60] HINT:  Is another postmaster already running on port 5432? If not, wait a few seconds and retry.
2024-12-20 11:30:58.237 UTC [60] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2024-12-20 11:30:58.269 UTC [61] LOG:  database system was shut down at 2024-12-20 11:30:57 UTC
2024-12-20 11:30:58.281 UTC [60] LOG:  database system is ready to accept connections
 done
server started
netdisco-db-entrypoint: bringing schema up-to-date
netdisco-db-entrypoint: importing OUI
DELETE 0
COPY 47812
netdisco-db-entrypoint: marking schema as up-to-date
netdisco-db-entrypoint: adding admin user if none exists
INSERT 0 1
netdisco-db-entrypoint: adding session key if none exists
INSERT 0 1
netdisco-db-entrypoint: queueing stats job
INSERT 0 1

waiting for server to shut down...2024-12-20 11:31:07.537 UTC [60] LOG:  received fast shutdown request
.2024-12-20 11:31:07.546 UTC [60] LOG:  aborting any active transactions
2024-12-20 11:31:07.548 UTC [60] LOG:  background worker "logical replication launcher" (PID 67) exited with exit code 1
2024-12-20 11:31:07.549 UTC [62] LOG:  shutting down
2024-12-20 11:31:07.795 UTC [60] LOG:  database system is shut down
 done
server stopped

PostgreSQL init process complete; ready for start up.

2024-12-20 11:31:07.865 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
2024-12-20 11:31:07.865 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2024-12-20 11:31:07.865 UTC [1] LOG:  listening on IPv6 address "::", port 5432
2024-12-20 11:31:07.887 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2024-12-20 11:31:07.904 UTC [358] LOG:  database system was shut down at 2024-12-20 11:31:07 UTC
2024-12-20 11:31:07.916 UTC [1] LOG:  database system is ready to accept connections

@Pigi-102
Copy link

I have the same problem:

netdisco-web-1         | DBIx::Class::Schema::Versioned::_on_connect(): Your DB is currently unversioned. Please call upgrade on your schema to sync the DB. at /home/netdisco/perl5/lib/perl5/DBICx/Sugar.pm line 121
netdisco-web-1         | DBIx::Class::Schema::Versioned::_on_connect(): Your DB is currently unversioned. Please call upgrade on your schema to sync the DB. at /home/netdisco/perl5/lib/perl5/DBICx/Sugar.pm line 121
netdisco-web-1         | DBIx::Class::Schema::Versioned::_on_connect(): Your DB is currently unversioned. Please call upgrade on your schema to sync the DB. at /home/netdisco/perl5/lib/perl5/DBICx/Sugar.pm line 121
netdisco-web-1         | Error while loading /home/netdisco/perl5/bin/netdisco-web-fg: The setting session_cookie_key must be defined at /home/netdisco/perl5/lib/perl5/Dancer/Session/Cookie.pm line 38.
netdisco-web-1         | Compilation failed in require at /home/netdisco/perl5/bin/netdisco-web-fg line 59.

and also to me we interface don't come up.

Permission are fine.
From the postgres docker the logs says:

netdisco-db-entrypoint: starting pg privately to container
waiting for server to start....2024-12-23 16:25:54.586 UTC [8] 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
2024-12-23 16:25:54.586 UTC [8] LOG:  listening on IPv6 address "::1", port 5432
2024-12-23 16:25:54.586 UTC [8] LOG:  listening on IPv4 address "127.0.0.1", port 5432
2024-12-23 16:25:54.604 UTC [8] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2024-12-23 16:25:54.646 UTC [9] LOG:  database system was shut down at 2024-12-23 16:25:40 UTC
2024-12-23 16:25:54.669 UTC [8] LOG:  database system is ready to accept connections
 done
server started
netdisco-db-entrypoint: bringing schema up-to-date
netdisco-db-entrypoint: importing OUI
DELETE 47812
COPY 47812
netdisco-db-entrypoint: marking schema as up-to-date
netdisco-db-entrypoint: adding admin user if none exists
netdisco-db-entrypoint: adding session key if none exists
netdisco-db-entrypoint: queueing stats job
INSERT 0 1
waiting for server to shut down....2024-12-23 16:26:05.386 UTC [8] LOG:  received fast shutdown request
netdisco-db-entrypoint: shutting down pg (will restart, listening for clients)
2024-12-23 16:26:05.406 UTC [8] LOG:  aborting any active transactions
2024-12-23 16:26:05.408 UTC [8] LOG:  background worker "logical replication launcher" (PID 15) exited with exit code 1
2024-12-23 16:26:05.408 UTC [10] LOG:  shutting down
2024-12-23 16:26:05.552 UTC [8] LOG:  database system is shut down
 done
server stopped

PostgreSQL Database directory appears to contain a database; Skipping initialization

2024-12-23 16:26:05.676 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
2024-12-23 16:26:05.676 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2024-12-23 16:26:05.676 UTC [1] LOG:  listening on IPv6 address "::", port 5432
2024-12-23 16:26:05.705 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2024-12-23 16:26:05.748 UTC [316] LOG:  database system was shut down at 2024-12-23 16:26:05 UTC
2024-12-23 16:26:05.769 UTC [1] LOG:  database system is ready to accept connections

@bergernetch
Copy link

@bergernetch : please also post logs, preferably in a new issues since there's already a lot going on here.

I am unable to provide more logs, got it running somehow but do not remember how..

Sorry nobody got around to look at this for multiple months, Netdisco volunteers are spread quite thin.

That is understandable, thanks for checking it at all!

@rc9000
Copy link
Member

rc9000 commented Dec 23, 2024

yes that's a bit the trouble here, everything that people post looks somewhat normal. The postgres container has a bit on startup that launches it without listening to network requests, during which potentially a schema upgrade is performed. This leads to some error messages of the other containers, but eventually it should resolve and the web interface starts accepting requests.

Here is a full example what a normal first start looks like:

Creating network "ndd8_default" with the default driver
Creating ndd8_netdisco-postgresql_1 ... done
Creating ndd8_netdisco-backend_1    ... done
Creating ndd8_netdisco-web_1        ... done
Attaching to ndd8_netdisco-postgresql_1, ndd8_netdisco-web_1, ndd8_netdisco-backend_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  | 2024-12-23 22:43:29.000 UTC [35] WARNING:  no usable system locales were found
netdisco-backend_1     | config watcher: watching /home/netdisco/environments for updates.
netdisco-web_1         | config watcher: watching /home/netdisco/environments for updates.
netdisco-web_1         | 2024/12/23-22:43:29 Starman::Server (type Net::Server::PreFork) starting! pid(8)
netdisco-web_1         | Binding to TCP port 5000 on host * with IPv4
netdisco-postgresql_1  | ok
netdisco-postgresql_1  | syncing data to disk ... 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  | 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  | waiting for server to start....2024-12-23 22:43:29.649 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  | 2024-12-23 22:43:29.659 UTC [41] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
netdisco-postgresql_1  | 2024-12-23 22:43:29.666 UTC [42] LOG:  database system was shut down at 2024-12-23 22:43:29 UTC
netdisco-postgresql_1  | 2024-12-23 22:43:29.669 UTC [41] LOG:  database system is ready to accept connections
netdisco-postgresql_1  |  done
netdisco-postgresql_1  | server started
netdisco-postgresql_1  |
netdisco-postgresql_1  | /usr/local/bin/docker-entrypoint.sh: sourcing /docker-entrypoint-initdb.d/netdisco-initdb.sh
netdisco-postgresql_1  | netdisco-db-entrypoint: configuring Netdisco user and db
netdisco-postgresql_1  | CREATE ROLE
netdisco-postgresql_1  | netdisco-db-entrypoint: restarting pg privately to container
netdisco-postgresql_1  | 2024-12-23 22:43:29.851 UTC [41] LOG:  received fast shutdown request
netdisco-postgresql_1  | waiting for server to shut down....2024-12-23 22:43:29.852 UTC [41] LOG:  aborting any active transactions
netdisco-postgresql_1  | 2024-12-23 22:43:29.855 UTC [41] LOG:  background worker "logical replication launcher" (PID 48) exited with exit code 1
netdisco-postgresql_1  | 2024-12-23 22:43:29.855 UTC [43] LOG:  shutting down
netdisco-postgresql_1  | 2024-12-23 22:43:29.866 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....2024-12-23 22:43:29.986 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  | 2024-12-23 22:43:29.990 UTC [59] LOG:  listening on IPv4 address "127.0.0.1", port 5432
netdisco-postgresql_1  | 2024-12-23 22:43:29.990 UTC [59] LOG:  could not bind IPv6 address "::1": Address not available
netdisco-postgresql_1  | 2024-12-23 22:43:29.990 UTC [59] HINT:  Is another postmaster already running on port 5432? If not, wait a few seconds and retry.
netdisco-postgresql_1  | 2024-12-23 22:43:29.995 UTC [59] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
netdisco-postgresql_1  | 2024-12-23 22:43:29.998 UTC [60] LOG:  database system was shut down at 2024-12-23 22:43:29 UTC
netdisco-postgresql_1  | 2024-12-23 22:43:30.001 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-web_1         | [10] 2024-12-23 22:43:30  warn App::Netdisco 2.080003 web
netdisco-web_1         | [13] 2024-12-23 22:43:30  warn App::Netdisco 2.080003 web
netdisco-web_1         | [12] 2024-12-23 22:43:30  warn App::Netdisco 2.080003 web
netdisco-web_1         | [9] 2024-12-23 22:43:30  warn App::Netdisco 2.080003 web
netdisco-web_1         | [11] 2024-12-23 22:43:30  warn App::Netdisco 2.080003 web
netdisco-postgresql_1  | netdisco-db-entrypoint: importing OUI
netdisco-postgresql_1  | DELETE 0
netdisco-web_1         | DBIx::Class::Schema::Versioned::_on_connect(): Your DB is currently unversioned. Please call upgrade on your schema to sync the DB. at /home/netdisco/perl5/lib/perl5/DBICx/Sugar.pm line 121
netdisco-web_1         | Error while loading /home/netdisco/perl5/bin/netdisco-web-fg: The setting session_cookie_key must be defined at /home/netdisco/perl5/lib/perl5/Dancer/Session/Cookie.pm line 38.
netdisco-web_1         | Compilation failed in require at /home/netdisco/perl5/bin/netdisco-web-fg line 59.
netdisco-web_1         | BEGIN failed--compilation aborted at /home/netdisco/perl5/bin/netdisco-web-fg line 59.
netdisco-web_1         | Child process 10 exited with status 115
netdisco-web_1         | DBIx::Class::Schema::Versioned::_on_connect(): Your DB is currently unversioned. Please call upgrade on your schema to sync the DB. at /home/netdisco/perl5/lib/perl5/DBICx/Sugar.pm line 121
netdisco-web_1         | DBIx::Class::Schema::Versioned::_on_connect(): Your DB is currently unversioned. Please call upgrade on your schema to sync the DB. at /home/netdisco/perl5/lib/perl5/DBICx/Sugar.pm line 121
netdisco-web_1         | Error while loading /home/netdisco/perl5/bin/netdisco-web-fg: The setting session_cookie_key must be defined at /home/netdisco/perl5/lib/perl5/Dancer/Session/Cookie.pm line 38.
netdisco-web_1         | Compilation failed in require at /home/netdisco/perl5/bin/netdisco-web-fg line 59.
netdisco-web_1         | BEGIN failed--compilation aborted at /home/netdisco/perl5/bin/netdisco-web-fg line 59.
netdisco-web_1         | DBIx::Class::Schema::Versioned::_on_connect(): Your DB is currently unversioned. Please call upgrade on your schema to sync the DB. at /home/netdisco/perl5/lib/perl5/DBICx/Sugar.pm line 121
netdisco-web_1         | Error while loading /home/netdisco/perl5/bin/netdisco-web-fg: The setting session_cookie_key must be defined at /home/netdisco/perl5/lib/perl5/Dancer/Session/Cookie.pm line 38.
netdisco-web_1         | Compilation failed in require at /home/netdisco/perl5/bin/netdisco-web-fg line 59.
netdisco-web_1         | BEGIN failed--compilation aborted at /home/netdisco/perl5/bin/netdisco-web-fg line 59.
netdisco-web_1         | Child process 12 exited with status 115
netdisco-web_1         | Error while loading /home/netdisco/perl5/bin/netdisco-web-fg: The setting session_cookie_key must be defined at /home/netdisco/perl5/lib/perl5/Dancer/Session/Cookie.pm line 38.
netdisco-web_1         | Compilation failed in require at /home/netdisco/perl5/bin/netdisco-web-fg line 59.
netdisco-web_1         | BEGIN failed--compilation aborted at /home/netdisco/perl5/bin/netdisco-web-fg line 59.
netdisco-web_1         | Child process 9 exited with status 115
netdisco-web_1         | Child process 13 exited with status 115
netdisco-web_1         | DBIx::Class::Schema::Versioned::_on_connect(): Your DB is currently unversioned. Please call upgrade on your schema to sync the DB. at /home/netdisco/perl5/lib/perl5/DBICx/Sugar.pm line 121
netdisco-web_1         | Error while loading /home/netdisco/perl5/bin/netdisco-web-fg: The setting session_cookie_key must be defined at /home/netdisco/perl5/lib/perl5/Dancer/Session/Cookie.pm line 38.
netdisco-web_1         | Compilation failed in require at /home/netdisco/perl5/bin/netdisco-web-fg line 59.
netdisco-web_1         | BEGIN failed--compilation aborted at /home/netdisco/perl5/bin/netdisco-web-fg line 59.
netdisco-web_1         | Child process 11 exited with status 115
netdisco-postgresql_1  | netdisco-db-entrypoint: marking schema as up-to-date
netdisco-postgresql_1  | COPY 47812
netdisco-postgresql_1  | netdisco-db-entrypoint: adding admin user if none exists
netdisco-postgresql_1  | INSERT 0 1
netdisco-postgresql_1  | netdisco-db-entrypoint: adding session key if none exists
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  | 2024-12-23 22:43:36.236 UTC [59] LOG:  received fast shutdown request
netdisco-postgresql_1  | waiting for server to shut down....2024-12-23 22:43:36.238 UTC [59] LOG:  aborting any active transactions
netdisco-postgresql_1  | 2024-12-23 22:43:36.239 UTC [59] LOG:  background worker "logical replication launcher" (PID 66) exited with exit code 1
netdisco-postgresql_1  | 2024-12-23 22:43:36.239 UTC [61] LOG:  shutting down
netdisco-postgresql_1  | 2024-12-23 22:43:36.283 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  | 2024-12-23 22:43:36.363 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  | 2024-12-23 22:43:36.363 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
netdisco-postgresql_1  | 2024-12-23 22:43:36.363 UTC [1] LOG:  listening on IPv6 address "::", port 5432
netdisco-postgresql_1  | 2024-12-23 22:43:36.366 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
netdisco-postgresql_1  | 2024-12-23 22:43:36.370 UTC [357] LOG:  database system was shut down at 2024-12-23 22:43:36 UTC
netdisco-web_1         | [19] 2024-12-23 22:43:36  warn App::Netdisco 2.080003 web
netdisco-postgresql_1  | 2024-12-23 22:43:36.373 UTC [1] LOG:  database system is ready to accept connections
netdisco-web_1         | [22] 2024-12-23 22:43:36  warn App::Netdisco 2.080003 web
netdisco-web_1         | [21] 2024-12-23 22:43:36  warn App::Netdisco 2.080003 web
netdisco-web_1         | [20] 2024-12-23 22:43:36  warn App::Netdisco 2.080003 web
netdisco-web_1         | [23] 2024-12-23 22:43:36  warn App::Netdisco 2.080003 web

While some of that looks worrying, it really isn't. Also maybe not super self-explanatory, the final

netdisco-web_1         | [20] 2024-12-23 22:43:36  warn App::Netdisco 2.080003 web

mean that the web process has successfully started.

If you have a large database already, the phase between

netdisco-postgresql_1  | netdisco-db-entrypoint: restarting pg privately to container
...
netdisco-postgresql_1  | netdisco-db-entrypoint: importing OUI
...
netdisco-postgresql_1  | PostgreSQL init process complete; ready for start up.

can take quite long.

All that being said, if anybody still doesn't have a running web frontend after a couple minutes, maybe also post a docker-compose ps

@Pigi-102
Copy link

Just in case you wonder, a huge problem is when running in podman ( RHEL/OL ), where the internal resolution does not work unless the containers run in a single pod .
I have removed podman packages, installed docker-ce ( on OL ) and it started working as expected.
I have not figured out how to make it work in podman environmnet, sorry.

@rc9000
Copy link
Member

rc9000 commented Dec 24, 2024

Just in case you wonder, a huge problem is when running in podman ( RHEL/OL )

Thanks I've put this in a separate issue: #78 - I'll try to give it a spin when I get around to it, I can see how it could not be working with our bind mount instruction, DNS options etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

7 participants
@ollyg @rc9000 @bergernetch @thatlostboy @benjofalanga @Pigi-102 and others