0

I just installed varnish and used the default v4 magento configuration but whenever I flush the cache I'm getting this error and I have no idea what to do to fix it

a:4:{i:0;s:20:"Invalid header value";i:1;s:6328:"#0 /var/www/html/vendor/magento/zendframework1/library/Zend/Http/Client.php(1605): Zend_Http_Header_HeaderValue::assertValid('\x87'\x02P"\x19\xCD\xCB\xF9\xB3q\xEC\x14\xAA\xA6...')
#1 /var/www/html/vendor/magento/zendframework1/library/Zend/Http/Client.php(467): Zend_Http_Client->_validateHeaderValue('\x87'\x02P"\x19\xCD\xCB\xF9\xB3q\xEC\x14\xAA\xA6...')
#2 /var/www/html/vendor/magento/zendframework1/library/Zend/Http/Client.php(439): Zend_Http_Client->setHeaders('x-api-key', '\x87'\x02P"\x19\xCD\xCB\xF9\xB3q\xEC\x14\xAA\xA6...')
#3 /var/www/html/vendor/magento/module-new-relic-reporting/Model/Apm/Deployments.php(72): Zend_Http_Client->setHeaders(Array)
#4 /var/www/html/vendor/magento/module-new-relic-reporting/Model/Observer/ReportSystemCacheFlushToNewRelic.php(62): Magento\NewRelicReporting\Model\Apm\Deployments->setDeployment('Cache Flush', 'admin flushed t...', 'admin')
#5 /var/www/html/vendor/magento/framework/Event/Invoker/InvokerDefault.php(73): Magento\NewRelicReporting\Model\Observer\ReportSystemCacheFlushToNewRelic->execute(Object(Magento\Framework\Event\Observer))
#6 /var/www/html/vendor/magento/framework/Event/Invoker/InvokerDefault.php(61): Magento\Framework\Event\Invoker\InvokerDefault->_callObserverMethod(Object(Magento\NewRelicReporting\Model\Observer\ReportSystemCacheFlushToNewRelic), Object(Magento\Framework\Event\Observer))
#7 /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))
#8 /var/www/html/vendor/magento/framework/Event/Manager.php(66): Magento\Framework\Event\Invoker\InvokerDefault\Interceptor->dispatch(Array, Object(Magento\Framework\Event\Observer))
#9 /var/www/html/var/generation/Magento/Framework/Event/Manager/Proxy.php(95): Magento\Framework\Event\Manager->dispatch('adminhtml_cache...', Array)
#10 /var/www/html/vendor/magento/module-backend/Controller/Adminhtml/Cache/FlushSystem.php(22): Magento\Framework\Event\Manager\Proxy->dispatch('adminhtml_cache...')
#11 /var/www/html/vendor/magento/framework/App/Action/Action.php(102): Magento\Backend\Controller\Adminhtml\Cache\FlushSystem->execute()
#12 /var/www/html/vendor/magento/module-backend/App/AbstractAction.php(226): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))
#13 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(74): Magento\Backend\App\AbstractAction->dispatch(Object(Magento\Framework\App\Request\Http))
#14 /var/www/html/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Backend\Controller\Adminhtml\Cache\FlushSystem\Interceptor->___callParent('dispatch', Array)
#15 /var/www/html/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Backend...', 'dispatch', Object(Magento\Backend\Controller\Adminhtml\Cache\FlushSystem\Interceptor), Array, 'adminAuthentica...')
#16 /var/www/html/vendor/magento/module-backend/App/Action/Plugin/Authentication.php(143): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
#17 /var/www/html/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Backend\App\Action\Plugin\Authentication->aroundDispatch(Object(Magento\Backend\Controller\Adminhtml\Cache\FlushSystem\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#18 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Backend...', 'dispatch', Object(Magento\Backend\Controller\Adminhtml\Cache\FlushSystem\Interceptor), Array, 'adminMassaction...')
#19 /var/www/html/vendor/magento/module-backend/App/Action/Plugin/MassactionKey.php(33): Magento\Backend\Controller\Adminhtml\Cache\FlushSystem\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#20 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(142): Magento\Backend\App\Action\Plugin\MassactionKey->aroundDispatch(Object(Magento\Backend\Controller\Adminhtml\Cache\FlushSystem\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#21 /var/www/html/var/generation/Magento/Backend/Controller/Adminhtml/Cache/FlushSystem/Interceptor.php(26): Magento\Backend\Controller\Adminhtml\Cache\FlushSystem\Interceptor->___callPlugins('dispatch', Array, Array)
#22 /var/www/html/vendor/magento/framework/App/FrontController.php(55): Magento\Backend\Controller\Adminhtml\Cache\FlushSystem\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#23 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(74): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#24 /var/www/html/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
#25 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'install')
#26 /var/www/html/vendor/magento/framework/Module/Plugin/DbStatusValidator.php(69): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#27 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(142): Magento\Framework\Module\Plugin\DbStatusValidator->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#28 /var/www/html/var/generation/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
#29 /var/www/html/vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#30 /var/www/html/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()
#31 /var/www/html/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#32 {main}";s:3:"url";s:100:"/admin/admin/cache/flushSystem/key/814248736250b59b868903b8bab3f6de9c404fb6225a3191a1fcde54ee868c50/";s:11:"script_name";s:10:"/index.php";}
  • Does your VCL version matches to that of Varnish? What plugin in your Magento setup tries to set x-api-key header? This is a bit unusual. – Danila Vershinin May 3 '17 at 18:40
  • @DanielV. I have the vcl 4 and it matches varnish and as far as that header goes I think it is cloudflare but I'm not 100% sure – user3610374 May 3 '17 at 22:03

Your Answer

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

Browse other questions tagged or ask your own question.