GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Immediate /meta/connect failing with 403::Unknown client error after successful handshake · Issue #2480 · cometd/cometd

Immediate /meta/connect failing with 403::Unknown client error after successful handshake #2480

New issue
Copy link
New issue
Copy link
Open
Open
Immediate /meta/connect failing with 403::Unknown client error after successful handshake#2480
Copy link
Labels
question

Description

@dyutimanc
dyutimanc
opened on Aug 26, 2026
Issue body actions

CometD version(s): 8.0.2
Jetty version: 12.0.10

Java version & vendor: zulu-17

We connect our listener to Salesforce and receive events. Time to time we receive "403::Unknown client" error in /meta/connect channel because of expired cookie, and CometD internally initiate the handshake call and the listener gets subscribed back to Salesforce.

In one of such incidents we observed that the subscription kept on failing. Once received the "403::Unknown client" error:

2026-07-15 22:11:11.640 GMT (tid=698526) [0004E] [CHANNEL:META_CONNECT:EventListener]: {"advice":{"reconnect":"handshake","interval":0},"channel":"/meta/connect","id":"2168506","error":"403::Unknown client","successful":false}

CometD initiated the handshake, which was successful:

2026-07-15 22:11:11.720 GMT (tid=452778) [0002I] [CHANNEL:META_HANDSHAKE:EventListener]: {"ext":{"replay":true,"payload.format":true},"minimumVersion":"1.0","clientId":"38ck1drtro5jeik3t68tzs732t7wb","supportedConnectionTypes":["long-polling"],"channel":"/meta/handshake","id":"2168508","version":"1.0","successful":true}

=== new "clientId":"38ck1drtro5jeik3t68tzs732t7wb" ===

Once we received the success response, we initiated the subscribe call which went through:

2026-07-15 22:11:11.846 GMT (tid=452778) [0005I] [CHANNEL:META_SUBSCRIBE:EventListener]: {"clientId":"38ck1drtro5jeik3t68tzs732t7wb","channel":"/meta/subscribe","id":"2168509","subscription":"/data/AssignedResourceChangeEvent","successful":true}

But then, the immediate /meta/connect call failed with "403::Unknown client" error:

2026-07-15 22:11:11.890 GMT (tid=698526) [0004E] [CHANNEL:META_CONNECT:EventListener]: {"advice":{"reconnect":"handshake","interval":0},"channel":"/meta/connect","id":"2168510","error":"403::Unknown client","successful":false}

So, CometD client re-initiated the handshake again and it was success

2026-07-15 22:11:11.964 GMT (tid=452778) [0002I] [CHANNEL:META_HANDSHAKE:EventListener]: {"ext":{"replay":true,"payload.format":true},"minimumVersion":"1.0","clientId":"38ck1drtro5jeik3t68tzs732t7wb","supportedConnectionTypes":["long-polling"],"channel":"/meta/handshake","id":"2168511","version":"1.0","successful":true}

=== received same clientId "clientId":"38ck1drtro5jeik3t68tzs732t7wb" ===

The subscribe call also came back with success:

2026-07-15 22:11:12.064 GMT (tid=452778) [0005I] [CHANNEL:META_SUBSCRIBE:EventListener]: {"clientId":"38ck1drtro5jeik3t68tzs732t7wb","channel":"/meta/subscribe","id":"2168512","subscription":"/data/AssignedResourceChangeEvent","successful":true}

But then the immediate /meta/connect call failed again:

2026-07-15 22:11:12.027 GMT (tid=698526) [0004E] [CHANNEL:META_CONNECT:EventListener]: {"advice":{"reconnect":"handshake","interval":0},"channel":"/meta/connect","id":"2168513","error":"403::Unknown client","successful":false}

Again a handshake call made by CometD:

2026-07-15 22:11:12.100 GMT (tid=698526) [0002I] [CHANNEL:META_HANDSHAKE:EventListener]: {"ext":{"replay":true,"payload.format":true},"minimumVersion":"1.0","clientId":"9ym7pj12fbpnmcmnqveeq04bn42","supportedConnectionTypes":["long-polling"],"channel":"/meta/handshake","id":"2168514","version":"1.0","successful":true}

=== got new clientId "clientId":"9ym7pj12fbpnmcmnqveeq04bn42" ===

But this time our subscribe call failed with "403::Unknown client":

2026-07-15 22:11:12.152 GMT (tid=452778) [0005E] [CHANNEL:META_SUBSCRIBE:EventListener]: {"advice":{"reconnect":"handshake","interval":0},"channel":"/meta/subscribe","id":"2168515","error":"403::Unknown client","successful":false}

And this time the /meta/connect call was successful:

2026-07-15 22:11:12.162 GMT (tid=698526) [0004I] [CHANNEL:META_CONNECT:EventListener]: {"clientId":"9ym7pj12fbpnmcmnqveeq04bn42","advice":{"reconnect":"retry","interval":0,"timeout":110000},"channel":"/meta/connect","id":"2168516","successful":true}

As our subscription call failed, we disconnected the client and re-initiated the handshake:

2026-07-15 22:11:27.242 GMT (tid=452780) [0002I] [CHANNEL:META_HANDSHAKE:EventListener]: {"ext":{"replay":true,"payload.format":true},"minimumVersion":"1.0","clientId":"38dfkq30rojjgmgo1bhcmip5in5em","supportedConnectionTypes":["long-polling"],"channel":"/meta/handshake","id":"2168522","version":"1.0","successful":true}

=== got new clientId "clientId":"38dfkq30rojjgmgo1bhcmip5in5em" ===

The subscribe call also went through:

2026-07-15 22:11:27.378 GMT (tid=452778) [0005I] [CHANNEL:META_SUBSCRIBE:EventListener]: {"clientId":"38dfkq30rojjgmgo1bhcmip5in5em","channel":"/meta/subscribe","id":"2168523","subscription":"/data/AssignedResourceChangeEvent","successful":true}

But then again the /meta/connect failed:

2026-07-15 22:11:27.309 GMT (tid=698526) [0004E] [CHANNEL:META_CONNECT:EventListener]: {"advice":{"reconnect":"handshake","interval":0},"channel":"/meta/connect","id":"2168524","error":"403::Unknown client","successful":false}

And finally, when CometD client tried to subscribe again, the call failed with Authentication error:

2026-07-15 22:11:27.379 GMT (tid=698526) [0002E] [CHANNEL:META_HANDSHAKE:EventListener]: {"ext":{"sfdc":{"failureReason":"401::Authentication invalid"},"replay":true,"payload.format":true},"advice":{"reconnect":"none"},"channel":"/meta/handshake","id":"2168525","error":"403::Handshake denied","successful":false}

This time our subscriber stopped permanently.

We checked with Salesforce team and they were not able to get us much information about why the immediate /meta/connect calls were failing. As we do not receive the clientId in the failed /meta/connect response, we could not confirm that if we were sending the proper clientId.

The question here is, could there be any chance that a wrong clientId was being sent in the /meta/connect call by the CometD client immediately after a handshake call came back with success? Or if CometD client was initiating parellal subscription calls where the clientId was overlapped with one request to another?

We observed this behaviour only once. There are no particular steps we can do to reproduce this issue, so that we can enable more logs to check the actual request/response. We have multiple other subscribers which were working fine during the same period. It just happened with only one subscriber.

Any thought, comment, suggestions are welcome here.

  • thanks

Activity

  1. dyutimanc
    added
    question
    on Aug 26, 2026
  2. sbordet commented on Aug 26, 2026

    @sbordet
    sbordet
    on Aug 26, 2026
    Member
    More actions

    Sorry, but it happens that SalesForce uses a very old and custom modified CometD server based on CometD 3.
    We have no details about their modifications, and therefore we cannot help you here, you should contact SalesForce.

    Vanilla CometD does not issue 403::Unknown client, but instead uses the 402 code, and that is only the minimal surface that shows that SalesForce is using a heavily modified server.

  3. dyutimanc commented on Aug 26, 2026

    @dyutimanc
    dyutimanc
    on Aug 26, 2026
    Author
    More actions

    Thanks for the reply @sbordet!

    We as a client is not aware of Salesforce implementation, but we have shared these details with them also.

    But I just wanted to make sure that the CometD client will have no chance to send wrong clientId in the /meta/connect call just after the successful /meta/handshake response.

    • thanks
  4. sbordet commented on Aug 26, 2026

    @sbordet
    sbordet
    on Aug 26, 2026
    Member
    More actions

    I suspect SalesForce has heavily optimized the CometD client as well.

    Using a vanilla CometD client against the modified server probably won't work that well (for example, the error codes are different).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    question

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402605 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.