B
B
BusterX2015-04-29 17:41:38
Squid
BusterX, 2015-04-29 17:41:38

No route to host error when installing Laravel with Composer?

There is a WEB server on ubuntu + LAMP, the Internet is accessed through a Squid proxy (separate machine).
I want to try Laravel.
1. Globally installed Composer

curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer

2. Next, in /var/www/html/ downloaded Laravel
composer create-project laravel/laravel laravel --prefer-dist

3. The process does not go further, when diagnosing,
sudo composer diag
I have such a picture
Checking composer.json: OK
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity: FAIL
[Composer\Downloader\TransportException] The "https://packagist.org/packages.json" file could not be downloaded: failed to open stream: No route to host
Checking github.com rate limit: FAIL
[Composer\Downloader\TransportException] The "https://api.github.com/rate_limit" file could not be downloaded: failed to open stream: No route to host
Checking disk free space: OK
Checking composer version:

  [Composer\Downloader\TransportException]
  The "https://getcomposer.org/version" file could not be downloaded: failed to open stream: No route to host

diagnose

The following request appears in the Squid logs:
192.168.1.10 - - [29/Apr/2015:15:47:40 +0400] "NONE NONE:// HTTP/0.0" 400 1302 TCP_DENIED:NONE

Actually, when
sudo composer install
answering
Loading composer repositories with package information

  [Composer\Downloader\TransportException]
  The "https://packagist.org/packages.json" file could not be downloaded: failed to open stream: No route to host

As I understand it, the proxy is blocking an empty "anonymous" request (I could be wrong). The problem is most likely on my web server.
http_proxy, https_proxy are registered, ubuntu and apt themselves see the Internet.
I do not administer the proxy, but I can ask you to correct the rules.
What and where should I look/change?
Thank you in advance!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
mureevms, 2015-04-29
@mureevms

Please note that the presented log from the proxy shows the http protocol, and in the request httpS. It seems to me that this is the issue.
Are you sure that the proxy works through httpS? If it does work, is its certificate imported into the system? If it is imported, does composer know how to work with third-party certificates, or is the certificate hardcoded in it and it cannot work with others? If he can, does he see the imported one?
Try to find out how https packets go on the proxy (gateway). Ask the proxy admin to temporarily give direct access to port 443, bypassing the proxy, it will most likely work. Check if https is working on the system itself

B
BusterX, 2015-04-30
@BusterX

It seems to work, because in point 1 the command "curl -sS httpS://getcomposer.org/installer | php" was executed, which worked!
Thanks for the answer!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question