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

ValueError for remote_name when using Windows AD account with the form 'DOMAIN\username' #344

atoom opened this issue Aug 16, 2018 · 2 comments


Copy link

@atoom atoom commented Aug 16, 2018


First of all - thanks for a great project!

We are running a mixed environment with both Linux and Windows and the user management is centralized in the Windows AD. In the production environment we have to include the domain together with the username for the authentication to work properly, for example:

ssh 'DOMAIN\user'@host


ssh user@DOMAIN@host

However this results in the following exception when running Ansible together with Mitogen:

The full traceback is:
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/ansible/executor/", line 138, in run
    res = self._execute()
  File "/usr/lib/python2.7/site-packages/ansible/executor/", line 576, in _execute
    result =
  File "/usr/lib/python2.7/site-packages/ansible_mitogen/", line 115, in run
    return super(ActionModuleMixin, self).run(tmp, task_vars)
  File "/usr/lib/python2.7/site-packages/ansible/plugins/action/", line 27, in run
    result =
  File "/usr/lib/python2.7/site-packages/ansible_mitogen/", line 115, in run
    return super(ActionModuleMixin, self).run(tmp, task_vars)
  File "/usr/lib/python2.7/site-packages/ansible/plugins/action/", line 24, in run
    results = merge_hash(results, self._execute_module(task_vars=task_vars, wrap_async=wrap_async))
  File "/usr/lib/python2.7/site-packages/ansible_mitogen/", line 334, in _execute_module
  File "/usr/lib/python2.7/site-packages/ansible_mitogen/", line 527, in _connect
  File "/usr/lib/python2.7/site-packages/mitogen/", line 1126, in call_service
    return recv.get().unpickle()
  File "/usr/lib/python2.7/site-packages/mitogen/", line 487, in unpickle
    raise obj
CallError: exceptions.ValueError: remote_name= cannot contain slashes
  File "<stdin>", line 2049, in _dispatch_calls
  File "<stdin>", line 2041, in _dispatch_one
  File "master:/usr/lib/python2.7/site-packages/ansible_mitogen/", line 233, in init_child
    _fork_parent = econtext.router.fork()
  File "master:/usr/lib/python2.7/site-packages/mitogen/", line 1280, in fork
    return self.connect(u'fork', **kwargs)
  File "master:/usr/lib/python2.7/site-packages/mitogen/", line 1256, in connect
    return self._connect(klass, name=name, **kwargs)
  File "master:/usr/lib/python2.7/site-packages/mitogen/", line 1235, in _connect
    stream = klass(self, context_id, **kwargs)
  File "master:/usr/lib/python2.7/site-packages/mitogen/", line 750, in __init__
    super(Stream, self).__init__(*args, **kwargs)
  File "<stdin>", line 951, in __init__
  File "master:/usr/lib/python2.7/site-packages/mitogen/", line 107, in construct
  File "master:/usr/lib/python2.7/site-packages/mitogen/", line 771, in construct
    raise ValueError('remote_name= cannot contain slashes')

Running Ansible without Mitogen works as expected.

Ansible version: 2.6.1
Mitogen version: 0.2.2
Host OS: CentOS 7.5
Host Python: 2.7.5
Target OS: RHEL 7.5
Target Pyton: 2.7.5

Copy link

@dw dw commented Aug 17, 2018

Hi there,

A fix for this is on dmw branch and will reach master hopefully over the coming weekend. For now, please feel free to install from Thanks for reporting this!

Copy link

@atoom atoom commented Aug 17, 2018


I have tested the code in the dmw branch and can confirm that it is working - thanks for the quick fix!

@atoom atoom closed this Aug 17, 2018
dw added a commit that referenced this issue Aug 18, 2018
getpass.getuser() output may contain slashes, which must be avoided as
they break virtualenv when present in argv[0].

Closes #344.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants