GUI stuck on "waiting for socket connection" [solved]

Started by Kilo95, December 05, 2015, 03:37:20 PM

Kilo95

NOTE: this topic was split from the NeDB upgrade topic.

Can you tell me the commands so I can copy the newest NeDB zip from github and then unzip it? Thanks

Felix

Quote from: Kilo95 on December 05, 2015, 03:37:20 PM
Can you tell me the commands so I can copy the newest zip from github and then unzip it? Thanks
Please see the updated post above to upgrade to neDB 1.5, that is all you need.

Kilo95

When I get to the "npm outdated" command I don't see Nedb showing up at all.

Kilo95

My gateway GUI is still stuck on "waiting for socket connection". I've tried reinstall of raspbian from your link (with settings.js changed appropriately and password changed). I'm at a loss

Felix

You have to do npm outdated in the moteino/node_modules, not one level deeper...
Please  revisit what I did in the post above.

Kilo95

Ok. I did exactly as you said, starting from the beginning of those instructions. In ~/moteino/node_modules/. Not any deeper. Still "waiting for socket connection"

Felix

Can you look in the browser debug debug window to see if there are any javascript errors?
Can you confirm if gateway.js is running?
run ps aux | grep node  - this will show all running node processes

Kilo95

Ok. It was an error in settings.js. Fixed that. It connects now but shows "nodes 0". I used minicom and everything is working fine there. I really apologize for the trouble and thank you for the help while I learn

Kilo95

Update. It is working now. All is well. Thank you

Felix


beckerdo

I had this similar message from my Nginx web server on Raspberry Pi 2, but I solved it in a different manner.

I used the pre-generate IMG from Felix, but I noticed some pieces of the software stack were not in place and still needed to be done manually.

1) I needed to generate the self-signed SSL certificate in /home/pi/gateway/data/secure with:
sudo openssl req -new -x509 -nodes -days 365 -newkey rsa:2048 -out server.crt -keyout server.key


2) For some reason, upstart was not available, so I had to install that, reboot, and assure node gateway.js was running:
sudo apt-get install upstart
sudo reboot
ps aux | grep node


Once I did these steps, Nginx and node gateway.js served up some devices to my browser.
Thanks

Kilo95

When I put my email address, mobile number, etc into settings.js, I accidentally put a ' instead of a " or vise versa. Don't remember which it is. That was enough to mess things up. Works like a charm now