I have been using stomp with springboot and tomcat as server. From frontend sockJS is used. 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. 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. So the bots that are crawling the site can generate this issue.