Failed: PluginFailed: Connection timed out (Connection timed out)

33 views
Skip to first unread message

aristos....@gmail.com

unread,
May 7, 2025, 12:35:18 PMMay 7
to rundeck-discuss
I am trying to run the command "hostname" on a remote windows11 node, but I keep getting the error "Failed: PluginFailed: Connection timed out (Connection timed out)"

On the remote node I've successfully run the following commands

  • Get-NetConnectionProfile | Set-NetConnectionProfile -NetworkCategory Private
  • winrm set winrm/config/service/auth '@{Basic="true"}'
  • winrm set winrm/config/client/auth '@{Basic="true"}'
  • winrm set winrm/config/service '@{AllowUnencrypted="true"}'
  • netsh advfirewall firewall add rule name="WinRM 5985" dir=in action=allow protocol=TCP localport=5985
  • Set-ExecutionPolicy RemoteSigned -Force
  • netsh advfirewall firewall add rule name="Allow ICMPv4-In" protocol=icmpv4:8,any dir=in action=allow
  • winrm quickconfig -quiet
In key storage I have added "keys/monitor3"

In nodes.xml, the remote node is configured like this:

<?xml version="1.0" encoding="UTF-8"?>

<project>
  <node name="monitor3" tags="" hostname="192.168.1.37" osFamily="Windows" username="Administrator" winrm-password-storage-path="keys/monitor3" winrm-port="5985" winrm-transport="http" winrm-authtype="basic" winrm-nossl="true" winrm-shell="powershell" winrm-node-executor="python3"/>
  <node name="rundeck" description="Rundeck server node" tags="" hostname="rundeck" osArch="amd64" osFamily="unix" osName="Linux" osVersion="6.1.0-28-amd64" username="rundeck"/>
</project>

I'm I forgetting something?

rac...@rundeck.com

unread,
May 7, 2025, 1:36:58 PMMay 7
to rundeck-discuss

Hi,

Can you test the connectivity against the remote node using this script? (From the Rundeck instance server).

import winrm session = winrm.Session('192.168.1.37', auth=.('Administrator','windows_password')) result = session.run_ps("hostname") print(result.std_out)

Also, try using this simplest node definition.

Regards.

aristos....@gmail.com

unread,
May 7, 2025, 9:54:45 PMMay 7
to rundeck-discuss
forgot to mention that my rundeck instance is running in a docker container. This is th output of the job

/tmp/610-614-rundeck-dispatch-script.tmp.sh: line 1: import: command not found
/tmp/610-614-rundeck-dispatch-script.tmp.sh: line 2: syntax error near unexpected token `('
/tmp/610-614-rundeck-dispatch-script.tmp.sh: line 2: `session = winrm.Session('192.168.1.37', auth=.('Administrator','password!'))'
Result: 2
Failed: NonZeroResultCode: Result code was 2
Execution failed: 614 in project hostnames: [Workflow result: , step failures: {1=Dispatch failed on 1 nodes: [rundeck: NonZeroResultCode: Result code was 2 + {dataContext=MultiDataContextImpl(map={ContextView(step:1, node:rundeck)=BaseDataContext{{exec={exitCode=2}}}, ContextView(node:rundeck)=BaseDataContext{{exec={exitCode=2}}}}, base=null)} ]}, Node failures: {rundeck=[NonZeroResultCode: Result code was 2 + {dataContext=MultiDataContextImpl(map={ContextView(step:1, node:rundeck)=BaseDataContext{{exec={exitCode=2}}}, ContextView(node:rundeck)=BaseDataContext{{exec={exitCode=2}}}}, base=null)} ]}, status: failed]

aristos....@gmail.com

unread,
May 8, 2025, 5:15:45 AMMay 8
to rundeck-discuss
I suspect that the Docker version of Rundeck doesn't even include python. So how can the py-winrm plugin work?

rac...@rundeck.com

unread,
May 8, 2025, 9:39:34 AMMay 8
to rundeck-discuss

Python isn’t installed by default in the Docker image. You need to extend the image to install it using RUN sudo apt-get install. Take a look at this example.

Regards.

Message has been deleted

aristos....@gmail.com

unread,
May 9, 2025, 5:08:51 AMMay 9
to rundeck-discuss
Is there a way to automate the process of installing any prerequisites (eg, python) during the container installation?

Maybe it's just me, but it doesn't make sense to have the py-winrm plugin available in the docker image, without having python included in the container.
Reply all
Reply to author
Forward
0 new messages