docksal: [Wordpress] cURL error 28: Resolving timed out after XXXX milliseconds

Occasionally I get the following error in Wordpress Backend.

Description

Problem/feature description…

Steps to reproduce the issue:

  1. fin project create
  2. yolo
  3. 3 [Wordpress]
  4. yolo.docksal/wp-admin (admin:admin)
  5. Look at “Wordpress Events and News” Metabox http://imgur.com/a/L2zcg

I also got this with my own Wordpress Setup. It fails at wp-includes/update.php:323

Describe the results you received:

WP_Error Object ( [errors] => Array ( [http_request_failed] => Array ( [0] => cURL error 28: Resolving timed out after 4513 milliseconds ) ) [error_data] => Array ( ) )

Output of fin config:

fin config output
WARNING: No swap limit support
---------------------
COMPOSE_PROJECT_NAME_SAFE: wordpress
COMPOSE_FILE:
/home/mj/.docksal/stacks/volumes-bind.yml
/home/mj/.docksal/stacks/stack-default.yml
ENV_FILE:
/home/mj/projects/wordpress/.docksal/docksal.env

PROJECT_ROOT: /home/mj/projects/wordpress
DOCROOT: docroot
VIRTUAL_HOST: wordpress.docksal
VIRTUAL_HOST_ALIASES: *.wordpress.docksal
IP: 192.168.64.100
MYSQL: 192.168.64.100:32815

Docker Compose configuration
---------------------
services:
  cli:
    dns:
    - 192.168.64.100
    - 8.8.8.8
    environment:
      HOST_GID: '1000'
      HOST_UID: '1000'
      XDEBUG_ENABLED: '0'
    hostname: cli
    image: docksal/cli:1.3-php7
    volumes:
    - docksal_ssh_agent:/.ssh-agent:ro
    - project_root:/var/www:rw,nocopy
  db:
    dns:
    - 192.168.64.100
    - 8.8.8.8
    environment:
      MYSQL_DATABASE: default
      MYSQL_PASSWORD: user
      MYSQL_ROOT_PASSWORD: root
      MYSQL_USER: user
    hostname: db
    image: docksal/db:1.1-mysql-5.6
    ports:
    - 03306/tcp
    volumes:
    - project_root:/var/www:ro,nocopy
  web:
    depends_on:
      cli:
        condition: service_started
    dns:
    - 192.168.64.100
    - 8.8.8.8
    environment:
      APACHE_BASIC_AUTH_PASS: null
      APACHE_BASIC_AUTH_USER: null
      APACHE_DOCUMENTROOT: /var/www/docroot
    hostname: web
    image: docksal/web:2.0-apache2.4
    labels:
      io.docksal.project-root: /home/mj/projects/wordpress
      io.docksal.virtual-host: wordpress.docksal,*.wordpress.docksal
    volumes:
    - project_root:/var/www:ro,nocopy
version: '2.1'
volumes:
  docksal_ssh_agent:
    external: true
  project_root:
    driver: local
    driver_opts:
      device: /home/mj/projects/wordpress
      o: bind
      type: none

Output of fin sysinfo:

fin sysinfo output
WARNING: No swap limit support
███  OS & BASICS
Linux mjdev17 4.4.0-87-generic #110-Ubuntu SMP Tue Jul 18 12:55:35 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
Ubuntu 16.04
fin version: 1.22.0
Mode:  Native / Docker for Mac/Windows
███  DOCKER
DOCKER_HOST:

Docker: Client:
Version:      17.06.0-ce
API version:  1.30
Go version:   go1.8.3
Git commit:   02c1d87
Built:        Fri Jun 23 21:23:31 2017
OS/Arch:      linux/amd64

