wordmove: Wordmove commands (inc. wordmove init) throwing errors in Docker Wordpress container
UPDATE realised I was pulling from production, rather than remote in this comment. However, there is still an issue… see further down and the wordmove init error in this comment.
Had wordmove working brilliantly on a vagrant box (modified vccw box), but am attempting to move across to Docker to simlify config. I’m attempting to extend the Docker Wordpress image (with up to date Ruby etc.), and hitting an issue that, after much Googling, I’m getting nowhere with. I’m running as root (will this cause issues with wp-cli??), and getting the following issues when I try to run any wordmove command, even wordmove init.
Any help would be massively appreciated. It’s an awesome tool, and even more awesome when you know how good it is but cant have it!!!
Output of wordmove pull -d -u -e production
▬▬ Using Movefile: ./movefile.yml ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
/usr/local/rvm/gems/ruby-2.4.1/gems/wordmove-2.4.2/lib/wordmove/deployer/base.rb:14:in `deployer_for': undefined method `[]' for nil:NilClass (NoMethodError)
from /usr/local/rvm/gems/ruby-2.4.1/gems/wordmove-2.4.2/lib/wordmove/cli.rb:68:in `pull'
from /usr/local/rvm/gems/ruby-2.4.1/gems/thor-0.19.4/lib/thor/command.rb:27:in `run'
from /usr/local/rvm/gems/ruby-2.4.1/gems/thor-0.19.4/lib/thor/invocation.rb:126:in `invoke_command'
from /usr/local/rvm/gems/ruby-2.4.1/gems/thor-0.19.4/lib/thor.rb:369:in `dispatch'
from /usr/local/rvm/gems/ruby-2.4.1/gems/thor-0.19.4/lib/thor/base.rb:444:in `start'
from /usr/local/rvm/gems/ruby-2.4.1/gems/wordmove-2.4.2/exe/wordmove:6:in `<top (required)>'
from /usr/local/rvm/gems/ruby-2.4.1/bin/wordmove:23:in `load'
from /usr/local/rvm/gems/ruby-2.4.1/bin/wordmove:23:in `<main>'
from /usr/local/rvm/gems/ruby-2.4.1/bin/ruby_executable_hooks:15:in `eval'
from /usr/local/rvm/gems/ruby-2.4.1/bin/ruby_executable_hooks:15:in `<main>'
Using movefile.yml:
global:
sql_adapter: default
local:
vhost: http://local.vhost.co.uk
wordpress_path: /var/www/html
database: # these creds work fine using mysql command to connect to the db
name: wordpress
user: root
password: rootwordpress
host: db
port: '3306'
charset: utf8
mysqldump_options: --max_allowed_packet=50MB
remote:
vhost: https://host.co.uk
wordpress_path: /path/to/wp
database:
name: db_name
user: user
password: xxxxxxxxxxxx
host: xxx.xxx.xxx.xxx
ssh:
host: host.co.uk
user: user
port: 1234
rsync_options: --verbose
Output of wordmove init:
/usr/local/rvm/gems/ruby-2.4.1/gems/thor-0.19.4/lib/thor/actions/create_file.rb:62:in `initialize': Input/output error @ rb_sysopen - /var/www/html/movefile.yml (Errno::EIO)
from /usr/local/rvm/gems/ruby-2.4.1/gems/thor-0.19.4/lib/thor/actions/create_file.rb:62:in `open'
from /usr/local/rvm/gems/ruby-2.4.1/gems/thor-0.19.4/lib/thor/actions/create_file.rb:62:in `block in invoke!'
from /usr/local/rvm/gems/ruby-2.4.1/gems/thor-0.19.4/lib/thor/actions/empty_directory.rb:116:in `invoke_with_conflict_check'
from /usr/local/rvm/gems/ruby-2.4.1/gems/thor-0.19.4/lib/thor/actions/create_file.rb:60:in `invoke!'
from /usr/local/rvm/gems/ruby-2.4.1/gems/thor-0.19.4/lib/thor/actions.rb:95:in `action'
from /usr/local/rvm/gems/ruby-2.4.1/gems/thor-0.19.4/lib/thor/actions/create_file.rb:25:in `create_file'
from /usr/local/rvm/gems/ruby-2.4.1/gems/thor-0.19.4/lib/thor/actions/file_manipulation.rb:115:in `template'
from /usr/local/rvm/gems/ruby-2.4.1/gems/wordmove-2.4.2/lib/wordmove/generators/movefile.rb:12:in `copy_movefile'
from /usr/local/rvm/gems/ruby-2.4.1/gems/thor-0.19.4/lib/thor/command.rb:27:in `run'
from /usr/local/rvm/gems/ruby-2.4.1/gems/thor-0.19.4/lib/thor/invocation.rb:126:in `invoke_command'
from /usr/local/rvm/gems/ruby-2.4.1/gems/thor-0.19.4/lib/thor/invocation.rb:133:in `block in invoke_all'
from /usr/local/rvm/gems/ruby-2.4.1/gems/thor-0.19.4/lib/thor/invocation.rb:133:in `each'
from /usr/local/rvm/gems/ruby-2.4.1/gems/thor-0.19.4/lib/thor/invocation.rb:133:in `map'
from /usr/local/rvm/gems/ruby-2.4.1/gems/thor-0.19.4/lib/thor/invocation.rb:133:in `invoke_all'
from /usr/local/rvm/gems/ruby-2.4.1/gems/thor-0.19.4/lib/thor/group.rb:232:in `dispatch'
from /usr/local/rvm/gems/ruby-2.4.1/gems/thor-0.19.4/lib/thor/base.rb:444:in `start'
from /usr/local/rvm/gems/ruby-2.4.1/gems/wordmove-2.4.2/lib/wordmove/cli.rb:12:in `init'
from /usr/local/rvm/gems/ruby-2.4.1/gems/thor-0.19.4/lib/thor/command.rb:27:in `run'
from /usr/local/rvm/gems/ruby-2.4.1/gems/thor-0.19.4/lib/thor/invocation.rb:126:in `invoke_command'
from /usr/local/rvm/gems/ruby-2.4.1/gems/thor-0.19.4/lib/thor.rb:369:in `dispatch'
from /usr/local/rvm/gems/ruby-2.4.1/gems/thor-0.19.4/lib/thor/base.rb:444:in `start'
from /usr/local/rvm/gems/ruby-2.4.1/gems/wordmove-2.4.2/exe/wordmove:6:in `<top (required)>'
from /usr/local/rvm/gems/ruby-2.4.1/bin/wordmove:23:in `load'
from /usr/local/rvm/gems/ruby-2.4.1/bin/wordmove:23:in `<main>'
from /usr/local/rvm/gems/ruby-2.4.1/bin/ruby_executable_hooks:15:in `eval'
from /usr/local/rvm/gems/ruby-2.4.1/bin/ruby_executable_hooks:15:in `<main>'
Output of wordmove doctor (the test mysql command looks weird??)
▬▬ Using Movefile: ./movefile.yml ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
▬▬ Validating movefile section: global ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
✓ success | Formal validation passed
▬▬ Validating movefile section: local ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
✓ success | Formal validation passed
▬▬ Validating movefile section: remote ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
✓ success | Formal validation passed
▬▬ Using Movefile: ./movefile.yml ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
▬▬ Checking local database commands and connection ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
✓ success | `mysql` command is in $PATH
✓ success | `mysqldump` command is in $PATH
✗ error | We can't connect to the database using credentials
specified in the Movefile. Double check them or try
to debug your system configuration.
The command used to test was:
mysql -u -h -e'QUIT'
▬▬ Checking local wp-cli installation ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Error: YIKES! It looks like you're running this as root. You probably meant to run this as the user that your WordPress install exists under.
If you REALLY mean to run this as root, we won't stop you, but just bear in mind that any code on this site will then have full control of your server, making it quite DANGEROUS.
If you'd like to continue as root, please run this again, adding this flag: --allow-root
If you'd like to run it as the user that this site is under, you can run the following to become the respective user:
sudo -u USER -i -- wp <command>
✓ success | wp-cli is correctly installed and up to date
▬▬ Checking rsync ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
✓ success | rsync is installed at version 3.1.2
▬▬ Checking SSH client ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
✓ success | SSH command found
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 20 (6 by maintainers)
Commits related to this issue
- Fix PATH changed when doing sudo https://github.com/welaika/wordmove/issues/452 https://stackoverflow.com/questions/257616/sudo-changes-path-why — committed to simonbland/docker-wordmove by deleted user 6 years ago
@simonbland @pioneerskies an update. Got everything working, although I can corroborate the issue that
wordmove doctorfails when testing the mysql connection, but the succeeds when runningwordmove pull.Not really sure what happened when trying to setup the Docker container that led to this thread, particularly why
wordmove initappeared to fail. I think we can safely allocate that to user failure!!Today, using
wp-cliinstead ofwpcli(user error again). Let to the problem.Going to close this issue, but will open another one tomorrow to cover the mysql test behaviour that we’ve accidentally uncovered…
Thanks for your help, and thanks for the incredibly useful tool!