Problem with the SSL CA cert (path? access rights?)

测试服务器无故调用接口失败,返回一直为空。不明所以,于是在curl_post方法打印异常

curl_error

发现报错为Problem with the SSL CA cert (path? access rights?)

很奇怪,为此从正式服将代码覆盖到测试服,异常依旧。但是正式服明明没有问题。

使用postman也可以正常返回。

网上搜索,叫安装ca-certificate

yum reinstall openssl ca-certificates -y

直接报错

There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:

   No module named yum

Please install a package which provides this module, or
verify that the module is installed correctly.

It's possible that the above module doesn't match the
current version of Python, which is:
2.7.10 (default, Apr  2 2018, 10:49:48) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-18)]

If you cannot solve this problem yourself, please go to 
the yum faq at:
  http://yum.baseurl.org/wiki/Faq

使用命令查看是否已存在

ll /etc/pki/tls/certs/ca-bundle.crt

结果正式服是

-rw-r--r-- 1 root root 884985 May 10  2017 /etc/pki/tls/certs/ca-bundle.crt

测试服却是

-rw-r--r--. 1 root root 786601 Jun 24  2014 /etc/pki/tls/certs/ca-bundle.crt

看起来是不够新,尝试寻找更新命令。未及找到,看见有人推荐解决方法是重启,猛然想起好像之前也处理过这样的问题,于是,果断重启apche

service httpd restart

问题解决。。

posted @ 2018-04-27 19:13  村长叫我返去扒龙船  阅读(2175)  评论(0编辑  收藏  举报