Linux Octopus Tentacle not starting with systemctl

Hi
We have an automated creation of an Amazon Linux 2 instance which update all programs and installs the Tentacle. This has been working for a year or so but today we recreated the Linux-instance and the Tentacle is not starting anymore.

The new instance is running Tentacle version 6.1.708, the old version was 6.0.612.

—systemctl—
[root@ip-10-0-4-120 ~]# systemctl status Tentacle.service
● Tentacle.service - Octopus Deploy: Tentacle deployment agent
Loaded: loaded (/etc/systemd/system/Tentacle.service; enabled; vendor preset: disabled)
Active: failed (Result: start-limit) since Mon 2021-06-07 15:17:04 UTC; 2min 39s ago
Main PID: 22493 (code=exited, status=1/FAILURE)

systemd[1]: Unit Tentacle.service entered failed state.
systemd[1]: Tentacle.service failed.
systemd[1]: Tentacle.service holdoff time over, scheduling restart.
systemd[1]: start request repeated too quickly for Tentacle.service
systemd[1]: Failed to start Octopus Deploy: Tentacle deployment agent.
systemd[1]: Unit Tentacle.service entered failed state.
systemd[1]: Tentacle.service failed.
—systemctl—

The Tentacle works fine if we start it with the command:
root@ip-10-0-4-120 ~]# Tentacle agent --console
Agent will trust Octopus Servers with the thumbprint: XYZ
Agent will poll Octopus Server at https://octopus.XYZ.com:10943/ for subscription poll://XYZ/ expecting thumbprint XYZ
Agent will not listen on any TCP ports
Running. Press to shut down…
https://octopus.XYZ.com:10943/ 6 Opening a new connection to https://octopus.XYZ.com:10943/
https://octopus.XYZ.com:10943/ 6 Secure connection established. Server at [::ffff:111.11.11.111]:10943 identified by thumbprint: XYZ, using protocol Tls12

We install the tentacle with the following script:
#!/bin/bash
serverUrl=“https://octopus.XYZ.com:10943/
serverCommsPort=10943
apiKey=“XYZ”
name=“Sandbox”
environment=“Sandbox”
role=“Sandbox-Worker”
configFilePath="/etc/octopus/default/tentacle-default.config"
applicationPath="/home/Octopus/Applications/"
wget https://rpm.octopus.com/tentacle.repo -O /etc/yum.repos.d/tentacle.repo
yum -y install tentacle
/opt/octopus/tentacle/Tentacle create-instance --config “$configFilePath”
/opt/octopus/tentacle/Tentacle new-certificate --if-blank
/opt/octopus/tentacle/Tentacle configure --noListen True --reset-trust --app “$applicationPath”
echo “Registering the Tentacle $name with server $serverUrl in environment $environment with role $role”
/opt/octopus/tentacle/Tentacle register-with --server “$serverUrl” --apiKey “$apiKey” --name “$name” --env “$environment” --role “$role” --comms-style “TentacleActive” --server-comms-port $serverCommsPort --force
/opt/octopus/tentacle/Tentacle service --install --start

Ragards
Lars

Hi Lars,

Thanks for getting in touch with us over your issue, and welcome to the community!

I’m not sure what is causing this problem yet, but am attempting to reproduce it following your steps.

In the meantime, we have seen similar issues with quotes "" around the Tentacle instance name in the systemd file causing problems with the Tentacle service starting. If you open the file /etc/systemd/system/Tentacle.service, it should look something like this:

[Unit]
Description=Octopus Deploy: Tentacle deployment agent
After=network.target
[Service]
Type=simple
User=root
ExecStart="/opt/octopus/tentacle/Tentacle" run --instance="Tentacle" --noninteractive
Restart=always
[Install]
WantedBy=multi-user.target

With quotes around the instance name: --instance="Tentacle" --noninteractive​

Can you try removing the quotes from the Tentacle.service file so it looks like --instance=Tentacle --noninteractive​?

Once you’ve done this run a systemctl daemon-reload​ and then start the service: /opt/octopus/tentacle/Tentacle service --start​

That may get the service up and running, but check to see that it is and please let us know if this works.

I’m looking forward to hearing back on the results from the above and will let you know what I find on my end.

Best,
Patrick

Hi Patrick,
Thank you for the fast reply.
This solved the problem. I also checked the other environments (where all is working) and in those files the instance name is without the quotes.
Do you know when this problem was introduced and if a fix is soon available?

Regards
Lars

Hi Lars,

I’m glad to hear that was the solution to your issue, and thanks for getting back to me.

This problem was introduced about a month ago, and we’ve had just a few reports so far. I can’t say for sure when this issue will be fixed, but you can follow and track this issue on GitHub: Linux tentacle systemd service fails to start on some Linux distributions · Issue #6911 · OctopusDeploy/Issues · GitHub

I hope that helps and please feel free to reach out with any further questions or issues.

Kind regards,
Patrick

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.