You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 12, 2024. It is now read-only.
I've run into an issue where running multiple winrm cmd commands will eventually trigger a TypeError in winrm-1.0.4/lib/winrm/http/transport.rb:141. Specifically, the third invocation will trigger it. The sample task:
set:winrm_krb5_realm,'OURS.LOCAL'namespace:windows_workerdodesc'Test task to expose fault'task:testbug,:roles=>:windows_workerdocommand=[]command << 'echo This is the first run'command << 'echo This is the second run'command << 'echo This is the third run'command.eachdo |cmd|
winrmcmddo |channel,stream,data|
puts"#{channel} - #{stream} - #{data}"end#winrmend#task
When executed against a single server, it'll error out on the third command. When run against two, it'll error out on the second line on the second server. The error:
winrm-1.0.4/lib/winrm/http/transport.rb:141:in `+': can't convert nil into String (TypeError)
from /winrm-1.0.4/lib/winrm/http/transport.rb:141:in `winrm_encrypt'
from /winrm-1.0.4/lib/winrm/http/transport.rb:80:in `send_request'
from /winrm-1.0.4/lib/winrm/winrm_service.rb:333:in `send_message'
from /winrm-1.0.4/lib/winrm/winrm_service.rb:180:in `cleanup_command'
from /winrm-1.0.4/lib/winrm/winrm_service.rb:224:in `run_cmd'
from /capistrano_winrm-1.0.0/lib/winrm_connection.rb:27:in `exec'
from /capistrano-2.8.0/lib/capistrano/command.rb:222:in `block (4 levels) in open_channels'
from /capistrano-2.8.0/lib/capistrano/command.rb:259:in `request_pty_if_necessary'
from /capistrano-2.8.0/lib/capistrano/command.rb:206:in `block (3 levels) in open_channels'
from /capistrano_winrm-1.0.0/lib/winrm_connection.rb:23:in `open_channel'
from /capistrano-2.8.0/lib/capistrano/command.rb:200:in `block (2 levels) in open_channels'
from /capistrano-2.8.0/lib/capistrano/command.rb:199:in `map'
from /capistrano-2.8.0/lib/capistrano/command.rb:199:in `block in open_channels'
from /capistrano-2.8.0/lib/capistrano/command.rb:197:in `map'
from /capistrano-2.8.0/lib/capistrano/command.rb:197:in `open_channels'
from /capistrano-2.8.0/lib/capistrano/command.rb:156:in `initialize'
from /capistrano-2.8.0/lib/capistrano/command.rb:134:in `new'
from /capistrano-2.8.0/lib/capistrano/command.rb:134:in `process'
from /capistrano-2.8.0/lib/capistrano/configuration/actions/invocation.rb:178:in `block in run_tree'
from /capistrano-2.8.0/lib/capistrano/configuration/connections.rb:198:in `block in execute_on_servers'
from /capistrano-2.8.0/lib/capistrano/configuration/connections.rb:186:in `each'
from /capistrano-2.8.0/lib/capistrano/configuration/connections.rb:186:in `each_slice'
from /capistrano-2.8.0/lib/capistrano/configuration/connections.rb:186:in `execute_on_servers'
from /capistrano-2.8.0/lib/capistrano/configuration/actions/invocation.rb:176:in `run_tree'
from /capistrano_winrm-1.0.0/lib/capistrano_winrm.rb:11:in `winrm_run'
from /capistrano-2.8.0/lib/capistrano/configuration/namespaces.rb:186:in `method_missing'
from /testtask.rb:199:in `block (3 levels) in load'
from /testtask.rb:198:in `each'
from /testtask.rb:198:in `block (2 levels) in load'
from /capistrano-2.8.0/lib/capistrano/configuration/execution.rb:139:in `instance_eval'
from /capistrano-2.8.0/lib/capistrano/configuration/execution.rb:139:in `invoke_task_directly'
from /capistrano-2.8.0/lib/capistrano/configuration/callbacks.rb:27:in `invoke_task_directly_with_callbacks'
from /capistrano-2.8.0/lib/capistrano/configuration/execution.rb:89:in `execute_task'
from /capistrano-2.8.0/lib/capistrano/configuration/execution.rb:101:in `find_and_execute_task'
from /capistrano-2.8.0/lib/capistrano/cli/execute.rb:46:in `block in execute_requested_actions'
from /capistrano-2.8.0/lib/capistrano/cli/execute.rb:45:in `each'
from /capistrano-2.8.0/lib/capistrano/cli/execute.rb:45:in `execute_requested_actions'
from /capistrano-2.8.0/lib/capistrano/cli/help.rb:19:in `execute_requested_actions_with_help'
from /capistrano-2.8.0/lib/capistrano/cli/execute.rb:34:in `execute!'
from /capistrano-2.8.0/lib/capistrano/cli/execute.rb:14:in `execute'
from /capistrano-2.8.0/bin/cap:4:in `<top (required)>'
It seems like something in capistrano_winrm is getting something confused, since I can create a file using the winrm gem directly and can do the same commands with no errors.
The text was updated successfully, but these errors were encountered:
I've run into an issue where running multiple
winrm cmd
commands will eventually trigger a TypeError in winrm-1.0.4/lib/winrm/http/transport.rb:141. Specifically, the third invocation will trigger it. The sample task:When executed against a single server, it'll error out on the third command. When run against two, it'll error out on the second line on the second server. The error:
It seems like something in capistrano_winrm is getting something confused, since I can create a file using the winrm gem directly and can do the same commands with no errors.
The text was updated successfully, but these errors were encountered: