简体   繁体   English

Magento SOAP APIv2服务器重启后停止工作

[英]Magento SOAP APIv2 Stopped working after server restart

My server shutdown unexpectedly today due to Amazon Spot Instance. 由于Amazon Spot Instance,我的服务器今天意外关闭。 I restarted the server, updated the address and cleared the cache in var/cache (If not the updated address won't show). 我重新启动了服务器,更新了地址并清除了var / cache中的缓存(如果没有更新的地址则不会显示)。

After which, the SOAP API stopped working. 之后,SOAP API停止工作。 It isn't displaying any error, I just can't connect to it even after I disable the API account. 它没有显示任何错误,即使我禁用了API帐户,我也无法连接到它。 Normally when you visit your API from browser eg 通常,当您从浏览器访问API时,例如

http://example.com/index.php/api/v2_soap/?wsdl http://example.com/index.php/api/v2_soap/?wsdl
http://example.com/index.php/api/v2_soap/ http://example.com/index.php/api/v2_soap/
http://example.com/index.php/api/ http://example.com/index.php/api/

You will get some results, eg XML file, error, or data but it's redirecting me straight to the home page now, so it's obviously not getting data from the API. 您将获得一些结果,例如XML文件,错误或数据,但它现在直接将我重定向到主页 ,因此它显然无法从API获取数据。

Why is it even redirecting me to the home page? 为什么甚至将我重定向到主页?

The code to calling API is fine, I'm quite sure, since even when I disable the account, it still doesn't show any error etc. Furthermore there wasn't any modification to the code before the server shutdown. 调用API的代码很好,我很确定,因为即使我禁用了帐户,它仍然没有显示任何错误等。此外,在服务器关闭之前没有对代码进行任何修改。

  1. Is there anyway I can restart the web service? 无论如何我可以重启网络服务吗?
  2. Did my clear cache of var/cache screw the API up? 我清除var / cache的缓存是不是搞砸了API?

I tried to see what was loaded before it redirects. 我试图在重定向之前看到加载的内容。

Reload the page to get source for: http://example.com/index.php/api/v2_soap/?wsdl 重新加载页面以获取源代码: http//example.com/index.php/api/v2_soap/?wsdl

Found the reason .... I find it quite stupid. 找到原因......我发现它很愚蠢。

core_config_data - my baseurl is set with www. core_config_data - 我的baseurl设置为www。 infront so when you call the API , you will also need the www. 因此,当您调用API时,您还需要www。 infront 在前

  1. disabled api module? 禁用api模块?
  2. rewrite via htaccess, vhost or magento system? 通过htaccess,vhost或magento系统重写?
  3. cms page named api? cms页面名为api? not very possible but one never knows 不太可能,但一个人永远不会知道
  4. bad custom code in observer, controller rewrite? 观察者中的自定义代码错误,控制器重写?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM