Hi guys. Drupal 8 install, behind a proxy for http/https that works fine for everything but Drupal. In settings.php:

$settings['proxy_server'] = '192.0.0.3';
$settings['proxy_port'] = 8089;
# $settings['proxy_username'] = '';
# $settings['proxy_password'] = '';
$settings['proxy_user_agent'] = '';
$settings['proxy_exceptions'] = array('127.0.0.1', 'localhost');

Whenever I try and update Drupal, I get this:

GuzzleHttp\Exception\ConnectException: cURL error 6: Could not resolve host: updates.drupal.org (see http://curl.haxx.se/libcurl/c/libcurl-errors.html) in GuzzleHttp\Handler\CurlFactory::createRejection() (line 186 of /var/www/drupal8/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php).

When logged into the system and using the same proxy settings via curl on the command line everything is fine, so the problem doesn't seem to be with curl but rather Drupal not utilising the proxy settings.

I found a couple of modules for this but they aren't for Drupal 8 (and the dev ones for Drupal 8 don't work due to lack of info.yml etc.)

Any ideas?

Comments

raj45’s picture

I am getting almost the same error:
GuzzleHttp\Exception\ConnectException: cURL error 7: Failed to connect to updates.drupal.org port 80: Connection refused (see http://curl.haxx.se/libcurl/c/libcurl-errors.html) in GuzzleHttp\Handler\CurlFactory::createRejection() (line 186 of /data/www/drupal8/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php).

drush up from the command line works fine for me.

I had to add our proxy name proxy=http://dmzproxy:3128 to ~/.curlrc, to make curl updates.drupal.org work.

@elevarni: What happens if you add your host name to your proxy-exceptions?

raj45’s picture

I have created an issue in the Drupal core section (https://www.drupal.org/node/2687623) and a working solution has been posted.