Skip to content

ModuleNotFoundError with 'ansible_mitogen.target' #586

Description

@href

I've encountered a bit of a problem with Suitable and Mitogen that I don't quite know how to solve. When trying to connect from a Python3.6/3.7 host to a Python3.6 Ubuntu 18.04 vanilla installation I get the following error:

Traceback (most recent call last):
File /Users/denis/.virtualenvs/operations/lib/python3.7/site-packages/ansible/executor/task_executor.py
line 140, in run
    res = self._execute()
File /Users/denis/.virtualenvs/operations/lib/python3.7/site-packages/ansible/executor/task_executor.py
line 612, in _execute
    result = self._handler.run(task_vars=variables)
File /Users/denis/.virtualenvs/operations/lib/python3.7/site-packages/ansible_mitogen/mixins.py
line 116, in run
    return super(ActionModuleMixin, self).run(tmp, task_vars)
File /Users/denis/.virtualenvs/operations/lib/python3.7/site-packages/ansible/plugins/action/command.py
line 24, in run
'    results = merge_hash(results, '
'self._execute_module(task_vars=task_vars, '
wrap_async=wrap_async))
File /Users/denis/.virtualenvs/operations/lib/python3.7/site-packages/ansible_mitogen/mixins.py
line 354, in _execute_module
    self._temp_file_gibberish(module_args, wrap_async)
File /Users/denis/.virtualenvs/operations/lib/python3.7/site-packages/ansible_mitogen/mixins.py
line 333, in _temp_file_gibberish
    self._connection.get_good_temp_dir()
File /Users/denis/.virtualenvs/operations/lib/python3.7/site-packages/ansible_mitogen/connection.py
line 702, in get_good_temp_dir
    self._connect()
File /Users/denis/.virtualenvs/operations/lib/python3.7/site-packages/ansible_mitogen/connection.py
line 721, in _connect
    self._connect_stack(stack)
File /Users/denis/.virtualenvs/operations/lib/python3.7/site-packages/ansible_mitogen/connection.py
line 675, in _connect_stack
    stack=mitogen.utils.cast(list(stack)),
File /Users/denis/.virtualenvs/operations/lib/python3.7/site-packages/mitogen/core.py
line 1859, in call_service
    return recv.get().unpickle()
File /Users/denis/.virtualenvs/operations/lib/python3.7/site-packages/mitogen/core.py
line 835, in unpickle
    raise obj
mitogen.core.CallError: builtins.ModuleNotFoundError: The
Mitogen master process was unable to serve
"'ansible_mitogen.target'. It may be a native Python extension, "
or it may be missing entirely. Check the importer debug logs on
the master for more information.
  File "<stdin>", line 3099, in _dispatch_one
  File "<stdin>", line 3086, in _parse_request
  File "<stdin>", line 596, in import_module
  File "<stdin>", line 1330, in load_module

They key is this:

mitogen.core.CallError: builtins.ModuleNotFoundError: The
Mitogen master process was unable to serve
"'ansible_mitogen.target'. It may be a native Python extension, "
or it may be missing entirely. Check the importer debug logs on
the master for more information.

I know this might be related to Suitable's on hackery ending up in something that is like Ansible, but not quite like Ansible. So I'm not sure this is a Mitogen issue. But I'd be happy to get any pointers.

Especially, how can I check the importer debug logs?

I'm running with MITOGEN_LOG_LEVEL=DEBUG and mitogen.log_to_file, but I do not have a proper test-setup yet that I could show off. I'm happy to provide one, but at this point I'm just as happy for any kind of information what might be going on here.

What could be the cause of this error?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions