Skip to main content

Troubleshooting

NATS timeout issue

Error message:

  • Message bus request failed with timeout Timeout occurred. SnowSoftware.Platform.EventBus.Abstractions.Exceptions.EventBusTimeoutException: Message bus request failed with timeout Timeout occurred.

    ---> NATS.Client.NATSTimeoutException: Timeout occurred. at NATS.Client.Connection.<>c__DisplayClass132_0.<<requestAsync>b__0>d.MoveNext()

    --- End of stack trace from previous location where exception was thrown --- at SnowSoftware.Platform.EventBus.Nats.Generic.NatsRequester.<>c__DisplayClass9_0`1.

Solution:

  1. Stop the services SnowLicenseManagerDataAccessService and SnowLicenseManagerOffice365Service.

  2. Navigate to the appsettings.json file located in C:\Program Files\Snow Software\Snow License Manager\Services\SnowLicenseManagerDataAccessService.

    1. For the DbCommandTimeOutSec, increase Regular to 300 and Long to 400.

    2. Save the file.

  3. Navigate to the appsettings.json file located in C:\Program Files\Snow Software\Snow License Manager\Services\Office365.

    1. For the SLMDataAccessServiceTimeoutSec, increase Regular to 300 and Long to 450.

    2. For the DbCommandTimeOutSec, increase Regular to 150 and Long to 450.

    3. Save the file.

  4. Check that EventWarehouse and NATS are working.

  5. Start the services SnowLicenseManagerDataAccessService and SnowLicenseManagerOffice365Service.

  6. Aggregate a new import.

Microsoft365 database timeout issue

  1. Stop the service SnowLicenseManagerOffice365Service.

  2. Navigate to the appsettings.json file located in C:\Program Files\Snow Software\Snow License Manager\Services\Office365.

    1. For the DbCommandTimeOutSec, increase the Regular and Long timeouts.

    2. Save the file.

  3. Start the service SnowLicenseManagerOffice365Service.

  4. Aggregate a new import.

Microsoft365 BFF database timeout issue

  1. Stop the service SnowLicenseManagerMicrosoft365BFF.

  2. Navigate to the appsettings.json file located in C:\Program Files\Snow Software\Snow License Manager\Services\Microsoft365BFF.

    1. For the DbCommandTimeOutSec, increase the Regular and Long timeouts.

    2. Save the file.

  3. Start the service SnowLicenseManagerMicrosoft365BFF.

Microsoft365 BFF Insights optimization

  1. Stop the service SnowLicenseManagerMicrosoft365BFF.

  2. Navigate to the appsettings.json file located in C:\Program Files\Snow Software\Snow License Manager\Services\Microsoft365BFF.

    1. Change InsightsOptimization to true.

    2. Save the file.

  3. Start the service SnowLicenseManagerMicrosoft365BFF.

Message payload size is exceeded

Error message:

  • The message payload size exceeds the max payload size and no data broker is available for this connection

Solution:

  1. Stop the service SnowLicenseManagerOffice365Service.

  2. Navigate to the appsettings.json file located in C:\Program Files\Snow Software\Snow License Manager\Services\Office365.

    1. For the EventSourcing, decrease the ReadingEventsBatchSize and the WritingEventsBatchSize to 150 or 200.

    2. For the SLMDataAccessServiceTimeoutSec, increase Regular to 800 and Long to 900.

    3. Save the file.

  3. Start the service SnowLicenseManagerOffice365Service.

Event Warehouse service crashes with TCP/UDP error

note

This procedure is relevant for versions 9.2 to 9.26 of Snow License Manager. The SnowEventWarehouse service was removed in Snow License Manager 9.27.

The SnowEventWarehouse service connects to the MS SQL database using a TCP/IP connection.

If the following error messages appear in your Event Warehouse logging, try the respective suggested solution.

Error messages:

  • [Date and time stamp] FTL Failed to connect to the database: Unable to open tcp connection with host [Host Name]: dial tcp [GUID]:1433: connectex: No connection could be made because the target machine actively refused it.

  • [Date and time stamp] FTL Failed to connect to the database: Unable to get instances from Sql Server Browser on host [Host Name]: read udp 10.xx.xx.xx:xxxx->10.xx.xx.xx:xxxx: i/o timeout

Solution:

  1. Enable TCP/IP for your SQL Server.

    Refer to the article Enable or Disable a Server Network Protocol in Microsoft documentation for more information on how to enable TCP/IP.

  2. Restart the services SnowEventWarehouse and SnowLicenseManagerOffice365Service.

Error message:

  • [Date and time stamp] FTL Failed to connect to the database: Unable to get instances from Sql Server Browser on host [Host Name]: read udp 10.195.18.75:61007->10.195.17.43:1434:

Solution:

  1. Enable TCP/IP for your SQL Server.

    Refer to the article Enable or Disable a Server Network Protocol in Microsoft documentation for more information on how to enable TCP/IP.

  2. Restart the services SnowEventWarehouse and SnowLicenseManagerOffice365Service.

  3. Set the Firewall setting UnicastResponsesToMulticastBroadcastDisabled to FALSE (default). The setting is a property of the INetFwProfile interface.

    note

    The setting is set to false to be able to perform a request to the SQL Server Engine on port 1434. If the connection string contains a named instance, e.g. Data Source=[XYZ]\sam, and the port number assigned to this instance is not provided, the driver tries to get the TCP port number over a UDP connection.

    For more information, see INetFwProfile::get_UnicastResponsesToMulticastBroadcastDisabled method (netfw.h) from Microsoft.

If enabling the Firewall setting did not work, there can be an error message like:

  • Failed to connect to the database: Unable to get instances from Sql Server Browser on host XXXXXXXXX: read udp X.X.X.X:61007->X.X.X.X:1434: i/o timeout

The suggested solution is then to:

  1. Provide a fixed port for a named instance.
    Use TCP port 1433, since it is the most common port allowed through the firewall.

    For more information, see Configure SQL Server to listen on a specific TCP port from Microsoft.

  2. Open the port in Firewall.

    note

    The TCP port has to be opened in the Windows Firewall, even if a default instance is used. It applies to routine connections to the default installation of the Database Engine, or a named instance that is the only instance running on the computer. Be aware that named instances can have special considerations in the firewall setting.

    For more information, see Configure Windows Firewall for Database Engine access from Microsoft.

  3. Add the port to the SLM connection string.
    The connection string, with a named instance, can be configured to something similar to Data Source=[XYZ]\sam,60000.

With this solution, the driver does not need to go over UDP but will instead open a TCP connection directly.

Restart the data migration

note

This procedure is relevant when migrating from version 9.6.1 to 9.6.2 of Snow License Manager.

For troubleshooting purposes, it is possible to restart the data migration. There are two alternative methods.

Alternative 1: Restart the migration with EventStore (v2)

Restart the migration to migrate the data based on the EventStore (v2), including Microsoft 365 data before Snow License Manager 9.6.1.

  1. Stop the services SnowLicenseManagerEventStoreService and SnowLicenseManagerOffice365Service.

  2. Remove the o365 folder in %programdata%\snowsoftware\licensemanager\eventstore.

  3. Optional: replace the database folder with the database folder from the other server to use data from another server. This can for example be done by copying production server data into a staging environment.

  4. Execute the sql script:

    USE SNOWLICENSEMANAGER exec Sp_msforeachtable @command1='Truncate Table
    ?',@whereand='and Schema_Id=Schema_id(''o365'')'
  5. Start the service SnowLicenseManagerEventStoreService.

  6. Wait for about a minute to allow all health checks in the EventStore to complete.

  7. Start the service SnowLicenseManagerOffice365Service.

Alternative 2: Restart the migration with EventStore (v3)

Restart the migration to migrate the data based on the EventStore (v3), including Microsoft 365 data after Snow License Manager 9.6.1.

  1. Stop the services SnowLicenseManagerEventStoreService and SnowLicenseManagerOffice365Service.

  2. Verify that the appsettings.json in the Microsoft 365 service directory has the setting UseOldEventStore set to false.

  3. Optional: replace the o365 folder with the o365 folder from the other server to use data from another server. This can for example be done by copying production server data into a staging environment.

  4. Execute the sql script:

    USE SNOWLICENSEMANAGER exec Sp_msforeachtable @command1='Truncate Table
    ?',@whereand='and Schema_Id=Schema_id(''o365'')'
  5. Start the service SnowLicenseManagerEventStoreService.

  6. Wait for about a minute to allow all health checks in the EventStore to complete.

  7. Start the service SnowLicenseManagerOffice365Service.

Restart when the migration does not complete

note

This procedure is relevant when migrating from version 9.6.1 to 9.6.2 of Snow License Manager.

If the migration stops and does not complete, perform the following steps:

  1. Stop the service SnowLicenseManagerOffice365Service.

  2. Navigate to the appsettings.json file located in C:\Program Files\Snow Software\Snow License Manager\Services\Office365.

  3. Lower the values for ReadingEventsBatchSize, WritingEventsBatchSize and SQLBatchSize.

  4. Save the file.

  5. Start the service SnowLicenseManagerOffice365Service.