Description
Summary
Elastic agent does not start if base URL is using https
Steps to Reproduce
- Run Bamboo using https
- Ensure that base URL is set to use the https URL
- Start elastic agent
Expected Results
Agent should connect with no issues
Actual Results
The below exception is thrown in the elastic-agent.out file:
2015-10-21 13:11:49,741 FATAL [main] [AgentBootstrap] Exiting due to fatal exception. org.apache.http.client.ClientProtocolException at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:867) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:106) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:57) at com.atlassian.bamboo.agent.bootstrap.AgentContext.initFingerprint(AgentContext.java:118) at com.atlassian.bamboo.agent.bootstrap.AgentContext.initServerSession(AgentContext.java:103) at com.atlassian.bamboo.agent.bootstrap.AgentContext.run(AgentContext.java:94) at com.atlassian.bamboo.agent.bootstrap.AgentBootstrap.run(AgentBootstrap.java:95) at com.atlassian.bamboo.agent.elastic.client.ElasticAgentBootstrap.run(ElasticAgentBootstrap.java:73) at com.atlassian.bamboo.agent.elastic.client.ElasticAgentBootstrap.main(ElasticAgentBootstrap.java:53) Caused by: org.apache.http.HttpException: Unable to establish route: planned = {}->httpst://127.0.0.1:46593; current = {s}->httpst://127.0.0.1:46593 at org.apache.http.impl.client.DefaultRequestDirector.establishRoute(DefaultRequestDirector.java:818) at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:615) at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:446) at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:863) ... 9 more Exception in thread "main" java.lang.NullPointerException at com.atlassian.bamboo.agent.elastic.utils.IOUtils.closeQuietly(IOUtils.java:20) at com.atlassian.bamboo.agent.elastic.utils.IOUtils.printStream(IOUtils.java:46) at com.atlassian.bamboo.agent.elastic.installer.ElasticAgentInstaller.runCommand(ElasticAgentInstaller.java:103) at com.atlassian.bamboo.agent.elastic.installer.ElasticAgentInstaller.install(ElasticAgentInstaller.java:86) at com.atlassian.bamboo.agent.elastic.installer.ElasticAgentInstaller.main(ElasticAgentInstaller.java:155)
Workaround
Start Bamboo with the following startup parameter:
-Dbamboo.ec2.agent.endpoint=http://localhost:TOMCAT_PORT
Replace TOMCAT_PORT with the tomcat connector port
Take notice that using HTTP for agent to connect to Bamboo server instead of HTTPS is not compromising security because HTTP connection is only used to tunnel secure encrypted channels which are used for actual data transfer.
Attachments
Issue Links
- mentioned in
-
Page Loading...