首页 / 故障排查 / 快速解决linux服务器curl报curl: (35) Peer reports incompatible or unsupported protocol version.

快速解决linux服务器curl报curl: (35) Peer reports incompatible or unsupported protocol version.

2023-07-06 08:33:33故障排查 阅读 738

有时候在linux服务器上想快速curl一个某个网址,但却出现了报错,


curl: (35) Peer reports incompatible or unsupported protocol version.
[root@localhost ~]# curl -A "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36" "https://www.isres.com/"
curl: (35) Peer reports incompatible or unsupported protocol version.
网上很多的建议是升级openssl ,有时候也能解决问题,但对于需要快速处理问题的情况,这费事一些,而且还有可能遇到问题。


这个错误通常表示你正在尝试使用的协议版本不被服务器所支持,或者服务器无法识别你发送的协议版本。
如果在使用 HTTPS 连接时出现此错误,可能是由于本地的 OpenSSL 版本较旧,不支持服务器使用的加密套件或协议版本。
以下是curl: (35) Peer reports incompatible or unsupported protocol version.两个解决思路

1、猜如果自己高于对方网站的ssl,则降低版本访问【一般很多】


curl --tlsv1.2 https://example.com


2、禁用ssl验证


curl -k https://example.com【用得最多】


3、有时候使用--tlsv1.2后会遇到以下报错


curl: (60) The certificate issuer's certificate has expired.  Check your system date and time.
More details here: http://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
 of Certificate Authority (CA) public keys (CA certs). If the default
 bundle file isn't adequate, you can specify an alternate file
 using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
 the bundle, the certificate verification probably failed due to a
 problem with the certificate (it might be expired, or the name might
 not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
 the -k (or --insecure) option.

解决方式就是二者同时使用

curl -k --tlsv1.2 https://example.com




本文《快速解决linux服务器curl报curl: (35) Peer reports incompatible or unsupported protocol version.》由爱思考吧 isres.com 分享,转载请注明出处。本文网址:https://www.isres.com/jingyan2/79.html

本站主要收集测评能够节省时间和提升效率的软件工具并分享使用与学习的过程和感受,任何情况下用户都需遵守所使用软件资源的相关协议。与《快速解决linux服务器curl报curl: (35) Peer reports incompatible or unsupported protocol version.》有关的本站文章及资源仅供个人学习交流使用,相关资源请下载后24小时内删除,请勿用于其它用途,因此产生的任何问题由您自行承担。

相关推荐

猜你喜欢

  • u盘安装Centos7报starting timeout scripts错误

    这个问题出现两次,有必要记录一下了。 就是需要在显示 安装界面 。 install centos 和 test mdeia 的界面上。 按一下tab,修改一个路径 按网上说的,就是WIN10刻录才这样...

    2023-04-25 12:14:43 373
  • playwright._impl._api_types.TimeoutError: Timeout 30000ms exceeded.

    这是默认情况下,playwright的报错,默认是30秒 playwright._impl._api_types.TimeoutError: Timeout 30000ms exceeded. 如果需...

    2023-05-15 16:16:12 881
  • conda环境下print(torch.cuda.is_available()) False

    情景是:明明pip install torch>=1.10 安装成功了,但conda环境下运行 print(torch.cuda.is_available()) 却得到 False ...

    2023-05-23 23:07:19 509
  • 解决html元素上style的设置被样式表中的设置覆盖

    解决html元素上style的设置被样式表中的设置覆盖

    一般情况下,我们在页面代码上的html原色设置的样式效果是最优先的,比如 页面代码 <div class="a1" style="width:10px;"></div> 样式...

    2023-06-17 10:11:28 687
  • 解决向vim粘贴代码出现汉字乱码的问题

    解决向vim粘贴代码出现汉字乱码的问题

    方法分为永久解决方法和临时解决方法 1、临时解决方法 检查:在vim编辑器上 :set enc #得到 encoding=latin1 处理:在vim编辑器上 :set encoding=utf-8...

    2023-07-18 08:51:45 437
  • 设置xshell断开自动重连的方法

    设置xshell断开自动重连的方法

    有时候xshell挂机做一些任务,由于网络不稳定,尤其是我们这种家用宽带时不是跳一下公网IP导致连接异常,xshell经常没过多久就断开了,麻烦的很。 关于这个问题首先问了一个AI, AI一本正经胡...

    2023-05-30 08:21:46 447
  • 2023年3月亲测,恢复Google和360浏览器的翻译功能

    2023年3月亲测,恢复Google和360浏览器的翻译功能

    如图:已成功在360浏览器把github首页翻译成了中文 可能很多人已经掌握了这个技巧,但这个问题却困扰了我很久,直到下决心找资料解决这个翻译问题。只是想不到的时候,解决方案确实如此简单,也不是很麻...

    2023-04-24 13:34:54 388
  • 升级DellR430 bios以点亮V4CPU

    升级DellR430 bios以点亮V4CPU

    有一台以前买的R430服务器,原来安装的E5-2620V3 CPU,相升级换成 E5-2680V4 。 无奈发现开机后一直卡在,Configuring Memory…Done ,换回V3 CPU就正常...

    2023-04-20 16:25:30 1274