Trouble running HG on Server 2016

I brought this up on G+ but this should be documented.

I previously ran HG on Server 2008 without issue. When I upgraded, HG is locking up on Server 2016 and the background process is continuously using 10% CPU. Loading the web interface locks up and rarely completes. However, using the app to turn on and off devices works and the security alarm worked. My API string to turn on the security alarm rarely worked but using the string to turn it off did work most of the time. Not sure what’s wrong there. I have resolved the issue for my needs now that I’m moving my server to a VM on a Windows 10 machine so I can just run HG on the Win 10 machine but ultimately I would like it to be running on the server OS.

shouldnt be much difference between 10 and 2016… what A/V / security products are you running on 2016…

Maybe different .NET version?

1 Like

No security products.

Also I’m not seeing .net installed. Is it required? I know I had it on
2008.

yes you need .net

3.5 wont be installed by default… but it shouldnt be needed, but you could try adding it…
open powershell and type Add-WindowsFeature NET-Framework-Core

you can check with get-windowsfeature

.net 4.5x should be present by default…

Ill give it a try on a 2016 box here when I get a min…

I installed the latest .net and so far no issues 1 minute in. I’ll check later tonight to see if it’s still functioning and not locking up. That’s strange that it will even work without it. Maybe a base level of .net should be added to the installer package.

After a few hours it is still responding normally so I believe this is resolved and was not a bug. I have moved the thread to troubleshooting. I like this new forum. It’s nice.

It’s really strange because HomeGenie and its related libraries are targeting .Net Framework 4.5 so .Net 3.5 should not be needed.
Anyway thanks for sharing this knowledge.

Nope I take it back. It’s doing it again. I can’t get the web interface to load all the way. It loads the menu buttons and most of the menus but no wood background or devices. So frustrating. It just spins for infinity and never times out or finishes loading.

What browser do you use? Have you tried other browsers?

Yep tried all the browsers. HG runs fine in win 10 though. I’ve had this issue since day one of a new server install and new HG install. Tried to reinstall it and the same issue would always come up. I really wish I knew what it was.

Today I installed Windows Server 2016 (with GUI) in Parallels Desktop and wasn’t able to reproduce the problem.
After the default installation, HG doesn’t consume a lot of CPU, on stand-by 0%. But I didn’t run any automatization programs on that installation, so maybe one of them uses a lot of CPU.

There is no base version of .net in the package… but 2016 will have 4.6.2 iirc installed by default - so it might be that updating to 4.7.x fixed something that was amiss.

Are you running the browser on the 2016 machine?

if so try connecting from another device and see what behaviour you get there?

The only automation I have is the HEM and a day/night cycle for my outdoor lights.

I took a look again and it was flip flopping between 15 and 35% CPU every second and the page would not load at all. I stopped the service and started again. CPU is back to 0. I load the page and it loads halfway and the CPU is at 4% and stops loading while at 4% CPU with the continuous spinner.

If I remember right, a new install everything works fine until you restore from backup and then it gets hosed. I can restore from the same backup on Win 10 and everything works fine.

I think it might have something to do with IIS web hosting. I couldn’t get it to load after I reinstalled until I stopped the IIS web host and then restarted the HG service and now it loaded. I’m going to try leaving it for a few hours and see if that resolves the issue. Server 2016 uses IIS 10 and 2008R2 was using IIS 7.5 I believe. I always use HG on another port so they won’t conflict with each other but there might be something new that is clashing somehow?

edit 2 minutes later it’s not responding again after I changed the port and restarted the service. I really can’t track down what’s going on.

I’m no expert at debugging and don’t know if it would help. But if you could build from source and use debug mode in Visual Studio it may be possible to paus HG when the problem occurs. Maybe it could give a hint where in the code the problem is?

It’s hanging at the point where it should announce “Connected to Stream” and then load the background.

IIS doesnt install by default and isnt required for homegenie… if your not using it, remove it… or change its default binding from port 80 to something like 82…

I confirm that after installing IIS on the fresh Windows Server 2016 HG stops working normally and hangs on page reload.
Need to investigate it more.

I’m glad you were able to replicate it. I don’t feel crazy now. I’m wondering if Win10 Pro with IIS installed would produce the same issue?