Author Topic: Waiting for socket connection on PiZero W  (Read 2071 times)

ChemE

  • Sr. Member
  • ****
  • Posts: 419
  • Country: us
Waiting for socket connection on PiZero W
« on: March 11, 2017, 10:21:53 AM »
I'm just now getting around to trying all this out on my Pi Zero W and in both FF and Chrome I get the "waiting for socket connection..."  Clicking around the rest of the webpage all the menus and whatnot seem to work fine.  I do not have a Mote hooked up to my Pi so perhaps that is the issue?  I had thought to make sure the software was working before busting out my iron but perhaps I need to rethink?  To complicate troubleshooting I'm using DietPi as my OS :)

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: Waiting for socket connection on PiZero W
« Reply #1 on: March 12, 2017, 06:54:59 PM »
Your gateway app is probably not running.
Please look in the logs/gateway.sys.log for any errors.

ChemE

  • Sr. Member
  • ****
  • Posts: 419
  • Country: us
Re: Waiting for socket connection on PiZero W
« Reply #2 on: March 13, 2017, 10:43:21 AM »
Thanks Felix.  It appears the gateway service is running and the log has 19 identical entries in it:

Code: [Select]
/bin/sh: 1: /usr/bin/node: not found

I issued a restart command on the service and now the log file has 24 entries just like the one above rather than 19.
« Last Edit: March 13, 2017, 10:47:31 AM by ChemE »

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: Waiting for socket connection on PiZero W
« Reply #3 on: March 13, 2017, 10:51:07 AM »
Node.js is not found, did you see any errors during the install?

ChemE

  • Sr. Member
  • ****
  • Posts: 419
  • Country: us
Re: Waiting for socket connection on PiZero W
« Reply #4 on: March 13, 2017, 10:57:55 AM »
Just did a sudo apt-get install node.js and it that installation is working now.  The install took so long on the zero that the screen went blank a few times.  I sat there for most of it but I could have missed an error message for sure.

ChemE

  • Sr. Member
  • ****
  • Posts: 419
  • Country: us
Re: Waiting for socket connection on PiZero W
« Reply #5 on: March 13, 2017, 11:10:20 AM »
When I do ps aux | grep node.js I get
root 2060 0.0 04 4272 1852 tty1 S+ 10:08 0:00 grep node.js

I'm no Linux expert so I don't know that this for sure means that node.js is installed and running.  There are 34 entries in my log file as above now.

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: Waiting for socket connection on PiZero W
« Reply #6 on: March 13, 2017, 11:41:38 AM »
The entry you see there is not related to gateway.js, it's not running for sure.
The added entries means the process monitor keep trying to restart it without success.

You will have to retry installing on a clean latest image, not sure what else to suggest. I don't have a Pi0-W but I don't expect the setup script to fail. Watch out for errors and do a screen capture of that if you can. I should probably add a setup log to the setup script.