netdisco-docker icon indicating copy to clipboard operation
netdisco-docker copied to clipboard

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

Open thatlostboy opened this issue 5 months ago • 2 comments

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 avatar Sep 03 '24 18:09 thatlostboy