docs/dev/how_to/debugging_effortless.md
There are some occasions in which Chef Infra Client runs in Effortless may fail. This document will help you debug those failures.
In a Powershell console, run as administrator:
Set-ExecutionPolicy Bypass -Scope Process -Force
Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/habitat-sh/habitat/master/components/hab/install.ps1'))
(You may need to restart your shell after installing hab)
tar -xvf customer-export.tar.gz
Copy-Item -Path customer-export\hab -Destination C:\hab -Recurse
or start path\to\customer-export and start C:\ and drag/copy hab directory from the customer export to C:\
In a Powershell console, run as administrator:
hab sup run
In a separate Powershell console, run as administrator:
# Load the service in question c:\hab\pkgs\<origin>\<service>
hab svc load <origin>/<service>
This will output to c:\hab\svc\<service>\...
The service will start up based on an interval of seconds defined in c:\hab\pkgs\<origin>\<service>\...\default.toml:
interval = 14400
splay = 7200
splay_first_run = 1000
run_lock_timeout = 600
log_level = "info"
env_path_prefix = ";C:/WINDOWS;C:/WINDOWS/system32/;C:/WINDOWS/system32/WindowsPowerShell/v1.0;"
[chef_license]
acceptance = "accept-no-persist"
You can see the loop that runs this in c:\hab\pkgs\<origin>\<service>\...\hooks\run to see how the intervals are used.
The hab sup run window will display any output from the service run. If an error occurs that results in a stacktrace,
the stacktrace will be output to the sup window, such as C:/hab/svc/<service>/data/cache/cache/chef-stacktrace.out
If you want to make changes to the service, hab svc unload <origin>/<service> and make changes to the files in the c:\hab\pkgs\<origin>\<service> directory,
Then, hab svc load <origin>/<service> to start the service again.