Jump to content

Disconnecting for NodeJS


Pit
  • Not Specified Closed Bug

Getting disconnected after a few minutes: Babble is not connected to the node server, please contact the administrator!

Even after setting up the forever start with NPM.


User Feedback

Recommended Comments

make sure your private key in acp->babble->Configuration->General, matches the "privateKey" in babble.js. also make sure a firewall on your computer/network isn't blocking the port.

Link to comment
Share on other sites


Hello, port is open and listening:
3000 tcp -/- - 15286 root /usr/bin/node /home/x/public_html/... /usr/bin/node
Does UDP need to be open?

Key is identical to one in ACP.
Link to comment
Share on other sites

It could be a bug, as Babble does disconnect with the server even when the settings allow it, including port 3000, to go through.

 

I've noticed that the command line returns a "not found" when I do this

[sudo] forever start /home/site/public_html/forums/applications/babble/sources/Node/babble.js

However, when I do this it works

forever start /home/site/public_html/forums/applications/babble/sources/Node/babble.js

The return message is this

info: Forever processing file

 

I am hoping that this will resolve Babble from disconnecting to the server.

Edited by GrooveOnBeat
Link to comment
Share on other sites

node itself will time out after awhile. it is why i've recommend using forever. 

the server isn't the only thing involved here, the users own computer and network are also involved. certain firewalls will block ports. 

if you send a message and get the "babble is disconnected" message, it is either your network/firewall blocking it, or the validation code in the babble.js is out of sync with what you have in the acp for babble. if babble.js receives a invalid validation key, it will disconnect the user, to prevent further attempts. 

and some servers, will require sudo, it is why it is bracketed, to denote it might not be needed. on my server here, i don't need it, but on my testing server it does. 

Link to comment
Share on other sites

Hi Michael,

Thanks for the information.

So when I run this command it should automatically restart if Babble disconnects?

forever start /home/site/public_html/forums/applications/babble/sources/Node/babble.js

I'm asking because I'm not familiar with forever.

Link to comment
Share on other sites

forever will restart the babble.js if it closes or crashes, that message could mean its not running or you've been disconnected from it. it is just a generalized message to let you know there is a problem.

Link to comment
Share on other sites

So when I get this message after running the command it means there is a problem?

info: Forever processing file

What message should appear if forever is always running?

Link to comment
Share on other sites

warn:    --minUptime not set. Defaulting to: 1000ms
warn:    --spinSleepTime not set. Your script will exit if it does not stay up for at least 1000ms

for me it says this.

  • Like 1
Link to comment
Share on other sites

Sorry to report, but it's still not working for me; even with firewall disabled. Doesn't work on multiple clients, all with no firewall.

Key is identical to that in the ACP, and I've reset the key too.

The run forever results with:

warn:    --minUptime not set. Defaulting to: 1000ms
warn:    --spinSleepTime not set. Your script will exit if it does not stay up for at least 1000ms
info:    Forever processing file: /home/_X_/public_html/forums/applications/babble/sources/Node/babble.js
 

Edited by Pit
Link to comment
Share on other sites

if you open up the browser console (in chrome its f12, not sure about other browsers), and click on "console" tab while in babble, do you see something like this:

2016-08-11_1804.png

if you do, then it means the URL you have for your node url is not correct. if not, then the user is being disconnected from node after submitting the first message. now in my code the only thing that would cause this would be having the incorrect validation key (which is created for each message and its unique to that message, to validate in babble.js, the privatekey is used to generate this, that is why they must match exactly in the acp and in the babble.js file). has the babble.js script been restarted after you changed the key in the acp and then in the file? changes to the file while the script is running will not be reflected in the running script only after it is stopped/restarted. I've run run into this while testing, where the script will still be running, and i've made changes to it and the changes aren't showing up like they should.

if you are have checked all these, the only thing that is left is that i will need access to the server to diagnose (this includes ssh, ftp and IPS ACP).

Link to comment
Share on other sites

socket.io.js?v=a9cc6014c5:1 GET http://x.com:3000/socket.io/?EIO=3&transport=polling&t=LPxwI-J net::ERR_CONNECTION_TIMED_OUT

That's what I see in the console. 

I used forever stop and got: info:    Forever stopped process:
    uid  command       script                                                                      forever pid   id logfile                 uptime
[0] f2qg /usr/bin/node /home/x/public_html/forums/applications/babble/sources/Node/babble.js 14138   14140    /root/.forever/f2qg.log 0:0:2:37.576

Then restarted it with the forever start with new key.

Edited by Pit
Link to comment
Share on other sites


×
×
  • Create New...