繁体   English   中英

Curl 命令在 centos 服务器上不起作用

[英]Curl command not working from centos Server

我尝试从centos到Redhat服务器执行以下curl命令。 它返回以下错误。 但是当我直接在 RedHat 服务器中执行它时,相同的 curl 命令工作正常。

卷曲命令:

curl --cert client_cert.pem --key client_key.pem --cacert server_cert.pem -u uname:pwd -X POST https:xyz.com/start -H "Content-Type: application/json" -H "接受: / " --data '{"operationName": "Upload", "operationAlias": "从网络上传配置数据", "operationAttributes": {"takeSranBtsFileBackups": true, "WS": "working_set2_32118"}}' -克

错误:

“错误”:{“userMessage”:“WebApplicationException:com.sun.jersey.api.MessageException:Java 类 com.nokia.oss.configurator.rac.operationservice.webservice.rest.bindings.StartOperation 的消息正文阅读器,以及Java 类型类 com.nokia.oss.configurator.rac.operationservice.webservice.rest.bindings.StartOperation,并且未找到 MIME 媒体类型 application/octet-stream。} curl: (6) 无法解析主机:应用程序;名称或服务未知}

我该如何解决这个错误?

curl: (6) Could not resolve host: application; Name or service not known}

貌似dns无法解析https:xyz.com 好吧,你的主机格式不对。 使用此格式: https : //stackoverflow.com

或在 centos 中检查您的 dns 配置:

[root@pftest2 ~]# cat /etc/resolv.conf 
# Generated by NetworkManager
nameserver 114.114.114.114
nameserver 8.8.8.8

暂无
暂无

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

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