welaika / wordmove

Multi-stage command line deploy/mirroring and task runner for Wordpress
https://wptools.it/wordmove
MIT License
1.87k stars 167 forks source link

Error on push - fresh scotchbox install - rsync error: error in rsync protocol data stream (code 12) at io.c(226) [sender=3.1.1] #418

Closed ryanfurtner closed 6 years ago

ryanfurtner commented 7 years ago

I am getting this error if I try to push my files on a new scotchbox setup. I was getting a different error before. Installing sshpass fixed that. I cannot for the life of me figure this one out:

rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(226) [sender=3.1.1]

here is my movefile (with domains and passwords changed)

global:
  sql_adapter: "default"

local:
  vhost: "http://domain.local"
  wordpress_path: "/var/www/public" # use an absolute path here

  database:
    name: "domain"
    user: "root"
    password: "root"
    host: "localhost"

production:
  vhost: "https://domain.domain.com"
  wordpress_path: "/public_html" # use an absolute path here

  database:
    name: "dbname"
    user: "dbuser"
    password: "password"
    host: "host"
    # port: "3308" # Use just in case you have exotic server config
    # mysqldump_options: "--max_allowed_packet=1G" # Only available if using SSH

  exclude:
    - ".git/"
    - ".gitignore"
    - ".sass-cache/"
    - "node_modules/"
    - "bin/"
    - "tmp/*"
    - "Gemfile*"
    - "Movefile"
    - "wp-config.php"
    - "wp-content/*.sql.gz"

  ssh:
     host: "13.111.111.11"
     user: "sitedomain"
     password: "password" # password is optional, will use public keys if available.
     rsync_options: "--verbose" # Additional rsync options, optional
alessandro-fazzi commented 7 years ago

Hey there! What scotchbox is? Do you have a ref so that I could know what we are talking about?

Thanks!

alessandro-fazzi commented 7 years ago

@ryanfurtner I see it's a Vagrant setup. Please give us some context anyway: have you ssh-ed inside vagrant, you have wordmove inside vagrant and you are trying to push to production? Or what else? Is wordmove included in the box or you have installed it manually?

This seems to be "just" a connection or configuration problem, but I have no clue on where to start thinking about...

ryanfurtner commented 7 years ago

Sure thing @pioneerskies! I am using this pro version here: https://github.com/scotch-io/scotch-box-pro-nginx

i am using 'vagrant ssh' and using the vagrant user for all these commands. Wordmove is inside vagrant and I am trying to push to production. I used to use it with vvv but I have moved over to scotchbox.

ryanfurtner commented 7 years ago

@pioneerskies It is wordmove v2.1.3 btw

ryanfurtner commented 7 years ago

@pioneerskies I fixed this by setting up a key pair and removing the password line of my movefile. I guess this is best practice anyway, so im happy with the outcome 👍

defaultcontrarian commented 6 years ago

@ryanfurtner @pioneerskies i realize this issue is closed but i might be having the same issue. Ryan can you elaborate on your "fix" above. I'm not a developer or very experienced with the c-line. I basically have the same setup (vagrant > vagrant ssh). Trying to push from local to production but getting the following errors after each item gets pushed (core, uploads, themes, etc.):

ssh: connect to host mydomain.com port xxxxx: Connection timed out rsync: connection unexpectedly closed (0 bytes received so far) [sender] rsync error: error in rsync protocol data stream (code 12) at io.c(226) [sender=3.1.1]

P.S. A few weeks ago I did a push from local to staging and has no issues. The only difference between the two events that I can see if that I am now pointing my site to cloudflare (using their name servers vs my hosting providers NS).

Thanks in advance.

ryanfurtner commented 6 years ago

@defaultcontrarian I have had issues on and off like this before, without rhyme or reason seemingly.

To fix it in the case mentioned above, I relied on SSH keys rather than a plaintext password. If you search for how to generate key pairs you will learn more about how to do it.

defaultcontrarian commented 6 years ago

@ryanfurtner thanks for the reply. error has been resolved :) I used my server's IP address as the "host" instead of my domain. Seemed to solve the issue but thanks for getting back to me so soon.