I can’t get a “run a script” task to run on a raspberry pi. For Dev I have a Mac and it runs fine there, but for prod, I am using a raspberry pi. My hunch is that either the script isn’t transferring to the pi or something isn’t wiring-up properly so it doesn’t know what it needs to run.
The short error message is:
Could not find script file:
The remote script failed with exit code 1
The reason behind my hunch is that I think there should be something after the colon in the error message like a file name that the system is looking to run. To troubleshoot the issue, I created a new step in the process to run a batch script. Here is the entirety of the test script that it will not run:
pwd
The “Installing the package” task seems to work fine without the “run script” tasks. I also tested using “Custom Deployment Scripts” and those work just fine also (I just put some echo bash commands in those and they worked without error), but I also want to be able to run a basic bash script outside of the “Custom Deployment Scripts” feature in a separate task.
I don’t have a tentacle log because it is a raspberry pi. The OctopusServer log doesn’t have any errors in it. Here is the output from Calamari on the pi:
##octopus[stdout-verbose]
Octopus Deploy: Calamari version 2018.4.6-v2018-4-0-0032
Environment Information:
OperatingSystem: Unix 4.14.62.7
OsBitVersion: x86
Is64BitProcess: False
Running on Mono: False
CurrentUser: octopus
MachineName: raspberrypi
ProcessorCount: 4
CurrentDirectory: /home/octopus/.octopus/OctopusServer/Calamari/linux-arm/2018.4.6-v2018-4-0-0032
TempDirectory: /tmp/
HostProcessName: Calamari
The version of Octopus that I am running is v2018.7.7.
Here is my raw server task log:
Task ID: ServerTasks-411
Task status: Failed
Task queued: Monday, September 3, 2018 4:40:28 PM
Task started: Monday, September 3, 2018 4:40:28 PM
Task completed: Monday, September 3, 2018 4:40:41 PM
Task duration: 13 seconds
Server version: 2018.7.7+Branch.master.Sha.196ebf6b37848e9afcd14e4e3cdec8f35bc794ba
Server node: HEY-XPS
| == Failed: Deploy Article Site release 0.0.14 to PROD ==
16:40:28 Verbose | Guided failure is not enabled for this task
16:40:41 Fatal | The deployment failed because one or more steps failed. Please see the deployment log for details.
|
| == Failed: Step 1: Script test ==
16:40:41 Fatal | The step failed: Activity Script test on pi0 failed with error ‘The remote script failed with exit code 1’.
16:40:41 Verbose | Script test completed
|
| Failed: pi0
16:40:28 Verbose | Octopus Server version: 2018.7.7+Branch.master.Sha.196ebf6b37848e9afcd14e4e3cdec8f35bc794ba
16:40:28 Verbose | Environment Information:
| OperatingSystem: Microsoft Windows NT 10.0.17134.0
| OsBitVersion: x64
| Is64BitProcess: True
| CurrentUser: HEY-XPS\Octopus
| MachineName: HEY-XPS
| ProcessorCount: 8
| CurrentDirectory: C:\WINDOWS\system32
| TempDirectory: C:\Users\Octopus\AppData\Local\Temp
| HostProcessName: Octopus.Server
| PID: 11104
16:40:28 Verbose | Executing Script test (type Run a Script) on pi0
16:40:28 Verbose | Using Calamari.linux-arm 2018.4.6-v2018-4-0-0032
16:40:28 Verbose | Requesting upload…
16:40:28 Verbose | Establishing SSH connection…
16:40:29 Verbose | SSH connection established
16:40:29 Verbose | Beginning streaming transfer of command.sh to $HOME.octopus\OctopusServer\Work\20180903234028-411-96
16:40:29 Verbose | Establishing SFTP connection…
16:40:30 Verbose | SSFTP connection established
16:40:30 Verbose | Stream transfer complete
16:40:30 Verbose | Requesting upload…
16:40:31 Verbose | Beginning streaming transfer of Variables.secret to $HOME.octopus\OctopusServer\Work\20180903234028-411-96
16:40:31 Verbose | Stream transfer complete
16:40:35 Verbose | Octopus Deploy: Calamari version 2018.4.6-v2018-4-0-0032
16:40:35 Verbose | Environment Information:
16:40:35 Verbose | OperatingSystem: Unix 4.14.62.7
16:40:35 Verbose | OsBitVersion: x86
16:40:35 Verbose | Is64BitProcess: False
16:40:35 Verbose | Running on Mono: False
16:40:35 Verbose | CurrentUser: octopus
16:40:35 Verbose | MachineName: raspberrypi
16:40:35 Verbose | ProcessorCount: 4
16:40:35 Verbose | CurrentDirectory: /media/usb1/OctopusWork/20180903234028-411-96
16:40:35 Verbose | TempDirectory: /tmp/
16:40:35 Verbose | HostProcessName: Calamari
16:40:41 Error | Could not find script file:
16:40:41 Verbose | Disposing SFTP connection…
16:40:41 Verbose | Disposing SSH connection…
16:40:41 Verbose | Updating manifest with output variables
16:40:41 Verbose | Updating manifest with action evaluated variables
16:40:41 Fatal | The remote script failed with exit code 1
16:40:41 Fatal | The action Script test on pi0 failed
|
| Canceled: Acquire packages
16:40:41 Verbose | Step “Acquire Packages” runs only when all previous steps succeeded; skipping
|
| Canceled: Step 2: Install Package
16:40:41 Verbose | Step “Install Package” runs only when all previous steps succeeded; skipping
|
| Canceled: Step 3: Configure Service
16:40:41 Verbose | Step “Configure Service” runs only when all previous steps succeeded; skipping
|
If anyone can help me, that would be awesome. Any help would be appreciated!