Loading

Couldn't connect to Salesforce streaming server because a 403 error has been returned error=403::Unknown client Warning messages in log

Udgivelsesdato: Mar 2, 2024
Løsning

SYMPTOM

When using the Replay Channel Listener of Salesforce Connector, the following warning message is observed in the logs periodically:
[2022-02-02 10:56:00.544] WARN  AuthFailureListener [HttpClient@7c1cdd18-165] [event: ]: Couldn't connect to Salesforce streaming server because a 403 error has been returned. Handling 403. 
Arguments: {message={advice={interval=0, reconnect=handshake}, channel=/meta/connect, id=33678, error=403::Unknown client, successful=false}, error=403::Unknown client}.

CAUSE

The 'sfdc-stream' cookie managed by the Salesforce load balancer has expired and it has a default 3 hour expiration. As a result, the CometD client (used by the Salesforce Connector) receives a "403::Unknown client" response from the Salesforce server. To continue consuming events Salesforce has clarified that 'if the client already subscribed, it is necessary to re-subscribe. If you need any further clarification from Salesforce you can contact them and refer to GUS ID W-7395361.

The error message you see is mentioned in the Salesforce error code and message information
  • If a long-lived connection is lost due to unexpected network disruption, the CometD server times out the client and deletes the client state.
  • The CometD client attempts to reconnect but the connection is rejected with the "403 :: Unknown Client" error because the client state doesn't exist anymore.
These Warning messages can be safely ignored if Salesforce Connector continues to subscribe to events after the Warning messages are logged.

SOLUTION

This is expected behavior. The CometD client will perform a new handshake and reconnect and will be reassigned a new Client ID.

No action needs to be taken if Salesforce Connector continues to subscribe to events after the Warning messages are logged.

REFERENCE

Please refer to the documentation from Salesforce: Handling Streaming API 403 Errors
Please refer to Salesforce Connector - Expecting BayeuxClient to handle [403::Unknown client] by re-handshaking about how this will affect your application if you are using the "Only_new" option.

 
Vidensartikelnummer

001119042

 
Indlæser
Salesforce Help | Article