javax.net.ssl.SSLHandshakeException when Bamboo agent connects to server
0 reputation · 13 Apr 2021, 14:57 UTC
Problem
When an Atlassian Bamboo agent attempts to establish an HTTPS connection to the Bamboo server, a self‑signed or expired certificate results in a javax.net.ssl.SSLHandshakeException. The agent logs the exception and fails to register, preventing build execution.
DNS‑Related Unresolved Behavior
Agents are identified by hostname. Bamboo caches the resolved IP address for each agent. If the agent’s IP changes—e.g., due to a DNS update—the server continues to use the stale IP until the agent is re‑registered or the Bamboo server is restarted. This stale cache can cause the agent to appear offline or unable to reach the server.
Missing Per‑Agent Trust Store
All agents rely on the Java cacerts or a global trust store; there is no documented way to configure a custom trust store per agent. Consequently, any certificate that is not already trusted in the global store will trigger the same SSL handshake error across all agents.
Open Questions
1. What mechanisms can be employed to force Bamboo to refresh its DNS cache for registered agents without a full server restart?
2. Is there a supported approach to configure per‑agent trust stores or import custom certificates into individual agent instances?
3. Should Bamboo include automatic DNS refresh for agents whose IP addresses change, and if so, how would that be implemented?