Skip to content

Instantly share code, notes, and snippets.

@spuder
Created August 17, 2016 00:22
Show Gist options
  • Save spuder/ac64adaee9ad66e718c266b4ad9ef254 to your computer and use it in GitHub Desktop.
Save spuder/ac64adaee9ad66e718c266b4ad9ef254 to your computer and use it in GitHub Desktop.
octopus deploy chef failure
Recipe: nd-octopus::tentacle
* octopus_deploy_tentacle[Tentacle] action install
* remote_file[C:\chef\cache/octopus-tentacle.msi] action create (up to date)
* windows_package[Octopus Deploy Tentacle] action install (up to date)
(up to date)
* octopus_deploy_tentacle[Tentacle] action configure
* windows_firewall_rule[Octopus Deploy Tentacle] action create (skipped due to only_if)
* octopus_deploy_tentacle[Tentacle] action install
* remote_file[C:\chef\cache/octopus-tentacle.msi] action create (up to date)
* windows_package[Octopus Deploy Tentacle] action install (up to date)
(up to date)
* directory[C:\Octopus] action create (up to date)
* powershell_script[generate-tentacle-cert] action run (skipped due to not_if)
* powershell_script[create-instance-Tentacle] action run (skipped due to not_if)
* powershell_script[configure-tentacle-Tentacle] action run (skipped due to not_if)
* windows_service[OctopusDeploy Tentacle] action enable (up to date)
* windows_service[OctopusDeploy Tentacle] action start
- start service windows_service[OctopusDeploy Tentacle]
* octopus_deploy_tentacle[Tentacle] action register
* powershell_script[register-Tentacle-tentacle] action run
================================================================================
Error executing action `run` on resource 'powershell_script[register-Tentacle-tentacle]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
---- Begin output of "C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe" -NoLogo -NonInteractive -NoProfile -ExecutionPolicy Bypass -InputFormat None -File "C:/Users/sowen/AppData/Local/Temp/2/chef-script20160816-6264-14s3l6c.ps1" ----
STDOUT:
STDERR: C:\Users\sowen\AppData\Local\Temp\2\chef-script20160816-6264-14s3l6c.ps1 : ERROR: Command returned 1 Registering Tentacle
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,chef-script20160816-6264-14s3l6c.ps1
---- End output of "C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe" -NoLogo -NonInteractive -NoProfile -ExecutionPolicy Bypass -InputFormat None -File "C:/Users/sowen/AppData/Local/Temp/2/chef-script20160816-6264-14s3l6c.ps1" ----
Ran "C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe" -NoLogo -NonInteractive -NoProfile -ExecutionPolicy Bypass -InputFormat None -File "C:/Users/sowen/AppData/Local/Temp/2/chef-script20160816-6264-14s3l6c.ps1" returned 1
Resource Declaration:
---------------------
# In C:/chef/cache/cookbooks/octopus-deploy/providers/tentacle.rb
158: register_instance = powershell_script "register-#{instance}-tentacle" do
159: action :run
160: cwd tentacle_install_location
161: code <<-EOH
162: .\\Tentacle.exe register-with --instance "#{instance}" --server "#{server}" --name "#{node.name}" --apiKey "#{api_key}" #{register_comm_config(polling, port)} --environment "#{environment}" #{option_list('role', roles)} --console
163: #{catch_powershell_error('Registering Tentacle')}
164: EOH
165: # This is sort of a hack, you need to specify the config_path on register if it is not default
166: # The other option is to read the registry key but the helpers are not available in 12.4.1
167: not_if { tentacle_exists?(server, api_key, tentacle_thumbprint(config_path)) }
168: end
169:
Compiled Resource:
------------------
# Declared in C:/chef/cache/cookbooks/octopus-deploy/providers/tentacle.rb:158:in `block in class_from_file'
powershell_script("register-Tentacle-tentacle") do
action [:run]
retries 0
retry_delay 2
default_guard_interpreter :powershell_script
command "register-Tentacle-tentacle"
backup 5
cwd "C:\\Program Files\\Octopus Deploy\\Tentacle"
returns 0
code " .\\Tentacle.exe register-with --instance \"Tentacle\" --server \"https://octopus.example.com\" --name \"dvp-chefzero\" --apiKey \"API-xxxxxxxxx\" --comms-style \"TentacleActive\" --server-comms-port \"10943\" --force --environment \"dev\" --role \"web-default\" --console\n
if ( ! $? ) { throw \"ERROR: Command returned $LastExitCode Registering Tentacle\" }\n"
interpreter "powershell.exe"
declared_type :powershell_script
cookbook_name "nd-octopus"
not_if { #code block }
end
Platform:
---------
x64-mingw32
================================================================================
Error executing action `register` on resource 'octopus_deploy_tentacle[Tentacle]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
powershell_script[register-Tentacle-tentacle] (C:/chef/cache/cookbooks/octopus-deploy/providers/tentacle.rb line 158) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of "C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe" -NoLogo -NonInteractive -NoProfile -ExecutionPolicy Bypass -InputFormat None -File "C:/Users/sowen/AppData/Local/Temp/2/chef-script20160816-6264-14s3l6c.ps1" ----
STDOUT:
STDERR: C:\Users\sowen\AppData\Local\Temp\2\chef-script20160816-6264-14s3l6c.ps1 : ERROR: Command returned 1 Registering Tentacle
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,chef-script20160816-6264-14s3l6c.ps1
---- End output of "C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe" -NoLogo -NonInteractive -NoProfile -ExecutionPolicy Bypass -InputFormat None -File "C:/Users/sowen/AppData/Local/Temp/2/chef-script20160816-6264-14s3l6c.ps1" ----
Ran "C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe" -NoLogo -NonInteractive -NoProfile -ExecutionPolicy Bypass -InputFormat None -File "C:/Users/sowen/AppData/Local/Temp/2/chef-script20160816-6264-14s3l6c.ps1" returned 1
Resource Declaration:
---------------------
# In C:/chef/cache/cookbooks/nd-octopus/recipes/tentacle.rb
8: octopus_deploy_tentacle 'Tentacle' do
9: action :register
10: server node['nd-octopus']['server']
11: api_key node['nd-octopus']['api_key']
12: roles node['nd-octopus']['roles']
13: environment node.chef_environment.to_s
14: polling node['nd-octopus']['polling']
15: configure_firewall node['nd-octopus']['configure_firewall']
16: end
Compiled Resource:
------------------
# Declared in C:/chef/cache/cookbooks/nd-octopus/recipes/tentacle.rb:8:in `from_file'
octopus_deploy_tentacle("Tentacle") do
action [:register]
retries 0
retry_delay 2
default_guard_interpreter :default
declared_type :octopus_deploy_tentacle
cookbook_name "nd-octopus"
recipe_name "tentacle"
version "3.3.27"
checksum "c432c3ca9715d5a40ff27c11b411ca26128883ff0025377a15cb3e44096b0729"
trusted_cert "xxxxxxxxxxxxx"
server "https://octopus.example.com"
api_key "API-xxxxxxxxxxxx"
roles ["web-default"]
environment "dev"
polling true
configure_firewall true
instance "Tentacle"
config_path "C:\\Octopus\\Tentacle.config"
end
Platform:
---------
x64-mingw32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment