Skip to content

500 Internal Server Error #2302

@backupandforkacc

Description

@backupandforkacc

I moved some docker container to another system recently. Everyhing worked on the old machine. Started the containers on the new machine, but got:

500 Internal Server Error
grafik

Here is how I started the testserver:

docker run -d \
    --name testserver \
    --network nextcloudpi \
    -p 8086:8080 \
    -v /etc/timezone:/etc/timezone:ro \
    -v /etc/localtime:/etc/localtime:ro \
    -e 'LETSENCRYPT_EMAIL=letsencrypt@regenpost.de' \
    -e 'LETSENCRYPT_HOST=test.bardhome.de, test.bardhome.eu' \
    -e 'VIRTUAL_HOST=test.bardhome.de, test.bardhome.eu' \
    nginxdemos/nginx-hello

and nginx-proxy:

docker run --detach \
    --name nginx-proxy \
    --publish 80:80 \
    --publish 443:443 \
    --volume /docker/volumes/letsencrypt:/etc/nginx/certs \
    --volume vhost:/etc/nginx/vhost.d \
    --volume html:/usr/share/nginx/html \
    --volume /var/run/docker.sock:/tmp/docker.sock:ro \
    -v /etc/timezone:/etc/timezone:ro \
    -v /etc/localtime:/etc/localtime:ro \
    --network=nextcloudpi \
    nginxproxy/nginx-proxy

also started nginx-proxy-companion:

docker run --detach \
    --name nginx-proxy-acme \
    --volumes-from nginx-proxy \
    --volume /var/run/docker.sock:/var/run/docker.sock:ro \
    --volume acme:/etc/acme.sh \
    -v /etc/timezone:/etc/timezone:ro \
    -v /etc/localtime:/etc/localtime:ro  \
    --network=nextcloudpi \
    --env "DEFAULT_EMAIL=letsencrypt@regenpost.de" \
    nginxproxy/acme-companion

This is the logs when I try to open the site:

nginx.1     | test.bardhome.de 79.244.34.207 - - [17/Sep/2023:20:01:38 +0200] "GET / HTTP/2.0" 500 177 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/117.0" "-"
nginx.1     | test.bardhome.de 79.244.34.207 - - [17/Sep/2023:20:01:58 +0200] "GET / HTTP/2.0" 500 177 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/117.0" "-"
nginx.1     | 2023/09/17 20:07:46 [error] 36#36: *5607 connect() failed (111: Connection refused) while connecting to upstream, client: 150.129.59.5, server: test.bardhome.de, request: "GET / HTTP/1.1", upstream: "http://172.18.0.8:80/", host: "test.bardhome.de"
nginx.1     | test.bardhome.de 150.129.59.5 - - [17/Sep/2023:20:07:46 +0200] "GET / HTTP/1.1" 502 559 "-" "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36" "172.18.0.8:80"
nginx.1     | 2023/09/17 20:07:56 [error] 36#36: *5609 connect() failed (111: Connection refused) while connecting to upstream, client: 31.186.166.197, server: test.bardhome.de, request: "GET / HTTP/1.1", upstream: "http://172.18.0.8:80/", host: "test.bardhome.de"
nginx.1     | test.bardhome.de 31.186.166.197 - - [17/Sep/2023:20:07:56 +0200] "GET / HTTP/1.1" 502 559 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36" "172.18.0.8:80"
nginx.1     | 2023/09/17 20:07:56 [error] 36#36: *5611 connect() failed (111: Connection refused) while connecting to upstream, client: 195.5.55.36, server: test.bardhome.de, request: "GET / HTTP/1.1", upstream: "http://172.18.0.8:80/", host: "test.bardhome.de"
nginx.1     | test.bardhome.de 195.5.55.36 - - [17/Sep/2023:20:07:56 +0200] "GET / HTTP/1.1" 502 559 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36" "172.18.0.8:80"
nginx.1     | 79.244.34.207 34.219.62.144 - - [17/Sep/2023:20:07:59 +0200] "GET / HTTP/1.1" 503 190 "-" "AHC/2.1" "-"
nginx.1     | 2023/09/17 20:07:59 [error] 36#36: *5614 connect() failed (111: Connection refused) while connecting to upstream, client: 35.91.128.185, server: test.bardhome.de, request: "GET / HTTP/1.1", upstream: "http://172.18.0.8:80/", host: "test.bardhome.de"
nginx.1     | test.bardhome.de 35.91.128.185 - - [17/Sep/2023:20:07:59 +0200] "GET / HTTP/1.1" 502 157 "-" "AHC/2.1" "172.18.0.8:80"

Edit: Strange, no I do not get an error in the logs, but still the same message 500 - internal server error:

nginx.1     | bardhome.de 79.244.34.207 - - [17/Sep/2023:21:13:31 +0200] "GET /index.php/login?user=simon&direct=1 HTTP/2.0" 500 177 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/117.0" "-"
nginx.1     | bardhome.de 79.244.34.207 - - [17/Sep/2023:21:13:31 +0200] "GET /favicon.ico HTTP/2.0" 500 177 "https://bardhome.de/index.php/login?user=simon&direct=1" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/117.0" "-"
nginx.1     | bardhome.de 79.244.34.207 - - [17/Sep/2023:21:13:39 +0200] "GET /index.php/login?user=simon&direct=1 HTTP/2.0" 500 177 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/117.0" "-"
nginx.1     | bardhome.de 79.244.34.207 - - [17/Sep/2023:21:13:39 +0200] "GET /favicon.ico HTTP/2.0" 500 177 "https://bardhome.de/index.php/login?user=simon&direct=1" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/117.0" "-"
nginx.1     | bardhome.de 79.244.34.207 - - [17/Sep/2023:21:13:51 +0200] "GET /index.php/login?user=simon&direct=1 HTTP/1.1" 200 6330 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/117.0" "172.18.0.5:80"
nginx.1     | bardhome.de 79.244.34.207 - - [17/Sep/2023:21:13:51 +0200] "GET /core/css/server.css?v=b37b8fe6-1 HTTP/1.1" 499 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/117.0" "172.18.0.5:80"
nginx.1     | bardhome.de 79.244.34.207 - - [17/Sep/2023:21:13:54 +0200] "GET /index.php/apps/theming/image/logo?v=1 HTTP/1.1" 404 18305 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/117.0" "172.18.0.5:80"
nginx.1     | test.bardhome.de 79.244.34.207 - - [17/Sep/2023:21:14:11 +0200] "GET / HTTP/2.0" 500 177 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/117.0" "-"

Version of nginx-proxy:
nginxproxy/nginx-proxy latest b3fe70959a81 6 days ago 203MB

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions