0
点赞
收藏
分享

微信扫一扫

curl: (56) Recv failure: Connection reset by peer问题解决

才德的女子 2022-04-14 阅读 189
linux

问题现象

[root@centos7 yang]# curl  -X POST --header "Content-Type:application/json" --data '{"username":"yang"}' http://10.226.151.83:1611/service
curl: (56) Recv failure: Connection reset by peer
[root@centos7 yang]# curl  -X POST --header "Content-Type:application/json" --data '{"username":"yang"}' http://10.226.151.8:1612/service
[root@centos7 yang]#

问题原因

出现此问题可能有多种情况,请结合自己的实际情况查询问题原因。
我这边是指定的端口号1611不对,1612不是一个http service的端口,是grpc的接口。

解决方法

更改为http service的端口1612即可解决

[root@centos7 yang]# curl  -X POST --header "Content-Type:application/json" --data '{"username":"yang"}' http://10.226.151.8:1612/service
[root@centos7 yang]#
举报

相关推荐

0 条评论