Deploy Package mac ssh cannot execute binary file

usability
known
(Mkimonos) #1

I created a ssh connection to our local Mac mini for mobile app signing and deployment. I have upload the Mobile apk and ipa into a single .zip file to octopus. I troed using TRANSFER A PACKAGE
and deploy package and they give the same error message. It is able to transfer from the package to the mac. I it failed on v2018.10.5 so I upgraded to latest version 2019.9.4. which didn’t help

Here are the server logs:
Task ID: ServerTasks-14511
Related IDs: Deployments-1144, Channels-121, Releases-802, Projects-121, Spaces-1, Environments-1
Task status: Failed
Task queued: Tuesday, 29 October 2019 4:29:12 PM -04:00
Task started: Tuesday, 29 October 2019 4:29:13 PM -04:00
Task completed: Tuesday, 29 October 2019 4:29:18 PM -04:00
Task duration: 5 seconds
Server version: 2019.9.4+Branch.tags-2019.9.4.Sha.e745662d7a1c43db42e0a2b6944af4dc6f5df2fa
Server node: SEDEVOPS01

                | == Failed: Deploy iSign Mobile release 0.0.2 to DEVP ==

16:29:13 Info | Step 1: Deliver to Mac Mini is disabled, and will not be executed
16:29:13 Info | Step 2: Unzip Sign and Deploy AppCenter is disabled, and will not be executed
16:29:13 Verbose | Guided failure is not enabled for this task
16:29:18 Fatal | The deployment failed because one or more steps failed. Please see the deployment log for details.
|
| == Failed: Acquire packages ==
16:29:13 Info | Acquiring packages
16:29:13 Info | Making a list of packages to acquire
16:29:13 Verbose | No packages are required on the Octopus Server
16:29:13 Verbose | Delta compression is enabled for package transfers from the Octopus Server to deployment targets
16:29:13 Info | The package cache will be skipped because the variable ‘Octopus.Deployment.ForcePackageDownload’ has been set to ‘true’
16:29:17 Fatal | The step failed: Activity failed with error ‘The remote script failed with exit code 126’.
16:29:17 Verbose | Acquire Packages completed
|
| Failed: 172.25.10.180
16:29:17 Fatal | The remote script failed with exit code 126
16:29:17 Verbose | at Octopus.Server.Orchestration.ServerTasks.Deploy.ActionDispatch.SuccessArbitrator.ThrowIfNotSuccessfull(IActionHandlerResult result) in C:\buildAgent\work\abb2fbfce959a439\source\Octopus.Server\Orchestration\ServerTasks\Deploy\ActionDispatch\SuccessArbitrator.cs:line 23
| at Octopus.Server.Orchestration.ServerTasks.Deploy.ActionDispatch.AdHocActionDispatcher.Dispatch(Machine machine, ActionHandlerInvocation actionHandler, VariableCollection variables) in C:\buildAgent\work\abb2fbfce959a439\source\Octopus.Server\Orchestration\ServerTasks\Deploy\ActionDispatch\AdHocActionDispatcher.cs:line 65
| at Octopus.Server.Orchestration.ServerTasks.Deploy.Steps.Acquire.PackageAcquisitionExecutionHandlers.FindPackage(String packageId, IVersion version, String packageHash, PackageSearchOptions packageSearchOptions) in C:\buildAgent\work\abb2fbfce959a439\source\Octopus.Server\Orchestration\ServerTasks\Deploy\Steps\Acquire\PackageAcquisitionExecutionHandlers.cs:line 32
| at Octopus.Server.Orchestration.Targets.Common.PackageStagingMediator.PushPackageWithDeltaCompression(StoredPackage packageToPush, PackageIdentity packageIdentity, IDeploymentPackageDownloader deploymentPackageDownloader, PackageAcquisitionExecutionHandlers execs) in C:\buildAgent\work\abb2fbfce959a439\source\Octopus.Server\Orchestration\Targets\Common\PackageStagingMediator.cs:line 124
| at Octopus.Server.Orchestration.Targets.Common.PackageStagingMediator.PushPackage(PackageIdentity packageIdentity, StoredPackage packageToPush, IDeploymentPackageDownloader deploymentPackageDownloader, DeltaCompressionOptions deltaCompressionOptions, PackageCacheOptions packageCacheOptions, PackageAcquisitionExecutionHandlers execs) in C:\buildAgent\work\abb2fbfce959a439\source\Octopus.Server\Orchestration\Targets\Common\PackageStagingMediator.cs:line 89
| at Octopus.Server.Orchestration.Targets.Common.PackageStagingMediator.DownloadPackageAndPushToAgent(PackageIdentity packageIdentity, IDeploymentPackageDownloader deploymentPackageDownloader, DeltaCompressionOptions deltaCompressionOptions, PackageCacheOptions packageCacheOptions, PackageAcquisitionExecutionHandlers execs) in C:\buildAgent\work\abb2fbfce959a439\source\Octopus.Server\Orchestration\Targets\Common\PackageStagingMediator.cs:line 62
| at Octopus.Server.Orchestration.ServerTasks.Deploy.Steps.Acquire.AcquireMachinePackageTask.StagePackage(PackageAcquisitionExecutionHandlers packageAcquisitionHandlers) in C:\buildAgent\work\abb2fbfce959a439\source\Octopus.Server\Orchestration\ServerTasks\Deploy\Steps\Acquire\AcquireMachinePackageTask.cs:line 165
| at Octopus.Server.Orchestration.ServerTasks.Deploy.Steps.Acquire.AcquireMachinePackageTask.Acquire(AcquiredPackageMap acquiredPackageMap, ITaskContext taskContext, LogContext logContext) in C:\buildAgent\work\abb2fbfce959a439\source\Octopus.Server\Orchestration\ServerTasks\Deploy\Steps\Acquire\AcquireMachinePackageTask.cs:line 133
| at Octopus.Server.Orchestration.ServerTasks.Deploy.DeploymentTaskController.<>c__DisplayClass35_1.b__1() in C:\buildAgent\work\abb2fbfce959a439\source\Octopus.Server\Orchestration\ServerTasks\Deploy\DeploymentTaskController.cs:line 359
| at Octopus.Server.Orchestration.ServerTasks.Deploy.DeploymentTaskController.ExecuteWithTransientErrorDetection(Action action, DeploymentTarget deploymentTarget) in C:\buildAgent\work\abb2fbfce959a439\source\Octopus.Server\Orchestration\ServerTasks\Deploy\DeploymentTaskController.cs:line 654
| at Octopus.Server.Orchestration.ServerTasks.OctoThreadClosure`1.Execute() in C:\buildAgent\work\abb2fbfce959a439\source\Octopus.Server\Orchestration\ServerTasks\OctoThreadClosure.cs:line 32
|
| Failed: Upload package iSign.Mobile v0.2.11.1
16:29:13 Info | Downloading iSign.Mobile v0.2.11.1 to package cache…
16:29:13 Verbose | Downloading iSign.Mobile v0.2.11.1 from Octopus Server (built-in) using cache policy BypassCache…
16:29:13 Verbose | Downloading package (attempt 1 of 5)
16:29:13 Verbose | Found iSign.Mobile v0.2.11.1 (63.08 MB) with SHA1 98aec4609c7f3273a52ec210ef165016b5bd807a in the built-in repository at E:\Octopus\Packages\Spaces-1\feeds-builtin\iSign.Mobile\iSign.Mobile.0.2.11.1.zip.
16:29:13 Info | Downloaded iSign.Mobile v0.2.11.1 (63.08 MB) with SHA1 98aec4609c7f3273a52ec210ef165016b5bd807a.
16:29:13 Info | Skipping the package cache because it has been disabled, or this deployment target does not support caching
16:29:13 Verbose | Using Calamari.linux-x64 7.1.9
16:29:13 Verbose | Requesting upload…
16:29:13 Verbose | Establishing SSH connection…
16:29:14 Verbose | SSH connection established
16:29:14 Verbose | Beginning streaming transfer of command.sh to $HOME.octopus\OctopusServer\Work\20191029202913-14511-5
16:29:14 Verbose | Establishing SFTP connection…
16:29:14 Verbose | SSFTP connection established
16:29:15 Verbose | Stream transfer complete
16:29:15 Verbose | Requesting upload…
16:29:15 Verbose | Beginning streaming transfer of Variables.secret to $HOME.octopus\OctopusServer\Work\20191029202913-14511-5
16:29:16 Verbose | Stream transfer complete
16:29:16 Verbose | Requesting upload…
16:29:16 Verbose | Beginning streaming transfer of Variables.Bash.secret to $HOME.octopus\OctopusServer\Work\20191029202913-14511-5
16:29:16 Verbose | Stream transfer complete
16:29:17 Error | /Users/sedev/.octopus/OctopusServer/Work/20191029202913-14511-5/command.sh: line 35: /Users/sedev/.octopus/OctopusServer/Calamari/linux-x64/7.1.9/Calamari: cannot execute binary file
16:29:17 Verbose | SFTP connection disposed.
16:29:17 Verbose | SSH connection disposed.
16:29:17 Verbose | Exit code: 126
|
| == Skipped: Step 3: Deploy to MacMini ==
16:29:17 Info | Step “Deploy to MacMini” runs only when all previous steps succeeded; skipping
|

(Justin Walsh) #5

Hi @mkimonos!

Sorry to hear you’re having issues here - what looks to be the problem is that the wrong version of Calamari has been configured on your deployment target, and it is attempting to use the Linux binaries instead of the OSX ones. On your deployment target configuration page, you will want to change the platform option from linux-x64 to osx-x64.

Please let me know if you have any further questions!

(Mkimonos) #6

Worked like a charm. I knew it was something minor. Appreciate the help