No internet connection?

[details=“Support intro”]

Nextcloud version (eg, 12.0.2): 13.0.5
Operating system and version (eg, Ubuntu 17.04): Ubuntu 16.04.3 LTS
Apache or nginx version (eg, Apache 2.4.25):
PHP version (eg, 7.1):
Nextcloud_Community_VM_PRODUCTION

The issue you are facing:
i can connect to my nextclould from internet but nextcloud is not connecting to git etc.

Is this the first time you’ve seen this error? (Y/N): yes

Steps to replicate it:

The output of your Nextcloud log in Admin > Logging:

Error	internet_connection_check	GuzzleHttp\Exception\ConnectException: cURL error 6: Could not resolve host: www.github.com	2018-08-20T19:46:41+0300
Error	internet_connection_check	GuzzleHttp\Exception\ConnectException: cURL error 6: Could not resolve host: www.github.com	2018-08-20T19:46:40+0300
Error	internet_connection_check	GuzzleHttp\Exception\ConnectException: cURL error 6: Could not resolve host: www.google.com	2018-08-20T19:46:00+0300
Error	internet_connection_check	GuzzleHttp\Exception\ConnectException: cURL error 6: Could not resolve host: www.google.com	2018-08-20T19:45:59+0300
Error	internet_connection_check	GuzzleHttp\Exception\ConnectException: cURL error 6: Could not resolve host: www.nextcloud.com	2018-08-20T19:45:20+0300
Error	internet_connection_check	GuzzleHttp\Exception\ConnectException: cURL error 6: Could not resolve host: www.nextcloud.com	2018-08-20T19:45:18+0300
Error	internet_connection_check	GuzzleHttp\Exception\ConnectException: cURL error 6: Could not resolve host: www.github.com	2018-08-20T19:42:25+0300
Error	internet_connection_check	GuzzleHttp\Exception\ConnectException: cURL error 6: Could not resolve host: www.github.com	2018-08-20T19:42:18+0300
Error	internet_connection_check	GuzzleHttp\Exception\ConnectException: cURL error 6: Could not resolve host: www.github.com	2018-08-20T19:42:17+0300
Error	internet_connection_check	GuzzleHttp\Exception\ConnectException: cURL error 6: Could not resolve host: www.github.com	2018-08-20T19:41:58+0300
Error	internet_connection_check	GuzzleHttp\Exception\ConnectException: cURL error 6: Could not resolve host: www.google.com	2018-08-20T19:41:45+0300
Error	internet_connection_check	GuzzleHttp\Exception\ConnectException: cURL error 6: Could not resolve host: www.google.com	2018-08-20T19:41:38+0300
Error	internet_connection_check	GuzzleHttp\Exception\ConnectException: cURL error 6: Could not resolve host: www.google.com	2018-08-20T19:41:36+0300
Error	internet_connection_check	GuzzleHttp\Exception\ConnectException: cURL error 6: Could not resolve host: www.google.com	2018-08-20T19:41:17+0300
Error	internet_connection_check	GuzzleHttp\Exception\ConnectException: cURL error 6: Could not resolve host: www.nextcloud.com	2018-08-20T19:41:04+0300
Error	internet_connection_check	GuzzleHttp\Exception\ConnectException: cURL error 6: Could not resolve host: www.nextcloud.com	2018-08-20T19:40:57+0300
Error	internet_connection_check	GuzzleHttp\Exception\ConnectException: cURL error 6: Could not resolve host: www.nextcloud.com	2018-08-20T19:40:56+0300
Error	internet_connection_check	GuzzleHttp\Exception\ConnectException: cURL error 6: Could not resolve host: www.nextcloud.com	2018-08-20T19:40:37+0300
Error	internet_connection_check	GuzzleHttp\Exception\ConnectException: cURL error 6: Could not resolve host: www.nextcloud.com	2018-08-20T15:19:51+0300
Error	internet_connection_check	GuzzleHttp\Exception\ConnectException: cURL error 6: Could not resolve host: www.github.com	2018-08-20T15:13:17+0300
Error	internet_connection_check	GuzzleHttp\Exception\ConnectException: cURL error 6: Could not resolve host: www.github.com	2018-08-20T15:13:16+0300
Error	internet_connection_check	GuzzleHttp\Exception\ConnectException: cURL error 6: Could not resolve host: www.github.com	2018-08-20T15:13:15+0300
Error	internet_connection_check	GuzzleHttp\Exception\ConnectException: cURL error 6: Could not resolve host: www.github.com	2018-08-20T15:13:14+0300
Error	internet_connection_check	GuzzleHttp\Exception\ConnectException: cURL error 6: Could not resolve host: www.github.com

on_check	GuzzleHttp\Exception\ConnectException: cURL error 6: Could not resolve host: www.github.com

    /var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/RequestFsm.php - line 103: GuzzleHttp\Exception\RequestException wrapException(Object(GuzzleHttp\Message\Request), Object(GuzzleHttp\Ring\Exception\ConnectException))
    /var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/RequestFsm.php - line 132: GuzzleHttp\RequestFsm->__invoke(Object(GuzzleHttp\Transaction))
    /var/www/nextcloud/3rdparty/react/promise/src/FulfilledPromise.php - line 25: GuzzleHttp\RequestFsm->GuzzleHttp\{closure}(*** sensitive parameters replaced ***)
    /var/www/nextcloud/3rdparty/guzzlehttp/ringphp/src/Future/CompletedFutureValue.php - line 55: React\Promise\FulfilledPromise->then(Object(Closure), NULL, NULL)
    /var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Message/FutureResponse.php - line 43: GuzzleHttp\Ring\Future\CompletedFutureValue->then(Object(Closure), NULL, NULL)
    /var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/RequestFsm.php - line 134: GuzzleHttp\Message\FutureResponse proxy(Object(GuzzleHttp\Ring\Future\CompletedFutureArray), Object(Closure))
    /var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php - line 165: GuzzleHttp\RequestFsm->__invoke(Object(GuzzleHttp\Transaction))
    /var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php - line 125: GuzzleHttp\Client->send(Object(GuzzleHttp\Message\Request))
    /var/www/nextcloud/lib/private/Http/Client/Client.php - line 138: GuzzleHttp\Client->get('http //www.gith...', Array)
    /var/www/nextcloud/settings/Controller/CheckSetupController.php - line 129: OC\Http\Client\Client->get('http //www.gith...')
    /var/www/nextcloud/settings/Controller/CheckSetupController.php - line 112: OC\Settings\Controller\CheckSetupController->isSiteReachable('www.github.com')
    /var/www/nextcloud/settings/Controller/CheckSetupController.php - line 426: OC\Settings\Controller\CheckSetupController->isInternetConnectionWorking()
    [internal function] OC\Settings\Controller\CheckSetupController->check()
    /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 161: call_user_func_array(Array, Array)
    /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 91: OC\AppFramework\Http\Dispatcher->executeController(Object(OC\Settings\Controller\CheckSetupController), 'check')
    /var/www/nextcloud/lib/private/AppFramework/App.php - line 115: OC\AppFramework\Http\Dispatcher->dispatch(Object(OC\Settings\Controller\CheckSetupController), 'check')
    /var/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php - line 47: OC\AppFramework\App main('OC\\Settings\\Con...', 'check', Object(OC\AppFramework\DependencyInjection\DIContainer), Array)
    [internal function] OC\AppFramework\Routing\RouteActionHandler->__invoke(Array)
    /var/www/nextcloud/lib/private/Route/Router.php - line 297: call_user_func(Object(OC\AppFramework\Routing\RouteActionHandler), Array)
    /var/www/nextcloud/lib/base.php - line 999: OC\Route\Router->match('/settings/ajax/...')
    /var/www/nextcloud/index.php - line 42: OC handleRequest()
    {main}

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

$CONFIG = array (
  'passwordsalt' => '',
  'secret' => ,
  'trusted_domains' =>
  array (
    0 => 'localhost',
    1 => '192.168.1.6',
    2 => '',
    3 => '',
  ),
  'datadirectory' => '/var/ncdata',
  'overwrite.cli.url' => '',
  'dbtype' => 'mysql',
  'version' => '13.0.5.2',
  'dbname' => 'nextcloud_db',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
 'mysql.utf8mb4' => true,
  'dbuser' => 
  'dbpassword' => '',
  'installed' => true,
  'instanceid' => '',
  'maintenance' => false,
  'mail_smtpmode' => 'smtp',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'filelocking.enabled' => true,
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
 'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => '/var/run/redis/redis.sock',
    'port' => 0,
    'timeout' => 0,
    'dbindex' => 0,
    'password' => ,
  ),
  'htaccess.RewriteBase' => '/',
 'loglevel' => '2',
'log_type' => 'file',
  'logfile' => '/var/ncdata/nextcloud.log',
  'logtimezone' => 'Europe/Helsinki',
  'mail_from_address' => '',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_domain' => '',
  'mail_smtphost' => '',
  'mail_smtpport' => '25',
  'updater.release.channel' => 'stable',
  'theme' => '',
);


Aug 20 06:25:30 gsx1300r /usr/lib/snapd/snapd[1063]: retry.go:81: DEBUG: Retryi$
Aug 20 06:25:30 gsx1300r /usr/lib/snapd/snapd[1063]: retry.go:49: DEBUG: Retryi$
Aug 20 06:25:40 gsx1300r /usr/lib/snapd/snapd[1063]: retry.go:81: DEBUG: Retryi$
Aug 20 06:25:40 gsx1300r /usr/lib/snapd/snapd[1063]: retry.go:49: DEBUG: Retryi$
Aug 20 06:25:40 gsx1300r /usr/lib/snapd/snapd[1063]: retry.go:81: DEBUG: Retryi$
Aug 20 06:25:40 gsx1300r /usr/lib/snapd/snapd[1063]: retry.go:49: DEBUG: Retryi$
Aug 20 06:25:50 gsx1300r /usr/lib/snapd/snapd[1063]: retry.go:81: DEBUG: Retryi$
Aug 20 06:25:50 gsx1300r /usr/lib/snapd/snapd[1063]: retry.go:49: DEBUG: Retryi$
Aug 20 06:26:00 gsx1300r /usr/lib/snapd/snapd[1063]: retry.go:61: DEBUG: The re$
Aug 20 06:26:00 gsx1300r /usr/lib/snapd/snapd[1063]: snapmgr.go:411: Cannot pre$
Aug 20 06:26:00 gsx1300r snapd[1063]: 2018/08/20 06:26:00.921248 snapmgr.go:411$
Aug 20 06:26:00 gsx1300r snapd[1063]: 2018/08/20 06:26:00.921303 stateengine.go$
Aug 20 06:26:00 gsx1300r /usr/lib/snapd/snapd[1063]: stateengine.go:98: state e$
Aug 20 06:30:01 gsx1300r CRON[48499]: (www-data) CMD (php -f /var/www/nextcloud$
Aug 20 06:35:30 gsx1300r /usr/lib/snapd/snapd[1063]: retry.go:81: DEBUG: Retryi$
Aug 20 06:35:30 gsx1300r /usr/lib/snapd/snapd[1063]: retry.go:49: DEBUG: Retryi$
Aug 20 06:35:40 gsx1300r /usr/lib/snapd/snapd[1063]: retry.go:81: DEBUG: Retryi$
Aug 20 06:35:40 gsx1300r /usr/lib/snapd/snapd[1063]: retry.go:49: DEBUG: Retryi$
Aug 20 06:35:40 gsx1300r /usr/lib/snapd/snapd[1063]: retry.go:81: DEBUG: Retryi$
[ Read 4617 lines ]

The output of your Apache/nginx/system log in /var/log/____:


Does your nextcloud server have DNS resolving problems? What if you try to ping a server from the terminal? ping www.google.com ?

Yes
It won’t resolve.

Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)

DO NOT EDIT THIS FILE BY HAND – YOUR CHANGES WILL BE OVERWRITTEN

nameserver 8.8.8.8
nameserver 8.8.4.4

Also Tried ping with ipaddress www.google.com and don’t ping it.

So this is not really a Nextcloud related problem. Please search for DNS (name server) instructions for your operating system (Ubuntu, isn’t it?).