java.lang.NullPointerException

Atlassian JIRA | Deric Lee | 1 year ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  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]
    java.lang.NullPointerException
  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
    java.lang.NullPointerException

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at com.atlassian.bamboo.agent.elastic.utils.IOUtils.closeQuietly()
    2. com.atlassian.bamboo
      ElasticAgentInstaller.main
      1. com.atlassian.bamboo.agent.elastic.utils.IOUtils.closeQuietly(IOUtils.java:20)
      2. com.atlassian.bamboo.agent.elastic.utils.IOUtils.printStream(IOUtils.java:46)
      3. com.atlassian.bamboo.agent.elastic.installer.ElasticAgentInstaller.runCommand(ElasticAgentInstaller.java:103)
      4. com.atlassian.bamboo.agent.elastic.installer.ElasticAgentInstaller.install(ElasticAgentInstaller.java:86)
      5. com.atlassian.bamboo.agent.elastic.installer.ElasticAgentInstaller.main(ElasticAgentInstaller.java:155)
      5 frames