Unable to move file error showing

another error

@harshadyeola

Setting up NGINX configuration  [Done]
Setting up webroot              [Done]
Downloading Wordpress           [Done]
Setting up database             [Done]
Reload : nginx     [Failed]
Unable to change owner : /var/www/xxxx.com

@rnovino. Your package setup is not done by EasyEngineā€¦ It will create problem while creation of siteā€¦ I recommended you to purge package and install with EasyEngine

I have mine set like this.

### MySQL database grant host name
grant-host = %

I have more than 1 web server and I control access through the Firewall so I donā€™t want to specify the FQDN. Itā€™s what I do on my other server and the instructions say this is ok. https://rtcamp.com/easyengine/docs/remote-mysql/

I can connect to remote host.

mysql -u aws -p -h RDS.FQDN.com
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 362456
Server version: 5.6.19-log MySQL Community Server (GPL)

Copyright (c) 2009-2014 Percona LLC and/or its affiliates
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

@gau1991 if I purge the previous packages is it also going to delete my database?

Update: Looks to be our remote mysql setup. I opened an issue on github https://github.com/rtCamp/easyengine/issues/431. dbhost is not being passed to wp-cli when creating the config. This causes a wp-cli error and then config file is not created. I will see if i can get a patch file submitted.

I am having the same issue. It looks to be a problem with wp-cli creating the config file. We have a remote mysql box setup and it seems dbhost is not passed to the confing command. Also wp-cli throws an error when the --dbpass param is empty

    2015-02-17 17:06:38,237 (DEBUG) ee : collecting arguments/commands for <ee.cli.plugins.site.EESiteCreateController object at 0x7f70938916a0>
2015-02-17 17:06:38,241 (DEBUG) ee : Setting apt_packages variable for Nginx
2015-02-17 17:06:38,680 (DEBUG) ee : Setting apt_packages variable for PHP
2015-02-17 17:06:39,102 (DEBUG) ee : Setting apt_packages variable for MySQL
2015-02-17 17:06:39,102 (DEBUG) ee : Running command: mysqladmin ping
2015-02-17 17:06:39,120 (DEBUG) ee : Setting apt_packages variable for Postfix
2015-02-17 17:06:39,540 (DEBUG) ee : Setting packages variable for WP-CLI
2015-02-17 17:06:39,541 (DEBUG) ee : Running command: which wp
2015-02-17 17:06:39,544 (INFO) ee : Setting up NGINX configuration 	
2015-02-17 17:06:39,561 (INFO) ee : [Done]
2015-02-17 17:06:39,562 (DEBUG) ee : Destination: /etc/nginx/sites-enabled/spareurl222.com exists
2015-02-17 17:06:39,562 (INFO) ee : Setting up webroot 		
2015-02-17 17:06:39,562 (INFO) ee : [Done]
2015-02-17 17:06:39,563 (INFO) ee : Downloading Wordpress 		
2015-02-17 17:06:39,563 (DEBUG) ee : Running command: wp --allow-root core download
2015-02-17 17:06:40,523 (INFO) ee : [Done]
2015-02-17 17:06:40,524 (INFO) ee : Setting up database		
2015-02-17 17:06:40,524 (DEBUG) ee : Creating databse spareurl222_com
2015-02-17 17:06:40,549 (DEBUG) ee : Executing MySQL statement: create database `spareurl222_com`
2015-02-17 17:06:40,557 (DEBUG) ee : Creating user spareurl222_com
2015-02-17 17:06:40,557 (DEBUG) ee : create user `spareurl222_com`@`%` identified by ''
2015-02-17 17:06:40,571 (DEBUG) ee : Setting up user privileges
2015-02-17 17:06:40,578 (DEBUG) ee : Executing MySQL statement: grant all privileges on `spareurl222_com`.* to `spareurl222_com`@`%`
2015-02-17 17:06:40,585 (INFO) ee : [Done]
2015-02-17 17:06:40,586 (DEBUG) ee : Setting up wp-config file
2015-02-17 17:06:40,586 (DEBUG) ee : Generating wp-config for WordPress Single site
2015-02-17 17:06:40,586 (DEBUG) ee : bash -c "php /usr/bin/wp --allow-root core config --dbname=spareurl222_com --dbprefix=wp_ --dbuser=spareurl222_com --dbpass= --extra-php<<PHP 
 

define('WP_DEBUG', false);
PHP"
2015-02-17 17:06:40,649 (DEBUG) ee : ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
2015-02-17 17:06:40,650 (DEBUG) ee : Moving file from /var/www/spareurl222.com/htdocs/wp-config.php to /var/www/spareurl222.com
2015-02-17 17:06:40,650 (DEBUG) ee : [Errno 2] No such file or directory: '/var/www/spareurl222.com/htdocs/wp-config.php'
2015-02-17 17:06:40,650 (ERROR) ee : Unable to move file from /var/www/spareurl222.com/htdocs/wp-config.php to /var/www/spareurl222.com

WP-CLI ERROR

Error: Too many positional arguments: --dbpass=

Joshā€™s github commit fixed the problem.

Iā€™m getting the same error. Iā€™m posting because my log looks different from the scenarios above. Maybe itā€™s the same issue-- how exactly should I resolve it?

I set up my stack via ee. I successfully set up a test site and everything worked great. Now, attempting to set up a second site and receiving the error:

root@Sandbox:~# ee site create test.esox.net --wp
Setting up NGINX configuration  [Done]
Setting up webroot              [Done]
Downloading Wordpress           [Done]
Setting up database             [Done]
Unable to move file from /var/www/test.esox.net/htdocs/wp-config.php to /var/www test.esox.net

##tail /var/log/ee/ee.log

2015-02-21 17:26:46,761 (DEBUG) ee : Generating wp-config for WordPress Single site
2015-02-21 17:26:46,761 (DEBUG) ee : bash -c "php /usr/bin/wp --allow-root core config --dbname=test_esox_net --dbprefix=wp_ --dbuser=test_esox_net --dbpass= --extra-php<<PHP


define('WP_DEBUG', false);
PHP"
2015-02-21 17:26:46,765 (DEBUG) ee : bash: php: command not found
2015-02-21 17:26:46,766 (DEBUG) ee : Moving file from /var/www/test.esox.net/htdocs/wp-config.php to /var/www/test.esox.net
2015-02-21 17:26:46,766 (DEBUG) ee : [Errno 2] No such file or directory: '/var/www/test.esox.net/htdocs/wp-config.php'
2015-02-21 17:26:46,766 (ERROR) ee : Unable to move file from /var/www/test.esox.net/htdocs/wp-config.php to /var/www/test.esox.net

lsb_release -a

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.1 LTS
Release:        14.04
Codename:       trusty

Thanks!

Same issues hereā€¦ Here is my info:

Setting up NGINX configuration 	[Done]
Setting up webroot 		[Done]
Downloading Wordpress 		[Done]
Setting up database		[Done]
Unable to move file from /var/www/fqdn.net/htdocs/wp-config.php to /var/www/fqdn.net

Iā€™m using a remote mysql server, but I have a .my.cnf set up. The database is created on the remote machine, so i ee was able to access it. but the log says otherwise:

tail /var/log/ee/ee.log

2015-02-22 05:30:28,831 (DEBUG) ee : Generating wp-config for WordPress Single site
2015-02-22 05:30:28,832 (DEBUG) ee : bash -c "php /usr/bin/wp --allow-root core config --dbname= fqdn_net --dbprefix=wp_ --dbuser=fqdn_net --dbpass= --extra-php<<PHP 

define('WP_DEBUG', false);
PHP"
2015-02-22 05:30:29,016 (DEBUG) ee : ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
2015-02-22 05:30:29,018 (DEBUG) ee : Moving file from /var/www/fqdn.net/htdocs/wp-config.php to /var/www/fqdn.net
2015-02-22 05:30:29,019 (DEBUG) ee : [Errno 2] No such file or directory: '/var/www/fqdn.net/htdocs/wp-config.php'
2015-02-22 05:30:29,019 (ERROR) ee : Unable to move file from /var/www/fqdn.net/htdocs/wp-config.php to /var/www/fqdn.net

##lsb_release -a

No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 14.04.2 LTS
Release:	14.04
Codename:	trusty

Any help would be fantastic! thanks!!

@bluehatdesign

From your logs it seems that you are missing Ģphp5-cliĢ package.

@achegedus

Could you check for your mysql server running properly.

Check that you have Ģ.my.cnfĢ file with correct credential

check whether you can login to your mysql shell

I can verify that mysql is running, and that the .my.cnf file is there. Also, I can login via shell. When i run the ee create, the database is created on the remote server by ee, so itā€™s definitely able to connect.

Thanks, A

@achegedus

EasyEngine 3.0.3 has been released, please update your EasyEngine. This will solve your problem

I received the same result with version 3.0.3. The database was created from the web server, but I still get the same error:

Reload : postfix   [OK]
Setting up NGINX configuration 	[Done]
Setting up webroot 		[Done]
Downloading Wordpress 		[Done]
Setting up database		[Done]
Unable to move file from /var/www/xxxxxxxx.net/htdocs/wp-config.php to /var/www/xxxxxxxx.net
root@webserver:~# ee --version
EasyEngine v3.0.3
Copyright (c) 2015 rtCamp Solutions Pvt. Ltd.

I see this in the log:

2015-02-24 06:26:24,354 (DEBUG) ee : Command Output: , Command Error: ERROR 1045 (28000): Access denied for user 'xxxxxxxx_net'@'10.38.233.10' (using password: YES)

itā€™s trying to use a database name that it creates from the domain name instead of the one in the ~/.my.cnf. is this expected behavior?

@achegedus

Yes it is the expected behaviour, it checks database connection for user created for that site and then generate wp-config file.

So any idea why ee can create a database, but fails on the user?

@achegedus

Please, Check your EasyEngine configuration file, for the grant-host field. Change its value to your db-host.

I have the ip of the db host in there already, but that didnā€™t help.

When I look in the logs, I see where the user is created:

2015-02-24 06:26:24,209 (DEBUG) ee : Executing MySQL statement: grant all privileges on `testdomain_net`.* to `testdomain_net`@`10.38.233.1`

But then the error in the permissions:

2015-02-24 06:26:24,354 (DEBUG) ee : Command Output: , Command Error: ERROR 1045 (28000): Access denied for user 'testdomain_net'@'10.38.233.10' (using password: YES)

The ee call is made on .10, but the db is on .1. It looks like the permissions are set for the user to log in from .1, but it needs to be from .10. Any ideas on how to fix this?