Kürzlich habe ich meinen Dell-Server von einem Standort an einen anderen verlegt. Sein Haupt-Betriebssystem/VM-Manager ist Proxmox VE 5.3. Ich habe eine Nginx-VM, die als Reverse-Proxy für mehrere andere VMs fungiert, darunter eine Discourse-VM.
Nach der Konfiguration meines neuen Routers konnte ich mehrere meiner VMs mit dem Internet verbinden (ohne dass die SSL-Zertifikate erneuert werden mussten). Bei Discourse erhalte ich jedoch beim Versuch, über einen Browser auf Discourse zuzugreifen, die Fehlermeldung 502 Bad Gateway - nginx/1.14.0 (Ubuntu).
Ich habe diesen Fehler bereits zuvor erhalten, aber normalerweise wird er durch eine der folgenden Methoden behoben:
Discourse-VM neu starten
Immer noch 502 Bad Gateway - nginx/1.14.0 (Ubuntu) im Browser.
Browser-Cookies löschen und andere Browser ausprobieren
Nur um sicherzugehen, dass es nicht an mir liegt … nein. Gleicher 502 Bad Gateway - nginx/1.14.0 (Ubuntu)-Fehler in verschiedenen Browsern.
Discourse-Bereinigung und Überprüfung des Festplattenspeichers
Bei der ersten Bereinigung wurden etwa 4 GB Daten entfernt. Das hat mich sehr überrascht. Vielleicht war das der Auslöser des Problems? Wie auch immer, wenn ich jetzt versuche, Discourse zu bereinigen:
> root@forum:/var/discourse# ./launcher cleanup
> WARNING! This will remove all stopped containers.
> Are you sure you want to continue? [y/N] y
> Total reclaimed space: 0B
> WARNING! This will remove all images without at least one container associated to them.
> Are you sure you want to continue? [y/N] y
> Total reclaimed space: 0B
Ich möchte auch betonen, dass mir nicht der Festplattenspeicher ausgeht:
Git Pull
Es ist auf dem neuesten Stand.
> root@forum:/var/discourse# git pull
> Already up to date.
Discourse neu starten
Hier habe ich zwei Fehler entdeckt, die ich erhalte:
> root@forum:/var/discourse# ./launcher restart app
>
> WARNING: We are about to start downloading the Discourse base image
> This process may take anywhere between a few minutes to an hour, depending on your network speed
>
> Please be patient
>
> Unable to find image 'discourse/base:2.0.20191013-2320' locally
> /usr/bin/docker: Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers).
> See '/usr/bin/docker run --help'.
> Your Docker installation is not working correctly
>
> See: `https://meta.discourse.org/t/docker-error-on-bootstrap/13657/18?u=sam`
Ich habe den vorgeschlagenen Link geprüft. Dort wird ein Git Pull und ein Neubau von Discourse empfohlen (dazu sehen Sie später unten, was ich erhalte). Es wird auch vorgeschlagen, einen Docker-“Hello World”-Befehl auszuführen. Das funktioniert (obwohl es einige Probleme zu geben scheint?):
> root@forum:/var/discourse# docker run -it --rm hello-world
> Unable to find image 'hello-world:latest' locally
> latest: Pulling from library/hello-world
> 1b930d010525: Pull complete
> Digest: sha256:c3b4ada4687bbaa170745b3e4dd8ac3f194ca95b2d0518b417fb47e5879d9b5f
> Status: Downloaded newer image for hello-world:latest
>
> Hello from Docker!
> This message shows that your installation appears to be working correctly.
>
> To generate this message, Docker took the following steps:
> 1. The Docker client contacted the Docker daemon.
> 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
> (amd64)
> 3. The Docker daemon created a new container from that image which runs the
> executable that produces the output you are currently reading.
> 4. The Docker daemon streamed that output to the Docker client, which sent it
> to your terminal.
>
> To try something more ambitious, you can run an Ubuntu container with:
> $ docker run -it ubuntu bash
>
> Share images, automate workflows, and more with a free Docker ID:
> https://hub.docker.com/
>
> For more examples and ideas, visit:
> https://docs.docker.com/get-started/
>
> failed to resize tty, using default size
Nun habe ich den Ubuntu Bash-Versuch gemacht … und Fehler:
> root@forum:/var/discourse# docker run -it ubuntu bash
> Unable to find image 'ubuntu:latest' locally
> docker: Error response from daemon: Get https://registry-1.docker.io/v2/library/ubuntu/manifests/latest: Get https://auth.docker.io/token?scope=repository%3Alibrary%2Fubuntu%3Apull&service=registry.docker.io: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers).
> See 'docker run --help'.
Zeit, zu anderen mir bekannten Methoden überzugehen:
Discourse anhalten und starten
Ich erhalte dasselbe wie beim Neustart:
> root@forum:/var/discourse# ./launcher stop app
>
> WARNING: We are about to start downloading the Discourse base image
> This process may take anywhere between a few minutes to an hour, depending on your network speed
>
> Please be patient
>
> Unable to find image 'discourse/base:2.0.20191013-2320' locally
> /usr/bin/docker: Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers).
> See '/usr/bin/docker run --help'.
> Your Docker installation is not working correctly
>
> See: `https://meta.discourse.org/t/docker-error-on-bootstrap/13657/18?u=sam`
>
> root@forum:/var/discourse# ./launcher start app
>
> WARNING: We are about to start downloading the Discourse base image
> This process may take anywhere between a few minutes to an hour, depending on your network speed
>
> Please be patient
>
> Unable to find image 'discourse/base:2.0.20191013-2320' locally
> /usr/bin/docker: Error response from daemon: Get https://registry-1.docker.io/v2/discourse/base/manifests/2.0.20191013-2320: Get https://auth.docker.io/token?scope=repository%3Adiscourse%2Fbase%3Apull&service=registry.docker.io: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers).
> See '/usr/bin/docker run --help'.
> Your Docker installation is not working correctly
>
> See: `https://meta.discourse.org/t/docker-error-on-bootstrap/13657/18?u=sam`
Discourse neu aufbauen
Und wieder erhalte ich dieselben beiden Fehler.
> root@forum:/var/discourse# ./launcher rebuild app
>
> WARNING: We are about to start downloading the Discourse base image
> This process may take anywhere between a few minutes to an hour, depending on your network speed
>
> Please be patient
>
> Unable to find image 'discourse/base:2.0.20191013-2320' locally
> /usr/bin/docker: Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers).
> See '/usr/bin/docker run --help'.
> Your Docker installation is not working correctly
>
> See: https://meta.discourse.org/t/docker-error-on-bootstrap/13657/18?u=sam
Wiederherstellung aus einem früheren Backup
Ich habe einen Snapshot von einem Zeitpunkt vor dem Umzug des Servers und der Bereinigung (die, wie erwähnt, etwa 4 GB Dateien entfernt hat). Ich habe alle oben genannten Schritte erneut versucht … und es passiert dasselbe (abgesehen von der Bereinigung), sowie der 502 Bad Gateway - nginx/1.14.0 (Ubuntu)-Fehler im Browser. Vielleicht hat dies also nichts mit der Bereinigung zu tun?
In all meiner Zeit mit Discourse bin ich noch nie auf einen dieser beiden Fehler gestoßen. Haben Sie Vorschläge, wie ich diese Fehler beheben und Discourse wieder im Browser zum Laufen bringen kann?
