{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/22371","repository_url":"https://api.github.com/repos/ansible/ansible","labels_url":"https://api.github.com/repos/ansible/ansible/issues/22371/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/22371/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/22371/events","html_url":"https://github.com/ansible/ansible/issues/22371","id":212496715,"number":22371,"title":"stderr: Shared connection to [host] closed.","user":{"login":"Harosgr","id":9092383,"avatar_url":"https://avatars0.githubusercontent.com/u/9092383?v=4","gravatar_id":"","url":"https://api.github.com/users/Harosgr","html_url":"https://github.com/Harosgr","followers_url":"https://api.github.com/users/Harosgr/followers","following_url":"https://api.github.com/users/Harosgr/following{/other_user}","gists_url":"https://api.github.com/users/Harosgr/gists{/gist_id}","starred_url":"https://api.github.com/users/Harosgr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Harosgr/subscriptions","organizations_url":"https://api.github.com/users/Harosgr/orgs","repos_url":"https://api.github.com/users/Harosgr/repos","events_url":"https://api.github.com/users/Harosgr/events{/privacy}","received_events_url":"https://api.github.com/users/Harosgr/received_events","type":"User","site_admin":false},"labels":[{"id":437720699,"url":"https://api.github.com/repos/ansible/ansible/labels/affects_2.2","name":"affects_2.2","color":"5319e7","default":false},{"id":48276055,"url":"https://api.github.com/repos/ansible/ansible/labels/bug_report","name":"bug_report","color":"fbca04","default":false},{"id":496359346,"url":"https://api.github.com/repos/ansible/ansible/labels/module","name":"module","color":"1d76db","default":false},{"id":636352796,"url":"https://api.github.com/repos/ansible/ansible/labels/support:core","name":"support:core","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":13,"created_at":"2017-03-07T17:05:52Z","updated_at":"2017-08-02T13:44:19Z","closed_at":null,"body":"##### ISSUE TYPE\r\n - Bug Report\r\n\r\n##### COMPONENT NAME\r\nscript module\r\n\r\n##### ANSIBLE VERSION\r\n```\r\n2.2.1.0\r\n```\r\n\r\n##### CONFIGURATION\r\ndefault\r\n\r\n##### OS / ENVIRONMENT\r\nRHEL 7\r\n\r\n##### SUMMARY\r\nWhenever I use the script module to run a python script (even with a simple print in it) I get a stderr as seen bellow. I have tried setting \"-o ControlMaster=no\" in the ssh_args but I get the same result.\r\n\r\n```\r\nstderr: Shared connection to xxxxxx closed.\r\n```\r\n\r\n##### STEPS TO REPRODUCE\r\n```yaml\r\n---\r\n- name: doing something\r\n  script: test.py\r\n```\r\n\r\n(python script)\r\n```\r\n#!/usr/bin/env python\r\n\r\nprint(\"test\")\r\n```\r\n\r\n##### ACTUAL RESULTS\r\nHere is the verbose output of the error\r\n```\r\nstderr: OpenSSH_6.6.1, OpenSSL 1.0.1e-fips 11 Feb 2013\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 56: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 17315\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\nShared connection to xxxxxxxxx closed.\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/ansible/ansible/issues/comments/319676168","html_url":"https://github.com/ansible/ansible/issues/22371#issuecomment-319676168","issue_url":"https://api.github.com/repos/ansible/ansible/issues/22371","id":319676168,"user":{"login":"hogarthj","id":3037132,"avatar_url":"https://avatars0.githubusercontent.com/u/3037132?v=4","gravatar_id":"","url":"https://api.github.com/users/hogarthj","html_url":"https://github.com/hogarthj","followers_url":"https://api.github.com/users/hogarthj/followers","following_url":"https://api.github.com/users/hogarthj/following{/other_user}","gists_url":"https://api.github.com/users/hogarthj/gists{/gist_id}","starred_url":"https://api.github.com/users/hogarthj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hogarthj/subscriptions","organizations_url":"https://api.github.com/users/hogarthj/orgs","repos_url":"https://api.github.com/users/hogarthj/repos","events_url":"https://api.github.com/users/hogarthj/events{/privacy}","received_events_url":"https://api.github.com/users/hogarthj/received_events","type":"User","site_admin":false},"created_at":"2017-08-02T13:44:19Z","updated_at":"2017-08-02T13:44:19Z","body":"As a further small update ... switching from ssh to paramiko for the connection type also behaves the same:\r\n```\r\nUsing module file /usr/lib/python2.7/site-packages/ansible/modules/network/basics/uri.py\r\n<192.168.124.209> EXEC /bin/sh -c 'echo ~ && sleep 0'\r\n<192.168.124.209> EXEC /bin/sh -c '( umask 77 && mkdir -p \"` echo /root/.ansible/tmp/ansible-tmp-1501681327.99-231400714792810 `\" && echo ansible-tmp-1501681327.99-231400714792810=\"` echo /root/.ansible/tmp/ansible-tmp-1501681327.99-231400714792810 `\" ) && sleep 0'\r\n<192.168.124.209> PUT /tmp/tmp5p318_ TO /root/.ansible/tmp/ansible-tmp-1501681327.99-231400714792810/uri.py\r\n<192.168.124.209> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1501681327.99-231400714792810/ /root/.ansible/tmp/ansible-tmp-1501681327.99-231400714792810/uri.py && sleep 0'\r\n<192.168.124.209> EXEC /bin/sh -c '/usr/bin/python /root/.ansible/tmp/ansible-tmp-1501681327.99-231400714792810/uri.py; rm -rf \"/root/.ansible/tmp/ansible-tmp-1501681327.99-231400714792810/\" > /dev/null 2>&1 && sleep 0'\r\nFAILED - RETRYING: wait 60 seconds for app to respond (16 retries left).Result was: {\r\n    \"attempts\": 5, \r\n    \"failed\": true, \r\n    \"module_stderr\": \"\", \r\n    \"module_stdout\": \"Traceback (most recent call last):\\r\\n  File \\\"/tmp/ansible_EMq_4Y/ansible_module_uri.py\\\", line 498, in <module>\\r\\n    main()\\r\\n  File \\\"/tmp/ansible_EMq_4Y/ansible_module_uri.py\\\", line 439, in main\\r\\n    dict_headers, socket_timeout)\\r\\n  File \\\"/tmp/ansible_EMq_4Y/ansible_module_uri.py\\\", line 352, in uri\\r\\n    method=method, timeout=socket_timeout)\\r\\n  File \\\"/tmp/ansible_EMq_4Y/ansible_modlib.zip/ansible/module_utils/urls.py\\\", line 1032, in fetch_url\\r\\n  File \\\"/usr/lib64/python2.6/urllib.py\\\", line 999, in info\\r\\n    return self.headers\\r\\nAttributeError: 'HTTPError' object has no attribute 'headers'\\r\\n\", \r\n    \"msg\": \"MODULE FAILURE\", \r\n    \"rc\": 0, \r\n    \"retries\": 21\r\n}\r\n```"}}
{"actor":{"display_login":"hogarthj"}}