Service control audit instance crashes immediately after startup

The audit instance of my newly installed service control environment immediately crashes after starting up. The version is 4.26.0. I installed using the powershell script audit-add using the same queue names and other settings from the previously running instance (v 4.4.1)
Everything is set-up on a new machine.
Service Control and Monitoring instances appear both to be running fine. All the instances run on the same machine

There’s absolutely nothing in the log except

2023-01-18 16:08:06.6253|1|Info|ServiceControl.Audit.Infrastructure.Bootstrapper|
-------------------------------------------------------------
ServiceControl Audit Version:       4.26.0+143710d3279a865bd175394dddc74f7cb062843d
Audit Retention Period:             30.00:00:00
Forwarding Audit Messages:          True
Database Size:                       b
Database Folder Size:               35 MB
ServiceControl Logging Level:       Info
RavenDB Logging Level:              Warn
Transport Customization:            ServiceControl.Transports.SqlServer.SqlServerTransportCustomization, ServiceControl.Transports.SqlServer,
Persistence:                        RavenDB5
-------------------------------------------------------------

The only other thing I can find is a stack trace in the event viewer that doesn’t help me at all trying to understand the issue.

Application: ServiceControl.Audit.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.InvalidOperationException
   at Raven.Embedded.EmbeddedServer+<RunServer>d__20.MoveNext()
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task)
   at Raven.Client.Extensions.TaskExtensions+<>c__3`1[[System.ValueTuple`2[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].<WithCancellation>b__3_0(System.Threading.Tasks.Task`1<System.ValueTuple`2<System.__Canon,System.__Canon>>)
   at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2[[System.ValueTuple`2[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.ValueTuple`2[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task)
   at Raven.Embedded.EmbeddedServer+<GetServerUriAsync>d__15.MoveNext()
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task)
   at Raven.Embedded.EmbeddedServer+<>c__DisplayClass13_0+<<GetDocumentStoreAsync>b__0>d.MoveNext()
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task)
   at Raven.Client.Extensions.TaskExtensions+<>c__3`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].<WithCancellation>b__3_0(System.Threading.Tasks.Task`1<System.__Canon>)
   at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].InnerInvoke()
   at System.Threading.Tasks.Task.Execute()

The PS command I used is

audit-add -Name Servicecontrol.Audit -InstallPath 'C:\Program Files (x86)\Particular Software\ServiceControl.Audit' -DBPath 'E:\ServiceControl.Audit\DB' -LogPath 'E:\ServiceControl.Audit\Logs' -HostName localhost -Port 44444 -DatabaseMaintenancePort 44445 -AuditQueue audit -AuditLogQueue audit.log -Transport 'SQL Server' -DisplayName ServiceControl.Audit -ConnectionString 'Data Source=<masked>' -ForwardAuditMessages -ServiceAccount 'user' -ServiceAccountPassword 'password' -AuditRetentionPeriod '30.00:00:00' -ServiceControlQueueAddress Servicecontrol -SkipQueueCreation -EnableFullTextSearchOnBodies

Connection string, service account and password are identical with the other two services that are running fine. So, this should not be an issue.

Any ideas what is causing this issue?

Hi Philip!

v4.26 comes with new dependencies but the installer should set them up for you

Did you run the installer on the machine?

Does the machine by any chance have internet access blocked? Installer silently skips installing prerequisites if internet access is blocked on the target machine · Issue #3277 · Particular/ServiceControl · GitHub

Cheers,

Andreas

Hi Andreas

Yes, we used the installers. I checked the prerequisites on the machine. All of them are installed in the x64 version with at least the version required. x86 versions of some of the packages are installed in a lower version though. Though I would expect this should have no impact, since the processes are x64.

.NET 4.7.2 is available implicitly as it is a Windows 2019 Server. Confirmed with the registry.

Please note, that Servicecontrol and the Monitoring run smoothly. Do they have different prerequisites than the Audit service?

Any other points I should look into?

Thanks,
Philipp

Audit instances are using RavenDB5 which needs .net6 and VC++ 2015 Redistributable so there is a difference.

I think we need to do some more in-depth troubleshooting, can you send an email to support@particular.net so that we can set something up?

Cheers,

Andreas

1 Like

Mail sent.

Audit instances are using RavenDB5 which needs .net6 and VC++ 2015 Redistributable so there is a difference.

I can ask our IT to update the x86 versions to the same versios for all NSB prerequisites as the x64. Though I would expect that RavenDB5 also runs as a x64 process

Update: x64 and x86 versions of all frameworks are now identical. As expected, this didn’t change anything. Just wanted to be sure

Just to loop back, Philip was hit by Audit instances logs to the installation folder · Issue #3364 · Particular/ServiceControl · GitHub and we’re currently starting work on a fix for this

We’ve just released the fix ServiceControl 4.27.7 – Patch release available