The Could not start the connection to the server error occurs because Virto Commerce cannot synchronize events between multiple backend instances. More details can be found in the Scaling Push Notifications documentation.
Error Details:
[20:22:33 ERR] Could not start the connection to the server http://some-doman/pushNotificationHub
System.Net.Http.HttpRequestException: Response status code does not indicate success: 401 (Unauthorized).
Steps to Resolve:
- Sign in to the Virto Commerce Backend.
- Navigate to Security and create a new user account named ‘PushNotificationHubIntegration’ without assigning any roles.
- Generate a new API Key (
{your-vc-api-key}
). - Update the
appsettings.json
:
- Set
PushNotifications::ScalabilityMode
toRedisBackplane
. - Set
PushNotifications::HubUrl
tohttps://some-domain.com/pushNotificationHub?api_key={your-vc-api-key}
. - Example: http://virtostart-main-platform.virtostart.svc.cluster.local/pushNotificationHub?api_key=d4ab2591-5d7e-4a38-92ee-db4201234670
- Restart the Virto Commerce instances to apply the changes.