[英]Magento SOAP-ERROR: Parsing WSDL - by cron
I have an ERP using the magento SOAP API v2 ( http://www.example.com/api/v2_soap/?wsdl ).我有一个使用 magento SOAP API v2 ( http://www.example.com/api/v2_soap/?wsdl ) 的 ERP。 Through my local server, crons access every minute the API and synchronize data.
通过我的本地服务器,cron 每分钟访问 API 并同步数据。
Everything always worked very well until one day just stopped working, firing the error:一切都很好,直到有一天停止工作,引发错误:
Symfony\\Component\\Debug\\Exception\\FatalErrorException: SOAP-ERROR: Parsing WSDL: Couldn't load from ' http://www.example.com/api/v2_soap/?wsdl ' : failed to load external entity " http://www.example.com/api/v2_soap/?wsdl "
Symfony\\Component\\Debug\\Exception\\FatalErrorException:SOAP-ERROR:解析 WSDL:无法从“ http://www.example.com/api/v2_soap/?wsdl ”加载:无法加载外部实体“ http:// /www.example.com/api/v2_soap/?wsdl ”
When worked, this error happened a few times an hour, but now it always happens.工作时,这个错误每小时发生几次,但现在它总是发生。
My server is a ubuntu 16.04 and use the laravel framework 5.2.我的服务器是 ubuntu 16.04 并使用 laravel 框架 5.2。
The big problem is that if I access the api in my local server by curl for example, everything works, but with cron stopped working.最大的问题是,例如,如果我通过 curl 访问本地服务器中的 api,一切正常,但 cron 停止工作。
I know there are many questions on this subject, but none solved my problem.我知道关于这个主题有很多问题,但没有一个能解决我的问题。
Thanks.谢谢。
我以前遇到过这种情况,不得不将soap服务器(您的Magento机器)的主机名放在/etc/hosts文件中,因为在进行soap调用时,服务器必须能够自行解析。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.