Skip to content

Agent node should only allow a single connection #812

@jearton

Description

@jearton

⚠️ Please verify that this bug has NOT been reported before.

  • I checked and didn't find similar issue

🛡️ Security Policy

Description

Agent node should allow only a single connection, consistent with Portainer Server + Agent behavior.

👟 Reproduction steps

Deploy one agent node and ensure it is running.

Start Server Node A and have it connect to the agent.

While the connection from Server Node A is still active, start Server Node B and attempt to connect it to the same agent node.

Observe that both Server Node A and Server Node B maintain active connections to the same agent node.

👀 Expected behavior

The agent node should accept only the first connection (e.g., from Server Node A).

Any subsequent connection attempts (e.g., from Server Node B) should be rejected with a clear error or ignored.

This behavior should align with how Portainer Server + Agent works—each agent maintains only one active connection to a server node at any time.

😓 Actual Behavior

The agent node accepts multiple simultaneous connections from different server nodes.

Both Server Node A and Server Node B are able to establish and maintain persistent connections to the same agent node.

Dockge Version

1.4.2

💻 Operating System and Arch

Ubuntu 22.04

🌐 Browser

Google Chrome Version 136.0.7103.114

🐋 Docker Version

Docker 27.0.3

🟩 NodeJS Version

No response

📝 Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions