# ansible failed with msg='MODULE FAILURE'  rc=249

**URL:** <https://forum.ansible.com/t/ansible-failed-with-msg-module-failure-rc-249/33768>\
**Category:** Ansible Project\
**Created:** [September 9, 2020, 1:44am UTC](https://forum.ansible.com/t/ansible-failed-with-msg-module-failure-rc-249/33768 "2020-09-09T01:44:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![user119](https://avatars.discourse-cdn.com/v4/letter/u/da6949/32.png) [@user119](https://forum.ansible.com/u/user119)\
**Post date:** [September 9, 2020, 1:44am UTC](https://forum.ansible.com/t/ansible-failed-with-msg-module-failure-rc-249/33768/1 "2020-09-09T01:44:34Z")

</div>

I can’t execute any module for a special server(which i can well done in other server).  
Can anyone help solve this problem? Thank you very much!!

LInux Envs:

Linux {local\_host} 3.10.0-327.el7.x86\_64 #1 SMP Thu Nov 19 22:10:57 UTC 2015 x86\_64 x86\_64 x86\_64 GNU/Linux  
Linux {remote\_host} 3.10.0-693.21.1.el7.x86\_64 #1 SMP Wed Mar 7 19:03:37 UTC 2018 x86\_64 x86\_64 x86\_64 GNU/Linux

All Python Version: 2.7.5  
Ansible Version: 2.3.1.0

Full command and msg as follow:  
ansible -i {hostname}, -vvv -m shell -a ‘python --version’ all

META: ran handlers  
Using module file /usr/lib/python2.7/site-packages/ansible/modules/commands/command.py  
\<${hostname}\> ESTABLISH SSH CONNECTION FOR USER: root  
\<${hostname}\> SSH: EXEC ssh -o ControlMaster=auto -o ControlPersist=1800s -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=10 -o ControlPath=/home/zhengzhuobin/.ansible/cp/a06eb3b99c ${hostname} ‘/bin/sh -c ‘"’"’/usr/bin/python && sleep 0’“'”‘’  
\<${hostname}\> (249, ‘’, ‘’)  
${hostname} | FAILED! =\> {  
“changed”: false,  
“failed”: true,  
“module\_stderr”: “”,  
“module\_stdout”: “”,  
“msg”: “MODULE FAILURE”,  
“rc”: 249  
}

And I can execute ssh command to this server.

ssh ${hostname} python --version  
Python 2.7.5
