Announcement

Collapse
No announcement yet.

Z-Net not reconnecting after disconnect - Solved!

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

    #76
    If you want to look at the structure of the v2, let me know and I can try to figure out how to get you an image.
    The biggest problem that I saw with the V2 Z-Net is that /etc/rc.local changed dramatically from V1. Also it appears that ser2net is now different. I attempted to insert the two changed lines of code into the new rc.local but the Z-net application still fails to start. I only had limited time to research this today but I could not make it work. and Yes the patch will Brick the V2 Z-net. Thank goodness for image backups.

    Bob

    Comment


      #77
      Originally posted by Bob_Linux_User View Post
      The biggest problem that I saw with the V2 Z-Net is that /etc/rc.local changed dramatically from V1.
      Thanks to Randy, I was able to get the V2 patch. Yeah, I see why the patch messed up the V2. I've posted an 'r3' patch that generates the /etc/rc.local from what is installed, rather than including it in the patch.

      Originally posted by Bob_Linux_User View Post
      Also it appears that ser2net is now different. I attempted to insert the two changed lines of code into the new rc.local but the Z-net application still fails to start.
      This is not good news; that should have worked. If the r3 patch doesn't work on the v2, my best guess is that the ser2net executable was changed so as not to accept the control port option, and so doesn't start. Then we are out of luck.

      Comment


        #78
        Originally posted by zwolfpack View Post
        Thanks to Randy, I was able to get the V2 patch. Yeah, I see why the patch messed up the V2. I've posted an 'r3' patch that generates the /etc/rc.local from what is installed, rather than including it in the patch.


        This is not good news; that should have worked. If the r3 patch doesn't work on the v2, my best guess is that the ser2net executable was changed so as not to accept the control port option, and so doesn't start. Then we are out of luck.
        Unless I did something incorrectly the patch will not install on a v2

        Code:
        homeseer@Z-Net:~ $ cd /tmp
        homeseer@Z-Net:/tmp $ tar xzf znetdown_patch-r3.tgz
        homeseer@Z-Net:/tmp $ sudo ./install.sh
        awk: cannot open /etc/init.d/ser2net (No such file or directory)
        homeseer@Z-Net:/tmp $
        HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon

        Comment


          #79
          Unless I did something incorrectly the patch will not install on a v2
          If my memory serves correctly ser2net is now in /etc/ifplugd/action.d/ but I cannot confirm that since my V2 is at work.

          Bob

          Comment


            #80
            Originally posted by Bob_Linux_User View Post
            If my memory serves correctly ser2net is now in /etc/ifplugd/action.d/ but I cannot confirm that since my V2 is at work.

            Bob
            It is not there. It is in /usr/local/sbin

            Click image for larger version

Name:	Capture2.PNG
Views:	1
Size:	4.0 KB
ID:	1186662

            A configuration file in /etc and docs in /usr/local/share/man/man8/

            Click image for larger version

Name:	Capture1.PNG
Views:	1
Size:	6.4 KB
ID:	1186661
            HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon

            Comment


              #81
              /usr/sbin/ser2net is the binary executable.
              /etc/init.d/ser2net is a shell script, used to start the binary on the post-1.17 v1 Z-NET's (confusing? nahhh).

              (Of note, the size of 216K is different than the 175K of my v1).

              Are you sure that the patch didn't install? The error due to the missing file may not be fatal since that file isn't needed in this case. To check, open /etc/rc.local and near the end see if there is this comment

              # znetdown patch modification - enable ser2net control port

              I'll fix the installer based on this new info.
              Last edited by zwolfpack; August 13, 2016, 02:36 PM. Reason: fix comment text

              Comment


                #82
                Originally posted by zwolfpack View Post
                /usr/sbin/ser2net is the binary executable.
                /etc/init.d/ser2net is a shell script, used to start the binary on the post-1.17 v1 Z-NET's (confusing? nahhh).

                (Of note, the size of 216K is different than the 175K of my v1).

                Are you sure that the patch didn't install? The error due to the missing file may not be fatal since that file isn't needed in this case. To check, open /etc/rc.local and near the end see if there is this comment

                # znet patch modification - enable ser2net control portdown

                I'll fix the installer based on this new info.
                Apparently the patch did install.
                Code:
                # znetdown patch modification - enable ser2net control port
                CONTROLPORT=127.0.0.1,1999
                /usr/local/sbin/ser2net ${CONTROLPORT:+-p} $CONTROLPORT -c /etc/ser2net.conf -n& 2>&1 >/dev/null
                exit 0
                And the Z-Net is behaving. I disconnected the Ethernet for 20 seconds, long enough for HS to quit communicating. The light stayed green, but it immediately reconnected. It would not do that reliably before the patch. Here is the log, oldest at the bottom.

                Aug-13 1:54:08 PM Z-Wave Z-Net-Primary is the SIS for the network.
                Aug-13 1:54:08 PM Z-Wave Z-Net-Primary There is a SUC/SIS in the network.
                Aug-13 1:54:08 PM Z-Wave Z-Net-Primary Controller is static lib.
                Aug-13 1:54:08 PM Z-Wave Z-Net-Primary Controller chip type is ZW050x.
                Aug-13 1:54:08 PM Z-Wave The interface's security support has been set.
                Aug-13 1:54:08 PM Z-Wave Z-Net-Primary: Z-Wave PC Controller is Type: Static Controller
                Aug-13 1:54:08 PM Z-Wave Z-Net-Primary: Z-Wave PC Controller Library Version: Z-Wave 4.05 (ZDK 6.51.6)
                Aug-13 1:54:02 PM Event Event Trigger "Utilities - Trouble Detection Z-Net Err count Increment (Primary)"
                Aug-13 1:54:02 PM Event Event Trigger "Utilities - Trouble Detection Z-Net Err count - Increment"
                Aug-13 1:54:00 PM Z-Wave Z-Net-Primary: Found 83 Z-Wave nodes in interface node ID 1 (Z-Net-Primary)
                Aug-13 1:54:00 PM Z-Wave Z-Net-Primary: Z-Wave interface node ID: 1, Home ID: 00000000
                Aug-13 1:54:00 PM Z-Wave Z-Net-Primary: Z-Wave Serial API version: 5
                Aug-13 1:53:59 PM Z-Wave Z-Net-Primary: Controller firmware version: 4.32
                Aug-13 1:53:59 PM Z-Wave Z-Net-Primary: Controller Manufacturer: Express Controls, ID=0x2, Type=0x5
                Aug-13 1:53:59 PM Z-Wave Z-Net-Primary: Getting node information from controller...
                Aug-13 1:53:57 PM Z-Wave Z-Net-Primary: Z-Wave Ethernet at IP 192.168.2.5, connected to interface ok.
                Aug-13 1:53:57 PM Z-Wave Warning Trying to re-connect to Ethernet interface at IP 192.168.2.5...
                Aug-13 1:53:56 PM Z-Wave Error Z-Net-Primary: The Z-Net-Primary interface did not respond to the request for the HomeID and Node - it may be disconnected or malfunctioning (2).
                Aug-13 1:53:56 PM Z-Wave Z-Net-Primary: Getting node information from controller...
                Aug-13 1:53:56 PM Z-Wave Z-Net-Primary: Processing data buffered by the interface while it was disconnected.
                Aug-13 1:53:54 PM Z-Wave Z-Net-Primary: Z-Wave Ethernet at IP 192.168.2.5, connected to interface ok.

                Aug-13 1:53:53 PM Device Control Device: Occupancy Zone BP Occupied to Occupied (100)
                Aug-13 1:53:53 PM Event Event Trigger "Occupancy BP Occupied"
                Aug-13 1:53:52 PM Z-Wave Warning Z-Net-Primary: The Ethernet interface at (192.168.2.5 port: 2001) was not successfully connected. Will keep attempting to connect...
                Aug-13 1:53:52 PM Z-Wave Warning Z-Net-Primary: Cannot connect to Z-Wave Ethernet at IP 192.168.2.5 port: 2001, Ex=A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 192.168.2.5:2001

                Aug-13 1:53:44 PM Event Event Trigger "Utilities - Trouble Detection Z-Net Err count Increment (Primary)"
                Aug-13 1:53:44 PM Event Event Trigger "Utilities - Trouble Detection Z-Net Err count - Increment"

                Aug-13 1:53:31 PM Z-Wave Error Z-Net-Primary: Exception transmitting to IP 192.168.2.5: Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host.
                Attached Files
                HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon

                Comment


                  #83
                  Progress! As another check, after a network disconnect event, a log file should be created at /tmp/znetdown.log - should look something like this:

                  Code:
                  IFDOWN=eth0
                  IP=192.168.1.113
                  CONTROLPORT=127.0.0.1,1999
                  RAWPORT=2001
                  DOWNPORT=2001
                  disconnect 2001
                  
                  RAWPORT=2002
                  DOWNPORT=
                  The key item is the "disconnect 2001". Can you check if you see this?

                  Comment


                    #84
                    Originally posted by zwolfpack View Post
                    Progress! As another check, after a network disconnect event, a log file should be created at /tmp/znetdown.log - should look something like this:

                    Code:
                    IFDOWN=eth0
                    IP=192.168.1.113
                    CONTROLPORT=127.0.0.1,1999
                    RAWPORT=2001
                    DOWNPORT=2001
                    disconnect 2001
                    
                    RAWPORT=2002
                    DOWNPORT=
                    The key item is the "disconnect 2001". Can you check if you see this?
                    There was nothing in /tmp. Not even the files I put there for the patch. It seems to do housekeeping on a restart. I just disconnected the Ethernet again for 30 seconds. This time it took longer to restore communication, about 3 minutes, but it did. Still nothing in /tmp.
                    HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon

                    Comment


                      #85
                      Thats what I was afraid of, when you said the light stayed green. If the patch was working, it should go red around 10 sec after the disconnect.

                      Couple of things you could check:

                      Verify there is a file /etc/ifplugd/action.d/znetdown

                      Issue this command and see if there is any output
                      $ ps -e | grep ifplugd

                      If it's not running ifplugd, we are out of luck.

                      PS. /tmp is of type tmpfs, which is mapped to RAM, not the SD card. So it's cleared on boot.

                      Comment


                        #86
                        Better command than the ps

                        $ service ifplugd status

                        Code:
                        [....] eth0: ifplugd process for device eth0 running as pid 1341.
                        [info] all: device all is either not present or not functional.
                        Last edited by zwolfpack; August 13, 2016, 05:25 PM. Reason: add sample output

                        Comment


                          #87
                          Originally posted by zwolfpack View Post
                          Thats what I was afraid of, when you said the light stayed green. If the patch was working, it should go red around 10 sec after the disconnect.

                          Couple of things you could check:

                          Verify there is a file /etc/ifplugd/action.d/znetdown
                          Yes
                          Issue this command and see if there is any output
                          $ ps -e | grep ifplugd

                          If it's not running ifplugd, we are out of luck.
                          I guess we are

                          Click image for larger version

Name:	Capture.PNG
Views:	1
Size:	74.6 KB
ID:	1186671

                          PS. /tmp is of type tmpfs, which is mapped to RAM, not the SD card. So it's cleared on boot.
                          Thanks for the tip. As I said, my knowledge of Linux is thin. I guess it is time to learn again.
                          HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon

                          Comment


                            #88
                            Originally posted by rprade View Post
                            I guess we are
                            Thinking about this, if the service installed but not running there might be hope. If you don't want to pursue this further say the word; otherwise try this command:

                            $ service ifplugd status

                            If it says "unrecognized service" we are indeed done. Otherwise, try
                            $sudo service ifplugd start
                            then
                            $service ifplugd status

                            If it looks anything like
                            Code:
                            [....] eth0: ifplugd process for device eth0 running as pid 1341.
                            [info] all: device all is either not present or not functional.
                            we might still have a chance. If so, try disconnecting Ethernet and observe the led. Also see if the file shows up in /tmp

                            Comment


                              #89
                              Originally posted by zwolfpack View Post
                              Thinking about this, if the service installed but not running there might be hope. If you don't want to pursue this further say the word; otherwise try this command:

                              $ service ifplugd status

                              If it says "unrecognized service" we are indeed done. Otherwise, try
                              $sudo service ifplugd start
                              then
                              $service ifplugd status

                              If it looks anything like
                              Code:
                              [....] eth0: ifplugd process for device eth0 running as pid 1341.
                              [info] all: device all is either not present or not functional.
                              we might still have a chance. If so, try disconnecting Ethernet and observe the led. Also see if the file shows up in /tmp
                              I don't mind pursuing this if you have further thoughts.

                              I guess this about wraps it up.

                              Click image for larger version

Name:	Capture.PNG
Views:	1
Size:	31.2 KB
ID:	1186672
                              HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon

                              Comment


                                #90
                                Not promising. However, ifplugd must be at least partially installed, as you previously confirmed existence of directory /etc/ifplugd/action.d

                                If you can, try a similar search for ifplugd that you did for ser2net previously.

                                Comment

                                Working...
                                X