This server has no working Internet connection (It does really)

Hi there,

I’m hoping someone can help.

I have a problem where my NextCloud installation complains that it has no network connection (When it does)

Details below -

Nextcloud version: 17.0.2
Operating system: CentOS Linux release 8.0.1905 (Core)
Apache version: Apache 2.4
PHP version: PHP 7.2
MySQL Version: Mysql Ver 15.1 Distrib 10.4.11-MariaDB

Steps to replicate it:

  1. Login to NextCloud as admin
  2. Navigate to ‘Settings’
  3. Click ‘Overview’
  4. A warning will appear at the top with the following information -

“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.”

NextCloud logging:

Error	internet_connection_check	GuzzleHttp\Exception\ConnectException: cURL error 7: (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)

    /var/www/html/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php - line 149:

    GuzzleHttp\Handler\CurlFactory::createRejection(GuzzleHttp\H ... l}, { errno: 7,e ... 0})

    /var/www/html/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php - line 102:

    GuzzleHttp\Handler\CurlFactory::finishError(GuzzleHttp\H ... {}, GuzzleHttp\H ... l}, GuzzleHttp\H ... {})

    /var/www/html/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlHandler.php - line 43:

    GuzzleHttp\Handler\CurlFactory::finish(GuzzleHttp\H ... {}, GuzzleHttp\H ... l}, GuzzleHttp\H ... {})

    /var/www/html/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/Proxy.php - line 28:

    GuzzleHttp\Handler\CurlHandler->__invoke("*** sensiti ... *", "*** sensiti ... *")

    /var/www/html/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/Proxy.php - line 51:

    GuzzleHttp\Handler\Proxy::GuzzleHttp\Handler\{closure}("*** sensiti ... *")

    /var/www/html/nextcloud/3rdparty/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php - line 37:

    GuzzleHttp\Handler\Proxy::GuzzleHttp\Handler\{closure}("*** sensiti ... *")

    /var/www/html/nextcloud/3rdparty/guzzlehttp/guzzle/src/Middleware.php - line 30:

    GuzzleHttp\PrepareBodyMiddleware->__invoke("*** sensiti ... *", "*** sensiti ... *")

    /var/www/html/nextcloud/3rdparty/guzzlehttp/guzzle/src/RedirectMiddleware.php - line 70:

    GuzzleHttp\Middleware::GuzzleHttp\{closure}("*** sensiti ... *")

    /var/www/html/nextcloud/3rdparty/guzzlehttp/guzzle/src/Middleware.php - line 60:

    GuzzleHttp\RedirectMiddleware->__invoke("*** sensiti ... *", "*** sensiti ... *")

    /var/www/html/nextcloud/3rdparty/guzzlehttp/guzzle/src/HandlerStack.php - line 67:

    GuzzleHttp\Middleware::GuzzleHttp\{closure}("*** sensiti ... *")

    /var/www/html/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php - line 277:

    GuzzleHttp\HandlerStack->__invoke("*** sensiti ... *", "*** sensiti ... *")

    /var/www/html/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php - line 125:

    GuzzleHttp\Client->transfer("*** sensiti ... *", "*** sensiti ... *")

    /var/www/html/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php - line 131:

    GuzzleHttp\Client->requestAsync("get", GuzzleHttp\Psr7\Uri {}, { verify: "/ ... }})

    /var/www/html/nextcloud/lib/private/Http/Client/Client.php - line 144:

    GuzzleHttp\Client->request("get", "http://www.edri.org/", { proxy: nul ... e})

    /var/www/html/nextcloud/settings/Controller/CheckSetupController.php - line 153:

    OC\Http\Client\Client->get("http://www.edri.org/")

    /var/www/html/nextcloud/settings/Controller/CheckSetupController.php - line 136:

    OC\Settings\Controller\CheckSetupController->isSiteReachable("www.edri.org")

    /var/www/html/nextcloud/settings/Controller/CheckSetupController.php - line 678:

    OC\Settings\Controller\CheckSetupController->hasInternetConnectivityProblems()

    /var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 170:

    OC\Settings\Controller\CheckSetupController->check()

    /var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 99:

    OC\AppFramework\Http\Dispatcher->executeController(OC\Settings\ ... {}, "check")

    /var/www/html/nextcloud/lib/private/AppFramework/App.php - line 126:

    OC\AppFramework\Http\Dispatcher->dispatch(OC\Settings\ ... {}, "check")

    /var/www/html/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php - line 47:

    OC\AppFramework\App::main("OC\\Setting ... r", "check", OC\AppFramew ... {}, { _route: "s ... "})

    <<closure>>

    OC\AppFramework\Routing\RouteActionHandler->__invoke({ _route: "s ... "})

    /var/www/html/nextcloud/lib/private/Route/Router.php - line 297:

    call_user_func(OC\AppFramew ... {}, { _route: "s ... "})

    /var/www/html/nextcloud/lib/base.php - line 997:

    OC\Route\Router->match("/settings/ajax/checksetup")

    /var/www/html/nextcloud/index.php - line 42:

    OC::handleRequest()

Is anyone able to offer any advice please? :slight_smile:

Thank you!

Well, no one offered any help :slight_smile: But I figured it out myself.

Seeing as there are literally hundreds of threads about this issue online it seems like I’m not the only one who has got caught up on this.

[SOLUTION] You just need to grant httpd/apache outbound network access via SELINUX.

setsebool -P httpd_can_network_connect 1

That’s it.

I would strongly suggest the NextCloud team add this to the administrator documents as it’s not present in the setup guide or admin guides anywhere.

Cheers.

5 Likes

Thank you for your contributing!

Would you mind elaborating a little on just how do you do this?