mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-04-25 17:35:52 +03:00
[GH-ISSUE #458] docker container reports unhealthy, the management login page reports "bad gateway" , no login possible #385
Labels
No labels
awaiting feedback
bug
cannot reproduce
dns provider request
duplicate
enhancement
enhancement
enhancement
good first issue
help wanted
invalid
need more info
no certbot plugin available
product-support
pull-request
question
stale
troll
upstream issue
v2
v2
v2
v3
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nginx-proxy-manager-NginxProxyManager#385
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @JDomotics on GitHub (Jun 11, 2020).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/458
Info.txt
I've been reading/trying many possible solutions, but none gave a solution.
I've gathered data:
xxx@yyyy:~ $ cat /etc/debian_version
10.4
xxx@yyyy:~ $ uname -a
Linux yyyy 4.19.118-v7+ #1311 SMP Mon Apr 27 14:21:24 BST 2020 armv7l GNU/Linux
xxxn@yyyy:~ $ cat /proc/cpuinfo
processor : 0
model name : ARMv7 Processor rev 4 (v7l)
BogoMIPS : 38.40
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xd03
CPU revision : 4
Hardware : BCM2835
Revision : a020d3
Serial : 0000000032806e22
Model : Raspberry Pi 3 Model B Plus Rev 1.3
xxx@yyyy:/etc/docker $ docker --version
Docker version 19.03.11, build 42e35e6
xxx@yyyy:/etc/docker $ docker-compose --version
docker-compose version 1.26.0, build unknown
xxx@yyyy:~ $ sudo nano /etc/docker/config.json
{
"database": {
"engine": "mysql",
"host": "db",
"name": "npm",
"user": "npm",
"password": "npm",
"port": 3306
}
}
xxx@yyyy:~ $ sudo nano /etc/docker/docker-compose.yml
version: "3"
services:
app:
image: jc21/nginx-proxy-manager:2
restart: always
ports:
# Public HTTP Port:
- '8080:80'
# Public HTTPS Port:
- '8443: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:
- ./config.json:/app/config/production.json
- ./data:/data
- ./letsencrypt:/etc/letsencrypt
depends_on:
- db
db:
image: jc21/mariadb-aria:10.4
restart: always
ports:
- 3306:3306
environment:
MYSQL_ROOT_PASSWORD: 'npm'
MYSQL_DATABASE: 'npm'
MYSQL_USER: 'npm'
MYSQL_PASSWORD: 'npm'
volumes:
- ./data/mysql:/var/lib/mysql
xxx@yyyy:/etc/docker $ docker-compose up -d
reports no errors and returns normally to the prompt
Nginx Proxy Manager V2.3.1 login page on ip-addres:81 reports always "Bad Gateway" when using default login usr:admin@example.com pwd:changeme
xxx@yyyy:/etc/docker $ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
5f39e350d499 jc21/nginx-proxy-manager:2 "/init" 28 minutes ago Up 28 minutes (unhealthy) 0.0.0.0:81->81/tcp, 0.0.0.0:8080->80/tcp, 0.0.0.0:8443->443/tcp docker_app_1
fe0e95ee2373 jc21/mariadb-aria:10.4 "/scripts/run.sh" 28 minutes ago Restarting (1) 23 seconds ago docker_db_1
xxx@yyyy:/etc/docker $ docker logs fe0e95ee2373
standard_init_linux.go:211: exec user process caused "exec format error"
standard_init_linux.go:211: exec user process caused "exec format error"
standard_init_linux.go:211: exec user process caused "exec format error"
...
xxx@yyyy:/etc/docker $ docker logs 5f39e350d499
[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.
❯ Enabling IPV6 in hosts: /etc/nginx/conf.d
❯ /etc/nginx/conf.d/default.conf
❯ /etc/nginx/conf.d/production.conf
❯ /etc/nginx/conf.d/include/letsencrypt-acme-challenge.conf
❯ /etc/nginx/conf.d/include/ssl-ciphers.conf
❯ /etc/nginx/conf.d/include/assets.conf
❯ /etc/nginx/conf.d/include/force-ssl.conf
❯ /etc/nginx/conf.d/include/block-exploits.conf
❯ /etc/nginx/conf.d/include/ip_ranges.conf
❯ /etc/nginx/conf.d/include/proxy.conf
❯ /etc/nginx/conf.d/include/resolvers.conf
❯ Enabling IPV6 in hosts: /data/nginx
[6/11/2020] [11:34:06 AM] [Global ] › ✖ error connect ECONNREFUSED 172.22.0.2:3306
[6/11/2020] [11:34:07 AM] [Global ] › ✖ error getaddrinfo ENOTFOUND db
[6/11/2020] [11:34:15 AM] [Global ] › ✖ error connect ECONNREFUSED 172.22.0.2:3306
[6/11/2020] [11:34:16 AM] [Global ] › ✖ error getaddrinfo ENOTFOUND db
[6/11/2020] [11:34:17 AM] [Global ] › ✖ error getaddrinfo ENOTFOUND db
[6/11/2020] [11:34:18 AM] [Global ] › ✖ error getaddrinfo ENOTFOUND db
[6/11/2020] [11:34:19 AM] [Global ] › ✖ error getaddrinfo ENOTFOUND db
[6/11/2020] [11:34:20 AM] [Global ] › ✖ error getaddrinfo ENOTFOUND db
[6/11/2020] [11:34:21 AM] [Global ] › ✖ error getaddrinfo ENOTFOUND db
[6/11/2020] [11:34:24 AM] [Global ] › ✖ error connect ECONNREFUSED 172.22.0.2:3306
[6/11/2020] [11:34:25 AM] [Global ] › ✖ error getaddrinfo ENOTFOUND db
[6/11/2020] [11:34:26 AM] [Global ] › ✖ error getaddrinfo ENOTFOUND db
...
@JDomotics commented on GitHub (Jun 12, 2020):
I'm trying to setup the nginx proxy manager on a raspberry pi 3B+.
The other issue discussions solved the problems I had during the load of the container in docker.
Now the "docker-compose up -d" command does not report any errors on the prompt.
But in the login page of nginx proxy manager I always get "bad gateway" as result of any login attempt. I've been searching in the other issues to find a way to solve this.
The logfile reports connection errors with the db it seems.
I really need some help, I don't grasp fully the concept of docker. So I've no clue where to start the troubleshooting.
@mcbeav commented on GitHub (Jun 13, 2020):
Have the same exact issue running Docker on macOS High Sierra 10.13.6. I also am new to Docker, but I have been working on it for a few days. I'll post back if I can figure out how to get things working.
@groundglass commented on GitHub (Jun 13, 2020):
I believe the problem you are having is with your choice of the db. Please check but I think the official mariadb and jc21/mariadb-aria:10.4 only support x86 and arm64 not the RPi arm v7.
Try: yobasystems/alpine-mariadb:latest
My docker-compose.yml
@mcbeav commented on GitHub (Jun 13, 2020):
I appreciate the help, at least in my case this did not help. When attempting to use MariaDB I get an error about unknown engine InnoDB, so I tried changing the image to use msql/mysql-server and everything builds fine, but I still get the bad gateway message when attempting to log in
@evan-swinney commented on GitHub (Jun 14, 2020):
Issue #333 sounds like the same problem as this. Can you verify that issue #333 is similar/same as the problem you're having?
@JDomotics commented on GitHub (Jun 14, 2020):
Thanks to all for these hints, they gave me more insight on how docker containers are installed/configured from the commandline.
I've found a workable solution by forcing the database container to the right hardware infrastructure: armV7 (tag: "armhf")
With the tag: "latest" the database app was installed for the armv8 family (64 bit)
the docker-compose.yml file:
version: "3"
services:
app:
image: jc21/nginx-proxy-manager:2
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:
- ./config.json:/app/config/production.json
- ./data:/data
- ./letsencrypt:/etc/letsencrypt
depends_on:
- db
db:
image: yobasystems/alpine-mariadb:armhf
restart: always
environment:
MYSQL_ROOT_PASSWORD: 'npm'
MYSQL_DATABASE: 'npm'
MYSQL_USER: 'npm'
MYSQL_PASSWORD: 'npm'
volumes:
- ./data/mysql:/var/lib/mysql
@sebabordon commented on GitHub (Jul 1, 2020):
having the same issue here but without docker compose, "bad gateway" at login. In my case is a standard container pointing to another mariadb 10.4