Announcement

Collapse
No announcement yet.

JowiHue 4.0.2.0 Plug-in is crashing on HS4 shutdown or when plug-in is disabled.

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

    JowiHue 4.0.2.0 Plug-in is crashing on HS4 shutdown or when plug-in is disabled.

    JowiHue 4.0.2.0 Plug-in is crashing on HS4 shutdown or when plug-in is disabled.

    Today, 12:33 PM
    JowiHue 4.0.2.0 Plug-in crashing on HS4 shutdown or when plug-in is disabled. Not a big deal as it only happens on exit, but would be nice to handle the exception to keep the log clean.

    Setup:
    Date/time=7/11/2020 12:30:40 PM PDT
    Version=HS4 Pro Edition 4.1.1.0 (Linux)
    License=Registered
    Uptime=0 Days 22 Hours 52 Minutes 55 Seconds
    Lan IP=10.0.10.150 (HomeSeer-MacMini.local)
    Device Count=690
    Event Count=105
    Plugins Enabled=Z-Wave:,Rachio:,Chromecast:,RFXCOM:,JowiHue:
    Modules/Threads=220 Modules, 10 Threads
    Available Threads=1199
    HomeSeer Memory Used=297 Mbytes
    Plugins Installed=Chromecast 4.0.12.0,JowiHue 4.0.2.0,Rachio 4.0.0.0,RFXCOM 30.0.0.41,weatherXML 3.0.1.19,Z-Wave 3.0.2.0

    Stack trace:
    > Shutting down Plug-In: JowiHue
    12:26:07:3683:[Plug-In]->Shutting down Plug-In: JowiHue
    Disconnecting from HomeSeer...
    12:26:07:3704:[Info]->Plugin JowiHue with ID: JowiHue and Instance: has disconnected
    Plugin shut down, killing EXE...
    Error sending over stream: Unable to write data to the transport connection: Cannot access a disposed object.
    Object name: 'System.Net.Sockets.Socket'..

    Unhandled Exception:
    System.IO.IOException: Sharing violation on path /usr/local/HomeSeerLogs\JowiHue.console.txt
    at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x0019e] in <f759957039b44a0190b1110fdfe3030f>:0
    at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode) [0x00000] in <f759957039b44a0190b1110fdfe3030f>:0
    at (wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode)
    at HSPI_JowiHue.JowiHueUtils.Log (System.String Message, HSPI_JowiHue.Enums+LogLevel Log_Level, System.String Color) [0x00244] in <cd5ed73401ec4b8aa22d0e1eb22d6add>:0
    at HSPI_JowiHue.HueCache.UpdateBridgeCache () [0x008b6] in <cd5ed73401ec4b8aa22d0e1eb22d6add>:0
    at HSPI_JowiHue.BaseCache._Lambda$__R21-1 (System.Object a0) [0x00000] in <cd5ed73401ec4b8aa22d0e1eb22d6add>:0
    at System.Threading.Timer+Scheduler.TimerCB (System.Object o) [0x00007] in <f759957039b44a0190b1110fdfe3030f>:0
    at System.Threading.QueueUserWorkItemCallback.System.Threading. IThreadPoolWorkItem.ExecuteWorkItem () [0x00008] in <f759957039b44a0190b1110fdfe3030f>:0
    at System.Threading.ThreadPoolWorkQueue.Dispatch () [0x00074] in <f759957039b44a0190b1110fdfe3030f>:0
    at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback () [0x00000] in <f759957039b44a0190b1110fdfe3030f>:0
    [ERROR] FATAL UNHANDLED EXCEPTION: System.IO.IOException: Sharing violation on path /usr/local/HomeSeerLogs\JowiHue.console.txt
    at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x0019e] in <f759957039b44a0190b1110fdfe3030f>:0
    at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode) [0x00000] in <f759957039b44a0190b1110fdfe3030f>:0
    at (wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode)
    at HSPI_JowiHue.JowiHueUtils.Log (System.String Message, HSPI_JowiHue.Enums+LogLevel Log_Level, System.String Color) [0x00244] in <cd5ed73401ec4b8aa22d0e1eb22d6add>:0
    at HSPI_JowiHue.HueCache.UpdateBridgeCache () [0x008b6] in <cd5ed73401ec4b8aa22d0e1eb22d6add>:0
    at HSPI_JowiHue.BaseCache._Lambda$__R21-1 (System.Object a0) [0x00000] in <cd5ed73401ec4b8aa22d0e1eb22d6add>:0
    at System.Threading.Timer+Scheduler.TimerCB (System.Object o) [0x00007] in <f759957039b44a0190b1110fdfe3030f>:0
    at System.Threading.QueueUserWorkItemCallback.System.Threading. IThreadPoolWorkItem.ExecuteWorkItem () [0x00008] in <f759957039b44a0190b1110fdfe3030f>:0
    at System.Threading.ThreadPoolWorkQueue.Dispatch () [0x00074] in <f759957039b44a0190b1110fdfe3030f>:0
    at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback () [0x00000] in <f759957039b44a0190b1110fdfe3030f>:0
    Error in IsEXERunning: Could not find a part of the path '/proc'.
    Verifying plugin links...
    Done removing plugin.

    I suspect that the problem is with this path
    /usr/local/HomeSeerLogs\JowiHue.console.txt
    which should be
    /usr/local/HomeSeer/Logs/JowiHue.console.txt

    #2
    I am sure that somehow the plugins shutdown procedure is not called correctly or not allowed to close decently. Will check on it. I am not sure about the console.txt file. This seems not to be a file created by the plugin. Asked another user about this too, is it possible that developer mode is set in the HS4 settings and that console output is forwarded?

    Wim
    -- Wim

    Plugins: JowiHue, RFXCOM, Sonos4, Jon00's Perfmon and Network monitor, EasyTrigger, Pushover 3P, rnbWeather, BLBackup, AK SmartDevice, Pushover, PHLocation, Zwave, GCalseer, SDJ-Health, Device History, BLGData

    1210 devices/features ---- 392 events ----- 40 scripts

    Comment


      #3
      I have the same issue with the console output file .
      I think maybe something is windows formated in your log path?

      ex: putting \ instead of /

      even hs4 have this in the html folder for dll that re suppposed to go into /html/bin.

      Comment


        #4
        \ instead of / looks definitely like windows formatting

        Comment


          #5
          The only file created by the plugin is the JowiHue.log file in the /Logs subdirctory. used this file to send me several times, so this is created correctly? In the old HS3 plugin there was another reference for creating a JowiHue.ini. In the HS4 plugin there is no other text file references. So I do not know why this file is created?
          -- Wim

          Plugins: JowiHue, RFXCOM, Sonos4, Jon00's Perfmon and Network monitor, EasyTrigger, Pushover 3P, rnbWeather, BLBackup, AK SmartDevice, Pushover, PHLocation, Zwave, GCalseer, SDJ-Health, Device History, BLGData

          1210 devices/features ---- 392 events ----- 40 scripts

          Comment


            #6
            Yes the one in the Logs is created correctly.

            Comment


              #7
              dkrupenn I think the file is created only when we start HomeSeer from console (with go scrips) ?
              rjh Maybe this is a hs4 issue ?

              Comment


                #8
                @MattL0 That seems to be correct I got this error when I start HS4 with the go script. Are the other ways to start HomeSeer other than from the console? I wrote a different startup/shutdown script, but the idea is the same: https://forums.homeseer.com/forum/ho...om-a-cold-boot

                Comment


                  #9
                  I did find a possible issue on the shutdown process (your first post) that might/hopefully also solve this console.txt issue. I will put this in the next release of the plugin.

                  Wim
                  -- Wim

                  Plugins: JowiHue, RFXCOM, Sonos4, Jon00's Perfmon and Network monitor, EasyTrigger, Pushover 3P, rnbWeather, BLBackup, AK SmartDevice, Pushover, PHLocation, Zwave, GCalseer, SDJ-Health, Device History, BLGData

                  1210 devices/features ---- 392 events ----- 40 scripts

                  Comment


                    #10
                    Hi Wim,

                    unfortunatly ii am stuill seeing the file (see picture)

                    And the plugin has difficulty to shut down:

                    [CODE]
                    Code:
                    xxxxxxxx@xxxxxxx:/HomeSeer# ./hs4stop.sh
                    { "Response":"ok" }
                    3101 sudo /usr/bin/mono /HomeSeer/HSConsole.exe --log
                    3107 /usr/bin/mono /HomeSeer/HSConsole.exe --log
                    3174 /usr/bin/mono /HomeSeer/HSPI_EasyTrigger.exe
                    3195 /usr/bin/mono /HomeSeer/HSPI_ZWave.exe
                    3217 /usr/bin/mono /HomeSeer/HSPI_MCSMQTT.exe
                    3227 /usr/bin/mono /HomeSeer/HSPI_JowiHue.exe
                    3245 /usr/bin/mono /HomeSeer/HSPI_PUSHOVER.exe
                    3292 /usr/bin/mono /HomeSeer/HSPI_LG_ThinQ.exe
                    3318 /usr/bin/mono /HomeSeer/HSPI_SqueezeBox.exe
                    3339 /usr/bin/mono /HomeSeer/HSPI_HarmonyHub.exe
                    3358 /usr/bin/mono /HomeSeer/HSPI_Big5.exe
                    3379 /usr/bin/mono /HomeSeer/HSPI_BLBackup.exe
                    3392 /usr/bin/mono /HomeSeer/HSPI_ULTRALOG3.exe
                    3411 /usr/bin/mono /HomeSeer/HSPI_LutronCaseta.exe
                    3432 /usr/bin/mono /HomeSeer/HSPI_MyHSToken.exe
                    3217 /usr/bin/mono /HomeSeer/HSPI_MCSMQTT.exe
                    3227 /usr/bin/mono /HomeSeer/HSPI_JowiHue.exe
                    3217 /usr/bin/mono /HomeSeer/HSPI_MCSMQTT.exe
                    3227 /usr/bin/mono /HomeSeer/HSPI_JowiHue.exe
                    3217 /usr/bin/mono /HomeSeer/HSPI_MCSMQTT.exe
                    3227 /usr/bin/mono /HomeSeer/HSPI_JowiHue.exe
                    3217 /usr/bin/mono /HomeSeer/HSPI_MCSMQTT.exe
                    3227 /usr/bin/mono /HomeSeer/HSPI_JowiHue.exe
                    3217 /usr/bin/mono /HomeSeer/HSPI_MCSMQTT.exe
                    3227 /usr/bin/mono /HomeSeer/HSPI_JowiHue.exe
                    3217 /usr/bin/mono /HomeSeer/HSPI_MCSMQTT.exe
                    3227 /usr/bin/mono /HomeSeer/HSPI_JowiHue.exe
                    3217 /usr/bin/mono /HomeSeer/HSPI_MCSMQTT.exe
                    3227 /usr/bin/mono /HomeSeer/HSPI_JowiHue.exe
                    3217 /usr/bin/mono /HomeSeer/HSPI_MCSMQTT.exe
                    3227 /usr/bin/mono /HomeSeer/HSPI_JowiHue.exe
                    3217 /usr/bin/mono /HomeSeer/HSPI_MCSMQTT.exe
                    3227 /usr/bin/mono /HomeSeer/HSPI_JowiHue.exe
                    3217 /usr/bin/mono /HomeSeer/HSPI_MCSMQTT.exe
                    3227 /usr/bin/mono /HomeSeer/HSPI_JowiHue.exe
                    3217 /usr/bin/mono /HomeSeer/HSPI_MCSMQTT.exe
                    3227 /usr/bin/mono /HomeSeer/HSPI_JowiHue.exe
                    3217 /usr/bin/mono /HomeSeer/HSPI_MCSMQTT.exe
                    3227 /usr/bin/mono /HomeSeer/HSPI_JowiHue.exe
                    3217 /usr/bin/mono /HomeSeer/HSPI_MCSMQTT.exe
                    3227 /usr/bin/mono /HomeSeer/HSPI_JowiHue.exe
                    3217 /usr/bin/mono /HomeSeer/HSPI_MCSMQTT.exe
                    3227 /usr/bin/mono /HomeSeer/HSPI_JowiHue.exe
                    3217 /usr/bin/mono /HomeSeer/HSPI_MCSMQTT.exe
                    3227 /usr/bin/mono /HomeSeer/HSPI_JowiHue.exe
                    3217 /usr/bin/mono /HomeSeer/HSPI_MCSMQTT.exe
                    3227 /usr/bin/mono /HomeSeer/HSPI_JowiHue.exe
                    3217 /usr/bin/mono /HomeSeer/HSPI_MCSMQTT.exe
                    3227 /usr/bin/mono /HomeSeer/HSPI_JowiHue.exe
                    3217 /usr/bin/mono /HomeSeer/HSPI_MCSMQTT.exe
                    3227 /usr/bin/mono /HomeSeer/HSPI_JowiHue.exe
                    3217 /usr/bin/mono /HomeSeer/HSPI_MCSMQTT.exe
                    3227 /usr/bin/mono /HomeSeer/HSPI_JowiHue.exe
                    3217 /usr/bin/mono /HomeSeer/HSPI_MCSMQTT.exe
                    3227 /usr/bin/mono /HomeSeer/HSPI_JowiHue.exe
                    3217 /usr/bin/mono /HomeSeer/HSPI_MCSMQTT.exe
                    3227 /usr/bin/mono /HomeSeer/HSPI_JowiHue.exe
                    3217 /usr/bin/mono /HomeSeer/HSPI_MCSMQTT.exe
                    3227 /usr/bin/mono /HomeSeer/HSPI_JowiHue.exe
                    3217 /usr/bin/mono /HomeSeer/HSPI_MCSMQTT.exe
                    3227 /usr/bin/mono /HomeSeer/HSPI_JowiHue.exe
                    3217 /usr/bin/mono /HomeSeer/HSPI_MCSMQTT.exe
                    3227 /usr/bin/mono /HomeSeer/HSPI_JowiHue.exe
                    3217 /usr/bin/mono /HomeSeer/HSPI_MCSMQTT.exe
                    3227 /usr/bin/mono /HomeSeer/HSPI_JowiHue.exe
                    3217 /usr/bin/mono /HomeSeer/HSPI_MCSMQTT.exe
                    3227 /usr/bin/mono /HomeSeer/HSPI_JowiHue.exe
                    3217 /usr/bin/mono /HomeSeer/HSPI_MCSMQTT.exe
                    3227 /usr/bin/mono /HomeSeer/HSPI_JowiHue.exe
                    3217 /usr/bin/mono /HomeSeer/HSPI_MCSMQTT.exe
                    3227 /usr/bin/mono /HomeSeer/HSPI_JowiHue.exe
                    3217 /usr/bin/mono /HomeSeer/HSPI_MCSMQTT.exe
                    3227 /usr/bin/mono /HomeSeer/HSPI_JowiHue.exe
                    3217 /usr/bin/mono /HomeSeer/HSPI_MCSMQTT.exe
                    3227 /usr/bin/mono /HomeSeer/HSPI_JowiHue.exe
                    3217 /usr/bin/mono /HomeSeer/HSPI_MCSMQTT.exe
                    3227 /usr/bin/mono /HomeSeer/HSPI_JowiHue.exe
                    3217 /usr/bin/mono /HomeSeer/HSPI_MCSMQTT.exe
                    3227 /usr/bin/mono /HomeSeer/HSPI_JowiHue.exe
                    3217 /usr/bin/mono /HomeSeer/HSPI_MCSMQTT.exe
                    3227 /usr/bin/mono /HomeSeer/HSPI_JowiHue.exe
                    3217 /usr/bin/mono /HomeSeer/HSPI_MCSMQTT.exe
                    3227 /usr/bin/mono /HomeSeer/HSPI_JowiHue.exe
                    3217 /usr/bin/mono /HomeSeer/HSPI_MCSMQTT.exe
                    3227 /usr/bin/mono /HomeSeer/HSPI_JowiHue.exe
                    3217 /usr/bin/mono /HomeSeer/HSPI_MCSMQTT.exe
                    3227 /usr/bin/mono /HomeSeer/HSPI_JowiHue.exe
                    3217 /usr/bin/mono /HomeSeer/HSPI_MCSMQTT.exe
                    3227 /usr/bin/mono /HomeSeer/HSPI_JowiHue.exe
                    3217 /usr/bin/mono /HomeSeer/HSPI_MCSMQTT.exe
                    3227 /usr/bin/mono /HomeSeer/HSPI_JowiHue.exe
                    3217 /usr/bin/mono /HomeSeer/HSPI_MCSMQTT.exe
                    3227 /usr/bin/mono /HomeSeer/HSPI_JowiHue.exe
                    3217 /usr/bin/mono /HomeSeer/HSPI_MCSMQTT.exe
                    3227 /usr/bin/mono /HomeSeer/HSPI_JowiHue.exe
                    3217 /usr/bin/mono /HomeSeer/HSPI_MCSMQTT.exe
                    3227 /usr/bin/mono /HomeSeer/HSPI_JowiHue.exe
                    3217 /usr/bin/mono /HomeSeer/HSPI_MCSMQTT.exe
                    3227 /usr/bin/mono /HomeSeer/HSPI_JowiHue.exe
                    3217 /usr/bin/mono /HomeSeer/HSPI_MCSMQTT.exe
                    3227 /usr/bin/mono /HomeSeer/HSPI_JowiHue.exe
                    3217 /usr/bin/mono /HomeSeer/HSPI_MCSMQTT.exe
                    3227 /usr/bin/mono /HomeSeer/HSPI_JowiHue.exe
                    3217 /usr/bin/mono /HomeSeer/HSPI_MCSMQTT.exe
                    3227 /usr/bin/mono /HomeSeer/HSPI_JowiHue.exe
                    this is what I have inn my hs4stop script (99% made by zwolfpack):

                    Code:
                    #!/bin/sh
                    # hs3stop.sh - stop the HS3 application
                    # supports: systemd service shutdown
                    
                    # import login credentials used to login to web server
                    # these are ignored if password not required
                    inifile=$(dirname $0)/Config/$(basename $0 .sh).ini
                    login=
                    test -r $inifile && . $inifile
                    
                    # extract web server port from settings.ini
                    hs3root=$(dirname $0) # where this script lives
                    webport=$(awk -F= '\
                    {
                    gsub("\015", "") # remove CR character
                    if ($1 == "gWebSvrPort") print $2
                    }
                    ' $hs3root/Config/settings.ini)
                    
                    # send application shutdown command
                    for i in $(seq 1 5)
                    do
                    /usr/bin/curl 'http://127.0.0.1:*EDITED*/JSON?request=runevent&id=11'
                    sleep 6
                    curl -f -s -o /dev/null ${login:+-u} $login -X POST -F 'scriptcmd=hs.shutdown()' -F 'runscript=Execute Command' "http://127.0.0.1:$webport/ControlPanel"
                    rc=$?
                    test $rc -eq 0 && break
                    sleep 2
                    done
                    
                    # if curl cmd unsuccessful, terminate main process
                    test $rc -ne 0 -a -n "$MAINPID" && kill $MAINPID
                    
                    # delay until all HomeSeer mono processes terminate
                    mono=$(which mono) || exit
                    while pgrep -af $mono.'*'\(HSConsole\|HomeSeer\)
                    do
                    sleep 5
                    done

                    Comment


                      #11
                      Matthieu,

                      I have honestly no idea what I am looking at here? Also missing the picture. Which version are you running at this point?
                      -- Wim

                      Plugins: JowiHue, RFXCOM, Sonos4, Jon00's Perfmon and Network monitor, EasyTrigger, Pushover 3P, rnbWeather, BLBackup, AK SmartDevice, Pushover, PHLocation, Zwave, GCalseer, SDJ-Health, Device History, BLGData

                      1210 devices/features ---- 392 events ----- 40 scripts

                      Comment


                        #12
                        The shutdown script for homeseer.

                        the script is just printing every 5 secs the plugin that are still running .

                        It is best viewed on a pc .

                        Anyways that was just to say that the plugin is hanging at shutdown.

                        Comment


                          #13
                          Ok, but does it throw any error? or do you still see the console.txt? If not, I would say it is resolved?
                          Does it log "Thanks for using it" during shutdown in the log? Then it should be fine.
                          -- Wim

                          Plugins: JowiHue, RFXCOM, Sonos4, Jon00's Perfmon and Network monitor, EasyTrigger, Pushover 3P, rnbWeather, BLBackup, AK SmartDevice, Pushover, PHLocation, Zwave, GCalseer, SDJ-Health, Device History, BLGData

                          1210 devices/features ---- 392 events ----- 40 scripts

                          Comment


                            #14
                            The plugin does not shutdown when homeseer shut down ,the process need to be killed manually ( mot sure at this time that it does this at every shut down.. I see not errors and do not see ‘’thanks for using’’ .
                            Will a trace log see this?


                            Yes the file was still there, but now... sure if this was from the last version of the plugin please let me try another time.

                            Comment


                              #15
                              Ok I do not see the file. The only issue remaining is that the plugin does not shutdown when hs is shutting down

                              Comment

                              Working...
                              X