← Back to Forum

OpenGard windows service dies right after start

✓ Resolved
Hi OpenGard team,

I'm trying to install OpenGard as a Windows service, but no matter what I do it crashes a few seconds after starting.

I created the service using the --config create-service command as instructions say.
Even when I start it from the Windows Services manager, it crashes after few seconds.

I also checked the Event Viewer but couldn't find any informative error messages.

Any idea what might be causing this?

-Mark
0

4 Replies

Hi Mark,

Sorry to hear you're experiencing issues.

Could you please check your OpenGard folder and see if there is a directory called `runtime_data/logs`? If it exists, is there a log file inside?

If so, please review the log and see whether it contains any errors or warnings. If you find something, feel free to post it here so we can assist further. Alternatively, you can contact us privately via email if you prefer not to share the information publicly.

Thanks,
OG Team
0
Hi team,

Yes I actually see an error before service shuts down:

2025-12-25 18:39:18.343 [Error] [Microsoft.Extensions.Hosting.Internal.Host] Hosting failed to start
System.InvalidOperationException: Unable to configure HTTPS endpoint. No server certificate was specified, and the default developer certificate could not be found or is out of date.
To generate a developer certificate run 'dotnet dev-certs https'. To trust the certificate (Windows and macOS only) run 'dotnet dev-certs https --trust'.
For more information on configuring HTTPS see https://go.microsoft.com/fwlink/?linkid=848054.
at Microsoft.AspNetCore.Hosting.ListenOptionsHttpsExtensions.UseHttps(ListenOptions listenOptions, Action`1 configureOptions)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.AddressesStrategy.BindAsync(AddressBindContext context, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.BindAsync(CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.StartAsync[TContext](IHttpApplication`1 application, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Hosting.GenericWebHostService.StartAsync(CancellationToken cancellationToken)
at Microsoft.Extensions.Hosting.Internal.Host.<StartAsync>b__14_1(IHostedService service, CancellationToken token)
at Microsoft.Extensions.Hosting.Internal.Host.ForeachService[T](IEnumerable`1 services, CancellationToken token, Boolean concurrent, Boolean abortOnFirstException, List`1 exceptions, Func`3 operation)
2025-12-25 18:39:18.345 [Information] [OpenGard.Services.JournalFlushService] JournalFlushService shutting down. Flushing remaining journal data...
2025-12-25 18:39:18.345 [Information] [OpenGard.Services.ActionsExecutor] ActionsExecutor stopped.

I also see these warnings before it (note: I haven't put any license yet. is that an issue?)

2025-12-25 18:39:17.808 [Warning] [Microsoft.EntityFrameworkCore.Query] Compiling a query which loads related collections for more than one collection navigation, either via 'Include' or through projection, but no 'QuerySplittingBehavior' has been configured. By default, Entity Framework will use 'QuerySplittingBehavior.SingleQuery', which can potentially result in slow query performance. See https://go.microsoft.com/fwlink/?linkid=2134277 for more information. To identify the query that's triggering this warning call 'ConfigureWarnings(w => w.Throw(RelationalEventId.MultipleCollectionIncludeWarning))'.
2025-12-25 18:39:17.876 [Warning] [OpenGard.Services.LicenseService] No license file found at C:\test\test_dam\opengard-windows-x64\LICENSE. Audit database limited to 10 MB.

- Mark
1
Hi Mark,

It looks like the installation may not have completed properly. Could you please confirm that you ran the following command as an administrator?

OpenGard.exe --config install

If possible, try running it again and see if that resolves the issue.

Thanks,
OG Team
0
That solved it. Thanks.
0