This server has no working Internet connection (nextcloud 15 docker nginx proxy)

Nextcloud version : 15.0.4
Operating system and version : Debian 9 (vhost Gandi)
Apache or nginx version : nginx 1.10.3
php version : 7.2.15
Install via docker-compose with wonderfall image (using redis, mariadb)

In Administration > Overview i get

This server has no working Internet connection: Multiple endpoints could not be reached. This means that some of the features like mounting external storage, notifications about updates or installation of third-party apps will not work. Accessing files remotely and sending of notification emails might not work, either. Establish a connection from this server to the Internet to enjoy all features.

I think it’s since nextcloud 15 update, but i’m not sure.

The output of my Nextcloud log in Admin > Logging:

[internet_connection_check] Error: GuzzleHttp\Exception\ConnectException: cURL error 6: Could not resolve host: www.nextcloud.com (see http://curl.haxx.se/libcurl/c/libcurl-errors.html) at <<closure>>

 0. /nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php line 149
    createRejection(GuzzleHttp\Handl ... l}, {errno: 6,error: ... 0})
 1. /nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php line 102
    finishError(GuzzleHttp\Handler\CurlHandler {}, GuzzleHttp\Handl ... l}, GuzzleHttp\Handler\CurlFactory {})
 2. /nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlHandler.php line 43
    finish(GuzzleHttp\Handler\CurlHandler {}, GuzzleHttp\Handl ... l}, GuzzleHttp\Handler\CurlFactory {})
 3. /nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/Proxy.php line 28
    __invoke("*** sensitive parameter replaced ***", "*** sensitive parameter replaced ***")
 4. /nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/Proxy.php line 51
    GuzzleHttp\Handler\{closure}("*** sensitive parameters replaced ***")
 5. /nextcloud/3rdparty/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php line 37
    GuzzleHttp\Handler\{closure}("*** sensitive parameters replaced ***")
 6. /nextcloud/3rdparty/guzzlehttp/guzzle/src/Middleware.php line 30
    __invoke("*** sensitive parameter replaced ***", "*** sensitive parameter replaced ***")
 7. /nextcloud/3rdparty/guzzlehttp/guzzle/src/RedirectMiddleware.php line 70
    GuzzleHttp\{closure}("*** sensitive parameters replaced ***")
 8. /nextcloud/3rdparty/guzzlehttp/guzzle/src/Middleware.php line 60
    __invoke("*** sensitive parameter replaced ***", "*** sensitive parameter replaced ***")
 9. /nextcloud/3rdparty/guzzlehttp/guzzle/src/HandlerStack.php line 67
    GuzzleHttp\{closure}("*** sensitive parameters replaced ***")
10. /nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php line 277
    __invoke("*** sensitive parameter replaced ***", "*** sensitive parameter replaced ***")
11. /nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php line 125
    transfer("*** sensitive parameter replaced ***", "*** sensitive parameter replaced ***")
