Using WebSockets with Static Agents in versions greater than 2.440.x

Last Reviewed:2025-02-26()
1 minute readKnowledge base

Issue

The WebSocket option is no longer displayed in the Agent configuration page since version 2.440.x. This configuration checkbox has been intentionally removed from the UI.

Resolution

Permanent agents can still be connected using WebSocket transport in CloudBees CI version 2.440.x and greater. The agent configuration page no longer shows a UI checkbox to indicate that configuration. This option was removed in Jenkins® 2.437, as shown in the changelog. Instead, on the agent status page, a message will be displayed indicating that a -webSocket argument has to be added to the agent command.

When the correspoding commands are copied on each case, you need to add the flag as shown below:

Run from agent command line: (Unix)

curl -sO https://INSTANCE_URL/jnlpJars/agent.jar java -jar agent.jar -url https://INSTANCE_URL/ -secret @secret-file -name "agent_name" -webSocket -workDir "/tmp"

Run from agent command line: (Windows)

curl.exe -sO https://INSTANCE_URL/jnlpJars/agent.jar java -jar agent.jar -url https://INSTANCE_URL/ -secret @secret-file -name "agent_name" -webSocket -workDir "/tmp"