LowPowerLab Forum

Software support => Pi Gateway => Topic started by: Kilo95 on December 05, 2015, 03:37:20 PM

Title: GUI stuck on "waiting for socket connection" [solved]
Post by: Kilo95 on December 05, 2015, 03:37:20 PM
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
Title: Re: GUI stuck on "waiting for socket connection"
Post by: Felix on December 06, 2015, 01:16:52 PM
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.
Title: Re: GUI stuck on "waiting for socket connection"
Post by: Kilo95 on December 10, 2015, 02:04:42 PM
When I get to the "npm outdated" command I don't see Nedb showing up at all. (//)
Title: Re: GUI stuck on "waiting for socket connection"
Post by: Kilo95 on December 10, 2015, 02:06:33 PM
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
Title: Re: GUI stuck on "waiting for socket connection"
Post by: Felix on December 10, 2015, 04:53:17 PM
You have to do npm outdated in the moteino/node_modules, not one level deeper...
Please  revisit what I did in the post above.
Title: Re: GUI stuck on "waiting for socket connection"
Post by: Kilo95 on December 11, 2015, 08:50:16 AM
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"
Title: Re: GUI stuck on "waiting for socket connection"
Post by: Felix on December 11, 2015, 09:05:19 AM
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
Title: Re: GUI stuck on "waiting for socket connection"
Post by: Kilo95 on December 11, 2015, 09:31:51 AM
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
Title: Re: GUI stuck on "waiting for socket connection"
Post by: Kilo95 on December 11, 2015, 09:40:47 AM
Update. It is working now. All is well. Thank you
Title: Re: GUI stuck on "waiting for socket connection"
Post by: Felix on December 11, 2015, 01:26:38 PM
Great :)
Thanks for the update
Title: Re: GUI stuck on "waiting for socket connection" [solved]
Post by: beckerdo on January 16, 2016, 04:41:33 PM
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
Title: Re: GUI stuck on "waiting for socket connection" [solved]
Post by: Kilo95 on January 22, 2016, 04:18:09 PM
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