Before asking for help please read "Requesting Help and Suggestions" by clicking on that tab above here.
  • Page:
  • 1

TOPIC:

Docker startup failing 1 week 4 days ago #1

  • debgz
  • debgz's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 2
Hi dear lovely community,

just tried to setup webtrees via docker compose and it fails to show the wizard (first startup, empty db) with a rather not self explanatory message.
The db is definitely reachable and and port is not occupied. Removing the port from base url does not change anything on the current behavior.

Maybe someone has an idea as the following message is not really stating what the problem is.

Log is basically this all over again:
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/docker-entrypoint.py", line 339, in <module>
    main()
  File "/docker-entrypoint.py", line 328, in main
    setup_wizard()
  File "/docker-entrypoint.py", line 262, in setup_wizard
    resp = request.urlopen(
  File "/usr/lib/python3.9/urllib/request.py", line 214, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python3.9/urllib/request.py", line 517, in open
    response = self._open(req, data)
  File "/usr/lib/python3.9/urllib/request.py", line 534, in _open
    result = self._call_chain(self.handle_open, protocol, protocol +
  File "/usr/lib/python3.9/urllib/request.py", line 494, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.9/urllib/request.py", line 1375, in http_open
    return self.do_open(http.client.HTTPConnection, req)
  File "/usr/lib/python3.9/urllib/request.py", line 1349, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error [Errno 111] Connection refused>
[NV_INIT] Setting up folder permissions for uploads
[NV_INIT] Attempting to automate setup wizard
[NV_INIT] LANG found in environment variables
[NV_INIT] DB_TYPE found in environment variables
[NV_INIT] DB_PORT found in environment variables
[NV_INIT] DB_USER found in environment variables
[NV_INIT] DB_NAME found in environment variables
[NV_INIT] DB_PREFIX found in environment variables
[NV_INIT] DB_HOST found in environment variables
[NV_INIT] DB_PASS found in environment variables
[NV_INIT] BASE_URL found in environment variables
[NV_INIT] WT_NAME found in environment variables
[NV_INIT] WT_USER found in environment variables
[NV_INIT] WT_PASS found in environment variables
[NV_INIT] WT_EMAIL found in environment variables
[NV_INIT] Config file does NOT exist
[NV_INIT] Automating setup wizard
[NV_INIT] Starting Apache in background
[NV_INIT] Disabling site webtrees-redir
Site webtrees-redir already disabled
[NV_INIT] Disabling site webtrees-ssl
Site webtrees-ssl already disabled
[NV_INIT] Enabling site webtrees
Site webtrees already enabled
[NV_INIT] Sending setup wizard request
Traceback (most recent call last):
  File "/usr/lib/python3.9/urllib/request.py", line 1346, in do_open
    h.request(req.get_method(), req.selector, req.data, headers,
  File "/usr/lib/python3.9/http/client.py", line 1255, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.9/http/client.py", line 1301, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.9/http/client.py", line 1250, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.9/http/client.py", line 1010, in _send_output
    self.send(msg)
  File "/usr/lib/python3.9/http/client.py", line 950, in send
    self.connect()
  File "/usr/lib/python3.9/http/client.py", line 921, in connect
    self.sock = self._create_connection(
  File "/usr/lib/python3.9/socket.py", line 843, in create_connection
    raise err
  File "/usr/lib/python3.9/socket.py", line 831, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

dockcer-compose.yml
version: "3"

services:
  app:
    environment:
      PRETTY_URLS: "1"
      HTTPS: "0"
      HTTPS_REDIRECT: "0"
      LANG: "de-DE"
      BASE_URL: "http://192.168.2.105:4000"
      DB_TYPE: "mysql"
      DB_HOST: "192.168.2.105"
      DB_PORT: "3306"
      DB_USER: "webtrees"
      DB_PASS: "dbpwd"
      DB_NAME: "webtrees"
      DB_PREFIX: ""
      WT_USER: "name"
      WT_NAME: "real name"
      WT_PASS: "wtpass"
      WT_EMAIL: "mail"
    image: ghcr.io/nathanvaughn/webtrees:2.1.5
    ports:
      - 4000:80
    restart: unless-stopped
    volumes:
      - ./app_data:/var/www/webtrees/data/
      - ./app_media:/var/www/webtrees/media/

Please Log in or Create an account to join the conversation.

Last edit: by debgz.

Docker startup failing 1 week 4 days ago #2

  • bertkoor
  • bertkoor's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Greetings from Utrecht, Holland
  • Posts: 2792
I think there is simply a mismatch between DB_USER and DB_PASS configured in the app container and the database container.

If your database has already started, this defeats the purpose of docker compose, where the app and all its dependencies get started and stopped simultaneously.

Try the full original docker compose file:
github.com/NathanVaughn/webtrees-docker/...n/docker-compose.yml
stamboom.BertKoor.nl runs on webtrees v1.7.13

Please Log in or Create an account to join the conversation.

Last edit: by bertkoor.

Docker startup failing 1 week 3 days ago #3

  • debgz
  • debgz's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 2
Well .. thats absolutely counter intuitive ;-) ... but threw me on the right track.
I replaced DB_USER, DB_PASSWORD and DB_NAME with their respective MARIADB names (as per the official documentation: hub.docker.com/r/nathanvaughn/webtrees). After that it started up and showed me the setup wizard where I had to enter everything I already set up via the env vars again.

Now runs just fine and I will never touch the config again :-).

PS.: speaking of counter intuitivity ... who the *** placed the "continue" button in the wizard on the left and the "back" button on the right side?

Please Log in or Create an account to join the conversation.

Last edit: by debgz.
  • Page:
  • 1
Powered by Kunena Forum