英文:
error during opening websocket in IOS (CFNetwork SSLHandshake failed (-9807))
问题
一切在两天前服务器上都正常运行。然后突然之间iOS开始出现问题。iOS现在无法与服务器建立WebSocket连接。以下是iOS的日志记录:
2020-04-04 10:51:35.122783-0300 xxxxx[5880:99324] TCP连接0x600000089c80 SSL握手失败(-9807)
2020-04-04 10:51:35.124999-0300 xxxxx[5880:99077] webSocket打开错误=无法完成操作。
webSocket关闭代码=0,原因=(null),wasClean=1
2020-04-04 10:51:35.604654-0300 xxxx[5880:99324] CFNetwork SSL握手失败(-9807)
2020-04-04 10:51:35.604788-0300 xxxx[5880:99324] TCP连接0x600000089d40 SSL握手失败(-9807)
2020-04-04 10:51:35.605253-0300 xxxx[5880:99077] webSocket打开错误=无法完成操作(OSStatus错误-9807)。
我的服务器是用Java编写的,我使用了Spring WebSocket。
我搜索了这个错误,但没有找到解决这个问题的方法。我不确定是应该在iOS上修复还是在服务器上修复。请帮助我解决这个问题。
英文:
Everything worked fine in the server two days ago. Then Suddenly IOS started not work. IOS cannot open websocket with server now. Those are the logs from IOS.
2020-04-04 10:51:35.122783-0300 xxxxx[5880:99324] TCP Conn 0x600000089c80 SSLHandshake failed (-9807)
2020-04-04 10:51:35.124999-0300 xxxxx[5880:99077] webSocket open error = The operation couldn’t be completed.
webSocket close code = 0, reason = (null), wasClean = 1
2020-04-04 10:51:35.604654-0300 xxxx[5880:99324] CFNetwork SSLHandshake failed (-9807)
2020-04-04 10:51:35.604788-0300 xxxx[5880:99324] TCP Conn 0x600000089d40 SSLHandshake failed (-9807)
2020-04-04 10:51:35.605253-0300 xxxx[5880:99077] webSocket open error = The operation couldn’t be completed. (OSStatus error -9807.)
My Server is written by java. I use spring webscoket.
I searched this error but I didn't find anything which would solve this problem.
And I cannot understand I must fix this in IOS or in the server.
please help me fixing this problem,
答案1
得分: 0
最终,我解决了这个问题。起初,我生成了新的 SSL 证书。然后,我在所有的 Nginx 配置文件中更改了 TLS 协议,你可以在这里找到如何操作:https://libre-software.net/tls-nginx/。我进行了测试,现在一切都正常了。
英文:
In the end I fixed this problem. At first I generated new ssl certificate. Then I changed tls protocol in all nginx config files so https://libre-software.net/tls-nginx/ here you
can find how to do that.I tested and everythink is fine now.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论