3

I'm getting the following errors pretty regularly and I have no idea why :(

[2017-05-03 21:54:13] main.CRITICAL: Zend_Http_Client_Exception: Unable to read response, or response is empty in /var/www/html/vendor/magento/zendframework1/library/Zend/Http/Client.php:1093
Stack trace:
#0 /var/www/html/vendor/magento/framework/HTTP/ZendClient.php(52): Zend_Http_Client->request(NULL)
#1 /var/www/html/vendor/magento/module-new-relic-reporting/Model/Apm/Deployments.php(85): Magento\Framework\HTTP\ZendClient->request()
#2 /var/www/html/vendor/magento/module-new-relic-reporting/Model/Cron/ReportNewRelicCron.php(148): Magento\NewRelicReporting\Model\Apm\Deployments->setDeployment('Modules Enabled', 'Apptrian_ImageO...', 'cron')
#3 /var/www/html/vendor/magento/module-new-relic-reporting/Model/Cron/ReportNewRelicCron.php(124): Magento\NewRelicReporting\Model\Cron\ReportNewRelicCron->setModuleChangeStatusDeployment(Array, 'Modules Enabled')
#4 /var/www/html/vendor/magento/module-new-relic-reporting/Model/Cron/ReportNewRelicCron.php(195): Magento\NewRelicReporting\Model\Cron\ReportNewRelicCron->reportModules()
#5 /var/www/html/vendor/magento/module-new-relic-reporting/Model/Cron.php(62): Magento\NewRelicReporting\Model\Cron\ReportNewRelicCron->report()
#6 [internal function]: Magento\NewRelicReporting\Model\Cron->runCron(Object(Magento\Cron\Model\Schedule))
#7 /var/www/html/vendor/magento/module-cron/Observer/ProcessCronQueueObserver.php(247): call_user_func_array(Array, Array)
#8 /var/www/html/vendor/magento/module-cron/Observer/ProcessCronQueueObserver.php(195): Magento\Cron\Observer\ProcessCronQueueObserver->_runJob(1493830440, 1493830441, Array, Object(Magento\Cron\Model\Schedule), 'default')
#9 /var/www/html/vendor/magento/framework/Event/Invoker/InvokerDefault.php(73): Magento\Cron\Observer\ProcessCronQueueObserver->execute(Object(Magento\Framework\Event\Observer))
#10 /var/www/html/vendor/magento/framework/Event/Invoker/InvokerDefault.php(61): Magento\Framework\Event\Invoker\InvokerDefault->_callObserverMethod(Object(Magento\Cron\Observer\ProcessCronQueueObserver), Object(Magento\Framework\Event\Observer))
#11 /var/www/html/var/generation/Magento/Framework/Event/Invoker/InvokerDefault/Interceptor.php(24): Magento\Framework\Event\Invoker\InvokerDefault->dispatch(Array, Object(Magento\Framework\Event\Observer))
#12 /var/www/html/vendor/magento/framework/Event/Manager.php(66): Magento\Framework\Event\Invoker\InvokerDefault\Interceptor->dispatch(Array, Object(Magento\Framework\Event\Observer))
#13 /var/www/html/var/generation/Magento/Framework/Event/Manager/Proxy.php(95): Magento\Framework\Event\Manager->dispatch('default', Array)
#14 /var/www/html/vendor/magento/framework/App/Cron.php(74): Magento\Framework\Event\Manager\Proxy->dispatch('default')
#15 /var/www/html/vendor/magento/module-cron/Console/Command/CronCommand.php(98): Magento\Framework\App\Cron->launch()
#16 /var/www/html/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Magento\Cron\Console\Command\CronCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#17 /var/www/html/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#18 /var/www/html/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(Magento\Cron\Console\Command\CronCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#19 /var/www/html/vendor/magento/framework/Console/Cli.php(96): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#20 /var/www/html/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Magento\Framework\Console\Cli->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#21 /var/www/html/bin/magento(23): Symfony\Component\Console\Application->run()
#22 {main} [] []
2

I faced the same issue and the problem was with the SSL certificate.

I was running Magento2.3 on Windows and Xampp.

To debug this issue I went to request method of class Zend_Http_Client (vendor\magento\zendframework1\library\Zend\Http\Client.php)

There, after this statement $response = $this->adapter->read(); where response is being recorded, I added this peice of code to fetch error $this->adapter->getError() which gave me the exact error.

  • Saved me a day of troubleshooting a spotty connection! – Matthew Colley Jan 29 '20 at 19:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.