acedanger

acedanger / docker debugging statements

Last active 21 hours ago

Like 0

acedanger revised this gist 21 hours ago · f9863e6

1 file changed

docker debugging renamed to docker debugging commands

File renamed without changes

acedanger revised this gist 21 hours ago · dee913b

1 file changed, 24 insertions

Additional debugging (file created)
@@ -0,0 +1,24 @@
1 + TL;DR: A 502 Bad Gateway from Pangolin means the proxy can reach the network boundary, but nothing is successfully answering on the target IP and port. Hugo is either crashing on startup, failing to bind properly due to permissions or missing files, or Pangolin is pointed at the wrong internal port (e.g., expecting 80 instead of 1313).
2 + Here is how you dig into this crawl and squash the bug:
3 + * Check the Container Runtime Status & Logs:
4 + * Run docker ps -a --filter name=blog to verify the container is actually Up and not stuck in a restart loop.
5 + * Inspect the container logs:
6 + docker logs blog --tail 50
7 +
8 + * Watch out for: Hugo building errors, missing themes, or permissions errors (especially since you forced user: "1000:1000" over the bind-mounted /src).
9 + * Verify Pangolin's Target Port:
10 + * Hugo is serving on port 1313, but most reverse proxy site definitions default to 80.
11 + * Check your Pangolin resource config or dashboard for word.ptrwd.com.
12 + * Ensure the upstream destination is explicitly set to http://blog:1313 (or the container's IP on port 1313), not http://blog:80.
13 + * Test Network Reachability from Inside the Network:
14 + * Spawn a temporary curl container on the pangolin network to see if the webserver actually responds to HTTP requests:
15 + docker run --rm --network pangolin curlimages/curl -Iv http://blog:1313
16 +
17 + * If curl returns Connection refused, Hugo is not listening on 0.0.0.0:1313.
18 + * If it resolves and returns HTTP/2 200 or HTTP/1.1 200, the issue lies strictly inside Pangolin's upstream routing or SSL offloading rules.
19 + * Check Pangolin Reverse Proxy Logs:
20 + * Check the logs of your Pangolin container to see what IP and port it is attempting to hit when throwing the 502:
21 + docker logs <pangolin_container_name> --tail 50
22 +
23 + * Look for connection timeouts, DNS resolution failures for blog, or connection resets.
24 +

acedanger revised this gist 21 hours ago · b1b560f

1 file changed, 3 insertions

docker debugging
@@ -8,3 +8,6 @@ systemctl start docker
8 8 docker ps -a # see what just came up
9 9 docker stop $(docker ps -q) # stop everything immediately
10 10 docker update --restart=no $(docker ps -aq) # clear the restart policy on all containers
11 +
12 + # run a curl image connected to the pangolin network and attempt to connect using the same host:port nomenclature as the resource settings in pangolin
13 + docker run --rm --network pangolin curlimages/curl -Iv http://blog:1313

acedanger revised this gist 1 day ago · 9e27495

1 file changed, 1 insertion, 2 deletions

docker debugging
@@ -3,9 +3,8 @@ sudo systemctl enable --now docker
3 3 docker compose -f /home/acedanger/docker/pangolin/docker-compose.yml up -d pangolin gerbil
4 4
5 5 # Fastest fix: strip restart policies before testing
6 - ```bash
6 +
7 7 systemctl start docker
8 8 docker ps -a # see what just came up
9 9 docker stop $(docker ps -q) # stop everything immediately
10 10 docker update --restart=no $(docker ps -aq) # clear the restart policy on all containers
11 - ```

acedanger revised this gist 1 day ago · 25ce87c

1 file changed, 3 insertions, 1 deletion

docker debugging
@@ -1,9 +1,11 @@
1 +
1 2 sudo systemctl enable --now docker
2 3 docker compose -f /home/acedanger/docker/pangolin/docker-compose.yml up -d pangolin gerbil
3 4
4 5 # Fastest fix: strip restart policies before testing
6 + ```bash
5 7 systemctl start docker
6 8 docker ps -a # see what just came up
7 9 docker stop $(docker ps -q) # stop everything immediately
8 10 docker update --restart=no $(docker ps -aq) # clear the restart policy on all containers
9 -
11 + ```

acedanger revised this gist 1 day ago · 13e06a8

1 file changed, 9 insertions

docker debugging (file created)
@@ -0,0 +1,9 @@
1 + sudo systemctl enable --now docker
2 + docker compose -f /home/acedanger/docker/pangolin/docker-compose.yml up -d pangolin gerbil
3 +
4 + # Fastest fix: strip restart policies before testing
5 + systemctl start docker
6 + docker ps -a # see what just came up
7 + docker stop $(docker ps -q) # stop everything immediately
8 + docker update --restart=no $(docker ps -aq) # clear the restart policy on all containers
9 +