Strange AWS Problems

Hi,

I had playbook that already worked with Rackspace cloud and recently we decided to migrate to AWS.

After changing rax module operations with ec2 counterparts, everything looked good at that moment. I am using the official Debian 7.6 image.

Here’s the weird thing, I can create the infrastructure needed and can SSH into the machine after that.

But for some reason, Ansible fails after few actions spanning two roles and gives me this error:

{"failed": true, "parsed": false}

“-vvvv” flag didn’t provide any useful information too and logs at the server indicates that the client is disconnecting for no reason.

I disabled the roles that were failing but later discovered that regardless of the actions, it always fails after a few actions at the same action. What is more weird is that sometimes it fails after performing 2 more actions.

Sorry if this is a duplicate but I couldn’t find any solutions for this strange behaviour and logs are not helpful. Any advice?

Regards,
Deniz

Hi Dennis,

Can you share what version of Ansible you are running, and the output before and after this line?

Usually when Ansible hits a parse error it will share part of the traceback or error.

Seeing both the output and the playbook line that failed would be helpful.

Thanks!

I am running Ansible version 1.6.6.

I am not sure why but now output shows additional errors with debug2/debug3 levels.

Here’s the output of the last task which seems to be failing:

`

failed: [54.68.129.168] => {“failed”: true, “md5sum”: "d291e1a0289d0aee992726913

d86ecab", “parsed”: false}
invalid output was:
debug3: mux_client_read_packet: read header failed: Broken pipe
debug2: Received exit status from master 0
Shared connection to 54.68.129.168 closed.

`

Task that is failing is:

`

  • name: set the content of the time zone file
    copy: dest=/etc/timezone content=“{{ nqdo_server_timezone }}”

`

When I tried to run this play again, it failed in a different task.

I was on 3G when running this play and the debug messages are new, I will try it again with WiFi later and report if here are any differences.

Thanks

Sounds like an unreliable connection, though it’s curious it managed to return a mostly parseable response.

Also it would be a good idea to take this time to upgrade to the latest released version, which is 1.7.1