Warning: There was some error in docker-compose up


#1

I’m using the following:

ee site create DOMAIN.TLD --type=wp --title=TITLE --dbname=DBNAME --dbuser=DBUSER --dbpass=DBPASS --dbprefix=PRE_ --admin-email=USER@DOMAIN.TLD --admin-user=ADMINUSER --admin-pass=ADMINPASSWORD --cache --with-local-redis --ssl=le --le-mail=USER@DOMAIN.TLD

This results in the following warnings:

Warning: There was some error in docker-compose up.
Warning: Initiating clean-up.

See attached screenshot.


#2

After 8 or 10 attempts to install, I finally got the installation to complete. However, it didn’t complete without errors…

Warning: Unable to download or activate nginx-helper plugin properly.
Warning: Unable to download or activate nginx-helper plugin properly.

…and I get white screens for all WordPress pages. Likely a half-baked install of Nginx-helper plugin, but the website is not at /var/www/DOMAIN.TLD/htdocs/… any more. I’ll have to go dig around for it now and see what didn’t get installed correctly.

So far, not impressed.


#3

There is some form of issue using wp-redis with EEv4. It white-screens WP. I deleted it and re-installed Redis Object Cache (which EEv3 used) and WP loads fine (I.E. No white screen).


#4

Decided to try v4 on a fresh 4 GB Hetzner Cloud server (fully updated Ubuntu 18.04 LTS) only to run into all the issues @bamajr reported above. Rebuilt the server several times to try different create commands but didn’t manage to get a working install. In the end I gave up and deleted the server. I can’t find additional info about the issues in this thread so don’t know what else to do. Anyone else had similar problems? I’d like to move my EE sites to v4 on a fresh server rather than attempt a migration, but it doesn’t seem production ready yet.


#5

Tried again and again ran into the Redis caching issue.

ee site create example.com --type=wp --cache --with-local-redis --local-db --ssl=le --wildcard

White screens until removing wp-redis plugin. nginx error:

2018/11/30 19:05:14 [error] 6#6: *32 FastCGI sent in stderr: "PHP message: PHP Warning: Redis::connect(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /var/www/htdocs/wp-content/plugins/wp-redis/object-cache.php on line 1105

PHP message: PHP Fatal error: Uncaught RedisException: php_network_getaddresses: getaddrinfo failed: Name or service not known in /var/www/htdocs/wp-content/plugins/wp-redis/object-cache.php:1105

Stack trace:
#0 /var/www/htdocs/wp-content/plugins/wp-redis/object-cache.php(1105): Redis->connect('ee-global-redis', 6379, 1, '', 100)
#1 /var/www/htdocs/wp-content/plugins/wp-redis/object-cache.php(1004): WP_Object_Cache->prepare_client_connection(Array)
#2 /var/www/htdocs/wp-content/plugins/wp-redis/object-cache.php(1325): WP_Object_Cache->_connect_redis()
#3 /var/www/htdocs/wp-content/plugins/wp-redis/object-cache.php(155): WP_Object_Cache->__construct()
#4 /var/www/htdocs/wp-includes/load.php(516): wp_cache_init()
#5 /var/www/htdocs/wp-settings.php(113): wp_start_object_cache()
#6 /var/www/wp-config.php(97): require_once('/var/www/htdocs...')
#7 /var/www/htdocs/wp-load.php(42): require_once('/var/www/wp-con...')
#8 /var/www/htdocs/wp-login.php(12): require('/var/www/htdocs...')
#9 {main}

thrown in /var/www" while reading response header from upstream, client: 0.0.0.0, server: example.com, request: "GET /wp-login.php HTTP/1.1", upstream: "fastcgi://172.20.0.5:9000", host: "example.com"

Seems to be looking for ee-global-redis in /var/www/htdocs(?) despite --with-local-redis flag on site creation.

Also:

Warning: Unable to download or activate nginx-helper plugin properly.
Warning: Unable to download or activate nginx-helper plugin properly.

… on site creation.


#6

Is no one else having this issue? I’ve just given it another try and got all the errors listed above. There’s clearly something wrong with the setting up of Redis caching/local Redis caching.

To aid any attempts to fix this bug, here’s the docker-compose up error I receive when trying to ee site create example.com --type=wp --cache ( no --with-local-redis which if included creates a site but doesn’t enable local Redis caching so it white screens because of the PHP errors in my post above).

[02-12-2018 15:20:27] ee.DEBUG: -----------------------  
[02-12-2018 15:20:27] ee.INFO: Starting site's services.  
[02-12-2018 15:20:27] ee.DEBUG: -----------------------  
[02-12-2018 15:20:27] ee.DEBUG: COMMAND: docker-compose up -d nginx postfix  
[02-12-2018 15:20:28] ee.DEBUG: STDERR: Service "nginx" uses an undefined network "global-backend-network"   
[02-12-2018 15:20:28] ee.DEBUG: RETURN CODE: 1  
[02-12-2018 15:20:28] ee.DEBUG: -----------------------  
[02-12-2018 15:20:28] ee.INFO: ======================== site cleanup start ========================  
[02-12-2018 15:20:28] ee.WARNING: There was some error in docker-compose up.  
[02-12-2018 15:20:28] ee.WARNING: Initiating clean-up.

The code - https://github.com/EasyEngine/site-type-wp/blob/develop/src/WordPress.php - that deals with caching setup…

$this->cache_type                      = \EE\Utils\get_flag_value( $assoc_args, 'cache' );
$this->site_data['site_ssl']           = \EE\Utils\get_flag_value( $assoc_args, 'ssl' );
$this->site_data['site_ssl_wildcard']  = \EE\Utils\get_flag_value( $assoc_args, 'wildcard' );
$this->site_data['php_version']        = \EE\Utils\get_flag_value( $assoc_args, 'php', 'latest' );
$this->site_data['app_admin_url']      = \EE\Utils\get_flag_value( $assoc_args, 'title', $this->site_data['site_url'] );
$this->site_data['app_admin_username'] = \EE\Utils\get_flag_value( $assoc_args, 'admin-user', \EE\Utils\random_name_generator() );
$this->site_data['app_admin_password'] = \EE\Utils\get_flag_value( $assoc_args, 'admin-pass', \EE\Utils\random_password() );
$this->site_data['db_name']            = \EE\Utils\get_flag_value( $assoc_args, 'dbname', str_replace( [ '.', '-' ], '_', $this->site_data['site_url'] ) );
$this->site_data['db_host']            = \EE\Utils\get_flag_value( $assoc_args, 'dbhost', GLOBAL_DB );
$this->site_data['db_port']            = '3306';
$this->site_data['db_user']            = \EE\Utils\get_flag_value( $assoc_args, 'dbuser', $this->create_site_db_user( $this->site_data['site_url'] ) );
$this->site_data['db_password']        = \EE\Utils\get_flag_value( $assoc_args, 'dbpass', \EE\Utils\random_password() );
$this->locale                          = \EE\Utils\get_flag_value( $assoc_args, 'locale', \EE::get_config( 'locale' ) );
$local_cache                           = \EE\Utils\get_flag_value( $assoc_args, 'with-local-redis' );
$this->site_data['cache_host']         = '';
if ( $this->cache_type ) {
	$this->site_data['cache_host'] = $local_cache ? 'redis' : 'global-redis';
}

… seems okay.

Any help getting this fixed would be much appreciated - at the moment v4 is unusable for me.


#7

This is very strange. Have you seen this post? (or is this you?) https://github.com/EasyEngine/easyengine/issues/1331

I am guessing you are on 4.0.3 and still having this issue? Or are you on a lower version? Do you want to try uninstalling EE then check to see if any of the docker containers and volumes remain after you’ve uninstalled EE? (sudo docker volume list)

I am thinking maybe some docker data was not deleted properly in an update or uninstall…I don’t know but worth checking out. Let me know what the result is


#8

Not me, but that is exactly the issue I’m having. A relief it’s not just me.

Yes, 4.0.3. Will do some more testing…


#9

Can you scroll to the end of your log file in /opt/easyengine/logs/ee.log maybe that can provide us with some more info to troubleshoot. I deleted my site just now, I had created it without a local db and local redis. I then re-created the site with both local flags and it worked fine. Did you get any where with checking if docker volumes remained after you removed EE?

Edit: Scratch that. Website won’t load, just a white screen.


#10

@purbeckpixels The issue seems to be fixed in the latest update. I’ve re-created a site with local db and cache and it’s worked fine. Try updating yours and creating your site now


#11

All working now. Thanks to the ee guys for the timely fix. Now to start planning the Big Move (manually migrate 25 sites to an ee4-powered server)…


#12

@purbeckpixels Awesome. I would recommend an easy backup plugin for you to migrate over so many sites. You can backup your entire wp setup including all plugins you’ve got. And once you restore, just install nginx-helper and the wp-redis plugin by Pantheon manually.

I use updraftplus, it’s free and does the job. Some of the features are behind the paywall but you won’t be needing those. There are plenty other backup plugins out there including ones that do real-time backup & migrations but I’ve been using updraft for a long time now and can’t fault it. So basically your process would be to create the site with all the flags you need on your EE4 server. Log in to WordPress, install updraft and then upload your backup files and restore it. Then install nginx-helper and wp-redis. Your WordPress password will now be changed to whatever it was on the old server so you can disregard the new one ee gave you during setup.

If you do end up using updraft, on the current server once a full backup is made, download each item (database, uploads, plugins etc) and then for the backup click on view log and then download the log, so you can upload this too when uploading your backup files on the new server. This way you can be sure that everything restored perfectly.


#13

@bamajr this has been fixed in the latest release. Update to the latest stable using ee site update --stable --yes and try re-creating the site with the same prameters.


#14

@msarhan @purbeckpixels EasyEngine provides a migration script which could help you migrate your sites from v3 to v4. I suggest you give it a shot :slight_smile:


#15

Like @msarhan I use UpdraftPlus for backups (together with a couple of server-level services). Doing what @msarhan suggested above worked flawlessly. First time I’ve used UpdraftPlus for a restore. A good plugin.


#16

Sweet. Glad to hear it went well. Personally I prefer this method as opposed to migrating. I just prefer a fresh server with a fresh install. Plus a lot of things can gone wrong during when migrating and it’s always good to have backups.