[英]Springboot Handshake failed due to invalid Upgrade header: null occurs intermitently
I have been using stomp with springboot and tomcat as server.我一直在使用带有 springboot 的 stomp 和 tomcat 作为服务器。 From frontend sockJS is used.
从前端使用 sockJS。 Everything works perfectly fine.
一切正常。 But sometimes the server logs gets following error.
但有时服务器日志会出现以下错误。
org.springframework.web.socket.server.support.DefaultHandshakeHandler - Handshake failed due to invalid Upgrade header: null
I have read a ton other questions with similar problem, but none of them have this similar problem.我已经阅读了大量其他类似问题的问题,但没有一个有类似问题。 Most answers out there are about configuration in nginx proxy, regarding port etc. and for every answer I read this is a consistent issue.
大多数答案都是关于 nginx 代理中的配置,关于端口等,对于我读到的每个答案,这是一个一致的问题。 For me its happening intermittently.
对我来说,它间歇性地发生。
What could be the scenario for this to happen intermittently?这种间歇性发生的情况可能是什么?
To people who are looking for an answer I have debugged various scenarios and found the cause for this.对于正在寻找答案的人,我已经调试了各种场景并找到了原因。
In my case while checking the agents from which requests came most of them seem to be google bots or facebook bots.就我而言,在检查发出请求的代理时,其中大多数似乎是谷歌机器人或 facebook 机器人。 So the bots that are crawling the site can generate this issue.
因此,正在抓取该网站的机器人可能会产生此问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.