Closed Buttercream91 closed 2 years ago
I have made sure there is no other process blocking the port. But I get the same error. the logs says following:
System.Net.HttpListenerException (5): Zugriff verweigert
at System.Net.HttpListener.AddPrefixCore(String registeredPrefix)
at System.Net.HttpListener.AddAllPrefixes()
at System.Net.HttpListener.Start()
at Grapevine.RestServer.Start()
at Grapevine.MiddlewareExtensions.Run(IRestServer server)
at HASS.Agent.API.ApiManager.Initialize()
2022-10-19 19:39:43.606 +02:00 [FTL] [LOCALAPI] Error trying to bind the API to port 5116: Cannot access a disposed object.
Object name: 'System.Net.HttpListener'.
System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'System.Net.HttpListener'.
at System.Net.HttpListener.CheckDisposed()
at System.Net.HttpListener.Stop()
at Grapevine.RestServer.Start()
at Grapevine.MiddlewareExtensions.Run(IRestServer server)
at HASS.Agent.API.ApiManager.Initialize()```
if i start hass-agent as admin it starts two instances. local-api works now but mqtt doesn't (it alternates really fast between on and off)
Can you please close all instances of hass.agent, then open an elevated command prompt, and run these commands:
netsh http delete urlacl http://+:5115/
netsh http add urlacl url=http://+:5115/ user=Everyone
Afterwards, restart hass.agent (as a normal user, no elevation required) and see if it's fixed
ok user=Everyone
didn't work: The SDDL could not be created. Error: 1789
but with my user (there is only one) it worked.
thanks
Edit: if windows is German it need to be user=Jeder
That error message pops up after installing Hass.agent followed by "Make sure no other instance of HASS.Agent is running and the port is available and registered.
I don't know how to ensure the port is available and registered. I successfully installed Hass.Agent on another pc on the network, is that what it means by no other instances? Please send help.