Server:
Version:      17.06.0-ce
API version:  1.30 (minimum version 1.12)
Go version:   go1.8.3
Git commit:   02c1d87
Built:        Fri Jun 23 21:19:04 2017
OS/Arch:      linux/amd64
Experimental: false
███  DOCKER COMPOSE
Docker Compose: docker-compose version 1.14.0, build c7bdf9e
docker-py version: 2.3.0
CPython version: 2.7.13
OpenSSL version: OpenSSL 1.0.1t  3 May 2016
WARNING: No swap limit support
███  DOCKER: IMAGES
REPOSITORY            TAG                 IMAGE ID            CREATED             SIZE
docksal/web           2.0-apache2.4       7f75db9a6aa7        2 days ago          87.5MB
docksal/vhost-proxy   1.1                 898fb21e7f2d        8 days ago          158MB
docksal/cli           1.3-php7            1442dc481915        2 weeks ago         752MB
docksal/db            1.1-mysql-5.6       6feb79af9597        2 weeks ago         298MB
docksal/dns           1.0                 20c7a535479d        6 months ago        61.6MB
docksal/ssh-agent     1.0                 148220cc033d        6 months ago        12.2MB
███  DOCKER: CONTAINERS
CONTAINER ID        IMAGE                       COMMAND                  CREATED             STATUS                    PORTS                                               NAMES
496d0e69fe7b        docksal/vhost-proxy:1.1     "docker-entrypoint..."   19 minutes ago      Up 19 minutes             0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp            docksal-vhost-proxy
86a3e4c6ee45        docksal/web:2.0-apache2.4   "httpd-foreground"       20 minutes ago      Up 20 minutes             80/tcp, 443/tcp                                     wordpress_web_1
e1e095b53a9c        docksal/cli:1.3-php7        "/opt/startup.sh s..."   20 minutes ago      Up 20 minutes (healthy)   22/tcp, 9000/tcp                                    wordpress_cli_1
a562b32cc96d        docksal/db:1.1-mysql-5.6    "/entrypoint.sh my..."   20 minutes ago      Up 20 minutes             0.0.0.0:32815->3306/tcp                             wordpress_db_1
fac882a97ddd        docksal/web:2.0-apache2.4   "httpd-foreground"       23 minutes ago      Up 23 minutes             80/tcp, 443/tcp                                     wpstack4_web_1
7bbe6de1eeab        docksal/cli:1.3-php7        "/opt/startup.sh s..."   23 minutes ago      Up 23 minutes (healthy)   22/tcp, 9000/tcp                                    wpstack4_cli_1
92e65f18915d        docksal/db:1.1-mysql-5.6    "/entrypoint.sh my..."   23 minutes ago      Up 23 minutes             0.0.0.0:32814->3306/tcp                             wpstack4_db_1
1de500c247f6        docksal/web:2.0-apache2.4   "httpd-foreground"       45 minutes ago      Up 45 minutes             80/tcp, 443/tcp                                     wpstack3_web_1
d9e4622b68e2        docksal/cli:1.3-php7        "/opt/startup.sh s..."   45 minutes ago      Up 45 minutes (healthy)   22/tcp, 9000/tcp                                    wpstack3_cli_1
9afd5043d8d9        docksal/db:1.1-mysql-5.6    "/entrypoint.sh my..."   45 minutes ago      Up 45 minutes             0.0.0.0:32813->3306/tcp                             wpstack3_db_1
246bf2f2455e        docksal/web:2.0-apache2.4   "httpd-foreground"       4 hours ago         Up 4 hours                80/tcp, 443/tcp, 0.0.0.0:3000-3001->3000-3001/tcp   wpstack2_web_1
d1f40a21e511        docksal/cli:1.3-php7        "/opt/startup.sh s..."   4 hours ago         Up 4 hours (healthy)      22/tcp, 9000/tcp                                    wpstack2_cli_1
00a1fa69c298        docksal/db:1.1-mysql-5.6    "/entrypoint.sh my..."   4 hours ago         Up 4 hours                0.0.0.0:32804->3306/tcp                             wpstack2_db_1
5717a412d8ec        docksal/web:2.0-apache2.4   "httpd-foreground"       23 hours ago        Up 23 hours               80/tcp, 443/tcp                                     test2_web_1
8d8e2f6a2a53        docksal/cli:1.3-php7        "/opt/startup.sh s..."   23 hours ago        Up 23 hours (healthy)     22/tcp, 9000/tcp                                    test2_cli_1
1ef341f121c1        docksal/db:1.1-mysql-5.6    "/entrypoint.sh my..."   23 hours ago        Up 23 hours               0.0.0.0:32795->3306/tcp                             test2_db_1
554b9b365b97        docksal/web:2.0-apache2.4   "httpd-foreground"       24 hours ago        Up 24 hours               80/tcp, 443/tcp                                     test_web_1
6408acaeb8ab        docksal/cli:1.3-php7        "/opt/startup.sh s..."   24 hours ago        Up 24 hours (healthy)     22/tcp, 9000/tcp                                    test_cli_1
6750bcf92cff        docksal/db:1.1-mysql-5.6    "/entrypoint.sh my..."   24 hours ago        Up 24 hours               0.0.0.0:32794->3306/tcp                             test_db_1
8ba4bea70b99        docksal/ssh-agent:1.0       "/run.sh ssh-agent"      24 hours ago        Up 24 hours                                                                   docksal-ssh-agent
5913180f4fbe        docksal/dns:1.0             "/opt/entrypoint.s..."   24 hours ago        Up 24 hours               192.168.64.100:53->53/udp                           docksal-dns

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 15 (8 by maintainers)

Most upvoted comments

Found workaround which fixes this problem:

in ./<project_directory>/.docksal/docksal.yml add following two lines for each container (cli, web, db):

extra_hosts: - "api.wordpress.org:198.143.164.251"

then restart (fin stop; fin start).

What this does, is adding static host record in /etc/hosts for each container. Issue can be closed.

@regenrek I experienced similar problem with Docker, but for a different application. In my case the problem was IP resolution over IPv6 network.

To see if you are having the same issue, try to set the following cURL option: curl_setopt($curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);

If it makes the timeout error go away, it means that you have IPv6 configured for Docker, but the host running your containers cannot reach the Internet over IPv6. In that case you can either make Internet connection accessible over IPv6 or disable it for Docker. To do the latter, make sure that dockerd is not started with --ipv6 or --fixed-cidr-v6 flags. Secondly disable IPv6 for the host network interface used by docker. For example if you have docker0, disable it like sudo sysctl -w sysctl net.ipv6.conf.docker0.disable_ipv6=1.

I hope this helps.