Announcement

Collapse
No announcement yet.

ISP's router craps out, have to restart HS4.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #31
    Thanks kenm

    I should have been more precise with the error when I tried to use the browser. It was "this site can't be reached" and "ERR_CONNECTION_REFUSED"

    Here are the results of the netstat command

    Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
    tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN -
    tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN -
    tcp 0 0 0.0.0.0:911 0.0.0.0:* LISTEN -
    tcp 0 0 0.0.0.0:8084 0.0.0.0:* LISTEN -
    tcp6 0 0 :::111 :::* LISTEN -
    tcp6 0 0 :::22 :::* LISTEN -
    tcp6 0 0 :::911 :::* LISTEN -
    udp 0 0 127.0.0.1:323 0.0.0.0:* -
    udp 0 0 0.0.0.0:68 0.0.0.0:* -
    udp 0 0 0.0.0.0:111 0.0.0.0:* -
    udp6 0 0 ::1:323 :::* -
    udp6 0 0 :::111 :::* -

    Comment


      #32
      OK. Now we're in sync and making progress. From the dump of the netstat output, I can see that HS is not listening on port 80. Now we need to figure out why.

      I was able to reproduce a problem similar to this but I'm not certain it's the same.

      Can you post the output of the following commands:

      cat /etc/dhcpcd.conf
      cat /etc/hostname
      cat /etc/hosts
      cat /etc/resolv.conf

      Hang in there. We'll get this figured out. BTW, can you attach an HDMI monitor to your Pi and watch it boot up?

      "if I have seen further [than others], it is by standing on the shoulders of giants." --Sir Isaac Newton (1675)

      Comment


        #33
        Here are the results. Note that I have the PI box connected via a cable directly to my router so I used eth0 instead of wlan0

        homeseer@HTPiHubG3v2:~$ cat /etc/dhcpcd.conf
        interface eth0
        static ip_address=192.168.0.101/24
        static routers=192.168.0.1
        static domain_name_servers=192.168.0.1
        homeseer@HTPiHubG3v2:~$ cat /etc/hostname
        HTPiHubG3v2
        homeseer@HTPiHubG3v2:~$ cat /etc/hosts
        127.0.0.1 localhost
        127.0.1.1 HTPiHubG3v2
        ::1 localhost HTPiHubG3v2 ip6-localhost ip6-loopback
        fe00::0 ip6-localnet
        ff00::0 ip6-mcastprefix
        ff02::1 ip6-allnodes
        ff02::2 ip6-allrouters
        homeseer@HTPiHubG3v2:~$ cat /etc/resolv.conf
        # Generated by NetworkManager
        nameserver 192.168.0.1
        homeseer@HTPiHubG3v2:~$

        Comment


          #34
          For the HDMI monitor, what would you want me to watch as it boots up? I don't have a monitor (use laptop) but I could try to find/buy a cable and connect it to a nearby TV

          Comment


            #35
            I think I see where the problem might be. in /etc/hosts, try changing the following line:

            127.0.1.1 HTPiHubG3v2

            to

            192.168.0.101 HTPiHubG3v2


            As far as watching the monitor output, you'd want to see if there's any useful messages displayed after the login prompt is reached. This could indicate a mono or HSConsole.exe startup problem.


            "if I have seen further [than others], it is by standing on the shoulders of giants." --Sir Isaac Newton (1675)

            Comment


              #36
              Ok. I made the change. Same results...still blue.

              Here are some dumps:
              homeseer@HTPiHubG3v2:~$ netstat -tulpn
              (Not all processes could be identified, non-owned process info
              will not be shown, you would have to be root to see it all.)
              Active Internet connections (only servers)
              Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
              tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN -
              tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN -
              tcp 0 0 0.0.0.0:911 0.0.0.0:* LISTEN -
              tcp 0 0 0.0.0.0:8084 0.0.0.0:* LISTEN -
              tcp6 0 0 :::111 :::* LISTEN -
              tcp6 0 0 :::22 :::* LISTEN -
              tcp6 0 0 :::911 :::* LISTEN -
              udp 0 0 127.0.0.1:323 0.0.0.0:* -
              udp 0 0 0.0.0.0:68 0.0.0.0:* -
              udp 0 0 0.0.0.0:111 0.0.0.0:* -
              udp6 0 0 ::1:323 :::* -
              udp6 0 0 :::111 :::* -

              homeseer@HTPiHubG3v2:~$ cat /etc/dhcpd.conf
              cat: /etc/dhcpd.conf: No such file or directory
              homeseer@HTPiHubG3v2:~$ cat /etc/dhcpcd.conf
              interface eth0
              static ip_address=192.168.0.101/24
              static routers=192.168.0.1
              static domain_name_servers=192.168.0.1
              homeseer@HTPiHubG3v2:~$ cat /etc/hostname
              HTPiHubG3v2
              homeseer@HTPiHubG3v2:~$ cat /etc/hosts
              127.0.0.1 localhost
              192.168.0.101 HTPiHubG3v2
              ::1 localhost HTPiHubG3v2 ip6-localhost ip6-loopback
              fe00::0 ip6-localnet
              ff00::0 ip6-mcastprefix
              ff02::1 ip6-allnodes
              ff02::2 ip6-allrouters
              homeseer@HTPiHubG3v2:~$ cat /etc/resolv.conf
              # Generated by NetworkManager
              nameserver 192.168.0.1
              homeseer@HTPiHubG3v2:~$

              Comment


                #37
                Dang it. I was almost certain that was the problem. Can you send me the output of the following commands:

                sudo netstat -tulpn

                sudo ps -eaf | grep mono

                "if I have seen further [than others], it is by standing on the shoulders of giants." --Sir Isaac Newton (1675)

                Comment


                  #38
                  Hi,

                  I've been watching this thread hoping for a solution. Power went off again yesterday for a few minutes, so I have my Homeseer in the "blue" light issue with no access the the webpage and none of my schedules are running. Seems as though the homeseer app has not started or at least stuck, not just that we can't access the webpage. I can access it the Homeseer through SSH using a fixed DCHP address. I've forced my router to give the Homeseer the same IP via DHCP (I've tried static IP too, but doesn't make any difference). Looks like the IP is working as I can access it via ssh no problem.

                  I didn't make any modifications, but if it helps here's my output of the last two commands you requested. Hope it can lead to a solutions:

                  homeseer@HTPiHubG3v2:~$ sudo netstat -tulpn

                  Active Internet connections (only servers)

                  Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name

                  tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1/init

                  tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1393/sshd

                  tcp 0 0 0.0.0.0:911 0.0.0.0:* LISTEN 1432/lighttpd

                  tcp 0 0 0.0.0.0:8084 0.0.0.0:* LISTEN 1339/mono

                  tcp6 0 0 :::111 :::* LISTEN 1/init

                  tcp6 0 0 :::22 :::* LISTEN 1393/sshd

                  tcp6 0 0 :::911 :::* LISTEN 1432/lighttpd

                  udp 0 0 127.0.0.1:323 0.0.0.0:* 1395/chronyd

                  udp 0 0 0.0.0.0:68 0.0.0.0:* 1454/dhclient

                  udp 0 0 0.0.0.0:111 0.0.0.0:* 1/init

                  udp6 0 0 ::1:323 :::* 1395/chronyd

                  udp6 0 0 :::111 :::* 1/init

                  homeseer@HTPiHubG3v2:~$ sudo ps -eaf | grep mono

                  www-data 1339 1 0 Jun30 ? 00:00:08 /usr/bin/mono /usr/lib/mono/4.5/xsp4.exe --port 8084 --address 0.0.0.0 --appconfigdir /etc/xsp4 --nonstop

                  homeseer 32510 32491 0 22:13 pts/0 00:00:00 grep mono

                  homeseer@HTPiHubG3v2:~$

                  Comment


                    #39
                    ejb068 - I've been working with MikeND via email on this and your symptom looks very much like what we are seeing. The netstat show that nothing is listening on port 80 and the 'ps' command shows the HSConsole.exe is not running.

                    Via ssh, can you try to start HS manually and post the output here by running the following command:

                    sudo /usr/local/HomeSeer/autostart_hs

                    EDIT: Also check to see if you can access the webpage while HS is running in the foreground.
                    "if I have seen further [than others], it is by standing on the shoulders of giants." --Sir Isaac Newton (1675)

                    Comment


                      #40
                      kenm, here is the output. After starting this, I can now access the homeseer webpage.


                      homeseer@HTPiHubG3v2:~$ sudo /usr/local/HomeSeer/autostart_hs

                      [sudo] password for homeseer:

                      Disk size: 30416044032




                      Connecting to HomeSeer...

                      Connected to HomeSeer

                      Waiting for initialization...

                      Z-Wave Plugin: OS Type is Linux

                      Processor type: arm

                      Loading Z-Wave device configuration parameters...

                      Connecting to HomeSeer...

                      Connected to HomeSeer

                      Waiting for initialization...

                      Exiting Initialize (9727 ms)

                      File upload thread started

                      Streaming bytes: 554

                      Streaming bytes: 330



                      Comment


                        #41
                        Great. Definite progress here. This is pointing to a boot up situation that is causing HSConole.exe not to startup or causing it crash at startup. IMHO, this is one of the downfalls of using the old SysV init scripts instead of systemd. With systemd HSConsole startup could be held off until the network is up and running.

                        Before we attempt a workaround, can you attach an HDMI monitor to the Pi and watch the output at boot up for the bad state? (i.e. power cycle the router and Pi) After the login prompt is reached you should start to see output similar to what you posted above, only I hope there is an error in this output. That error should help us narrow this down.
                        "if I have seen further [than others], it is by standing on the shoulders of giants." --Sir Isaac Newton (1675)

                        Comment


                          #42
                          kenm, thanks for you help looking into this. Are you affiliated with Homeseer or just a good Samaritan? While it would be great to fins a workaround for this issue, it would be even better if Homeseer could add a fix to the next update. Since this issue is not related just to me and is easy to reproduce, it should be straightforward for them. I imagine the reason we are seeing the issue and not everybody is that our router takes longer to boot than the PI after a power failure.
                          I don't have easy access to an HDMI monitor, but will try and hook it up to my TV as soon as I get a chance.

                          As a dumb temporary fix, maybe I can add a 1 or 2min delay to them startup of the PI?

                          Comment


                            #43
                            I added a "sleep 2m" in my rc.local file. Hopefully this will work

                            Comment


                              #44
                              Originally posted by ejb068 View Post
                              I added a "sleep 2m" in my rc.local file. Hopefully this will work
                              Have you tried running HS as a service under Linux? I'm using that method and it runs quite consistently. Also, the systemcmd service will bang on HS until it runs or restart it automatically if it stops. Below is the homeseer.service file that I use to start it. I think the directories below are fairly standard among Linux systems. Edit if necessary.

                              Place in your /etc/systemd/system directory.
                              I named mine homeseer.service

                              [Unit]
                              Description=HomeSeer Home Automation
                              Documentation=https://homeseer.com/support-home/
                              After=network-online.target remote-fs.target time-sync.target
                              Before=multi-user.target

                              [Service]
                              WorkingDirectory=/usr/local/HomeSeer
                              ExecStart=/usr/bin/mono HSConsole.exe --log
                              SyslogIdentifier=HSConsole
                              StandardOutput=null
                              Restart=on-failure
                              RestartSec=30
                              KillMode=none
                              TimeoutStopSec=300
                              ExecStop=/usr/local/HomeSeer/hsstop.sh

                              [Install]
                              WantedBy=multi-user.target

                              Comment


                                #45
                                ejb068 I'm just a long time HS user helping out where I can. As avpman suggested, the proper fix is to move HomeSeer control to systemd. IMHO, this is something HST should do for future releases vs. having the users have to reconfigure their product. The After= and Before= directives are what control the orderly startup.

                                The one thing I'd change in the unit file above is StandardOutput=null. You can either change it to journal or delete the line completely since journal is the default. I have not found HSCnoole to be very chatty but it also doesn't appear to output to StandardError. Since StandardError isn't in the above file, it defaults to journal as well.

                                Getting back to he task at hand, the 'sleep' command in /etc/rc.local was what I was going to suggest as a workaround. That's a band-aid at best.
                                "if I have seen further [than others], it is by standing on the shoulders of giants." --Sir Isaac Newton (1675)

                                Comment

                                Working...
                                X