Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addon failing on start #637

Open
martinviktora opened this issue May 14, 2024 · 4 comments
Open

Addon failing on start #637

martinviktora opened this issue May 14, 2024 · 4 comments

Comments

@martinviktora
Copy link

Core 2024.5.3, Supervisor
2024.05.1, Operating System 12.3, Frontend 20240501.1, RPi 4

Addon can not be started at all, fails immediately.

Logs:

at ESPresense.Services.TelemetryService.ExecuteAsync(CancellationToken stoppingToken) in /App/src/Services/TelemetryService.cs:line 50
at Microsoft.Extensions.Hosting.Internal.Host.b__15_1(IHostedService service, CancellationToken token)
at Microsoft.Extensions.Hosting.Internal.Host.ForeachService[T](IEnumerable1 services, CancellationToken token, Boolean concurrent, Boolean abortOnFirstException, List1 exceptions, Func3 operation) at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken) at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token) at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token) at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Run(IHost host) at Program.<Main>$(String[] args) in /App/src/Program.cs:line 110 [21:28:57 INF] Math.NET Numerics Configuration: Version 5.0.0 Built for .NET 5.0+ Linear Algebra Provider: Managed Fourier Transform Provider: Managed Sparse Solver Provider: Managed Max Degree of Parallelism: 4 Parallelize Elements: 300 Parallelize Order: 64 Check Distribution Parameters: True Thread-Safe RNGs: True Operating System: Debian GNU/Linux 12 (bookworm) Operating System Architecture: Arm64 Framework: .NET 8.0.2 Process Architecture: Arm64 [21:28:57 INF] Loading /config/espresense/config.yaml [21:28:58 INF] Optimization enabled [21:28:58 INF] Attempting to connect to mqtt server at core-mosquitto:1883 as addons... [21:28:58 ERR] Hosting failed to start System.ArgumentNullException: Value cannot be null. (Parameter 'managedMqttClient') at MQTTnet.Extensions.ManagedClient.ManagedMqttClientExtensions.EnqueueAsync(IManagedMqttClient managedMqttClient, String topic, String payload, MqttQualityOfServiceLevel qualityOfServiceLevel, Boolean retain) at ESPresense.Services.MqttCoordinator.EnqueueAsync(String topic, String payload, Boolean retain) in /App/src/Services/MqttCoordinator.cs:line 198 at ESPresense.Services.TelemetryService.ExecuteAsync(CancellationToken stoppingToken) in /App/src/Services/TelemetryService.cs:line 50 at Microsoft.Extensions.Hosting.Internal.Host.<StartAsync>b__15_1(IHostedService service, CancellationToken token) at Microsoft.Extensions.Hosting.Internal.Host.ForeachService[T](IEnumerable1 services, CancellationToken token, Boolean concurrent, Boolean abortOnFirstException, List1 exceptions, Func3 operation)
[21:28:58 ERR] BackgroundService failed
System.Threading.Tasks.TaskCanceledException: A task was canceled.
at ESPresense.Services.NodeTelemetryStore.ExecuteAsync(CancellationToken stoppingToken) in /App/src/Services/NodeTelemetryStore.cs:line 35
at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
[21:28:58 ERR] BackgroundService failed
System.Threading.Tasks.TaskCanceledException: A task was canceled.
at ESPresense.Services.DeviceSettingsStore.ExecuteAsync(CancellationToken stoppingToken) in /App/src/Services/DeviceSettingsStore.cs:line 35
at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
[21:28:58 FTL] The HostOptions.BackgroundServiceExceptionBehavior is configured to StopHost. A BackgroundService has thrown an unhandled exception, and the IHost instance is stopping. To avoid this behavior, configure this to Ignore; however the BackgroundService will not be restarted.
System.Threading.Tasks.TaskCanceledException: A task was canceled.
at ESPresense.Services.NodeTelemetryStore.ExecuteAsync(CancellationToken stoppingToken) in /App/src/Services/NodeTelemetryStore.cs:line 35
at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
[21:28:58 FTL] The HostOptions.BackgroundServiceExceptionBehavior is configured to StopHost. A BackgroundService has thrown an unhandled exception, and the IHost instance is stopping. To avoid this behavior, configure this to Ignore; however the BackgroundService will not be restarted.
System.Threading.Tasks.TaskCanceledException: A task was canceled.
at ESPresense.Services.DeviceSettingsStore.ExecuteAsync(CancellationToken stoppingToken) in /App/src/Services/DeviceSettingsStore.cs:line 35
at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
[21:28:58 ERR] BackgroundService failed
System.Threading.Tasks.TaskCanceledException: A task was canceled.
at ESPresense.Locators.DeviceTracker.ExecuteAsync(CancellationToken stoppingToken) in /App/src/Locators/DeviceTracker.cs:line 91
at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
[21:28:58 INF] Application is shutting down...
[21:28:58 FTL] The HostOptions.BackgroundServiceExceptionBehavior is configured to StopHost. A BackgroundService has thrown an unhandled exception, and the IHost instance is stopping. To avoid this behavior, configure this to Ignore; however the BackgroundService will not be restarted.
System.Threading.Tasks.TaskCanceledException: A task was canceled.
at ESPresense.Locators.DeviceTracker.ExecuteAsync(CancellationToken stoppingToken) in /App/src/Locators/DeviceTracker.cs:line 91
at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
[21:28:58 ERR] BackgroundService failed
System.Threading.Tasks.TaskCanceledException: A task was canceled.
at ESPresense.Services.NodeSettingsStore.ExecuteAsync(CancellationToken stoppingToken) in /App/src/Services/NodeSettingsStore.cs:line 62
at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
[21:28:58 FTL] The HostOptions.BackgroundServiceExceptionBehavior is configured to StopHost. A BackgroundService has thrown an unhandled exception, and the IHost instance is stopping. To avoid this behavior, configure this to Ignore; however the BackgroundService will not be restarted.
System.Threading.Tasks.TaskCanceledException: A task was canceled.
at ESPresense.Services.NodeSettingsStore.ExecuteAsync(CancellationToken stoppingToken) in /App/src/Services/NodeSettingsStore.cs:line 62
at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
[21:28:58 ERR] BackgroundService failed
System.Threading.Tasks.TaskCanceledException: A task was canceled.
at ESPresense.Locators.MultiScenarioLocator.ExecuteAsync(CancellationToken stoppingToken) in /App/src/Locators/MultiScenarioLocator.cs:line 19
at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
[21:28:58 ERR] BackgroundService failed
System.Threading.Tasks.TaskCanceledException: A task was canceled.
at ESPresense.Optimizers.OptimizationRunner.ExecuteAsync(CancellationToken stoppingToken) in /App/src/Optimizers/OptimizationRunner.cs:line 48
at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
[21:28:58 ERR] BackgroundService failed
System.Threading.Tasks.TaskCanceledException: A task was canceled.
at ESPresense.Services.ConfigLoader.ExecuteAsync(CancellationToken stoppingToken) in /App/src/Services/ConfigLoader.cs:line 84
at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
[21:28:58 FTL] The HostOptions.BackgroundServiceExceptionBehavior is configured to StopHost. A BackgroundService has thrown an unhandled exception, and the IHost instance is stopping. To avoid this behavior, configure this to Ignore; however the BackgroundService will not be restarted.
System.Threading.Tasks.TaskCanceledException: A task was canceled.
at ESPresense.Optimizers.OptimizationRunner.ExecuteAsync(CancellationToken stoppingToken) in /App/src/Optimizers/OptimizationRunner.cs:line 48
at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
[21:28:58 FTL] The HostOptions.BackgroundServiceExceptionBehavior is configured to StopHost. A BackgroundService has thrown an unhandled exception, and the IHost instance is stopping. To avoid this behavior, configure this to Ignore; however the BackgroundService will not be restarted.
System.Threading.Tasks.TaskCanceledException: A task was canceled.
at ESPresense.Locators.MultiScenarioLocator.ExecuteAsync(CancellationToken stoppingToken) in /App/src/Locators/MultiScenarioLocator.cs:line 19
at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
[21:28:58 FTL] The HostOptions.BackgroundServiceExceptionBehavior is configured to StopHost. A BackgroundService has thrown an unhandled exception, and the IHost instance is stopping. To avoid this behavior, configure this to Ignore; however the BackgroundService will not be restarted.
System.Threading.Tasks.TaskCanceledException: A task was canceled.
at ESPresense.Services.ConfigLoader.ExecuteAsync(CancellationToken stoppingToken) in /App/src/Services/ConfigLoader.cs:line 84
at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
Unhandled exception. System.ArgumentNullException: Value cannot be null. (Parameter 'managedMqttClient')
at MQTTnet.Extensions.ManagedClient.ManagedMqttClientExtensions.EnqueueAsync(IManagedMqttClient managedMqttClient, String topic, String payload, MqttQualityOfServiceLevel qualityOfServiceLevel, Boolean retain)
at ESPresense.Services.MqttCoordinator.EnqueueAsync(String topic, String payload, Boolean retain) in /App/src/Services/MqttCoordinator.cs:line 198
at ESPresense.Services.TelemetryService.ExecuteAsync(CancellationToken stoppingToken) in /App/src/Services/TelemetryService.cs:line 50
at Microsoft.Extensions.Hosting.Internal.Host.b__15_1(IHostedService service, CancellationToken token)
at Microsoft.Extensions.Hosting.Internal.Host.ForeachService[T](IEnumerable1 services, CancellationToken token, Boolean concurrent, Boolean abortOnFirstException, List1 exceptions, Func`3 operation)
at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken)
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Run(IHost host)
at Program.

$(String[] args) in /App/src/Program.cs:line 110

@BeyTek
Copy link

BeyTek commented Aug 11, 2024

+1

@JonLaliberte
Copy link

Same issue here. Fresh install of v1.0.0 on HA 2024.9.1.

@FlorianJohn
Copy link

FlorianJohn commented Sep 27, 2024

Same issue here.
ESPresense Companion v1.0.0
HAOS 2024.9.2 on proxmox

After deleting the espresense folder with the config.yaml and reinstalling the AddOn it will sometimes start once with the default config.yaml, but will not survive a reboot. Using the HA MQTT integration, so pretty much stock.

[21:54:16 INF] Math.NET Numerics Configuration:
Version 5.0.0
Built for .NET 5.0+
Linear Algebra Provider: Managed
Fourier Transform Provider: Managed
Sparse Solver Provider: Managed
Max Degree of Parallelism: 2
Parallelize Elements: 300
Parallelize Order: 64
Check Distribution Parameters: True
Thread-Safe RNGs: True
Operating System: Debian GNU/Linux 12 (bookworm)
Operating System Architecture: X64
Framework: .NET 8.0.8
Process Architecture: X64
[21:54:16 INF] Loading /config/espresense/config.yaml
[21:54:16 INF] Optimization enabled
[21:54:16 INF] Attempting to connect to mqtt server at core-mosquitto:1883 as addons...
[21:54:16 ERR] Hosting failed to start
System.ArgumentNullException: Value cannot be null. (Parameter 'managedMqttClient')
at MQTTnet.Extensions.ManagedClient.ManagedMqttClientExtensions.EnqueueAsync(IManagedMqttClient managedMqttClient, String topic, String payload, MqttQualityOfServiceLevel qualityOfServiceLevel, Boolean retain)
at ESPresense.Services.MqttCoordinator.EnqueueAsync(String topic, String payload, Boolean retain) in /App/src/Services/MqttCoordinator.cs:line 198
at ESPresense.Services.TelemetryService.ExecuteAsync(CancellationToken stoppingToken) in /App/src/Services/TelemetryService.cs:line 49
at Microsoft.Extensions.Hosting.Internal.Host.b__15_1(IHostedService service, CancellationToken token)
at Microsoft.Extensions.Hosting.Internal.Host.ForeachService[T](IEnumerable1 services, CancellationToken token, Boolean concurrent, Boolean abortOnFirstException, List1 exceptions, Func3 operation) [21:54:16 ERR] BackgroundService failed System.Threading.Tasks.TaskCanceledException: A task was canceled. at ESPresense.Services.NodeTelemetryStore.ExecuteAsync(CancellationToken stoppingToken) in /App/src/Services/NodeTelemetryStore.cs:line 32 at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService) [21:54:16 FTL] The HostOptions.BackgroundServiceExceptionBehavior is configured to StopHost. A BackgroundService has thrown an unhandled exception, and the IHost instance is stopping. To avoid this behavior, configure this to Ignore; however the BackgroundService will not be restarted. System.Threading.Tasks.TaskCanceledException: A task was canceled. at ESPresense.Services.NodeTelemetryStore.ExecuteAsync(CancellationToken stoppingToken) in /App/src/Services/NodeTelemetryStore.cs:line 32 at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService) [21:54:16 INF] Application is shutting down... [21:54:16 ERR] BackgroundService failed System.Threading.Tasks.TaskCanceledException: A task was canceled. at ESPresense.Services.NodeSettingsStore.ExecuteAsync(CancellationToken stoppingToken) in /App/src/Services/NodeSettingsStore.cs:line 60 at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService) [21:54:16 FTL] The HostOptions.BackgroundServiceExceptionBehavior is configured to StopHost. A BackgroundService has thrown an unhandled exception, and the IHost instance is stopping. To avoid this behavior, configure this to Ignore; however the BackgroundService will not be restarted. System.Threading.Tasks.TaskCanceledException: A task was canceled. at ESPresense.Services.NodeSettingsStore.ExecuteAsync(CancellationToken stoppingToken) in /App/src/Services/NodeSettingsStore.cs:line 60 at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService) [21:54:16 ERR] BackgroundService failed System.Threading.Tasks.TaskCanceledException: A task was canceled. at ESPresense.Locators.DeviceTracker.ExecuteAsync(CancellationToken stoppingToken) in /App/src/Locators/DeviceTracker.cs:line 91 at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService) [21:54:16 FTL] The HostOptions.BackgroundServiceExceptionBehavior is configured to StopHost. A BackgroundService has thrown an unhandled exception, and the IHost instance is stopping. To avoid this behavior, configure this to Ignore; however the BackgroundService will not be restarted. System.Threading.Tasks.TaskCanceledException: A task was canceled. at ESPresense.Locators.DeviceTracker.ExecuteAsync(CancellationToken stoppingToken) in /App/src/Locators/DeviceTracker.cs:line 91 at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService) [21:54:16 ERR] BackgroundService failed System.Threading.Tasks.TaskCanceledException: A task was canceled. at ESPresense.Services.DeviceSettingsStore.ExecuteAsync(CancellationToken stoppingToken) in /App/src/Services/DeviceSettingsStore.cs:line 35 at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService) Unhandled exception. System.ArgumentNullException: Value cannot be null. (Parameter 'managedMqttClient') at MQTTnet.Extensions.ManagedClient.ManagedMqttClientExtensions.EnqueueAsync(IManagedMqttClient managedMqttClient, String topic, String payload, MqttQualityOfServiceLevel qualityOfServiceLevel, Boolean retain) at ESPresense.Services.MqttCoordinator.EnqueueAsync(String topic, String payload, Boolean retain) in /App/src/Services/MqttCoordinator.cs:line 198 at ESPresense.Services.TelemetryService.ExecuteAsync(CancellationToken stoppingToken) in /App/src/Services/TelemetryService.cs:line 49 at Microsoft.Extensions.Hosting.Internal.Host.<StartAsync>b__15_1(IHostedService service, CancellationToken token) at Microsoft.Extensions.Hosting.Internal.Host.ForeachService[T](IEnumerable1 services, CancellationToken token, Boolean concurrent, Boolean abortOnFirstException, List1 exceptions, Func3 operation)
at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken)
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Run(IHost host)
at Program.

$(String[] args) in /App/src/Program.cs:line 111
[21:54:16 FTL] The HostOptions.BackgroundServiceExceptionBehavior is configured to StopHost. A BackgroundService has thrown an unhandled exception, and the IHost instance is stopping. To avoid this behavior, configure this to Ignore; however the BackgroundService will not be restarted.
System.Threading.Tasks.TaskCanceledException: A task was canceled.
at ESPresense.Services.DeviceSettingsStore.ExecuteAsync(CancellationToken stoppingToken) in /App/src/Services/DeviceSettingsStore.cs:line 35
at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
[21:54:16 ERR] BackgroundService failed
System.Threading.Tasks.TaskCanceledException: A task was canceled.
at ESPresense.Optimizers.OptimizationRunner.ExecuteAsync(CancellationToken stoppingToken) in /App/src/Optimizers/OptimizationRunner.cs:line 47
at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
[21:54:16 FTL] The HostOptions.BackgroundServiceExceptionBehavior is configured to StopHost. A BackgroundService has thrown an unhandled exception, and the IHost instance is stopping. To avoid this behavior, configure this to Ignore; however the BackgroundService will not be restarted.
System.Threading.Tasks.TaskCanceledException: A task was canceled.
at ESPresense.Optimizers.OptimizationRunner.ExecuteAsync(CancellationToken stoppingToken) in /App/src/Optimizers/OptimizationRunner.cs:line 47
at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
[21:54:16 ERR] BackgroundService failed
System.Threading.Tasks.TaskCanceledException: A task was canceled.
at ESPresense.Services.ConfigLoader.ExecuteAsync(CancellationToken stoppingToken) in /App/src/Services/ConfigLoader.cs:line 84
at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
[21:54:16 FTL] The HostOptions.BackgroundServiceExceptionBehavior is configured to StopHost. A BackgroundService has thrown an unhandled exception, and the IHost instance is stopping. To avoid this behavior, configure this to Ignore; however the BackgroundService will not be restarted.
System.Threading.Tasks.TaskCanceledException: A task was canceled.
at ESPresense.Services.ConfigLoader.ExecuteAsync(CancellationToken stoppingToken) in /App/src/Services/ConfigLoader.cs:line 84
at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)

@JonLaliberte
Copy link

It doesn't have triangulation yet, but I moved over to Bermuda so I could use my other ESPHome devices instead of have to dedicate devices for only this. TBD whether the tracking will be as good or not. Right now it just tells you the Area of the device that detects that tracked device and distance from it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants