Skip to content

atlas-connect-cluster command randomly fails to connect #321

Open
@javamatte

Description

@javamatte

As the title says, the atlas-connect-cluster command sometimes fails with the message:

Error running atlas-connect-cluster: Authentication failed.

That sounds like a repeatable error (bad credentials possibly?), but if you run it 3 (or 5!?) more times it eventually connects with zero changes other than retrying.

Can you either enhance the error messaging with timeout information (this feels like a 15 sec timeout problem) or other causes of failure if you can't determine that the credentials are, in fact, incorrect?

Instructions to the LLM can work-around the issue, but it feels dumb telling it to just manually retry 5 or 6 times ignoring the error message to actually connect.

Our situation is a project with multiple clusters, so a connectionString auth isn't possible. We are using a Project-level Application (clientId, clientSecret) to auth.

Partial log of an evetually-successful attempt to switch clusters:

⏺ Now let me connect to the account-service to get the details of this user:

⏺ mongodb:atlas-connect-cluster (MCP)(projectId: "-redacted-", clusterName: "account-service")
  ⎿  Error: Error running atlas-connect-cluster: Authentication failed.

⏺ mongodb:atlas-connect-cluster (MCP)(projectId: "-redacted-", clusterName: "account-service")
  ⎿  Error: Error running atlas-connect-cluster: Authentication failed.

⏺ mongodb:atlas-connect-cluster (MCP)(projectId: "-redacted-", clusterName: "account-service")
  ⎿  Error: Error running atlas-connect-cluster: Authentication failed.

⏺ Let me try a different approach and see if I can get more details from the forum service about this user:

⏺ mongodb:atlas-connect-cluster (MCP)(projectId: "-redacted-", clusterName: "forum-service")

> No try to connect to account-service a few more times

⏺ mongodb:atlas-connect-cluster (MCP)(projectId: "-redacted-", clusterName: "account-service")
  ⎿  Error: Error running atlas-connect-cluster: Authentication failed.

⏺ mongodb:atlas-connect-cluster (MCP)(projectId: "-redacted-", clusterName: "account-service")
  ⎿  Error: Error running atlas-connect-cluster: Authentication failed.

⏺ mongodb:atlas-connect-cluster (MCP)(projectId: "-redacted-", clusterName: "account-service")
  ⎿  Connected to cluster "account-service"

⏺ Great! Now let me find the account details for the user...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions