S
S
saanneekk2017-02-05 22:30:24
linux
saanneekk, 2017-02-05 22:30:24

How to fix cURL error 7: Failed to connect to 80: Connection refused?

Good afternoon! I installed lavarel-prerender on the site, but the following errors are pouring in:

ConnectException in CurlFactory.php line 186:
cURL error 7: Failed to connect to foods-service.com.ua port 443: Connection refused (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)
in CurlFactory.php line 186
at CurlFactory::createRejection(object(EasyHandle), array('errno' => '7', 'error' => 'Failed to connect to foods-service.com.ua port 443: Connection refused', 'url' => 'https://foods-service.com.ua/https%3A%2F%2Ffoods-service.com.ua%2F%3F_escaped_fragment_%3D', 'content_type' => null, 'http_code' => '0', 'header_size' => '0', 'request_size' => '0', 'filetime' => '-1', 'ssl_verify_result' => '0', 'redirect_count' => '0', 'total_time' => '0.004607', 'namelookup_time' => '0.004347', 'connect_time' => '0', 'pretransfer_time' => '0', 'size_upload' => '0', 'size_download' => '0', 'speed_download' => '0', 'speed_upload' => '0', 'download_content_length' => '-1', 'upload_content_length' => '-1', 'starttransfer_time' => '0', 'redirect_time' => '0', 'redirect_url' => '', 'primary_ip' => '', 'certinfo' => array(), 'primary_port' => '0', 'local_ip' => '', 'local_port' => '0')) in CurlFactory.php line 150
at CurlFactory::finishError(object(CurlHandler), object(EasyHandle), object(CurlFactory)) in CurlFactory.php line 103
at CurlFactory::finish(object(CurlHandler), object(EasyHandle), object(CurlFactory)) in CurlHandler.php line 43
at CurlHandler->__invoke(object(Request), array('synchronous' => true, 'handler' => object(HandlerStack), 'allow_redirects' => array('max' => '5', 'protocols' => array('http', 'https'), 'strict' => false, 'referer' => false, 'track_redirects' => false), 'http_errors' => true, 'decode_content' => true, 'verify' => true, 'cookies' => false)) in Proxy.php line 28
at Proxy::GuzzleHttp\Handler\{closure}(object(Request), array('synchronous' => true, 'handler' => object(HandlerStack), 'allow_redirects' => array('max' => '5', 'protocols' => array('http', 'https'), 'strict' => false, 'referer' => false, 'track_redirects' => false), 'http_errors' => true, 'decode_content' => true, 'verify' => true, 'cookies' => false)) in /home/admin/web/foods-service.com.ua/public_html/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php line 51
at Proxy::GuzzleHttp\Handler\{closure}(object(Request), array('synchronous' => true, 'handler' => object(HandlerStack), 'allow_redirects' => array('max' => '5', 'protocols' => array('http', 'https'), 'strict' => false, 'referer' => false, 'track_redirects' => false), 'http_errors' => true, 'decode_content' => true, 'verify' => true, 'cookies' => false)) in PrepareBodyMiddleware.php line 42
at PrepareBodyMiddleware->__invoke(object(Request), array('synchronous' => true, 'handler' => object(HandlerStack), 'allow_redirects' => array('max' => '5', 'protocols' => array('http', 'https'), 'strict' => false, 'referer' => false, 'track_redirects' => false), 'http_errors' => true, 'decode_content' => true, 'verify' => true, 'cookies' => false)) in Middleware.php line 30
at Middleware::GuzzleHttp\{closure}(object(Request), array('synchronous' => true, 'handler' => object(HandlerStack), 'allow_redirects' => array('max' => '5', 'protocols' => array('http', 'https'), 'strict' => false, 'referer' => false, 'track_redirects' => false), 'http_errors' => true, 'decode_content' => true, 'verify' => true, 'cookies' => false)) in RedirectMiddleware.php line 68
at RedirectMiddleware->__invoke(object(Request), array('synchronous' => true, 'handler' => object(HandlerStack), 'allow_redirects' => array('max' => '5', 'protocols' => array('http', 'https'), 'strict' => false, 'referer' => false, 'track_redirects' => false), 'http_errors' => true, 'decode_content' => true, 'verify' => true, 'cookies' => false)) in Middleware.php line 59
at Middleware::GuzzleHttp\{closure}(object(Request), array('synchronous' => true, 'handler' => object(HandlerStack), 'allow_redirects' => array('max' => '5', 'protocols' => array('http', 'https'), 'strict' => false, 'referer' => false, 'track_redirects' => false), 'http_errors' => true, 'decode_content' => true, 'verify' => true, 'cookies' => false)) in HandlerStack.php line 67
at HandlerStack->__invoke(object(Request), array('synchronous' => true, 'handler' => object(HandlerStack), 'allow_redirects' => array('max' => '5', 'protocols' => array('http', 'https'), 'strict' => false, 'referer' => false, 'track_redirects' => false), 'http_errors' => true, 'decode_content' => true, 'verify' => true, 'cookies' => false)) in Client.php line 275
at Client->transfer(object(Request), array('synchronous' => true, 'handler' => object(HandlerStack), 'allow_redirects' => array('max' => '5', 'protocols' => array('http', 'https'), 'strict' => false, 'referer' => false, 'track_redirects' => false), 'http_errors' => true, 'decode_content' => true, 'verify' => true, 'cookies' => false, '_conditional' => array('User-Agent' => 'GuzzleHttp/6.2.1 curl/7.35.0 PHP/5.5.9-1ubuntu4.20'))) in Client.php line 123
at Client->requestAsync('get', 'https://foods-service.com.ua/https%3A%2F%2Ffoods-service.com.ua%2F%3F_escaped_fragment_%3D', array('headers' => array('User-Agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36'), 'synchronous' => true)) in Client.php line 129
at Client->request('get', 'https://foods-service.com.ua/https%3A%2F%2Ffoods-service.com.ua%2F%3F_escaped_fragment_%3D', array('headers' => array('User-Agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36'))) in Client.php line 87
at Client->__call('get', array('https://foods-service.com.ua/https%3A%2F%2Ffoods-service.com.ua%2F%3F_escaped_fragment_%3D', array('headers' => array('User-Agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36')))) in PrerenderMiddleware.php line 178
at Client->get('https://foods-service.com.ua/https%3A%2F%2Ffoods-service.com.ua%2F%3F_escaped_fragment_%3D', array('headers' => array('User-Agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36'))) in PrerenderMiddleware.php line 178
at PrerenderMiddleware->getPrerenderedPageResponse(object(Request)) in PrerenderMiddleware.php line 98
at PrerenderMiddleware->handle(object(Request), object(Closure))
at call_user_func_array(array(object(PrerenderMiddleware), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 136
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in CheckForMaintenanceMode.php line 44
at CheckForMaintenanceMode->handle(object(Request), object(Closure))
at call_user_func_array(array(object(CheckForMaintenanceMode), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 136
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 103
at Pipeline->then(object(Closure)) in Kernel.php line 132
at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 99
at Kernel->handle(object(Request)) in index.php line 54

Screenshot : joxi.ru/xAeBzLSpXjNMry
Who can tell what the problem is?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
younghacker, 2017-02-06
@younghacker

cURL error 7: Failed to connect to foods-service.com.ua port 443: Connection refused (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)

Your host
1) was banned
2) your firewall is crookedly configured
3) outgoing connections are prohibited from the host.
For example, I'm fine
$ nmap -p80,443 foods-service.com.ua

Starting Nmap 7.12 ( https://nmap.org ) at 2017-02-05 22:24 CET
Nmap scan report for foods-service.com.ua (37.139.15.228)
Host is up (0.036s latency).
PORT    STATE SERVICE
80/tcp  open  http
443/tcp open  https

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question