Could not establish a secure connection
-
Dear community,
I have the following problem and I’m really out of ideas. I tried to get new plugins via admin interface and stuck on the following error messages:
Following error occures on the top of the page:
Warning: An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums. (WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.) in /www/dlw/hosttest/wordpress/wp-admin/includes/plugin-install.php on line 168
Following error occures after trying to get a plugin:
Installation failed: Download failed. cURL error 35:
Available plugins appear on plugin admin page at least.
Useful to know about my setup:
Wordpress Version: 4.9.1
Distribution: Debian 9
Webserver: Apache, PHP-FPM, PHP-7, chroot environment
Other: user specific hosts file with following content:127.0.0.1 localhost
192.0.78.23 public-api.wordpress.com
66.155.40.203 downloads.wordpress.org
178.16.58.184 de.planetwp.org
66.155.40.202 api.wordpress.orgThings I already tried out:
1
Adding following code in line 97 of /wp-includes/Requests/Transport/cURL.php (Constructor) to prevent possible errors with curl using ipv6
curl_setopt($this->handle, CURLOPT_RESOLVE, array("api.wordpress.org:80:66.155.40.187", "api.wordpress.org:443:66.155.40.187"));2
Using different IPs for api.wordpress.org in hosts-file3
Reinstallation of openssl and ca-certificatesDoes anybody have an idea? Thank you very much in advance!
Kind regards,
unknownlsl-
This topic was modified 8 years, 7 months ago by
unknownlsl.
-
This topic was modified 8 years, 7 months ago by
unknownlsl.
-
This topic was modified 8 years, 7 months ago by
unknownlsl.
-
This topic was modified 8 years, 7 months ago by
unknownlsl. Reason: adding useful information
-
This topic was modified 8 years, 7 months ago by
-
What do you see if you type
curl -v https://wordpress.org/latest.tar.gz > /dev/nullI get
$ curl -v https://wordpress.org/latest.tar.gz > /dev/null % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 66.155.40.250... * TCP_NODELAY set * Connected to wordpress.org (66.155.40.250) port 443 (#0) * ALPN, offering h2 * ALPN, offering http/1.1 * Cipher selection: PROFILE=SYSTEM * successfully set certificate verify locations: * CAfile: /etc/pki/tls/certs/ca-bundle.crt CApath: none } [5 bytes data] * TLSv1.2 (OUT), TLS handshake, Client hello (1): } [512 bytes data] * TLSv1.2 (IN), TLS handshake, Server hello (2): { [102 bytes data] * TLSv1.2 (IN), TLS handshake, Certificate (11): { [3740 bytes data] * TLSv1.2 (IN), TLS handshake, Server key exchange (12): { [333 bytes data] * TLSv1.2 (IN), TLS handshake, Server finished (14): { [4 bytes data] * TLSv1.2 (OUT), TLS handshake, Client key exchange (16): } [70 bytes data] * TLSv1.2 (OUT), TLS change cipher, Client hello (1): } [1 bytes data] * TLSv1.2 (OUT), TLS handshake, Finished (20): } [16 bytes data] * TLSv1.2 (IN), TLS handshake, Finished (20): { [16 bytes data] * SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256 * ALPN, server accepted to use h2 * Server certificate: * subject: OU=Domain Control Validated; CN=*.wordpress.org * start date: Nov 6 17:42:01 2017 GMT * expire date: Dec 15 20:11:21 2020 GMT * subjectAltName: host "wordpress.org" matched cert's "wordpress.org" * issuer: C=US; ST=Arizona; L=Scottsdale; O=GoDaddy.com, Inc.; OU=http://certs.godaddy.com/repository/; CN=Go Daddy Secure Certificate Authority - G2 * SSL certificate verify ok. 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Using HTTP2, server supports multi-use * Connection state changed (HTTP/2 confirmed) * Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0 } [5 bytes data] * Using Stream ID: 1 (easy handle 0x5613cedc7260) } [5 bytes data] > GET /latest.tar.gz HTTP/2 > Host: wordpress.org > User-Agent: curl/7.55.1 > Accept: */* > { [5 bytes data] * Connection state changed (MAX_CONCURRENT_STREAMS updated)! } [5 bytes data] < HTTP/2 200 < server: nginx < date: Tue, 02 Jan 2018 16:21:15 GMT < content-type: application/octet-stream < content-length: 9638827 < cache-control: private < content-disposition: attachment; filename=wordpress-4.9.1.tar.gz < last-modified: Wed, 29 Nov 2017 19:07:17 GMT < x-frame-options: SAMEORIGIN < content-md5: 111ecbfc98633103e1fc1105c0c00c76 < x-nc: HIT lax 250 < accept-ranges: bytes < { [1108 bytes data] 100 9412k 100 9412k 0 0 4706k 0 0:00:02 0:00:02 --:--:-- 3478k * Connection #0 to host wordpress.org left intactThanks a lot for helping me Steve Stern!
Seems very similar here:
Differences:
1
YOURS:
curl/7.55.1
MINE:
curl/7.52.1 (already run latest repository update)2
YOURS:
* Cipher selection: PROFILE=SYSTEM
MINE: * Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTHDo you have any guess where to search?
My own output:
curl -v https://wordpress.org/latest.tar.gz > /dev/null % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 66.155.40.249... * TCP_NODELAY set * Connected to wordpress.org (66.155.40.249) port 443 (#0) 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* ALPN, offering h2 * ALPN, offering http/1.1 * Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH * successfully set certificate verify locations: * CAfile: /etc/ssl/certs/ca-certificates.crt CApath: /etc/ssl/certs * TLSv1.2 (OUT), TLS header, Certificate Status (22): } [5 bytes data] * TLSv1.2 (OUT), TLS handshake, Client hello (1): } [512 bytes data] * TLSv1.2 (IN), TLS handshake, Server hello (2): { [107 bytes data] * TLSv1.2 (IN), TLS handshake, Certificate (11): { [3740 bytes data] * TLSv1.2 (IN), TLS handshake, Server key exchange (12): { [333 bytes data] * TLSv1.2 (IN), TLS handshake, Server finished (14): { [4 bytes data] * TLSv1.2 (OUT), TLS handshake, Client key exchange (16): } [70 bytes data] * TLSv1.2 (OUT), TLS change cipher, Client hello (1): } [1 bytes data] * TLSv1.2 (OUT), TLS handshake, Finished (20): } [16 bytes data] * TLSv1.2 (IN), TLS change cipher, Client hello (1): { [1 bytes data] * TLSv1.2 (IN), TLS handshake, Finished (20): { [16 bytes data] * SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256 * ALPN, server accepted to use h2 * Server certificate: * subject: OU=Domain Control Validated; CN=*.wordpress.org * start date: Nov 6 17:42:01 2017 GMT * expire date: Dec 15 20:11:21 2020 GMT * subjectAltName: host "wordpress.org" matched cert's "wordpress.org" * issuer: C=US; ST=Arizona; L=Scottsdale; O=GoDaddy.com, Inc.; OU=http://certs. godaddy.com/repository/; CN=Go Daddy Secure Certificate Authority - G2 * SSL certificate verify ok. * Using HTTP2, server supports multi-use * Connection state changed (HTTP/2 confirmed) * Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0 } [5 bytes data] * Using Stream ID: 1 (easy handle 0x55bbc4d189f0) } [5 bytes data] > GET /latest.tar.gz HTTP/1.1 > Host: wordpress.org > User-Agent: curl/7.52.1 > Accept: */* > { [5 bytes data] * Connection state changed (MAX_CONCURRENT_STREAMS updated)! } [5 bytes data] < HTTP/2 200 < server: nginx < date: Tue, 02 Jan 2018 16:27:28 GMT < content-type: application/octet-stream < content-length: 9638827 < cache-control: private < content-disposition: attachment; filename=wordpress-4.9.1.tar.gz < last-modified: Wed, 29 Nov 2017 19:07:17 GMT < x-frame-options: SAMEORIGIN < content-md5: 111ecbfc98633103e1fc1105c0c00c76 < x-nc: HIT lax 249 < accept-ranges: bytes < { [1108 bytes data] 98 9412k 98 9248k 0 0 2903k 0 0:00:03 0:00:03 --:--:-- 2903k* Curl_http_done: called premature == 0 100 9412k 100 9412k 0 0 2436k 0 0:00:03 0:00:03 --:--:-- 2436k * Connection #0 to host wordpress.org left intact-
This reply was modified 8 years, 7 months ago by
unknownlsl.
-
This reply was modified 8 years, 7 months ago by
unknownlsl.
So it works from the command line, which isolates the problem to connecting via PHP from within WordPress. That’s a bit of progress.
Please install the health check plugin and report back its findings: https://wordpress.org/plugins/health-check/
Thank you very much for your hint about the health check plugin!
Output of “Health Check”:
PHP Version 7.0.19-1 MariaDB Server version 10.1.26-MariaDB-0+deb9u1 JSON Extension Your PHP install supports JSON. MySQL utf8mb4 support Your MariaDB version supports utf8mb4 Communication with WordPress.org Unable to reach WordPress.org at wordpress.org: cURL error 6: Could not resolve host: wordpress.org HTTPS status You are accessing this website using HTTPS. Secure communication Your WordPress install can communicate securely with other services. Scheduled events A scheduled event (wp_version_check) has failed to run. Your site still works, but this may indicate that scheduling posts or automated updates may not work as intended. Background updates Warning: An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums. (WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.) in /www/dlw/hosttest/wordpress/wp-admin/includes/update.php on line 121 No version control systems were detected. Your installation of WordPress doesn't require FTP credentials to perform updates. All of your WordPress files are writable. Loopback request The loopback request to your site took too long to complete, this may prevent WP_Cron from working, along with theme and plugin editors.Output of “Debug information”:
---- WordPress ---- Version 4.9.1 Language en_US Home URL https://XYZ Site URL https://XYZ Permalink structure Is this site using HTTPS? Yes Can anyone register on this site? No Default comment status open Is this a multisite? No User Count 1 Communication with WordPress.org Unable to reach WordPress.org at 66.155.40.250: cURL error 35: Create loopback requests The loopback request to your site took too long to complete, this may prevent WP_Cron from working, along with theme and plugin editors. Return to table of contents ---- Active theme ---- Name Twenty Seventeen Version 1.4 Author the WordPress team Author website https://wordpress.org/ Parent theme Not a child theme Supported theme features automatic-feed-links, title-tag, post-thumbnails, menus, html5, post-formats, custom-logo, customize-selective-refresh-widgets, editor-style, starter-content, custom-header, widgets Return to table of contents ---- Other themes (2) ---- Twenty Fifteen (twentyfifteen) version 1.9 by the WordPress team Twenty Sixteen (twentysixteen) version 1.4 by the WordPress team Return to table of contents ---- Active Plugins (1) ---- Health Check version 0.7.0 by The WordPress.org community Return to table of contents ---- Inactive Plugins (2) ---- Akismet Anti-Spam version 4.0.1 by Automattic Hello Dolly version 1.6 by Matt Mullenweg Return to table of contents ---- Server ---- The options shown below relate to your server setup. If changes are required, you may need your web host's assistance. Server architecture Linux 4.9.0-4-amd64 x86_64 PHP Version 7.0.19-1 (Supports 64bit values) PHP SAPI fpm-fcgi PHP max input variables 1000 PHP time limit -1 PHP memory limit 2048M Upload max filesize 50M PHP post max size 50M cURL Version 7.52.1 OpenSSL/1.0.2l SUHOSIN installed No Is the Imagick library available Yes Return to table of contents Database Extension mysqli Server version 5.5.5-10.1.26-MariaDB-0+deb9u1 Client version mysqlnd 5.0.12-dev - 20150407 - $Id: b5c5906d452ec590732a93b051f3827e02749b83 $ Database user debug Database host 127.0.0.1 Database table debugtest Database prefix wp_ Return to table of contents WordPress constants These values represent values set in your websites code which affect WordPress in various ways that may be of importance when seeking help with your site. ABSPATH /www/dlw/hosttest/wordpress/ WP_HOME Undefined WP_SITEURL Undefined WP_DEBUG Enabled WP_MAX_MEMORY_LIMIT 2048M WP_DEBUG_DISPLAY Enabled WP_DEBUG_LOG Disabled SCRIPT_DEBUG Disabled WP_CACHE Disabled CONCATENATE_SCRIPTS Undefined COMPRESS_SCRIPTS Undefined COMPRESS_CSS Undefined WP_LOCAL_DEV Undefined Return to table of contents Filesystem permissions The status of various locations WordPress needs to write files in various scenarios. The main WordPress directory Writable The wp-content directory Writable The uploads directory Writable The plugins directory Writable The themes directory WritablePHP-Info:
PHP Version 7.0.19-1 System Linux web1 4.9.0-4-amd64 #1 SMP Debian 4.9.65-3 (2017-12-03) x86_64 Build Date May 11 2017 14:04:47 Server API FPM/FastCGI Virtual Directory Support disabled Configuration File (php.ini) Path /etc/php/7.0/fpm Loaded Configuration File /etc/php/7.0/fpm/php.ini Scan this dir for additional .ini files /etc/php/7.0/fpm/conf.d Additional .ini files parsed /etc/php/7.0/fpm/conf.d/10-mysqlnd.ini, /etc/php/7.0/fpm/conf.d/10-opcache.ini, /etc/php/7.0/fpm/conf.d/10-pdo.ini, /etc/php/7.0/fpm/conf.d/15-xml.ini, /etc/php/7.0/fpm/conf.d/20-apcu.ini, /etc/php/7.0/fpm/conf.d/20-apcu_bc.ini, /etc/php/7.0/fpm/conf.d/20-bz2.ini, /etc/php/7.0/fpm/conf.d/20-calendar.ini, /etc/php/7.0/fpm/conf.d/20-ctype.ini, /etc/php/7.0/fpm/conf.d/20-curl.ini, /etc/php/7.0/fpm/conf.d/20-dom.ini, /etc/php/7.0/fpm/conf.d/20-exif.ini, /etc/php/7.0/fpm/conf.d/20-fileinfo.ini, /etc/php/7.0/fpm/conf.d/20-ftp.ini, /etc/php/7.0/fpm/conf.d/20-gd.ini, /etc/php/7.0/fpm/conf.d/20-geoip.ini, /etc/php/7.0/fpm/conf.d/20-gettext.ini, /etc/php/7.0/fpm/conf.d/20-iconv.ini, /etc/php/7.0/fpm/conf.d/20-imagick.ini, /etc/php/7.0/fpm/conf.d/20-imap.ini, /etc/php/7.0/fpm/conf.d/20-intl.ini, /etc/php/7.0/fpm/conf.d/20-json.ini, /etc/php/7.0/fpm/conf.d/20-mbstring.ini, /etc/php/7.0/fpm/conf.d/20-mcrypt.ini, /etc/php/7.0/fpm/conf.d/20-memcache.ini, /etc/php/7.0/fpm/conf.d/20-mongodb.ini, /etc/php/7.0/fpm/conf.d/20-mysqli.ini, /etc/php/7.0/fpm/conf.d/20-pdo_mysql.ini, /etc/php/7.0/fpm/conf.d/20-pdo_sqlite.ini, /etc/php/7.0/fpm/conf.d/20-phar.ini, /etc/php/7.0/fpm/conf.d/20-posix.ini, /etc/php/7.0/fpm/conf.d/20-pspell.ini, /etc/php/7.0/fpm/conf.d/20-readline.ini, /etc/php/7.0/fpm/conf.d/20-recode.ini, /etc/php/7.0/fpm/conf.d/20-shmop.ini, /etc/php/7.0/fpm/conf.d/20-simplexml.ini, /etc/php/7.0/fpm/conf.d/20-soap.ini, /etc/php/7.0/fpm/conf.d/20-sockets.ini, /etc/php/7.0/fpm/conf.d/20-sqlite3.ini, /etc/php/7.0/fpm/conf.d/20-sysvmsg.ini, /etc/php/7.0/fpm/conf.d/20-sysvsem.ini, /etc/php/7.0/fpm/conf.d/20-sysvshm.ini, /etc/php/7.0/fpm/conf.d/20-tidy.ini, /etc/php/7.0/fpm/conf.d/20-tokenizer.ini, /etc/php/7.0/fpm/conf.d/20-wddx.ini, /etc/php/7.0/fpm/conf.d/20-xmlreader.ini, /etc/php/7.0/fpm/conf.d/20-xmlrpc.ini, /etc/php/7.0/fpm/conf.d/20-xmlwriter.ini, /etc/php/7.0/fpm/conf.d/20-xsl.ini, /etc/php/7.0/fpm/conf.d/20-zip.ini PHP API 20151012 PHP Extension 20151012 Zend Extension 320151012 Zend Extension Build API320151012,NTS PHP Extension Build API20151012,NTS Debug Build no Thread Safety disabled Zend Signal Handling disabled Zend Memory Manager enabled Zend Multibyte Support provided by mbstring IPv6 Support enabled DTrace Support available, disabled Registered PHP Streams https, ftps, compress.zlib, php, file, glob, data, http, ftp, compress.bzip2, phar, zip Registered Stream Socket Transports tcp, udp, unix, udg, ssl, sslv2, tls, tlsv1.0, tlsv1.1, tlsv1.2 Registered Stream Filters zlib.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk, bzip2.*, convert.iconv.*, mcrypt.*, mdecrypt.*What I have changed now:
I added IP for wordpress.org to hosts file
-> changing error in health check plugin from:Communication with WordPress.org Unable to reach WordPress.org at wordpress.org: cURL error 6: Could not resolve host: wordpress.org
to
Communication with WordPress.org Unable to reach WordPress.org at 66.155.40.250: cURL error 35:
Other errors still the same.
Is there a way to display any more detailed error message than cURL error 35?
Be right back (buying some food)
-
This reply was modified 8 years, 7 months ago by
unknownlsl.
-
This reply was modified 8 years, 7 months ago by
unknownlsl.
do you have the latest php-curl and libcurl (for PHP 7)installed for Debian?
Sorry, it took a bit longer than expected.
aptitude search libcurl
v libcurl-dev –
p libcurl-ocaml – OCaml curl bindings (Runtime Library)
v libcurl-ocaml-34fm5 –
p libcurl-ocaml-dev – OCaml libcurl bindings (Development package)
v libcurl-ocaml-dev-34fm5 –
v libcurl-ssl-dev –
i A libcurl3 – Einfach nutzbare Client-Bibliothek für URL-Übertragungen (OpenSSL-Variante)
p libcurl3-dbg – debugging symbols for libcurl (OpenSSL, GnuTLS and NSS flavours)
v libcurl3-dev –
i A libcurl3-gnutls – Einfach nutzbare Client-Bibliothek für URL-Übertragungen (GnuTLS-Variante)
v libcurl3-gnutls-dev –
p libcurl3-nss – Einfach nutzbare Client-Bibliothek für URL-Übertragungen (NSS-Variante)
v libcurl3-nss-dev –
v libcurl3-openssl-dev –
v libcurl4-dbg –
v libcurl4-dev –
p libcurl4-doc – documentation for libcurl
p libcurl4-gnutls-dev – development files and documentation for libcurl (GnuTLS flavour)
p libcurl4-nss-dev – development files and documentation for libcurl (NSS flavour)
i libcurl4-openssl-devaptitude search php7.0-curl
i php7.0-curl – CURL-Modul für PHPboth should be installed.
As always – thank you very much for your help! If curl wouldn’t work, would the available modules be displayed in the admin interface?
EDIT: I will try further methods tomorrow. I work the whole day solving that error and I really can’t concentrate anymore. Have a nice day and thank you very very much again!
-
This reply was modified 8 years, 7 months ago by
unknownlsl.
-
This reply was modified 8 years, 7 months ago by
unknownlsl.
-
This reply was modified 8 years, 7 months ago by
unknownlsl.
See https://wordpress.org/support/topic/curl-error-6-could-not-resolve-host/#post-8943748
What version of libc do you have on the server?
-
This reply was modified 8 years, 7 months ago by
The topic ‘Could not establish a secure connection’ is closed to new replies.