12. /nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php line 131
    requestAsync("get", GuzzleHttp\Psr7\Uri {}, {verify: "/data/ ... }})
13. /nextcloud/lib/private/Http/Client/Client.php line 161
    request("get", "http://www.nextcloud.com/", {verify: "/data/ ... e})
14. /nextcloud/settings/Controller/CheckSetupController.php line 157
    get("http://www.nextcloud.com/")
15. /nextcloud/settings/Controller/CheckSetupController.php line 140
    isSiteReachable("www.nextcloud.com")
16. /nextcloud/settings/Controller/CheckSetupController.php line 656
    isInternetConnectionWorking()
17. /nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 166
    check()
18. /nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 99
    executeController(OC\Settings\Cont ... {}, "check")
19. /nextcloud/lib/private/AppFramework/App.php line 118
    dispatch(OC\Settings\Cont ... {}, "check")
20. /nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php line 47
    main("OC\\Settings\\C ... r", "check", OC\AppFramework\ ... {}, {_route: "settings.CheckSetup.check"})
21. <<closure>>
    __invoke({_route: "settings.CheckSetup.check"})
22. /nextcloud/lib/private/Route/Router.php line 297
    call_user_func(OC\AppFramework\ ... {}, {_route: "settings.CheckSetup.check"})
23. /nextcloud/lib/base.php line 987
    match("/settings/ajax/checksetup")
24. /nextcloud/index.php line 42
    handleRequest()

GET /settings/ajax/checksetup

The output of my config.php file in /path/to/nextcloud

/ # cat nextcloud/config/config.php 
<?php
$CONFIG = array (
  'datadirectory' => '/data',
  'apps_paths' => 
  array (
    0 => 
    array (
      'path' => '/nextcloud/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 => 
    array (
      'path' => '/apps2',
      'url' => '/apps2',
      'writable' => true,
    ),
  ),
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'redis' => 
  array (
    'host' => 'redisnext',
    'port' => 6379,
  ),
  'instanceid' => 'an_id',
  'mail_from_address' => 'contact',
  'logtimezone' => 'Etc/UTC',
  'logdateformat' => 'Y-m-d H:i:s',
  'passwordsalt' => 'a_salt',
  'secret' => 'a_secret',
  'trusted_domains' => 
  array (
    0 => 'nextcloud.mydomain.end',
    1 => 'othersoft.mydomain.end',
  ),
  'overwrite.cli.url' => 'https://nextcloud.mydomain.end',
  'dbtype' => 'mysql',
  'version' => '15.0.4.0',
  'dbname' => 'dbnext',
  'dbhost' => 'databasenext',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextclouduser',
  'dbpassword' => 'a_password',
  'installed' => true,
  'maintenance' => false,
  'mail_smtpmode' => 'smtp',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpsecure' => 'ssl',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'mail.mymail.net',
  'mail_domain' => 'mydomain.end',
  'mail_smtpname' => 'contact@mydomain.end',
  'mail_smtppassword' => 'a_password',
  'theme' => '',
  'loglevel' => 0,
  'user_backends' => 
  array (
    0 => 
    array (
      'class' => 'OC_User_IMAP',
      'arguments' => 
      array (
        0 => '{mail.mymail.net:143/imap}',
        1 => 'mydomain.end',
      ),
    ),
  ),
  'mail_smtpport' => '465',
  'trusted_proxies' => 
  array (
    0 => '172.19.0.1',
  ),
);

There is nothing in nginx log.
My vhost.conf for nginx"s sites-enabled is

upstream nextcloud {
 server 127.0.0.1:8888;
}

server {
   listen 80;
   server_name nextcloud.mydomain.end;
   location /.well-known {
            alias /var/www/nextcloud.mydomain.end/.well-known;
   }
   location / {
    rewrite ^/(.*)$  https://$host/$1 permanent;
  }
}

server {
 listen 443 ssl;
 server_name nextcloud.mydomain.end;
 proxy_read_timeout 720s;
 proxy_connect_timeout 720s;
 proxy_send_timeout 720s;

 # Add Headers for odoo proxy mode
 proxy_set_header X-Forwarded-Host $host;
 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
 proxy_set_header X-Forwarded-Proto $scheme;
 proxy_set_header X-Real-IP $remote_addr;
 
 # Upload limit and security
 client_max_body_size 10000m;
 server_tokens off;

 # SSL parameters
 ssl on;
 ssl_certificate /etc/letsencrypt/live/nextcloud.mydomain.end/fullchain.pem;
 ssl_certificate_key /etc/letsencrypt/live/nextcloud.mydomain.end/privkey.pem;
 ssl_session_timeout 30m;
 ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
 ssl_ciphers 'CIP-HERS';
 ssl_prefer_server_ciphers on;

 # log
 access_log /var/log/nginx/nextcloud.access.log;
 error_log /var/log/nginx/nextcloud.error.log;

 # Redirect requests to nextcloud backend server
 location / {
   proxy_redirect off;
   proxy_pass http://nextcloud;
 }
  rewrite ^/.well-known/webfinger /public.php?service=webfinger last;
  location /.well-known/carddav {
      return 301 $scheme://$host/remote.php/dav;
    }
    location /.well-known/caldav {
      return 301 $scheme://$host/remote.php/dav;
    }
 # common gzip
 gzip_types text/css text/less text/plain text/xml application/xml application/json application/javascript;
 gzip on;
}

Hope it’s something obvious for you people…
thanks a lot

I assume that the DNS is not configured correctly in your docker container. Make sure that the DNS can resolve all servers on the Internet and the message shouldn’t pop-up again.

It’s true, I try to ping within docker container and it does not work.
It looks worse than a DNS problem, and I don"t see error in $DOCKER-PATH/etc/resolv.conf

nameserver 127.0.0.11
options timeout:1 attempts:3 rotate ndots:0

(127.0.0.11 is normal)

I upgraded docker to version 18.09.2 and rebuilt containers (did docker-compose down and up).
Now I have two problems…
First : Still no network in docker:

docker exec -ti 9c898e55e3e6 sh
/ # ping www.google.fr
ping: bad address 'www.google.fr'
/ # ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
^C
--- 8.8.8.8 ping statistics ---
9 packets transmitted, 0 packets received, 100% packet loss

I do not see errors neither in docker network’s definitions

docker network inspect legaragenum_back
[
    {
        "Name": "legaragenum_back",
        "Id": "c79b587574610811f6eca031ebb7ab6fea8cf21d0a8d77d084b68970321b0ad6",
        "Created": "2019-02-22T22:05:36.131341973+01:00",
        "Scope": "local",
        "Driver": "bridge",
        "EnableIPv6": false,
        "IPAM": {
            "Driver": "default",
            "Options": null,
            "Config": [
                {
                    "Subnet": "172.23.0.0/16",
                    "Gateway": "172.23.0.1"
                }
            ]
        },
        "Internal": false,
        "Attachable": false,
        "Ingress": false,
        "ConfigFrom": {
            "Network": ""
        },
        "ConfigOnly": false,
        "Containers": {
            "7cada52906cbf32a5289d6818feb2434e399dafea34aa3ad1e9bf81ff4a995bf": {
                "Name": "legaragenum_databasenext_1",
                "EndpointID": "cd44412e95eb0e887d40c7c3d41399414927deca24b29183c1ddf67a587f8a8b",
                "MacAddress": "02:42:ac:17:00:04",
                "IPv4Address": "172.23.0.4/16",
                "IPv6Address": ""
            },
            "9326a3324e355d6b2fe99dde3636e9c08050bf95c53d1d18e4fad3ef439aed9b": {
                "Name": "legaragenum_collabora_1",
                "EndpointID": "cda836c2bfe305f3a6a574d1667518b803d3476044be0e243b9906445ab5789c",
                "MacAddress": "02:42:ac:17:00:03",
                "IPv4Address": "172.23.0.3/16",
                "IPv6Address": ""
            },
            "9c898e55e3e645ce15333b18b16f3542ad4b241b46085fbd60c2587f11732c00": {
                "Name": "legaragenum_appnextcloud_1",
                "EndpointID": "59e1ef579bd8526bb9cf27a8b9aa988665476b309c61910f0efb8ff57d523aeb",
                "MacAddress": "02:42:ac:17:00:05",
                "IPv4Address": "172.23.0.5/16",
                "IPv6Address": ""
            },
            "a8fa6ac021905e07c040ca15de86a5ec9f658f00659a7920e174287fdcd0ef64": {
                "Name": "legaragenum_redisnext_1",
                "EndpointID": "3937cca82190b1fbe9228b4986d7a60d9cf73bc15bb1ee09f300b101bddbf03d",
                "MacAddress": "02:42:ac:17:00:02",
                "IPv4Address": "172.23.0.2/16",
                "IPv6Address": ""
            }
        },
        "Options": {},
        "Labels": {}
    }
]

docker network inspect legaragenum_default
[
    {
        "Name": "legaragenum_default",
        "Id": "29f88db082f187c5a5ece372b6f2b760a5fbab330d59d9f1cceee5492fe10373",
        "Created": "2019-02-22T22:05:35.979099647+01:00",
        "Scope": "local",
        "Driver": "bridge",
        "EnableIPv6": false,
        "IPAM": {
            "Driver": "default",
            "Options": null,
            "Config": [
                {
                    "Subnet": "172.22.0.0/16",
                    "Gateway": "172.22.0.1"
                }
            ]
        },
        "Internal": false,
        "Attachable": false,
        "Ingress": false,
        "ConfigFrom": {
            "Network": ""
        },
        "ConfigOnly": false,
        "Containers": {
            "9326a3324e355d6b2fe99dde3636e9c08050bf95c53d1d18e4fad3ef439aed9b": {
                "Name": "legaragenum_collabora_1",
                "EndpointID": "ecacbcdf8acba1d6c66848304699ba9776f2b2041ab7826444b1a105d5e1f307",
                "MacAddress": "02:42:ac:16:00:02",
                "IPv4Address": "172.22.0.2/16",
                "IPv6Address": ""
            },
            "9c898e55e3e645ce15333b18b16f3542ad4b241b46085fbd60c2587f11732c00": {
                "Name": "legaragenum_appnextcloud_1",
                "EndpointID": "6d0ec50dfd8ebcdd30648810e75a0e72edbba75200e474be6562729bd3615d23",
                "MacAddress": "02:42:ac:16:00:03",
                "IPv4Address": "172.22.0.3/16",
                "IPv6Address": ""
            }
        },
        "Options": {},
        "Labels": {}
    }
]


Second,
Now I can"t access to Nextcloud:
Capture%20du%202019-02-22%2022-11-35
but I did not change config.php …

Thanks for your help

You are using DNS names in your trusted_domains configuration, which don’t work if you have DNS problems. Better would be to switch to ip addresses to get access to your Nextcloud instance.

Hello,
it’s all working now.
Trusted domains error was fixed adding possible proxys in netxcloud conf.
And I had also to relaunch docker service at it hadn’t started well after update.
Thanks for help.