Issues Connecting Bamboo to bitbucket server
Asked by Michael Castro:

I am trying to connect my bamboo server to the bitbucket server, I thought to install the remote agent would make it easier. I got the installer on the server and it does not install? I changed the system variable to set the JAVA_HOME. I run the command that is given on the bamboo site. The command will run but it says it fails 3 times and the wrapper has stopped. this is the error I get. I replaced certain things with just zeros.

INFO \| jvm 4 \| 2019/04/16 12:41:10 \| 2019-04-16 12:41:10,418 INFO \[WrapperSimpleAppMain\] \[AgentBootstrap\] Agent bootstrap using endpoint: <http://000.000.000.00:8085/agentserver/agentServer/>  
INFO \| jvm 4 \| 2019/04/16 12:41:10 \| 2019-04-16 12:41:10,449 INFO \[WrapperSimpleAppMain\] \[RemoteAgentHomeLocatorForBootstrap\] Using agent home located at \[C:\\Users\\a_mcastro\\bamboo-agent-home\]  
INFO \| jvm 4 \| 2019/04/16 12:41:10 \| 2019-04-16 12:41:10,449 INFO \[WrapperSimpleAppMain\] \[RemoteAgentHomeLocatorForBootstrap\] Using agent home located at \[C:\\Users\\a_mcastro\\bamboo-agent-home\]  
INFO \| jvm 4 \| 2019/04/16 12:41:10 \| 2019-04-16 12:41:10,449 INFO \[WrapperSimpleAppMain\] \[AgentUuidInitializer\] Found agent UUID '5be5ead8-a301-4c4d-aa80-9070eebd580c' in temporary UUID file 'C:\\Users\\a_mcastro\\bamboo-agent-home\\uuid-temp.properties'  
INFO \| jvm 4 \| 2019/04/16 12:41:10 \| 2019-04-16 12:41:10,465 INFO \[WrapperSimpleAppMain\] \[AgentContext\] Requesting fingerprint, url: [http://000.000.000.00:8085/agentserver/agentServer/GetFingerprint.action?hostName=BitBucket.aff.local\&version=3\&agentUuid=5be5ead8-a301-4c4d-aa80-9070eebd580c\&securityToken=000000000000000000000000000000000000](http://000.000.000.00:8085/agentserver/agentServer/GetFingerprint.action?hostName=BitBucket.aff.local&version=3&agentUuid=5be5ead8-a301-4c4d-aa80-9070eebd580c&securityToken=000000000000000000000000000000000000)  
INFO \| jvm 4 \| 2019/04/16 12:41:10 \| 2019-04-16 12:41:10,465 INFO \[WrapperSimpleAppMain\] \[RemoteAgentHttpClientFactory\] Creating a new HTTP client...  
INFO \| jvm 4 \| 2019/04/16 12:41:11 \| 2019-04-16 12:41:10,918 INFO \[WrapperSimpleAppMain\] \[AgentContext\] Authenticating against Bamboo server at <http://000.000.000.00:8085/agentserver/agentServer/>  
INFO \| jvm 4 \| 2019/04/16 12:41:11 \| 2019-04-16 12:41:10,996 ERROR \[WrapperSimpleAppMain\] \[AgentContext\] An error has occurred when requesting fingerprint: HTTP/1.1 404  
INFO \| jvm 4 \| 2019/04/16 12:41:11 \| Exiting due to fatal exception.  
INFO \| jvm 4 \| 2019/04/16 12:41:11 \| com.atlassian.bamboo.agent.bootstrap.RemoteAgentHttpException: Response: \[HTTP/1.1 404 \] received after fingerprint request.  
INFO \| jvm 4 \| 2019/04/16 12:41:11 \| at com.atlassian.bamboo.agent.bootstrap.AgentContext.initFingerprint(AgentContext.java:156)  
INFO \| jvm 4 \| 2019/04/16 12:41:11 \| at com.atlassian.bamboo.agent.bootstrap.AgentContext.initServerSession(AgentContext.java:101)  
INFO \| jvm 4 \| 2019/04/16 12:41:11 \| at com.atlassian.bamboo.agent.bootstrap.AgentContext.run(AgentContext.java:88)  
INFO \| jvm 4 \| 2019/04/16 12:41:11 \| at com.atlassian.bamboo.agent.bootstrap.AgentBootstrap.run(AgentBootstrap.java:111)  
INFO \| jvm 4 \| 2019/04/16 12:41:11 \| at com.atlassian.bamboo.agent.bootstrap.AgentBootstrap.main(AgentBootstrap.java:50)  
INFO \| jvm 4 \| 2019/04/16 12:41:11 \| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  
INFO \| jvm 4 \| 2019/04/16 12:41:11 \| at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)  
INFO \| jvm 4 \| 2019/04/16 12:41:11 \| at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)  
INFO \| jvm 4 \| 2019/04/16 12:41:11 \| at java.lang.reflect.Method.invoke(Unknown Source)  
INFO \| jvm 4 \| 2019/04/16 12:41:11 \| at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240)  
INFO \| jvm 4 \| 2019/04/16 12:41:11 \| at java.lang.Thread.run(Unknown Source)  
INFO \| jvm 4 \| 2019/04/16 12:41:11 \| 2019-04-16 12:41:10,996 FATAL \[WrapperSimpleAppMain\] \[AgentBootstrap\] Exiting due to fatal exception.  
INFO \| jvm 4 \| 2019/04/16 12:41:11 \| com.atlassian.bamboo.agent.bootstrap.RemoteAgentHttpException: Response: \[HTTP/1.1 404 \] received after fingerprint request.  
INFO \| jvm 4 \| 2019/04/16 12:41:11 \| at com.atlassian.bamboo.agent.bootstrap.AgentContext.initFingerprint(AgentContext.java:156)  
INFO \| jvm 4 \| 2019/04/16 12:41:11 \| at com.atlassian.bamboo.agent.bootstrap.AgentContext.initServerSession(AgentContext.java:101)  
INFO \| jvm 4 \| 2019/04/16 12:41:11 \| at com.atlassian.bamboo.agent.bootstrap.AgentContext.run(AgentContext.java:88)  
INFO \| jvm 4 \| 2019/04/16 12:41:11 \| at com.atlassian.bamboo.agent.bootstrap.AgentBootstrap.run(AgentBootstrap.java:111)  
INFO \| jvm 4 \| 2019/04/16 12:41:11 \| at com.atlassian.bamboo.agent.bootstrap.AgentBootstrap.main(AgentBootstrap.java:50)  
INFO \| jvm 4 \| 2019/04/16 12:41:11 \| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  
INFO \| jvm 4 \| 2019/04/16 12:41:11 \| at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)  
INFO \| jvm 4 \| 2019/04/16 12:41:11 \| at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)  
INFO \| jvm 4 \| 2019/04/16 12:41:11 \| at java.lang.reflect.Method.invoke(Unknown Source)  
INFO \| jvm 4 \| 2019/04/16 12:41:11 \| at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240)  
INFO \| jvm 4 \| 2019/04/16 12:41:11 \| at java.lang.Thread.run(Unknown Source)  
ERROR \| wrapper \| 2019/04/16 12:41:11 \| JVM exited while starting the application.  
STATUS \| wrapper \| 2019/04/16 12:41:15 \| Launching a JVM...  
INFO \| jvm 5 \| 2019/04/16 12:41:15 \| Wrapper (Version 3.2.3-atlassian-1) <http://wrapper.tanukisoftware.org>  
INFO \| jvm 5 \| 2019/04/16 12:41:15 \| Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.  
INFO \| jvm 5 \| 2019/04/16 12:41:15 \|  
INFO \| jvm 5 \| 2019/04/16 12:41:16 \| 2019-04-16 12:41:15,938 INFO \[WrapperSimpleAppMain\] \[AgentBootstrap\] Starting Agent Bootstrap using Java 1.8.0_201 from Oracle Corporation. Default charset: windows-1252, file name encoding: Cp1252  
INFO \| jvm 5 \| 2019/04/16 12:41:16 \| 2019-04-16 12:41:15,938 INFO \[WrapperSimpleAppMain\] \[AgentBootstrap\] Agent bootstrap using endpoint: <http://000.000.000.00:8085/agentserver/agentServer/>  
INFO \| jvm 5 \| 2019/04/16 12:41:16 \| 2019-04-16 12:41:15,938 INFO \[WrapperSimpleAppMain\] \[RemoteAgentHomeLocatorForBootstrap\] Using agent home located at \[C:\\Users\\a_mcastro\\bamboo-agent-home\]  
INFO \| jvm 5 \| 2019/04/16 12:41:16 \| 2019-04-16 12:41:15,938 INFO \[WrapperSimpleAppMain\] \[RemoteAgentHomeLocatorForBootstrap\] Using agent home located at \[C:\\Users\\a_mcastro\\bamboo-agent-home\]  
INFO \| jvm 5 \| 2019/04/16 12:41:16 \| 2019-04-16 12:41:15,938 INFO \[WrapperSimpleAppMain\] \[AgentUuidInitializer\] Found agent UUID '5be5ead8-a301-4c4d-aa80-9070eebd580c' in temporary UUID file 'C:\\Users\\a_mcastro\\bamboo-agent-home\\uuid-temp.properties'  
INFO \| jvm 5 \| 2019/04/16 12:41:16 \| 2019-04-16 12:41:15,953 INFO \[WrapperSimpleAppMain\] \[AgentContext\] Requesting fingerprint, url: [http://000.000.000.00:8085/agentserver/agentServer/GetFingerprint.action?hostName=BitBucket.aff.local\&version=3\&agentUuid=5be5ead8-a301-4c4d-aa80-9070eebd580c\&securityToken=000000000000000000000000000000000000](http://000.000.000.00:8085/agentserver/agentServer/GetFingerprint.action?hostName=BitBucket.aff.local&version=3&agentUuid=5be5ead8-a301-4c4d-aa80-9070eebd580c&securityToken=000000000000000000000000000000000000)  
INFO \| jvm 5 \| 2019/04/16 12:41:16 \| 2019-04-16 12:41:15,953 INFO \[WrapperSimpleAppMain\] \[RemoteAgentHttpClientFactory\] Creating a new HTTP client...  
INFO \| jvm 5 \| 2019/04/16 12:41:16 \| 2019-04-16 12:41:16,406 INFO \[WrapperSimpleAppMain\] \[AgentContext\] Authenticating against Bamboo server at <http://000.000.000.00:8085/agentserver/agentServer/>  
INFO \| jvm 5 \| 2019/04/16 12:41:16 \| 2019-04-16 12:41:16,469 ERROR \[WrapperSimpleAppMain\] \[AgentContext\] An error has occurred when requesting fingerprint: HTTP/1.1 404  
INFO \| jvm 5 \| 2019/04/16 12:41:16 \| Exiting due to fatal exception.  
INFO \| jvm 5 \| 2019/04/16 12:41:16 \| com.atlassian.bamboo.agent.bootstrap.RemoteAgentHttpException: Response: \[HTTP/1.1 404 \] received after fingerprint request.  
INFO \| jvm 5 \| 2019/04/16 12:41:16 \| at com.atlassian.bamboo.agent.bootstrap.AgentContext.initFingerprint(AgentContext.java:156)  
INFO \| jvm 5 \| 2019/04/16 12:41:16 \| at com.atlassian.bamboo.agent.bootstrap.AgentContext.initServerSession(AgentContext.java:101)  
INFO \| jvm 5 \| 2019/04/16 12:41:16 \| at com.atlassian.bamboo.agent.bootstrap.AgentContext.run(AgentContext.java:88)  
INFO \| jvm 5 \| 2019/04/16 12:41:16 \| at com.atlassian.bamboo.agent.bootstrap.AgentBootstrap.run(AgentBootstrap.java:111)  
INFO \| jvm 5 \| 2019/04/16 12:41:16 \| at com.atlassian.bamboo.agent.bootstrap.AgentBootstrap.main(AgentBootstrap.java:50)  
INFO \| jvm 5 \| 2019/04/16 12:41:16 \| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  
INFO \| jvm 5 \| 2019/04/16 12:41:16 \| at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)  
INFO \| jvm 5 \| 2019/04/16 12:41:16 \| at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)  
INFO \| jvm 5 \| 2019/04/16 12:41:16 \| at java.lang.reflect.Method.invoke(Unknown Source)  
INFO \| jvm 5 \| 2019/04/16 12:41:16 \| at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240)  
INFO \| jvm 5 \| 2019/04/16 12:41:16 \| at java.lang.Thread.run(Unknown Source)  
INFO \| jvm 5 \| 2019/04/16 12:41:16 \| 2019-04-16 12:41:16,469 FATAL \[WrapperSimpleAppMain\] \[AgentBootstrap\] Exiting due to fatal exception.  
INFO \| jvm 5 \| 2019/04/16 12:41:16 \| com.atlassian.bamboo.agent.bootstrap.RemoteAgentHttpException: Response: \[HTTP/1.1 404 \] received after fingerprint request.  
INFO \| jvm 5 \| 2019/04/16 12:41:16 \| at com.atlassian.bamboo.agent.bootstrap.AgentContext.initFingerprint(AgentContext.java:156)  
INFO \| jvm 5 \| 2019/04/16 12:41:16 \| at com.atlassian.bamboo.agent.bootstrap.AgentContext.initServerSession(AgentContext.java:101)  
INFO \| jvm 5 \| 2019/04/16 12:41:16 \| at com.atlassian.bamboo.agent.bootstrap.AgentContext.run(AgentContext.java:88)  
INFO \| jvm 5 \| 2019/04/16 12:41:16 \| at com.atlassian.bamboo.agent.bootstrap.AgentBootstrap.run(AgentBootstrap.java:111)Do I need to set an Inbound firewall rule for my bamboo server to allow bitbucket to connect to it? I also tried to use the install without the wrapper and I get this error.

2019-04-16 12:19:00,539 INFO \[main\] \[AgentBootstrap\] Starting Agent Bootstrap using Java 1.8.0_201 from Oracle Corporation. Default charset: windows-1252, file name encoding: Cp1252  
2019-04-16 12:19:00,539 ERROR \[main\] \[AgentBootstrap\] Incorrect command line syntax. Maximum two arguments allowed. 3 arguments were passed: <http://000.000.000.00:8085/age>


Answers:
author: Kurt Klinner
body: [@Michael Castro](/t5/user/viewprofilepage/user-id/1805504)

Got it, seems like the agent has issues while authenticating against the bamboo server.

the context seem to be added twice /[agentserver/agentServer/](http://0.0.0.0:8085/agentserver/agentServer/)

How did you install the agent? The 404 error is also described at

<https://confluence.atlassian.com/bamkb/remote-agent-fails-to-start-up-http-status-code-404-received-in-response-to-fingerprint-request-300814507.html>

and is related to the wrong bamboo server url

Cheers

Kurt

comments: author: Michael Castro
body: Honestly, I don't think it is installed. I click on the jira download and it does not run. it opens and closes.


author: Kurt Klinner
body: [@Michael Castro](/t5/user/viewprofilepage/user-id/1805504)

i did not get that, "I click on the jira download and it does not run" what exactly do you mean.?


author: Michael Castro
body: ![2019-04-17_13-21-19.png](https://community.atlassian.com/t5/image/serverpage/image-id/51858i82B658366CC8966D/image-size/large?v=v2&px=999 "2019-04-17_13-21-19.png")  
When you click this to download the jar file and I move it to the server. When I double click on it. there is no install action. I also try to unwrap it and it fails..


author: Kurt Klinner
body: [@Michael Castro](/t5/user/viewprofilepage/user-id/1805504)

Please check at the page where you download the agent

there is the command stated that you need to run

see also

<https://confluence.atlassian.com/bamboo/bamboo-remote-agent-installation-guide-289276832.html>


author: Michael Castro
body: So I ran the command and it fails. the wrapper exists.


author: Kurt Klinner
body: [@Michael Castro](/t5/user/viewprofilepage/user-id/1805504)

What error / message did you get when the wrapper exited?


author: Michael Castro
body: Now this is not a need, but I appreciate the help


author: Kurt Klinner
body: [@Michael Castro](/t5/user/viewprofilepage/user-id/1805504)

[http://000.000.000.00:8085/agentserver/agentServer/](http://0.0.0.0:8085/agentserver/agentServer/)

the ip of the bamboo server seems weird, can you change it to the correct one by following

<https://confluence.atlassian.com/bamkb/how-to-update-the-bamboo-server-url-on-an-installed-agent-939920740.html>

Cheers

Kurt

comments: author: Michael Castro
body: I changed it just for this, so I wasn't putting my servers IP out there. I also did it for the security token


Tags: bitbucket-server

connect