[systemd-devel] bamboo agent does not start from systemd

vadud3 at gmail.com vadud3 at gmail.com
Wed Jun 16 14:00:51 UTC 2021


Bamboo agent install provides bamboo-agent.sh as part of the install.
It starts the bamboo agent. It works fine provided there is no service
unit file defined. If I define the service unit file it does not start
with systemctl. It also fails to start even when executing
bamboo-agent.sh start as bamboo. This seems very odd. Here are some
details.

# cat /etc/systemd/system/bamboo-agent.service
[Unit]
Description=Atlassian Bamboo Agent
After=syslog.target network.target
[Service]
Type=forking
User=bamboo
Group=bamboo
ExecStart=/bin/bash /opt/atlassian/remote-agent/bin/bamboo-agent.sh start
ExecStop=/bin/bash /opt/atlassian/remote-agent/bin/bamboo-agent.sh stop
[Install]
WantedBy=multi-user.target

[root at bamboo remote-agent]# systemctl start bamboo-agent
Job for bamboo-agent.service failed because the control process exited
with error code. See "systemctl status bamboo-agent.service" and
"journalctl -xe" for details.

[root at bamboo remote-agent]# systemctl status -l bamboo-agent
● bamboo-agent.service - Atlassian Bamboo Agent
Loaded: loaded (/etc/systemd/system/bamboo-agent.service; disabled;
vendor preset: disabled)
Active: failed (Result: exit-code) since Tue 2021-06-15 18:59:58 UTC; 12s ago
Process: 5680 ExecStart=/bin/bash
/opt/atlassian/remote-agent/bin/bamboo-agent.sh start (code=exited,
status=1/FAILURE)
Jun 15 18:59:57 bamboo.example.org systemd[1]: Starting Atlassian
Bamboo Agent...
Jun 15 18:59:57 bamboo.example.org bash[5680]: Starting Bamboo Agent
with systemd...
Jun 15 18:59:58 bamboo.example.org bash[5680]: Failed to start
bamboo-agent.service: Interactive authentication required.
Jun 15 18:59:58 bamboo.example.org bash[5680]: See system logs and
'systemctl status bamboo-agent.service' for details.
Jun 15 18:59:58 bamboo.example.org systemd[1]: bamboo-agent.service:
control process exited, code=exited status=1
Jun 15 18:59:58 bamboo.example.org systemd[1]: Failed to start
Atlassian Bamboo Agent.
Jun 15 18:59:58 bamboo.example.org systemd[1]: Unit
bamboo-agent.service entered failed state.
Jun 15 18:59:58 bamboo.example.org systemd[1]: bamboo-agent.service failed.

As you can see I cannot start manually either when the service unit exist

[root at bamboo remote-agent]# su - bamboo
[bamboo at bamboo ~]$ /opt/atlassian/remote-agent/bin/bamboo-agent.sh start
Starting Bamboo Agent with systemd...
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to manage system services or units.
Authenticating as: Cloud User (ec2-user)
Password:

If I remove the service unit I can manually start.

[root at bamboo remote-agent]# mv /etc/systemd/system/bamboo-agent.service /tmp
[root at bamboo remote-agent]# systemctl daemon-reload
[root at bamboo remote-agent]# su - bamboo
[bamboo at bamboo ~]$ /opt/atlassian/remote-agent/bin/bamboo-agent.sh start
Starting Bamboo Agent...
Waiting for Bamboo
Agent...........................................................................................................................
running: PID:6449
[bamboo at bamboo ~]$

It seems to me the bamboo-agent.sh that comes with installation has
bug in it. I am attaching bamboo-agent.sh file here as well.

Any suggestion how to get it running from systemd?

Thanks,
Asif



-- 
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bamboo-agent.sh
Type: text/x-sh
Size: 108362 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20210616/56ed1aea/attachment-0001.sh>


More information about the systemd-devel mailing list