Broken after upgrade
Today I did a ee update becuase it's been a while. Now ee is broke for me.
- ee site create demo.redux.io --wpfc
- Downloading WP-CLI [Errno 2] No such file or directory: '/usr/bin/wp'
- root@reduxframework:/usr/bin# ee --version
- EasyEngine v3.0.5
- Copyright (c) 2015 rtCamp Solutions Pvt. Ltd.
Any ideas?
Wird thought the ee update was removed and you had to use https://rtcamp.com/easyengine/docs/commands/ee-update/
Try the following
ee stack install --wpcli
And then try and create a --wpfc site again.
root@reduxframework:/var/www# ee stack install --wpcli Downloading WP-CLI [Errno 2] No such file or directory: '/usr/bin/wp'
Just manually installed wp-cli and all is well with the world. :)
Bah, now I'm getting:
root@reduxframework:/var/www# ee site create demo.redux.io --wpfc
Setting up NGINX configuration [Done]
Setting up webroot [Done]
Downloading Wordpress [Done]
Setting up database [Done]
Unable to Generate wp-config
Seems like I just need to re-install.
Wird issues you got going, just tryed to update my servers my self, no issues or what so ever :(
have you tryed ee stack install --web
root@reduxframework:/home# ee stack install --web Nginx already installed PHP already installed MySQL connection is already alive Postfix is already installed WP-CLI is already installed
However now it does this:
root@reduxframework:/var/log/ee# ee site create demo.redux.io --wpfc
Setting up NGINX configuration [Done]
Setting up webroot [Done]
Downloading Wordpress [Done]
Setting up database Cannot setup database user
Which probably means on the upgrade it lost my mysql user/pass. Were are those stored?
So I thought it was related to #454. So I made sure and reset the root password to the one listed in ~/.my.cnf. However, the problem still persists.
root@reduxframework:~# ee site create demo.redux.io --wpfc
Setting up NGINX configuration [Done]
Setting up webroot [Done]
Downloading Wordpress [Done]
Setting up database Cannot setup database user
Do you have an odd command in your most recent version? Do I need to update mysql? I originally had ee setup this server. So I'm confused by these issues.
Great. Now my whole server is getting 502 Bad Gateway...
Ok, so ee update forced a new update to /etc/php5/fpm/pool.d/www.conf. I allowed it to create a new file, thus throwing my server into shock.
Luckily it was smart enough to make a www.conf.dpkg-old backup. I restored that, did a service php-fpm restart and my server started working again.
However, now "cannot create database" or "cannot create database user" keeps happening...
ee.log:
root@reduxframework:/var/log/ee# tail ee.log
2015-03-18 23:04:08,358 (DEBUG) ee : Changing directory to /var/www/demo.redux.io/htdocs/
2015-03-18 23:04:08,358 (DEBUG) ee : Running command: wp --allow-root core download
2015-03-18 23:04:09,233 (INFO) ee : [Done]
2015-03-18 23:04:09,234 (INFO) ee : Setting up database
2015-03-18 23:04:09,234 (DEBUG) ee : Creating databse demo_redux_io
2015-03-18 23:04:09,241 (DEBUG) ee : Executing MySQL statement: create database `demo_redux_io`
2015-03-18 23:04:09,242 (DEBUG) ee : Creating user demo_redux_io
2015-03-18 23:04:09,242 (DEBUG) ee : create user `demo_redux_io`@`localhost` identified by ''
2015-03-18 23:04:09,244 (DEBUG) ee : (1396, "#HY000Operation CREATE USER failed for 'demo_redux_io'@'localhost'")
2015-03-18 23:04:09,244 (ERROR) ee : Cannot setup database user
Not sure if this is helpfull in any way, try and do ee stack migrate --mariadb
Make sure you got backup of your stuff, but ye if it's nothing big you got on the server, it might be faster to do a re-install.
I would hate reinstalling right now, since i got some quite large sites running.
I have a few sites running... I'm worried about crashing.
It's not ee. It's all in mysql. Can't create the user accounts after update of the stack...
Ye that sound like a pain i the a**
Hope one of the dev's can kick in with some info on this, would be nice to know if it happens to me ad some point.
OK, here's the resolution.
If for some reason the creation fails (wp-cli wasn't properly installed via an upgrade), then things linger.
So I had to do the following:
- Install wp-cli manually since it didn't install via upgrade.
- Remove the database manually - Even though it said the DB didn't exist, I had to manually delete it.
- Remove the user manually. If the DB isn't found, ee doesn't search for the user to clean things up.
- Delete the site and try again.
I think we should have extra checks. Even if it's not in the EE database, we should check if the db or user is there and prompt the user to delete them. It would have solved a whole ton of pain.
Also on creation we should check for an existing user. If there is, create another and go. Don't just error out and leave everything a mess.
Either way, that's the resolution. Not enough error checking in the setup site process. ;)
@dovy what was the ee version from which you upgraded?
I honestly do not know, but here's the log of the update.
https://gist.github.com/dovy/ec94a8f4db1ff280e9a9
Thanks. I'll take a snapshot of the VM before I try!