Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

WrapperSimpleApp Error: java.net.MalformedURLException: no protocol when starting agent

Tim Volckmann
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 23, 2020

Hi guys,

I want replace my Jenkins setup by Bamboo because all other projects is already using Atlassian tools. For evaluation I'm using the docker image provided by Atlassian (atlassian/bamboo-server:7.0.4).

Now I want extend Bamboo by an agent that builds my own Docker images. So I pulled the docker image:

docker pull atlassian/bamboo-agent-base

Now, I start my daemon:

sudo docker run -v bambooAgentVolume:/home/bamboo/bamboo-agent-home --init atlassian/bamboo-agent-base https://server-ip:8085

But the agent failed to start:

Could not find source file /classpath.zip
Unzipping /classpath.zip to /home/bamboo/bamboo-agent-home/classpath
PATH: /opt/java/openjdk/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
LANGUAGE: C.UTF-8
BAMBOO_CAPABILITIES: /home/bamboo/bamboo-agent-home/bin/bamboo-capabilities.properties
INIT_BAMBOO_CAPABILITIES: /home/bamboo/init-bamboo-capabilities.properties
AGENT_JAR: /home/bamboo/atlassian-bamboo-agent-installer.jar
JAVA_HOME: /opt/java/openjdk
BAMBOO_AGENT_HOME: /home/bamboo/bamboo-agent-home
BAMBOO_USER: bamboo
LANG: C.UTF-8
BAMBOO_USER_HOME: /home/bamboo
IGNORE_SERVER_CERT_NAME: false
HOSTNAME: 704bd2b57bf6
LC_ALL: C.UTF-8
BAMBOO_SERVER: test/agentServer/
BAMBOO_SECURITY_TOKEN:
BAMBOO_GROUP: bamboo
PWD: /home/bamboo
JAVA_VERSION: jdk8u252-b09
SHLVL: 0
HOME: /home/bamboo
ALLOW_EMPTY_ARTIFACTS: false
Running [/home/bamboo/bamboo-agent-home/bin/bamboo-agent.sh, console]
Agent process started, shutdown hook registered, proceeding with log pump...
Running Bamboo Agent...
Removed stale pid file: /home/bamboo/bamboo-agent-home/bin/./bamboo-agent.pid
STATUS | wrapper | 2020/05/23 07:38:14 | --> Wrapper Started as Console
STATUS | wrapper | 2020/05/23 07:38:14 | Java Service Wrapper Standard Edition 64-bit 3.5.41
STATUS | wrapper | 2020/05/23 07:38:14 | Copyright (C) 1999-2019 Tanuki Software, Ltd. All Rights Reserved.
STATUS | wrapper | 2020/05/23 07:38:14 | http://wrapper.tanukisoftware.com
STATUS | wrapper | 2020/05/23 07:38:14 | Licensed to Atlassian Pty Ltd for Bamboo Remote Agent
STATUS | wrapper | 2020/05/23 07:38:14 |
STATUS | wrapper | 2020/05/23 07:38:14 | Launching a JVM...
INFO | jvm 1 | 2020/05/23 07:38:15 | WrapperManager: Initializing...
INFO | jvm 1 | 2020/05/23 07:38:15 | 2020-05-23 07:38:15,334 INFO [WrapperSimpleAppMain] [AgentBootstrap] Starting Agent Bootstrap using Java 1.8.0_252 from AdoptOpenJDK. Default charset: UTF-8, file name encoding: UTF-8
INFO | jvm 1 | 2020/05/23 07:38:15 | WrapperSimpleApp:
INFO | jvm 1 | 2020/05/23 07:38:15 | WrapperSimpleApp Error: Encountered an error running main:
INFO | jvm 1 | 2020/05/23 07:38:15 | WrapperSimpleApp Error: java.net.MalformedURLException: no protocol: my-server-ip:54663/agentServer/
INFO | jvm 1 | 2020/05/23 07:38:15 | WrapperSimpleApp Error: at java.net.URL.<init>(URL.java:611)
INFO | jvm 1 | 2020/05/23 07:38:15 | WrapperSimpleApp Error: at java.net.URL.<init>(URL.java:508)
INFO | jvm 1 | 2020/05/23 07:38:15 | WrapperSimpleApp Error: at java.net.URL.<init>(URL.java:457)
INFO | jvm 1 | 2020/05/23 07:38:15 | WrapperSimpleApp Error: at com.atlassian.bamboo.agent.bootstrap.AgentBootstrap.main(AgentBootstrap.java:53)
INFO | jvm 1 | 2020/05/23 07:38:15 | WrapperSimpleApp Error: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
INFO | jvm 1 | 2020/05/23 07:38:15 | WrapperSimpleApp Error: at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
INFO | jvm 1 | 2020/05/23 07:38:15 | WrapperSimpleApp Error: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
INFO | jvm 1 | 2020/05/23 07:38:15 | WrapperSimpleApp Error: at java.lang.reflect.Method.invoke(Method.java:498)
INFO | jvm 1 | 2020/05/23 07:38:15 | WrapperSimpleApp Error: at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:349)
INFO | jvm 1 | 2020/05/23 07:38:15 | WrapperSimpleApp Error: at java.lang.Thread.run(Thread.java:748)
STATUS | wrapper | 2020/05/23 07:38:17 | <-- Wrapper Stopped
Waiting for the agent process to finish...
The underlying agent process terminated with a non zero exit code: 1
The underlying agent process terminated with a non zero exit code: 1
Bamboo Agent Installer is shutting down, the underlying agent process has already been shut down.

The problem is "WrapperSimpleApp Error: java.net.MalformedURLException: no protocol: my-server-ip:54663/agentServer/"... But no matter what I enter when I start the container, it always uses the same IP address, the same port (54663) and /agentServer. At the moment the IP address is not the problem currently because Bamboo and the agend are on the same server. But the problem seems to be that the https:// is missing... (because it says "no protocol"). So, what's the correct way to start the agent?

1 answer

0 votes
Moses Thomas
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 23, 2020

@Tim Volckmann   You will need to  update the Bamboo server Url on the installed  agent.

Update the Bamboo server URL on an installed agent 

 

Verify  and give feed back.

 

Best regards,

Mo.

Tim Volckmann
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 23, 2020

@Moses ThomasThank you! That's interesting. So I've to rebuild docker container provided by Atlassian before I can use it? On the documentation page of the docker container there's the following command line:

docker run -v bambooAgentVolume:/home/bamboo/bamboo-agent-home --name="bambooAgent" --init -d atlassian/bamboo-agent-base BAMBOO_SERVER_URL

So I thought BAMBOO_SERVER_URL is the URL to the Bamboo server... So I can use the container provided without rebuild...

Moses Thomas
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 25, 2020

@Tim Volckmann  Yes the BAMBOO_SERVER_URL is the URL to bamboo server,  but in the agent's  configuration  the url  most  also  match.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events