www.homeseer.com    
 

Go Back   HomeSeer Message Board > HomeSeer Products & Services > HomeSeer Software > HS3 / HS3PRO > HS3 / HS3PRO Discussion

HS3 / HS3PRO Discussion Discussions related to the released version of HS3/HS3PRO

Reply
 
Thread Tools Display Modes
  #1  
Old April 17th, 2017, 05:39 PM
rprade's Avatar
rprade rprade is offline
OverSeer
 
Join Date: Jan 2014
Location: Colorado
Posts: 5,908
Plug-ins fail to initialize.

I have been fighting this for a week. I have a perfectly functional system running under windows 10 on a stand alone SuperMicro server

I was going to do some maintenance on the server so I moved HS# back to a VM running Windows 10. I move HS3 by shutting it down and copying the entire directory structure to the backup machine. This VM is running under Hyper-v on a Windows Server 2012r2 machine. I have used this same VM in the past and was able to freely move the HS system back and forth between the physical machine and VM. I have done this between these same two machines dozens of times in the past, without issue. The last time I did this was about June last year.

Now when I try to bring up HS3 on the VM, I get 1-3 plug-ins that fail to initialize. It is not always the same plug-ins, but at least 1 fails to initialize. In developer mode I captured this for the Arduino plug-in
Code:
Unhandled Exception: System.TypeInitializationException: The type initializer fo
r 'HSPI_Arduino.Util' threw an exception. ---> System.Net.Sockets.SocketExceptio
n: Only one usage of each socket address (protocol/network address/port) is norm
ally permitted
   at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress
socketAddress)
   at System.Net.Sockets.Socket.Bind(EndPoint localEP)
   at System.Net.Sockets.UdpClient..ctor(Int32 port, AddressFamily family)
   at HSPI_Arduino.UDPboard..ctor()
   at HSPI_Arduino.Util..cctor()
   --- End of inner exception stack trace ---
   at HSPI_Arduino.Main.Main()
I checked permissions, disabled UAC and disabled the firewall, always with the same results.

I built a fresh VM, reinstalled HS3 and all of the plug-ins and tried again with the same result.

I decided I would try to run it under FireDaemon Pro on the Windows Server 2012r2 and the results are the same. Again I installed HS3, all plug-ins, double checked UAC settings, permissions, etc. Then I started HS bare, without my data, configurations and scripts. All plug-ins loaded fine.

As a last resort I tried to bring it up on the Server 2012 while logged in as a user - same results.

I restored my original machine from the same files as I was trying to run on the VMs and server and it runs fine on it (Windows 10 stand alone).

I am running fine on the original server, but have exhausted everything I can think of.

Any ideas?
__________________
Randy Prade
Aurora, CO
Prades.net

"Do or do not, there is no try"
-Yoda

PHLocation - Pushover - EasyTrigger - UltraECM3 - Ultra1Wire3 - Arduino
Reply With Quote
  #2  
Old April 17th, 2017, 06:53 PM
Kerat Kerat is offline
Seer Master
 
Join Date: May 2016
Location: Colorado USA
Posts: 639
What are the differences related to .net?


Sent from my iPhone using Tapatalk
Reply With Quote
  #3  
Old April 17th, 2017, 07:29 PM
Rupp's Avatar
Rupp Rupp is offline
OverSeer
 
Join Date: Jan 2001
Location: Huntsville, Al. USA
Posts: 36,793
It could be a licensing issue.
__________________
-Rupp
Reply With Quote
  #4  
Old April 17th, 2017, 08:27 PM
rprade's Avatar
rprade rprade is offline
OverSeer
 
Join Date: Jan 2014
Location: Colorado
Posts: 5,908
Quote:
Originally Posted by Kerat View Post
What are the differences related to .net?


Sent from my iPhone using Tapatalk
Both VMs and the server have .net 3.5 and 4.5 on the Windows 10 machines .net 2.0 and 3.0 are included and on the server they are added features. Server Essentials relies heavily on.net for the dashboard and remote app functions. They all work fine.

The second VM was a fresh install of Windows 10, a fresh install of all .net, a fresh install of HS3, a fresh install of all plug-ins.

