core icon indicating copy to clipboard operation
core copied to clipboard

Error: server is not connected to the internet message - but I am, or so I think ...

Open jnfrmarks opened this issue 11 years ago • 89 comments

Steps to reproduce

  1. Install 8.1
  2. Navigate to the admin page
  3. Check the security warnings

Expected behaviour

They should make sense

Actual behaviour

This one doesn't make sense as I am connected to the internet:

p340

More information is needed (a pointer to a link?) on how to resolve this.

Server Host info:

Ubuntu 14.04 PHP 5.5.9

Server configuration:

ownCloud Enterprise Edition 8.1 beta 1 (daily) Build:2015-05-11T03:08:42+00:00 52fc45e6e3d271c94d801af377c85974e1420d2e

jnfrmarks avatar May 11 '15 21:05 jnfrmarks

i can confirm this, how is the connection checked ? maybe something is missing ...

derkostka avatar May 11 '15 21:05 derkostka

The check seems to be done here:

https://github.com/owncloud/core/blob/6cc3fd92700fe7a0c778490ddb5fda1beaefb046/settings/controller/checksetupcontroller.php#L67

So www.owncloud.org needs to be reachable.

ghost avatar May 12 '15 04:05 ghost

@LukasReschke

DeepDiver1975 avatar May 12 '15 07:05 DeepDiver1975

Please create a test.php in the same directory as your index.php with the following input and report the output:

<?php

require_once('./lib/base.php');


$client = \OC::$server->getHTTPClientService()->newClient();
try {
    $client->get('https://www.owncloud.org/');
    $client->get('http://www.owncloud.org/');
} catch (\Exception $e) {
    throw $e;
}

Also be sure to add define('DEBUG', true); at top of your config.php so that we have a proper stacktrace.

LukasReschke avatar May 12 '15 07:05 LukasReschke

Thanks for your Help, here is the trace:

Interner Serverfehler

Der Server hat einen internen Fehler und konnte Ihre Anfrage nicht vervollständigen.

Bitte wende Dich an den Serveradministrator, sollte dieser Fehler mehrfach auftreten, und füge Deiner Anfrage die unten stehenden technischen Details bei.

Weitere Details können im Serverprotokoll gefunden werden.

Technische Details

Entfernte Adresse: 2a02:2450:102d:3ff:cd66:9893:147a:7cAnforderungskennung: VVJssn8AAAEAAGcnRB8AAAAGTyp: GuzzleHttp\Exception\RequestExceptionCode: 0Nachricht: cURL error 5: Could not resolve proxy: www.aaaaowncloud.orgDatei: /var/www/owncloud/3rdparty/guzzlehttp/guzzle/src/Exception/RequestException.phpZeile: 51

Spur

#0 /var/www/owncloud/3rdparty/guzzlehttp/guzzle/src/RequestFsm.php(104): GuzzleHttp\Exception\RequestException::wrapException(Object(GuzzleHttp\Message\Request), Object(GuzzleHttp\Ring\Exception\RingException)) #1 /var/www/owncloud/3rdparty/guzzlehttp/guzzle/src/RequestFsm.php(132): GuzzleHttp\RequestFsm->__invoke(Object(GuzzleHttp\Transaction)) #2 /var/www/owncloud/3rdparty/react/promise/src/FulfilledPromise.php(24): GuzzleHttp\RequestFsm->GuzzleHttp{closure}(Array) #3 /var/www/owncloud/3rdparty/guzzlehttp/ringphp/src/Future/CompletedFutureValue.php(55): React\Promise\FulfilledPromise->then(Object(Closure), NULL, NULL) #4 /var/www/owncloud/3rdparty/guzzlehttp/guzzle/src/Message/FutureResponse.php(43): GuzzleHttp\Ring\Future\CompletedFutureValue->then(Object(Closure), NULL, NULL) #5 /var/www/owncloud/3rdparty/guzzlehttp/guzzle/src/RequestFsm.php(135): GuzzleHttp\Message\FutureResponse::proxy(Object(GuzzleHttp\Ring\Future\CompletedFutureArray), Object(Closure)) #6 /var/www/owncloud/3rdparty/guzzlehttp/guzzle/src/Client.php(232): GuzzleHttp\RequestFsm->__invoke(Object(GuzzleHttp\Transaction)) #7 /var/www/owncloud/3rdparty/guzzlehttp/guzzle/src/Client.php(192): GuzzleHttp\Client->send(Object(GuzzleHttp\Message\Request)) #8 /var/www/owncloud/lib/private/http/client/client.php(122): GuzzleHttp\Client->get('https://www.aaa...', Array) #9 /var/www/owncloud/test.php(3): OC\Http\Client\Client->get('https://www.aaa...') #10 {main} Am 12.05.2015 09:46 schrieb "Lukas Reschke" [email protected]:

