org.apache.http.client.ClientProtocolException

Atlassian JIRA | Deric Lee | 1 year ago
  1. 0

    h3. Summary Elastic agent does not start if base URL is using https h3. Steps to Reproduce # Run Bamboo using https # Ensure that base URL is set to use the https URL # Start elastic agent h3. Expected Results Agent should connect with no issues h3. Actual Results The below exception is thrown in the elastic-agent.out file: {noformat} 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) {noformat} h3.Workaround Start Bamboo with the following startup parameter: {code}-Dbamboo.ec2.agent.endpoint=http://localhost:TOMCAT_PORT{code} (i) 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.

    Atlassian JIRA | 1 year ago | Deric Lee [Atlassian]
    org.apache.http.client.ClientProtocolException
  2. 0

    h3. Summary Elastic agent does not start if base URL is using https h3. Steps to Reproduce # Run Bamboo using https # Ensure that base URL is set to use the https URL # Start elastic agent h3. Expected Results Agent should connect with no issues h3. Actual Results The below exception is thrown in the elastic-agent.out file: {noformat} 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) {noformat} h3.Workaround Start Bamboo with the following startup parameter: {code}-Dbamboo.ec2.agent.endpoint=http://localhost:TOMCAT_PORT{code} (i) 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.

    Atlassian JIRA | 1 year ago | Deric Lee
    org.apache.http.client.ClientProtocolException
  3. 0

    Basic Authentication parameters for DockerClient ?

    GitHub | 2 years ago | ericfjosne
    javax.ws.rs.ProcessingException: org.apache.http.client.ClientProtocolException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    org.apache.http.ProtocolException: Target host is not specified

    Stack Overflow | 2 years ago | ac11
    org.apache.http.client.ClientProtocolException
  6. 0

    Java: Unsupported Content-Coding: text/xml posting text/xml

    Stack Overflow | 3 years ago | Sarah Weinberger
    org.apache.http.client.ClientProtocolException

  1. robert.nemet 1 times, last 6 months ago
  2. poroszd 1 times, last 10 months ago
14 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. 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()
  2. Apache HttpClient
    CloseableHttpClient.execute
    1. org.apache.http.impl.client.DefaultRequestDirector.establishRoute(DefaultRequestDirector.java:818)
    2. org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:615)
    3. org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:446)
    4. org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:863)
    5. org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
    6. org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:106)
    7. org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:57)
    7 frames
  3. com.atlassian.bamboo
    ElasticAgentBootstrap.main
    1. com.atlassian.bamboo.agent.bootstrap.AgentContext.initFingerprint(AgentContext.java:118)
    2. com.atlassian.bamboo.agent.bootstrap.AgentContext.initServerSession(AgentContext.java:103)
    3. com.atlassian.bamboo.agent.bootstrap.AgentContext.run(AgentContext.java:94)
    4. com.atlassian.bamboo.agent.bootstrap.AgentBootstrap.run(AgentBootstrap.java:95)
    5. com.atlassian.bamboo.agent.elastic.client.ElasticAgentBootstrap.run(ElasticAgentBootstrap.java:73)
    6. com.atlassian.bamboo.agent.elastic.client.ElasticAgentBootstrap.main(ElasticAgentBootstrap.java:53)
    6 frames