Skip to content

Bad Gateway, ECONNREFUSED #536

@itsMaxC

Description

@itsMaxC

Checklist

  • Have you pulled and found the error with jc21/nginx-proxy-manager:latest docker image?
    Yes
  • Are you sure you're not using someone else's docker image?
    Yes
  • If having problems with Lets Encrypt, have you made absolutely sure your site is accessible from outside of your network?
    N/A

Describe the bug

  • A clear and concise description of what the bug is.
    Will not connect to the database, error ECONNREFUSED and then it times out. Tried multiple ways. I can ping db just fine from the app console.
  • What version of Nginx Proxy Manager is reported on the login page?
    v2.3.1

config.json

{
  "database": {
    "engine": "mysql",
    "host": "db",
    "name": "npm",
    "user": "npm",
    "password": "mypassword",
    "port": 3306
  }
}

docker-compose.yml

version: "3"
services:
  app:
    image: jc21/nginx-proxy-manager:latest
    restart: always
    ports:
      # Public HTTP Port:
      - 80:80
      # Public HTTPS Port:
      - 443:443
      # Admin Web Port:
      - 81:81
    environment:
      # Uncomment this if IPv6 is not enabled on your host
      DISABLE_IPV6: "true"
    volumes:
      # Make sure this config.json file exists as per instructions above:
      - /share/Docker/NGINXPM/config.json:/app/config/production.json
      - /share/Docker/NGINXPM/data:/data
      - /share/Docker/NGINXPM/letsencrypt:/etc/letsencrypt
    depends_on:
      - db
  db:
    image: mariadb:latest
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: "myrootpassword"
      MYSQL_DATABASE: "npm"
      MYSQL_USER: "npm"
      MYSQL_PASSWORD: "mypassword"
    volumes:
      - /share/Docker/NGINXPM/data/mysql:/var/lib/mysql

DB Logs

2020-08-01 01:13:14+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.5.4+maria~focal started.

2020-08-01 01:13:14+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'

2020-08-01 01:13:14+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.5.4+maria~focal started.

2020-08-01 1:13:15 0 [Note] mysqld (mysqld 10.5.4-MariaDB-1:10.5.4+maria~focal) starting as process 1 ...

2020-08-01 1:13:15 0 [Note] InnoDB: Using Linux native AIO

2020-08-01 1:13:15 0 [Note] InnoDB: Uses event mutexes

2020-08-01 1:13:15 0 [Note] InnoDB: Compressed tables use zlib 1.2.11

2020-08-01 1:13:15 0 [Note] InnoDB: Number of pools: 1

2020-08-01 1:13:15 0 [Note] InnoDB: Using SSE4.2 crc32 instructions

2020-08-01 1:13:15 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts)

2020-08-01 1:13:15 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728

2020-08-01 1:13:15 0 [Note] InnoDB: Completed initialization of buffer pool

2020-08-01 1:13:15 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().

2020-08-01 1:13:15 0 [Note] InnoDB: 128 rollback segments are active.

2020-08-01 1:13:15 0 [Note] InnoDB: Creating shared tablespace for temporary tables

2020-08-01 1:13:15 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...

2020-08-01 1:13:15 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.

2020-08-01 1:13:15 0 [Note] InnoDB: 10.5.4 started; log sequence number 45093; transaction id 21

2020-08-01 1:13:15 0 [Note] Plugin 'FEEDBACK' is disabled.

2020-08-01 1:13:15 0 [Note] Server socket created on IP: '::'.

2020-08-01 1:13:15 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool

2020-08-01 1:13:15 0 [Note] InnoDB: Buffer pool(s) load completed at 200801 1:13:15

2020-08-01 1:13:15 0 [Warning] 'proxies_priv' entry '@% root@ac19879d292b' ignored in --skip-name-resolve mode.

2020-08-01 1:13:15 0 [Note] Reading of all Master_info entries succeeded

2020-08-01 1:13:15 0 [Note] Added new Master_info '' to hash table

2020-08-01 1:13:15 0 [Note] mysqld: ready for connections.

Version: '10.5.4-MariaDB-1:10.5.4+maria~focal' socket: '/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution

App log

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.

[s6-init] ensuring user provided files have correct perms...exited 0.

[fix-attrs.d] applying ownership & permissions fixes...

[fix-attrs.d] done.

[cont-init.d] executing container initialization scripts...

[cont-init.d] done.

[services.d] starting services

[services.d] done.

Generating dummy SSL certificate...

Generating a RSA private key

...............+++++

...................................................................+++++

writing new private key to '/data/nginx/dummykey.pem'


Complete

Disabling IPV6 in hosts

❯ Disabling IPV6 in hosts: /etc/nginx/conf.d

❯ /etc/nginx/conf.d/default.conf

❯ /etc/nginx/conf.d/include/assets.conf

❯ /etc/nginx/conf.d/include/block-exploits.conf

❯ /etc/nginx/conf.d/include/force-ssl.conf

❯ /etc/nginx/conf.d/include/ip_ranges.conf

❯ /etc/nginx/conf.d/include/letsencrypt-acme-challenge.conf

❯ /etc/nginx/conf.d/include/proxy.conf

❯ /etc/nginx/conf.d/include/ssl-ciphers.conf

❯ /etc/nginx/conf.d/include/resolvers.conf

❯ /etc/nginx/conf.d/production.conf

Disabling IPV6 in hosts

❯ Disabling IPV6 in hosts: /data/nginx

[8/1/2020] [1:22:52 AM] [Global ] › ✖ error connect ECONNREFUSED 172.29.0.2:3306

[8/1/2020] [1:22:53 AM] [Global ] › ✖ error connect ECONNREFUSED 172.29.0.2:3306

[8/1/2020] [1:22:54 AM] [Global ] › ✖ error connect ECONNREFUSED 172.29.0.2:3306

[8/1/2020] [1:22:55 AM] [Global ] › ✖ error connect ECONNREFUSED 172.29.0.2:3306

[8/1/2020] [1:22:56 AM] [Global ] › ✖ error connect ECONNREFUSED 172.29.0.2:3306

[8/1/2020] [1:22:57 AM] [Global ] › ✖ error connect ECONNREFUSED 172.29.0.2:3306

[8/1/2020] [1:22:58 AM] [Global ] › ✖ error connect ECONNREFUSED 172.29.0.2:3306

[8/1/2020] [1:22:59 AM] [Global ] › ✖ error connect ECONNREFUSED 172.29.0.2:3306

[8/1/2020] [1:23:00 AM] [Global ] › ✖ error connect ECONNREFUSED 172.29.0.2:3306

[8/1/2020] [1:23:01 AM] [Global ] › ✖ error connect ECONNREFUSED 172.29.0.2:3306

[8/1/2020] [1:23:02 AM] [Global ] › ✖ error connect ECONNREFUSED 172.29.0.2:3306

[8/1/2020] [1:23:03 AM] [Global ] › ✖ error connect ECONNREFUSED 172.29.0.2:3306

[8/1/2020] [1:23:04 AM] [Global ] › ✖ error connect ECONNREFUSED 172.29.0.2:3306

[8/1/2020] [1:23:05 AM] [Global ] › ✖ error connect ECONNREFUSED 172.29.0.2:3306

[8/1/2020] [1:23:06 AM] [Global ] › ✖ error connect ECONNREFUSED 172.29.0.2:3306

[8/1/2020] [1:23:07 AM] [Global ] › ✖ error connect ECONNREFUSED 172.29.0.2:3306

[8/1/2020] [1:23:08 AM] [Global ] › ✖ error connect ECONNREFUSED 172.29.0.2:3306

[8/1/2020] [1:23:09 AM] [Global ] › ✖ error connect ECONNREFUSED 172.29.0.2:3306

[8/1/2020] [1:23:10 AM] [Global ] › ✖ error connect ECONNREFUSED 172.29.0.2:3306

[8/1/2020] [1:23:11 AM] [Global ] › ✖ error connect ECONNREFUSED 172.29.0.2:3306

[8/1/2020] [1:23:12 AM] [Global ] › ✖ error connect ECONNREFUSED 172.29.0.2:3306

[8/1/2020] [1:23:13 AM] [Global ] › ✖ error connect ECONNREFUSED 172.29.0.2:3306

[8/1/2020] [1:23:14 AM] [Global ] › ✖ error connect ECONNREFUSED 172.29.0.2:3306

[8/1/2020] [1:23:15 AM] [Global ] › ✖ error connect ECONNREFUSED 172.29.0.2:3306

[8/1/2020] [1:23:16 AM] [Global ] › ✖ error connect ECONNREFUSED 172.29.0.2:3306

[8/1/2020] [1:23:17 AM] [Global ] › ✖ error connect ECONNREFUSED 172.29.0.2:3306

[8/1/2020] [1:23:18 AM] [Global ] › ✖ error connect ECONNREFUSED 172.29.0.2:3306

[8/1/2020] [1:23:19 AM] [Global ] › ✖ error connect ECONNREFUSED 172.29.0.2:3306

[8/1/2020] [1:23:20 AM] [Global ] › ✖ error connect ECONNREFUSED 172.29.0.2:3306

[8/1/2020] [1:23:21 AM] [Global ] › ✖ error connect ECONNREFUSED 172.29.0.2:3306

[8/1/2020] [1:23:22 AM] [Global ] › ✖ error connect ECONNREFUSED 172.29.0.2:3306

[8/1/2020] [1:23:33 AM] [Global ] › ✖ error connect ETIMEDOUT

Operating System
QNAP with latest QTS, Portainer 1.24.1

Additional context
At a loss here, tried everything.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions