Target/Machine Health Check Fails with "not a valid Base-64 string"

The target is defined as

The target definition via REST
“Id”: “Machines-1963”,
“EnvironmentIds”: [
“Roles”: [
“TenantedDeploymentParticipation”: “TenantedOrUntenanted”,
“TenantIds”: [
“TenantTags”: [],
“SpaceId”: “Spaces-1296”,
“Name”: “”,
“Thumbprint”: null,
“Uri”: null,
“IsDisabled”: false,
“MachinePolicyId”: “MachinePolicies-1296”,
“Status”: “CalamariNeedsUpgrade”,
“HealthStatus”: “Unhealthy”,
“HasLatestCalamari”: false,
“StatusSummary”: “There was a problem communicating with this machine (last checked: Friday, 15 May 2020 1:13:48 PM +00:00)”,
“IsInProcess”: false,
“Endpoint”: {
“CommunicationStyle”: “Ssh”,
“AccountId”: “sshkeypair-ldxc-dev2-dev-us-east-1-spaces-1296”,
“Host”: “”,
“Port”: 22,
“Fingerprint”: “xxxxxxxxxxxxxxxx6:f5:1b:43:f1:9d:2a:ce:b9”,
“Uri”: “ssh://”,
“ProxyId”: “Proxys-35”,
“DotNetCorePlatform”: “”,
“Id”: null,
“LastModifiedOn”: null,
“LastModifiedBy”: null,
“Links”: {}
“OperatingSystem”: “Unknown”,
“ShellName”: “Unknown”,
“ShellVersion”: “Unknown”,
“Links”: {
“Self”: “/api/Spaces-1296/machines/Machines-1963”,
“Connection”: “/api/Spaces-1296/machines/Machines-1963/connection”,
“TasksTemplate”: “/api/Spaces-1296/machines/Machines-1963/tasks{?skip,take}”

Hi Harris,

Thank you for providing so much information. It’s very appreciated.

I’m sorry you’ve hit this issue - but I think the Raw Log Files will be able to give us some insight into the issue. The Raw log files will be available on the same page you grabbed the first screenshot from.

Just click on the “Task Log” tab followed by “Raw Logs”. There should be an option to Download the log file. Send that file across and I can have a closer look.

Are you using an Octopus cloud-hosted environment or are you running a Self-hosted server? If you are self-hosted, what version of Octopus are you running?

Do you have other tentacles connecting through the Proxy successfully? If so, are they Polling, listening or SSH tentacles?

I’m looking forward to hearing back from you so we can get to the bottom of this.



Hi Dane: Thank you so much for your offer to help.

We have 2 Octopus Cloud-hosted instances. instance A is heavily used with manually-maintained jobs. instance B is where the problem is and all artifacts are created with the REST api. I create the artifacts to exactly align with the artifacts on instance
A. The connection to the target is ssh.

Hmmmm perhaps trying to access a target from 2 different Octopus instances is the problem?

I attached the raw log output.

The octopus server is Octopus-cloud hosted


ServerTasks-16085.log.txt (7.54 KB)

Actually, Dane. Here is the update for this ticket. Adding the ssh private key MANUALLY (via UI) caused the Healthcheck to

However, passing in the private key via a rest call does NOT work.

Please let me know that you have received this update and I will work on the REST call. But please leave this ticket open for now.


Update again. The passing of the private key via REST call to the account object is the problem. Here is the code

    pvtkey = '''-----BEGIN RSA PRIVATE KEY-----











-----END RSA PRIVATE KEY-----’’’

    trimmed_key = ''.join(pvtkey.split())

    data = {

        "Name": acct['Name'],



        "Username": acct['Username'],

        "PrivateKeyFile": {"HasValue":

False, “NewValue”: trimmed_key},

        "PrivateKeyPassphrase": {"HasValue":

False, “NewValue”:



        "EnvironmentIds": env_ids,

        "TenantIds": tenant_ids,


    response = self.executor.http_post(f"/accounts", data)

    return response["Id"]

Is there something about how the “PrivateKeyFile” is handled? I am assuming that the KEY is what belong here not a ‘file’?

This ticket can be closed (don’t see a way to do that in the web ui).

The problem is that the REST API does not seem to support direct uploads of ssh private key.

Will open another ticket with the clearer explanation

1 Like

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