Please create a test.php in the same directory as your index.php with the following input and report the output:

getHTTPClientService()->newClient();try { $client->get('https://www.aaaaowncloud.org/'); $client->get('http://www.owncloud.org/');} catch (\Exception $e) { throw $e;} Also be sure to add define('DEBUG', true); at top of your config.php so that we have a proper stacktrace. — Reply to this email directly or view it on GitHub https://github.com/owncloud/core/issues/16255#issuecomment-101173236.

derkostka avatar May 12 '15 21:05 derkostka

and once more without that AAA in the URL: Interner Serverfehler Der Server hat einen internen Fehler und konnte Ihre Anfrage nicht vervollständigen. Bitte wende Dich an den Serveradministrator, sollte dieser Fehler mehrfach auftreten, und füge Deiner Anfrage die unten stehenden technischen Details bei. Weitere Details können im Serverprotokoll gefunden werden.

Technische Details Entfernte Adresse: 2a02:2450:102d:3ff:cd66:9893:147a:7c Anforderungskennung: VVJuXn8AAAEAAGlEY7kAAAAC Typ: GuzzleHttp\Exception\RequestException Code: 0 Nachricht: cURL error 56: Proxy CONNECT aborted Datei: /var/www/owncloud/3rdparty/guzzlehttp/guzzle/src/Exception/RequestException.php Zeile: 51

Spur #0 /var/www/owncloud/3rdparty/guzzlehttp/guzzle/src/RequestFsm.php(104): GuzzleHttp\Exception\RequestException::wrapException(Object(GuzzleHttp\Message\Request), Object(GuzzleHttp\Ring\Exception\RingException)) #1 /var/www/owncloud/3rdparty/guzzlehttp/guzzle/src/RequestFsm.php(132): GuzzleHttp\RequestFsm->__invoke(Object(GuzzleHttp\Transaction)) #2 /var/www/owncloud/3rdparty/react/promise/src/FulfilledPromise.php(24): GuzzleHttp\RequestFsm->GuzzleHttp{closure}(Array) #3 /var/www/owncloud/3rdparty/guzzlehttp/ringphp/src/Future/CompletedFutureValue.php(55): React\Promise\FulfilledPromise->then(Object(Closure), NULL, NULL) #4 /var/www/owncloud/3rdparty/guzzlehttp/guzzle/src/Message/FutureResponse.php(43): GuzzleHttp\Ring\Future\CompletedFutureValue->then(Object(Closure), NULL, NULL) #5 /var/www/owncloud/3rdparty/guzzlehttp/guzzle/src/RequestFsm.php(135): GuzzleHttp\Message\FutureResponse::proxy(Object(GuzzleHttp\Ring\Future\CompletedFutureArray), Object(Closure)) #6 /var/www/owncloud/3rdparty/guzzlehttp/guzzle/src/Client.php(232): GuzzleHttp\RequestFsm->__invoke(Object(GuzzleHttp\Transaction)) #7 /var/www/owncloud/3rdparty/guzzlehttp/guzzle/src/Client.php(192): GuzzleHttp\Client->send(Object(GuzzleHttp\Message\Request)) #8 /var/www/owncloud/lib/private/http/client/client.php(122): GuzzleHttp\Client->get('https://www.own...', Array) #9 /var/www/owncloud/test.php(3): OC\Http\Client\Client->get('https://www.own...') #10 {main}

derkostka avatar May 12 '15 21:05 derkostka

@derkostka Interesting. Can you post your config.php and also try by fixing the aaaaaowncloud.org to owncloud.org - technically it should fail then as well if it is what I suspect. Thanks!

LukasReschke avatar May 12 '15 21:05 LukasReschke

Ah you were faster ;-) - Config.php still applies :-)

LukasReschke avatar May 12 '15 21:05 LukasReschke

Sure !

Please consider that if i upgrade i usually keep the old config. May be something is missing here for OC 8.1 ...

Welcome to Ubuntu 15.04 (GNU/Linux 3.8.13.28 armv7l)

cat /var/www/owncloud/config/config.php

'someocinstanceid', 'passwordsalt' => 'tastysalt', 'hashingCost' => 10, 'trusted_domains' => array ( 0 => 'cloud.sebastiankostka.de', 1 => 'de1.portmap64.net', 2 => '192.168.6.9', 3 => 'odroid', 4 => 'vpn', ), 'datadirectory' => '/media/data/owncloud/data', 'version' => '8.1.0.5', 'dbtype' => 'mysql', 'dbhost' => '127.0.0.1', 'dbname' => 'owncloud', 'dbuser' => 'ownclouduser', 'dbpassword' => 'mysecretpassword', 'dbtableprefix' => 'oc_', 'sqlite.journal_mode' => 'DELETE', 'installed' => true, 'default_language' => 'de', 'defaultapp' => 'files', 'knowledgebaseenabled' => true, 'enable_avatars' => true, 'allow_user_to_change_display_name' => true, 'remember_login_cookie_lifetime' => 1296000, 'session_lifetime' => 86400, 'session_keepalive' => true, 'skeletondirectory' => '', 'mail_domain' => 'mydomain', 'mail_from_address' => 'owncloud', 'mail_smtpdebug' => false, 'mail_smtpmode' => 'smtp', 'mail_smtphost' => 'mail', 'mail_smtpport' => 465, 'mail_smtptimeout' => 10, 'mail_smtpsecure' => 'ssl', 'mail_smtpauth' => true, 'mail_smtpauthtype' => 'LOGIN', 'mail_smtpname' => 'me@mymail', 'mail_smtppassword' => 'secret', 'overwritehost' => '', 'overwriteprotocol' => '', 'overwritewebroot' => '', 'overwritecondaddr' => '', 'overwrite.cli.url' => '', 'proxy' => '', 'proxyuserpwd' => '', 'trashbin_retention_obligation' => 30, 'trashbin_auto_expire' => true, 'appcodechecker' => false, 'updatechecker' => true, 'has_internet_connection' => true, 'check_for_working_webdav' => true, 'check_for_working_htaccess' => true, 'config_is_read_only' => false, 'log_type' => 'owncloud', 'logfile' => '/var/log/owncloud.log', 'loglevel' => 0, 'logdateformat' => 'F d, Y H:i:s', 'logtimezone' => 'Europe/Berlin', 'log_query' => false, 'cron_log' => true, 'log_rotate_size' => 104857600, '3rdpartyroot' => '', '3rdpartyurl' => '', 'customclient_desktop' => 'http://owncloud.org/sync-clients/', 'customclient_android' => ' https://play.google.com/store/apps/details?id=com.owncloud.android', 'customclient_ios' => ' https://itunes.apple.com/us/app/owncloud/id543672169?mt=8', 'appstoreenabled' => true, 'appstoreurl' => 'https://api.owncloud.com/v1', 'apps_paths' => array ( 0 => array ( 'path' => '/var/www/owncloud/apps', 'url' => '/apps', 'writable' => true, ), 1 => array ( 'path' => '/var/www/owncloud/apps2', 'url' => '/apps2', 'writable' => true, ), ), 'enable_previews' => true, 'preview_max_x' => NULL, 'preview_max_y' => NULL, 'preview_max_scale_factor' => 10, 'preview_max_filesize_image' => 50, 'preview_libreoffice_path' => '/usr/bin/libreoffice', 'preview_office_cl_parameters' => ' --headless --nologo --nofirststartwizard --invisible --norestore -convert-to pdf -outdir ', 'enabledPreviewProviders' => array ( 0 => 'OC\Preview\Image', 1 => 'OC\Preview\MP3', 2 => 'OC\Preview\TXT', 3 => 'OC\Preview\MarkDown', ), 'ldapUserCleanupInterval' => 51, 'maintenance' => false, 'singleuser' => false, 'forcessl' => true, 'forceSSLforSubdomains' => true, 'openssl' => array ( 'config' => '/absolute/location/of/openssl.cnf', ), 'blacklisted_files' => array ( 0 => '.htaccess', ), 'share_folder' => '/', 'theme' => '', 'xframe_restriction' => true, 'cipher' => 'AES-256-CFB', 'redis' => array ( 'host' => 'localhost', 'port' => 6379, 'timeout' => 0, ), 'memcached_servers' => array ( 0 => array ( 0 => 'localhost', 1 => 11211, ), ), 'cache_path' => '', 'quota_include_external_storage' => false, 'filesystem_check_changes' => 1, 'asset-pipeline.enabled' => false, 'assetdirectory' => '/var/www/owncloud', 'mount_file' => 'data/mount.json', 'filesystem_cache_readonly' => false, 'supportedDatabases' => array ( 0 => 'sqlite', 1 => 'mysql', 2 => 'pgsql', 3 => 'oci', 4 => 'mssql', ), 'custom_csp_policy' => 'default-src \'self\'; script-src \'self\' \'unsafe-eval\'; style-src \'self\' \'unsafe-inline\'; frame-src *; img-src *; font-src \'self\' data:; media-src *; connect-src *', 'secret' => 'somesecret', 'trusted_proxies' => array ( 0 => '203.0.113.45', 1 => '198.51.100.128', ), 'forwarded_for_headers' => array ( 0 => 'HTTP_X_FORWARDED', 1 => 'HTTP_FORWARDED_FOR', ), 'max_filesize_animated_gifs_public_sharing' => 10, 'ldapIgnoreNamingRules' => false, ); Am 12.05.2015 23:21 schrieb "Lukas Reschke" [email protected]: > @derkostka https://github.com/derkostka Interesting. Can you post your > config.php and also try by fixing the aaaaaowncloud.org to owncloud.org - > technically it should fail then as well if it is what I suspect. Thanks! > > — > Reply to this email directly or view it on GitHub > https://github.com/owncloud/core/issues/16255#issuecomment-101425597.

derkostka avatar May 12 '15 21:05 derkostka

@derkostka Seems you have copied over the config.sample.php? :see_no_evil:

ghost avatar May 12 '15 21:05 ghost

@RealRancor edit: had to read twice, it's late .. sorry.

anyway, if it is a configuration problem the error message should indicate that.

derkostka avatar May 12 '15 21:05 derkostka

so yes, I copied over the sample and did my modifications as far as I knew them ...

derkostka avatar May 12 '15 21:05 derkostka

@derkostka In general copying over the config.sample.php is not supported and can cause various issues. Newer versions of OC will also "bail out" if you're doing this there:

https://github.com/owncloud/core/blob/v8.0.3/config/config.sample.php#L7-L10 https://github.com/owncloud/core/blob/v8.0.3/config/config.sample.php#L973-L980

The second message you have posted says:

"cURL error 56: Proxy CONNECT aborted"

Your current config.php contains the default "trusted_proxies" setting:

https://github.com/owncloud/core/blob/v8.0.3/config/config.sample.php#L955

which could cause this.

ghost avatar May 13 '15 05:05 ghost

Thanks for the pointer. Good to see this one is probably (my) configuration fault. @jnfrmarks does this also apply to you ?

Edit: I did remove all Proxy-relations i´ve seen from the config, still: Nachricht: cURL error 56: Proxy CONNECT aborted

I am away for the weekend, but i will rework my complete config and look again in a test instance. meanwhile, let´s wait for jnfrmarks reply. Thanks for the support !

derkostka avatar May 13 '15 06:05 derkostka

@RealRancor @derkostka @LukasReschke

I'm getting back to this now and don't know what I need to do here. I still see the warning on my CentOS system but not on my ubuntu system.

jnfrmarks avatar Jun 16 '15 15:06 jnfrmarks

@jnfrmarks Any way you can grant me access to that system?

LukasReschke avatar Jun 16 '15 15:06 LukasReschke

Relevant error entry:

{"reqId":"gYucJ95zFT8VH1f3+Htt","remoteAddr":"172.16.12.96","app":"PHP","message":"GuzzleHttp\\Exception\\ClientException: Client error response [url] https:\/\/owncloud.org\/ [status code] 400 [reason phrase] Bad Request at \/var\/www\/html\/owncloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Exception\/RequestException.php#89","level":3,"time":"2015-06-16T07:23:58+00:00","method":"GET","url":"\/owncloud\/test.php"}

When dumping the error entry:


