Ansible deploy - rsync interrupted

I’m trying to deploy to a Digital Ocean VPS - have successfully ssh’d in to the server, set it up as a LEMP stack running Ubuntu, and have copied over my group_vars/production config from the bedrock ansible example.

I’ve gotten a couple different errors and just can’t think of what I’m missing.

Here is my production config in group_vars
mysql_root_password: ************

github_ssh_keys:
  - username: jeffsee55 
    authorized:
      - "{{ web_user }}"

project_pre_build_commands_local:
   - path: "{{ project.local_path }}/web/app/themes/sage"
     cmd: npm install
   - path: "{{ project.local_path }}/web/app/themes/sage"
     cmd: bower install
   - path: "{{ project.local_path }}/web/app/themes/sage"
     cmd: gulp --production

project_local_files:
  - name: sync local uploads
    src: "{{ project.local_path }}/web/app/uploads"
    dest: ../../shared
  - name: load compressed assets
    src: "{{ project.local_path }}/web/app/themes/sage/dist"
    dest: web/app/themes/sage
  - name: load plugins
    src: "{{ project.local_path }}/web/app/plugins"
    dest: web/app/

wordpress_sites:
  45.55.182.118:
    site_hosts:
      - 45.55.182.118
      - therealisticorganizer.com
    local_path: '../site' # path targeting local Bedrock site directory (relative to Ansible root)
    repo: git@github.com:jeffsee55/therealisticorganizer.com.git
    branch: master
    multisite:
      enabled: false
      subdomains: false
    ssl:
      enabled: false
    system_cron: true
    env:
      wp_home: http://45.55.182.118
      wp_siteurl: http://45.55.182.118
      wp_env: production
      db_name: realorg_prod
      db_user: realorg_dbuser
      db_password: ***********
      # Generate your keys here: https://api.wordpress.org/secret-key/1.1/salt/
      auth_key: "P>|Ht|%5-@4+nnr7vFrlQ857h<:!-Ygy*h0/,#qIkl{ =YJy!Gi-+6MxD-{0 %Qu"
      auth_salt: "u|L6Yu+|_+w~StnmFGuvnOqr0.f,=eq$ {DCzVu(+|#Xy;WRL<:^*1G){kh8KKtt"
      logged_in_key: "z{,UY~TI$V9Yn0.Oy/|811pZ[qde`qKgVoTnT$za-:r8YdSP<o{S#Ynjfb<4a8<v"
      logged_in_salt: "J_r+rzz+]>vNuA3H4+G<c0Hhu~ #ul+e9.-VX+t9T^0(*z:U%{aAp>;0+X5d~$29"
      nonce_key: "q2D*dlAidN8/@d]<|)P8ID,HKx|KTh:0|z/*k,9B,(gv;S::rmiMuFM6/MQJ1.CP"
      nonce_salt: "o];WO9wwA|.u+hqt<V_:Z:>[cJPDsb?s`r72`t<zqowz/N)myufZSqy!}_)7|7t<"
      secure_auth_key: "qY2EKFT&kW1p2PQt]8+/{6B8Bw-lu2c`UNrkJ);3At+hv+ouOh~{P|-DbTFne+EJ"
      secure_auth_salt: "A,wk5~;+P-h?.p>+F|(sFsZff3!rR9y)}+dIR?`?9pC-(`EAF}):d>pycDfq+|Kb"

The error is during the project_local_files section

msg: rsync: connection unexpectedly closed (8 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at /SourceCache/rsync/rsync-45/rsync/io.c(453) [sender=2.6.9]

After some googling I thought it may have something to do with SSH but everything seems to be ok - after all I have successfully uploaded the uploads folder (I’ve also gotten these errors without running the uploads folder piece). Rsync is up to date on the server as well, not sure what else to test out.

Running the deploy without project_local_files section gives a completely separate error during ‘create shared symlinks’ saying there is not such file or directory - I’m guessing that has something to do with rsync not working as well?

Is there any way that these errors are related? I’m totally unfamiliar with rsync so any debugging tips would help.

Does a manual rsync succeed for the uploads folder?

Wish I had some solid ideas, but I only have questions.

  • What’s your OS?
  • Has a Trellis deploy to DigitalOcean worked for you before?
  • When an online yaml linter helped your ansible runs succeed
    in the past, I started wondering if somehow your text editor was
    doing weird things. Maybe I’m being ridiculous and superstitious.
    • Would you mind sharing which text editor you’re using?
    • What kinds of formatting did the online yaml parser fix last time?
    • Would running your deploy-related files through the yaml parser give us
      some leads on this current rsync issue?

I was able to manually sync without a problem

I’m on OSX Yosemite - just using the vagrant setup with bedrock-ansible

Yes I was able to deploy a couple of sites successfully over the past week.

I’m using macvim - I definitely thought it was strange that I had a yaml issue and it disappeared on the following project (with the same bedrock-ansible repo used). It was just an indenting issue - I really didn’t see how it got messed up but there was definitely some strange indenting going on before I fixed it. Perhaps I’ll try redownloading the ansible side of the bedrock setup again

After reinstalling the ansible part of the repo and provisioning once again I was able to deploy successfully.

When I had a yaml parsing issue I was pretty certain I had not touched the file that was an issue and this time I’m 100% certain I ran the entire install without touching any ansible-related files except group_vars files and hosts… any ideas? The provisioning went fine the first time around so don’t think it was that

Nope, this is pretty strange. I’ve never gotten YAML errors except when I’m developing on the repo and do something wrong. Never had any other reports of this happening either.

I have no idea if this is relevant or not as I am just wrapping my very tired head around a lot of new stuff, but, I created two separate projects over the past week … one maybe a week ago and the other a couple days ago … I followed the instructions through the example project to a T and all went well for project one … the only edits I made were to change my Ansible_Path to ansible … mv my Vagrantfile … add subtree: site to group_vars … add my github info to group_vars/all and of course my site names and other relevant info to group_vars/development and group_vars/production.
I intentionally wanted to keep it as clean and vanilla as possible so that I could build on customizations as I learned and not confuse myself past the absolute necessary.
However, on project two, unless I am just way too tired, it seems that the default group_vars/production is different than the file that downloaded from cloning the repo for project one. Project one’s group_vars/production had the following … which seems somewhat related to your issue?

project_pre_build_commands_local:

  • path: "{{ project.local_path }}/web/app/themes/sage"
    cmd: npm install
  • path: "{{ project.local_path }}/web/app/themes/sage"
    cmd: bower install
  • path: "{{ project.local_path }}/web/app/themes/sage"
    cmd: gulp --production

project_local_files:

  • name: compiled theme assets
    src: "{{ project.local_path }}/web/app/themes/sage/dist"
    dest: web/app/themes/sage

… as well, the group_vars/production file on the example project used to ( while working with Project one ) have the subtree: site directive/key in it and it doesn’t have it now.

I can’t find anything in commits or history for the individual repos or the example project that reference this file being changed, so, I fear that either I truly am losing it or there was a glitch in the matrix and these directives changed somehow and you were affected midstream as I now seem to be?

I don’t know if this info will be useful to yourself or to you Scott but just thought I’d chime in here on it … I have a separate topic already opened for myself in trying to work out so not looking to hijack :wink: