Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Node keeps sending GET /sockjs-node/info requests after terminating with CTRL + C

I don't think it has much to do with the issue, but I'm running a react app in development environment, after terminating (i think) the node process with ctrl + c , I keep getting these requests.

enter image description here

Any clues? Thank's in advance.

like image 305
Majoren Avatar asked Sep 22 '16 09:09

Majoren


3 Answers

Its happens when you use socket in your application. When your server loads in the browser, your socket client establishes a connection between the socket client and socket.io on server side. When you stop node application (CTRL + C) you just stop the server side loop, while the client side loop try to connect/reconnect to server and you get this error.

like image 91
Amin Aghabeiki Avatar answered Sep 28 '22 02:09

Amin Aghabeiki


It looks like your browser is trying to connect to Node and it gets connection refused errors, which seems reasonable if you stopped the server.

What did you expect to get when you stop your server?

like image 22
rsp Avatar answered Sep 28 '22 04:09

rsp


I had this error when I mistakenly added a loop between two required javascript / typescript resources. On a resource "A", when the resource was loading, it was making a remote call to get a resource B. When the resource B required something from A, a require/import was added and it ended up in a loop, what it was solved splitting the file A to extract the required constant to another file removing the loop.

like image 37
Ariel Carrera Avatar answered Sep 28 '22 02:09

Ariel Carrera