object(GuzzleHttp\Message\Response)#486 (7) {
  ["reasonPhrase":"GuzzleHttp\Message\Response":private]=>
  string(11) "Bad Request"
  ["statusCode":"GuzzleHttp\Message\Response":private]=>
  int(400)
  ["effectiveUrl":"GuzzleHttp\Message\Response":private]=>
  string(29) "https://owncloud.org/test.php"
  ["headers":"GuzzleHttp\Message\AbstractMessage":private]=>
  array(8) {
    ["date"]=>
    array(1) {
      [0]=>
      string(29) "Tue, 16 Jun 2015 15:24:52 GMT"
    }
    ["server"]=>
    array(1) {
      [0]=>
      string(6) "Apache"
    }
    ["x-frame-options"]=>
    array(1) {
      [0]=>
      string(10) "SAMEORIGIN"
    }
    ["strict-transport-security"]=>
    array(1) {
      [0]=>
      string(16) "max-age=31536000"
    }
    ["x-xss-protection"]=>
    array(1) {
      [0]=>
      string(13) "1; mode=block"
    }
    ["content-length"]=>
    array(1) {
      [0]=>
      string(3) "347"
    }
    ["connection"]=>
    array(1) {
      [0]=>
      string(5) "close"
    }
    ["content-type"]=>
    array(1) {
      [0]=>
      string(29) "text/html; charset=iso-8859-1"
    }
  }
  ["headerNames":"GuzzleHttp\Message\AbstractMessage":private]=>
  array(8) {
    ["date"]=>
    string(4) "Date"
    ["server"]=>
    string(6) "Server"
    ["x-frame-options"]=>
    string(15) "X-Frame-Options"
    ["strict-transport-security"]=>
    string(25) "Strict-Transport-Security"
    ["x-xss-protection"]=>
    string(16) "X-XSS-Protection"
    ["content-length"]=>
    string(14) "Content-Length"
    ["connection"]=>
    string(10) "Connection"
    ["content-type"]=>
    string(12) "Content-Type"
  }
  ["body":"GuzzleHttp\Message\AbstractMessage":private]=>
  object(GuzzleHttp\Stream\Stream)#487 (7) {
    ["stream":"GuzzleHttp\Stream\Stream":private]=>
    resource(421) of type (stream)
    ["size":"GuzzleHttp\Stream\Stream":private]=>
    NULL
    ["seekable":"GuzzleHttp\Stream\Stream":private]=>
    bool(true)
    ["readable":"GuzzleHttp\Stream\Stream":private]=>
    bool(true)
    ["writable":"GuzzleHttp\Stream\Stream":private]=>
    bool(true)
    ["uri":"GuzzleHttp\Stream\Stream":private]=>
    string(10) "php://temp"
    ["customMetadata":"GuzzleHttp\Stream\Stream":private]=>
    array(0) {
    }
  }
  ["protocolVersion":"GuzzleHttp\Message\AbstractMessage":private]=>
  string(3) "1.1"
}

This means 172.18.5.39 gets a 400 returned from owncloud.org which results in this behaviour since a 400 status code is an error. Requires investigation on the owncloud.org server side as well. (on it)

LukasReschke avatar Jun 16 '15 15:06 LukasReschke

On the owncloud.org server:

[Tue Jun 16 17:28:24 2015] [error] [client XXXX] Re-negotiation request failed
[Tue Jun 16 17:28:24 2015] [error] SSL Library Error: 336068946 error:14080152:SSL routines:SSL3_ACCEPT:unsafe legacy renegotiation disabled
[Tue Jun 16 17:28:24 2015] [error] [client XXXX] Re-negotiation request failed
[Tue Jun 16 17:28:24 2015] [error] SSL Library Error: 336068946 error:14080152:SSL routines:SSL3_ACCEPT:unsafe legacy renegotiation disabled
[Tue Jun 16 17:28:30 2015] [error] Hostname www.owncloud.org provided via SNI and hostname owncloud.org provided via HTTP are different
[Tue Jun 16 17:28:30 2015] [error] Hostname www.owncloud.org provided via SNI and hostname owncloud.org provided via HTTP are different

Looks like an SNI related issue. Digging…

LukasReschke avatar Jun 16 '15 15:06 LukasReschke

Looks like an SNI related issue

Thought about the same. Is curl used for this request?

ghost avatar Jun 16 '15 15:06 ghost

Is curl used for this request?

Yup. With 8.1 we always use the PHP cURL bindings in form of a wrapper around GuzzleHttp.

This is a PHP bug: https://bugs.php.net/bug.php?id=67639

LukasReschke avatar Jun 16 '15 16:06 LukasReschke