lighthouse-ci icon indicating copy to clipboard operation
lighthouse-ci copied to clipboard

Getting error (ERR_CONNECTION_REFUSED)

Open xerosanyam opened this issue 5 years ago • 2 comments

Hi, thanks for this amazing project. I have a question, not an issue per se.

I am getting an error for one of the URLs, works well for others

Runtime error encountered: Lighthouse was unable to reliably load the page you requested. Make sure you are testing the correct URL and that the server is properly responding to all requests. (Details: net::ERR_CONNECTION_REFUSED)

Where should I start investigating the cause?

xerosanyam avatar Jun 02 '20 18:06 xerosanyam

Thanks for filing @xerosanyam! This error means that the server isn't responding to the connection.

If it's a localhost or dev server URL, that usually just means the server crashed or isn't running anymore. If it's a public URL, sometimes it means firewall rules have rejected the connection (we've seen this before with broken User Agent, regexes).

As a troubleshooting step, make sure you can run

curl 'https://whatever-the-problem-url-is.com/' \
  -H 'user-agent: Mozilla/5.0 (Linux; Android 6.0.1; Moto G (4)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Mobile Safari/537.36 Chrome-Lighthouse' \
  --compressed

successfully before running Lighthouse CI.

patrickhulce avatar Jun 02 '20 19:06 patrickhulce

Спасибо за подачу @xerosanyam ! Эта ошибка означает, что сервер не отвечает на соединение.

Если это URL-адрес localhost или dev-сервера, это обычно означает, что сервер вышел из строя или больше не работает. Если это общедоступный URL-адрес, иногда это означает, что правила брандмауэра отклонили соединение (мы видели это раньше с неработающим пользовательским агентом, регулярными выражениями).

В качестве шага по устранению неполадок убедитесь, что вы можете запустить

curl 'https://whatever-the-problem-url-is.com/' \
  -H 'user-agent: Mozilla/5.0 (Linux; Android 6.0.1; Moto G (4)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Mobile Safari/537.36 Chrome-Lighthouse' \
  --compressed

успешно перед запуском Lighthouse CI.

Hi, I have the same problem. I run it from the container to the localhost, the problem is only with the local host. Curl always works out.

Zayc-Pavel avatar Dec 10 '21 06:12 Zayc-Pavel