Skip to content

Wordpress-Container start, but no connection to Website #942

Closed

Description

@phillipunzen

Hello everyone,
I run my WordPress websites within a Kubernetes cluster. And unfortunately I have a problem with the latest wordpress:latest image that I can't connect to the website.

I just don't get a response on port 80. If I then switch to the container's shell and enter curl http://127.0.0.1:80, the query hangs and doesn't get a response. I then have to cancel it with CTRL + C.

To test whether this is perhaps a Kubernetes cluster problem, I did the same on my Docker server. A new installation with the latest tag cannot be opened either.

The ports are open, there is just no response. Maybe the following will help:

# netstat -tunlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp6 0 0 :::80 :::* LISTEN 1/apache2
# curl http://127.0.0.1:80
^C

The liveness and readiness probes also logically fail. It seems that the web server is not delivering any data or is not responding. But it is sufficient to keep the port open.

Activity

  1. yosifkit commented on Feb 24, 2025

    @yosifkit
    Member

    I am unable to reproduce the issue. I ran wordpress:latest in one terminal and tested from another.

    $ docker run -it --rm --name wordy wordpress:latest
    Unable to find image 'wordpress:latest' locally
    latest: Pulling from library/wordpress
    63eaf96fd2ee: Pull complete
    beeeb2e72514: Pull complete
    b7fd27be5b20: Pull complete
    8ca47539e139: Pull complete
    c6834909cd19: Pull complete
    e2a530cb2e77: Pull complete
    4f4fb700ef54: Pull complete
    814b6ecb84b0: Pull complete
    ea823f46cc3c: Pull complete
    ed50d9a76bab: Pull complete
    a4e58aa84c36: Pull complete
    bcbecb454049: Pull complete
    f473bcbd0e44: Pull complete
    1475f50d3e62: Pull complete
    08dc3bd6914b: Pull complete
    68d70c2b9fc9: Pull complete
    5ac3fe5e5e7e: Pull complete
    b545bb7ff18e: Pull complete
    5c36aa47b3f5: Pull complete
    b9903ecbcf0b: Pull complete
    d8b79b64a9d5: Pull complete
    Digest: sha256:0211348df9f5e29a32cb6a65ec5aff2c2e775670fdb054ab98f7833eb539234a
    Status: Downloaded newer image for wordpress:latest
    WordPress not found in /var/www/html - copying now...
    Complete! WordPress has been successfully copied to /var/www/html
    AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message
    AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message
    [Mon Feb 24 17:54:06.988521 2025] [mpm_prefork:notice] [pid 1:tid 1] AH00163: Apache/2.4.62 (Debian) PHP/8.2.27 configured -- resuming normal operations
    [Mon Feb 24 17:54:06.988756 2025] [core:notice] [pid 1:tid 1] AH00094: Command line: 'apache2 -D FOREGROUND'
    172.17.0.1 - - [24/Feb/2025:17:54:42 +0000] "GET / HTTP/1.1" 302 231 "-" "curl/7.88.1"
    172.17.0.1 - - [24/Feb/2025:17:55:00 +0000] "GET / HTTP/1.1" 302 231 "-" "curl/7.88.1"
    172.17.0.1 - - [24/Feb/2025:17:55:00 +0000] "GET /wp-admin/setup-config.php HTTP/1.1" 200 13470 "-" "curl/7.88.1"
    127.0.0.1 - - [24/Feb/2025:17:55:47 +0000] "GET / HTTP/1.1" 302 230 "-" "curl/7.88.1"
    127.0.0.1 - - [24/Feb/2025:17:55:47 +0000] "GET /wp-admin/setup-config.php HTTP/1.1" 200 13462 "-" "curl/7.88.1"
    ^C[Mon Feb 24 17:56:20.458055 2025] [mpm_prefork:notice] [pid 1:tid 1] AH00169: caught SIGTERM, shutting down

    And in the second terminal:

    $ docker container inspect --format '{{ .NetworkSettings.IPAddress }}' wordy
    172.17.0.2
    $ curl 'http://172.17.0.2'
    $ # returned instantly, (oh, from the apache logs, that was a 302 redirect, so I need `-L` for my curl)
    $ curl -fL 'http://172.17.0.2'
    <!DOCTYPE html>
    ...
    $ docker exec -it wordy bash
    root@b33ee9f6f736:/var/www/html# curl -fL 'http://127.0.0.1'
    <!DOCTYPE html>
    ...
  2. phillipunzen commented on Feb 24, 2025

    @phillipunzen
    Author

    Strange, do you have any idea how I can solve the problem?

  3. locked and limited conversation to collaborators on Feb 24, 2025
  4. converted this issue into a discussion #943 on Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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