Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: pexpect not installed, try: pip install pexpect #79

Open
chipmasonz opened this issue Jul 28, 2021 · 10 comments
Open

Error: pexpect not installed, try: pip install pexpect #79

chipmasonz opened this issue Jul 28, 2021 · 10 comments

Comments

@chipmasonz
Copy link

Rundeck 3.3.11 with py-winrm on Windows Server 2016 Server. Getting an error connecting to remote host running a Command job.

Error: pexpect not installed, try: pip install pexpect

Python3.9.6
verified pexpect 4.8.0 installed using pip list

I've tried;
uninstalled/reinstalled pexpect and Python and restarted Windows after Python reinstall and Rundeck Service after each change.

Any help would be greatly appreciated.
Thank you

@juniorosilva
Copy link

Same problem here, did you manage to solve?

@juniorosilva
Copy link

Rundeck 3.3.11 with py-winrm on Windows Server 2016 Server. Getting an error connecting to remote host running a Command job.

Error: pexpect not installed, try: pip install pexpect

Python3.9.6 verified pexpect 4.8.0 installed using pip list

I've tried; uninstalled/reinstalled pexpect and Python and restarted Windows after Python reinstall and Rundeck Service after each change.

Any help would be greatly appreciated. Thank you

Same problem here, did you manage to solve?

@Abs0luteMatt
Copy link

Same issue here. Cant get rundeck on Windows to recognise pexpect. Other libs are fine.

@juniorosilva
Copy link

Same issue here. Cant get rundeck on Windows to recognise pexpect. Other libs are fine.

I solved changing the authentication method to NTLM

@mezamoe
Copy link

mezamoe commented Jan 5, 2023

same here. rundeck 4.8, python 3.9, latest pywinrm and libs. Windows 2019. No other python setups present on server. Also pip confirms (during the install) that modules are installed in the current and only python setup. I do confirm that ntlm works, but definitely I'd rather stick to kerberos.

@Abs0luteMatt
Copy link

I did the same as juniorosilva (thanks for the tip @juniorosilva!), and switched to NTLM which worked.

It helped solve my immediate problem but probably not helpful if you need Kerberos.

@mezamoe
Copy link

mezamoe commented Jan 5, 2023

as I suspected upgrading to Python 3.11 didn't help. I see in the Content folder on Github the winrm-check.py which contains a Try statement that matches exactly the behaviour we are experiencing. But I can't find it in the plugin installed.

try:
    import pexpect

    if hasattr(pexpect, 'spawn'):
        argspec = getargspec(pexpect.spawn.__init__)
        if 'echo' in argspec.args:
            HAS_PEXPECT = True
except ImportError as e:
    HAS_PEXPECT = False

It seems the argspec is not being initiated with the expected value. This stopper is preventing kerberos to work on any Windows systems with this pywinrm version. It would great to just know where that statement is located in the plugin.

@mezamoe
Copy link

mezamoe commented Jan 5, 2023

found where the Try statement is in pywinrm plugin and tried to bypass it with a simple:

if(pexpect.__version__):
        HAS_PEXPECT = True

but it didn't help as the whole program uses pexpect.spawn everywhere. pexpect.spawn is not available in windows but only in *nix systems. source: https://pexpect.readthedocs.io/en/stable/install.html

Any chance to have this fixed? Rundeck on Windows does not allow Kerberos authentication at present.

@mezamoe
Copy link

mezamoe commented Aug 7, 2023

does anybody know if this has been fixed in later Windows releases ?

@mezamoe
Copy link

mezamoe commented Oct 7, 2023

I've just upgraded to the rundeck version 4.17 and now it works. I don't know when and in which earlier version this was fixed, but it was. Confirmed also by a wireshark capture.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants