How to debug a new chain?
See original GitHub issueHello,
I am trying to create a new chain -
var w10e_dc_vs17c_sql17d = PackerTemplates_CreateWindows("w10e-dc-vs17c-sql17d", parents: w10e_dc_vs17c);
var w10e_dc_vs17p_sql17d = PackerTemplates_CreateWindows("w10e-dc-vs17p-sql17d", parents: w10e_dc_vs17p);
When I run the build, I am getting an error in the sql install step. I am new to Chef. Can yo give me some pointers on how to do about capturing the logs (steps ends with VM deleted) and debugging this issue please? Thanks!
hyperv-vmcx: Recipe: gusztavvargadr_mssql::2017_developer
hyperv-vmcx: * gusztavvargadr_mssql_2017[developer] action install
hyperv-vmcx: * directory[c:\tmp\packer\chef-solo\local-mode-cache\cache/gusztavvargadr_mssql/2017_developer] action create
hyperv-vmcx: - create new directory c:\tmp\packer\chef-solo\local-mode-cache\cache/gusztavvargadr_mssql/2017_developer
hyperv-vmcx: * cookbook_file[c:\tmp\packer\chef-solo\local-mode-cache\cache/gusztavvargadr_mssql/2017_developer/configuration.ini] action create
hyperv-vmcx: - create new file c:\tmp\packer\chef-solo\local-mode-cache\cache/gusztavvargadr_mssql/2017_developer/configuration.ini
hyperv-vmcx: - update content in file c:\tmp\packer\chef-solo\local-mode-cache\cache/gusztavvargadr_mssql/2017_developer/configuration.ini from none to 00226d
hyperv-vmcx: (new content is binary, diff output suppressed)
hyperv-vmcx: * remote_file[c:\tmp\packer\chef-solo\local-mode-cache\cache/gusztavvargadr_mssql/2017_developer/installer.iso] action create
hyperv-vmcx: - create new file c:\tmp\packer\chef-solo\local-mode-cache\cache/gusztavvargadr_mssql/2017_developer/installer.iso
hyperv-vmcx: - update content in file c:\tmp\packer\chef-solo\local-mode-cache\cache/gusztavvargadr_mssql/2017_developer/installer.iso from none to 315d88
hyperv-vmcx: (file sizes exceed 10000000 bytes, diff output suppressed)
hyperv-vmcx: * gusztavvargadr_windows_iso[c:\tmp\packer\chef-solo\local-mode-cache\cache/gusztavvargadr_mssql/2017_developer/installer.iso] action mount
hyperv-vmcx: * powershell_script[Mount 'c:\tmp\packer\chef-solo\local-mode-cache\cache/gusztavvargadr_mssql/2017_developer/installer.iso' at 'I'] action run
hyperv-vmcx: - execute "C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe" -NoLogo -NonInteractive -NoProfile -ExecutionPolicy Bypass -InputFormat None -File "C:/Users/Administrator/AppData/Local/Temp/chef-script20190215-2128-q51boi.ps1"
hyperv-vmcx:
hyperv-vmcx: * gusztavvargadr_windows_powershell_script_elevated[Install SQL Server 2017 developer] action run
hyperv-vmcx: * directory[c:\tmp\packer\chef-solo\local-mode-cache\cache\gusztavvargadr_windows] action create
hyperv-vmcx: - create new directory c:\tmp\packer\chef-solo\local-mode-cache\cache\gusztavvargadr_windows
hyperv-vmcx: * file[c:\tmp\packer\chef-solo\local-mode-cache\cache\gusztavvargadr_windows\powershell-script-elevated-1550229717.ps1] action create
hyperv-vmcx: - create new file c:\tmp\packer\chef-solo\local-mode-cache\cache\gusztavvargadr_windows\powershell-script-elevated-1550229717.ps1
hyperv-vmcx: - update content in file c:\tmp\packer\chef-solo\local-mode-cache\cache\gusztavvargadr_windows\powershell-script-elevated-1550229717.ps1 from none to 379492
hyperv-vmcx: --- c:\tmp\packer\chef-solo\local-mode-cache\cache\gusztavvargadr_windows\powershell-script-elevated-1550229717.ps1 2019-02-15 11:21:57.629320900 +0000
hyperv-vmcx: +++ c:\tmp\packer\chef-solo\local-mode-cache\cache\gusztavvargadr_windows/chef-powershell-script-elevated-155022971720190215-2128-1y3944a.ps1 2019-02-15 11:21:57.629320900 +0000
hyperv-vmcx: @@ -1 +1,6 @@
hyperv-vmcx: + # Install SQL Server 2017 developer
hyperv-vmcx: + $(
hyperv-vmcx: + Start-Process "I:\\SETUP.EXE" "/CONFIGURATIONFILE=c:\tmp\packer\chef-solo\local-mode-cache\cache\gusztavvargadr_mssql\2017_developer\configuration.ini /IACCEPTSQLSERVERLICENSETERMS" -Wait
hyperv-vmcx: +
hyperv-vmcx: + ) *>&1 > c:\tmp\packer\chef-solo\local-mode-cache\cache\gusztavvargadr_windows\powershell-script-elevated-1550229717.log
hyperv-vmcx: * windows_task[powershell-script-elevated-1550229717] action create
hyperv-vmcx: - windows_task[powershell-script-elevated-1550229717] task created
hyperv-vmcx: * windows_task[powershell-script-elevated-1550229717] action run
hyperv-vmcx: - run scheduled task windows_task[powershell-script-elevated-1550229717]
hyperv-vmcx: * powershell_script[Wait for task 'powershell-script-elevated-1550229717'] action run
==> hyperv-vmcx: Disconnecting from vmconnect...
==> hyperv-vmcx: Unregistering and deleting virtual machine...
==> hyperv-vmcx: Deleting output directory...
==> hyperv-vmcx: Deleting build directory...
Build 'hyperv-vmcx' errored: Error executing Chef: Non-zero exit status: 2300218
Issue Analytics
- State:
- Created 5 years ago
- Comments:14 (7 by maintainers)
Top Results From Across the Web
Debugging chains | 🦜️ Langchain
It can be hard to debug a Chain object solely from its output as most Chain objects involve a fair amount of input...
Read more >Debugging a chain | Ignite Cli Docs
Ignite chain debug command can help you find issues during development. It uses Delve debugger which enables you to interact with your blockchain...
Read more >How to debug certificate chains with OpenSSL?
Be sure to include all the intermediate certificates and see that they are up to date. If test.crt is in fact a file...
Read more >Debugging Hyperledger Fabric Chaincode_VS Code Extension
In addition, installing a new version of Chaincode in a Fabric network is not as simple as uploading the new code.
Read more >How to effectively debug method chained function ...
The best way is insert step: .tap(console.log). Other ways: create mixin function var debug = function (val) { console.log(val); return val; } ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@gusztavvargadr That worked. The sql patch was again out of date so I updated it (samples/cookboks/mssql/attributes/2017_developer.rb - ‘patch_file_url’ => ‘https://download.microsoft.com/download/C/4/F/C4F908C9-98ED-4E5F-88D5-7D6A5004AEBD/SQLServer2017-KB4484710-x64.exe’) but after that the VM was created successfully.
Thanks for your help with this.
@gursharan001 according to the error message, can you try setting the value of your
HOME
env var before running the build? I usually set it up to matchUSERPROFILE
on Windows.