Understand that the first VM I went to was running HS3 in May of last year without issue, so it would seem to me it is something that changed in HS3 since then. This VM and the physical machine were alternated back and forth from May 2015 several dozen times until May of 2016.
Reply With Quote
  #5  
Old April 17th, 2017, 08:59 PM
rprade's Avatar
rprade rprade is offline
OverSeer
 
Join Date: Jan 2014
Location: Colorado
Posts: 5,908
Quote:
Originally Posted by Rupp View Post
It could be a licensing issue.
I find it difficult to believe that, since it is a socket error that causes plug-ins to fail. It is not always the same plug-in either, it can be any 1 or more of the 30 plug-ins I am running. If I change the order the plug-ins are loaded, it will change the one or two that fail to initialize. The ones that fail are always among the last 10 loaded. Additionally on the management page all licenses are there and valid, with no licensing errors on the management page or in the log.

The server has 64GB of RAM and a Xeon E3-1270 processor, the VMs had 8GB and 8 virtual cores assigned. The physical machine I run HS3 on daily is an E3-1230 with 8GB RAM running Windows 10 Pro.

Lastly, I reinstalled HS3 and all the plug-ins fresh on the Server - it had never had HS3 or any plug-ins installed. I reinstalled all licenses on the fresh install (it was tedious and time consuming), but the problem persists on that installation as well.

I will say that if there has been a change that prevents me from bringing up a computer, restored from a current backup of a running system, then there is no viable disaster recovery plan. The full directory restore is the only way to go, because the built in backup only backs up data, config and scripts folders, ignoring all of the databases and other configurations created in the bin and html directories by plug-ins.
Reply With Quote
  #6  
Old April 17th, 2017, 09:53 PM
rprade's Avatar
rprade rprade is offline
OverSeer
 
Join Date: Jan 2014
Location: Colorado
Posts: 5,908
I removed 6 plug-ins, reducing the count to 25 and it starts just fine. I restored from my current backup again and removed 5 different plug-ins and it starts fine. This would indicate that it might be Port Exhaustion, but I don't understand why one machine is not affected, but the two VMs and the much more powerful server are.

According to what I have found the socket error I get
Code:
System.Net.Sockets.SocketException: Only one usage of each socket address (protocol/network address/port) is normally permitted
on plug-ins that fail to initialize, can indicate that sockets are not being released quickly enough. It is TCP/IP Port Exhaustion. I added a registry keyword "TcpTimedWaitDelay" with a value of 30 to "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\ Parameters". This reduces the time before a port is released. None of the machines had this entry. It made no difference. Another registry dword under the same key is "MaxUserPort" which can be set from 5001 to 65534. It was already at the maximum on all three machines.
Reply With Quote
  #7  
Old April 17th, 2017, 10:36 PM
zwolfpack zwolfpack is offline
Seer Master
 
Join Date: Sep 2015
Location: Orange County, California, USA
Posts: 742
The snippet you posted indicates this problem occurred on a UDP socket; note call to
System.Net.Sockets.UdpClient..ctor(Int32 port, AddressFamily family)

Is this issue limited to UDP connections?
Reply With Quote
  #8  
Old April 17th, 2017, 11:01 PM
rprade's Avatar
rprade rprade is offline
OverSeer
 
Join Date: Jan 2014
Location: Colorado
Posts: 5,908
Quote:
Originally Posted by zwolfpack View Post
The snippet you posted indicates this problem occurred on a UDP socket; note call to
System.Net.Sockets.UdpClient..ctor(Int32 port, AddressFamily family)

Is this issue limited to UDP connections?
I have not read all of the command windows as plug-ins fail, but the two or three different plug-ins that failed where I had it in Developer Mode had similar error messages, but for different plug-ins.

It is also stone reliable with 25 plug-ins, but ALWAYS has at least one plug-in failing to initialize on startup if I run all 31. If I go in and disable/enable the failing plug-in after HomeSeer starts up it will initialize and work properly. The system will run properly after that, the problem only occurs on HS startup.

On my primary HS server it works without issue with all 31 plug-ins. That server has not had a hiccup in a year. It has been shutdown and restarted frequently because I do a lot of testing for a couple of plug-in developers.
Reply With Quote
  #9  
Old April 17th, 2017, 11:06 PM
zwolfpack zwolfpack is offline
Seer Master
 
Join Date: Sep 2015
Location: Orange County, California, USA
Posts: 742
It is strange alright. What are you running as a firewall? Try disabling that?
Reply With Quote
  #10  
Old April 17th, 2017, 11:36 PM
rprade's Avatar
rprade rprade is offline
OverSeer
 
Join Date: Jan 2014
Location: Colorado
Posts: 5,908
Quote:
Originally Posted by zwolfpack View Post
It is strange alright. What are you running as a firewall? Try disabling that?
On the machines it is just Windows firewall, which I disabled. I also completely disabled UAC by editing the registry. The server doesn't run antivirus and the 2 VMs run Windows Defender, which I have also disabled.

The really puzzling thing is that the plug-ins will all run fine, if I restart the plug-in(s) that fail to initialize at startup. If it was a firewall or similar issue, I wouldn't see it working after a plug-in is restarted. I really, really think it is something that is not starting cleanly, but that doesn't explain why it all works fine on the original machine.

Since the problems occur on the WSE 2012r2 machine and the 2 VMs that are also running on the same platform, I am going to try another desktop computer tomorrow. I don't see how a problem in the server could trickle down to the VMs, but it is the only common denominator.
Reply With Quote
  #11  
Old April 18th, 2017, 09:19 AM
rmasonjr's Avatar
rmasonjr rmasonjr is online now
OverSeer
 
Join Date: May 2001
Location: Brookhaven, MS USA
Posts: 6,196
Here's something I just saw that might help - not sure if you've seen this or not:
https://support.socketlabs.com/index...ally-permitted
__________________

HS3Pro Running on a Raspberry Pi2 (Raspbian)
61 Z-Wave Nodes, 162 Events, 293 Devices
UPB modules via OMNI plugin/panel
Plugins: Z-Wave, BLRF, HAI, HSTouch, weatherXML, EasyTrigger
HSTouch Clients: 3 Android, 1 Joggler
Reply With Quote
  #12  
Old April 18th, 2017, 10:18 AM
rprade's Avatar
rprade rprade is offline
OverSeer
 
Join Date: Jan 2014
Location: Colorado
Posts: 5,908
Quote:
Originally Posted by rmasonjr View Post
Here's something I just saw that might help - not sure if you've seen this or not:
https://support.socketlabs.com/index...ally-permitted
Thanks. I covered that in post #6 above. By default the MaxUserPort is already set to 65534 on all of my Windows 10 machines and the Server 2012. I did create the DWord for TcpTimedWaitDelay and set the value to 30, but it made no difference.

I am going to try to move HomeSeer to my desktop computer today, just to try different hardware.
Reply With Quote
  #13  
Old April 18th, 2017, 11:24 AM
rmasonjr's Avatar
rmasonjr rmasonjr is online now
OverSeer
 
Join Date: May 2001
Location: Brookhaven, MS USA
Posts: 6,196
Ah, gotcha... Please do post back what you find.

This reminds me of the old unix days chasing down semaphores and file descriptors.
Those were always fun easter eggs (not).
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't initialize Insteon plug-in on new PC tomsans Insteon Plug-in (Mark Sandler) 9 February 10th, 2014 04:04 PM
Unable to initialize Infrared interface BC4 Plug 1021 Bitwise Controls BC4 7 May 27th, 2010 08:33 AM
Z-Wave Plug in modules - fail to turn off TBG HomeSeer Z-Wave Plug-in 8 December 14th, 2008 03:50 PM
Plug in won't initialize gtg60 RokuSeer Plug-In 7 March 7th, 2007 12:03 PM
After updating Insteon plug-in: Unable to initialize interface Insteon :Either no lic slivko626 Insteon Plug-in (Mark Sandler) 1 October 15th, 2006 01:49 AM


All times are GMT -4. The time now is 11:09 PM.


Copyright HomeSeer Technologies, LLC