Pilothouse-App / Pilothouse

A command line app for managing a LEMP local development environment based on Docker.
http://pilothouse-app.org
GNU General Public License v2.0
98 stars 17 forks source link

ERROR: No container found for php_1 #47

Closed morganestes closed 7 years ago

morganestes commented 7 years ago

On my first run of dockerbox up, I get stuck with the error No container found for php_1 repeating for several minutes until I finally cancel the run. Just before that is a problem with mailcatcher, but I don't know if that's the cause or just a red herring.

Here's the messages just before and after the error starts:

ERROR:  Could not find a valid gem 'mailcatcher' (>= 0), here is why:
          Unable to download data from https://rubygems.org/ - SSL_connect returned=1 errno=0 state=error: certificate verify failed (https://api.rubygems.org/specs.4.8.gz)
ERROR: Service 'mailcatcher' failed to build: The command '/bin/sh -c apk add --no-cache --virtual .build-deps     build-base curl ruby-dev && apk add --no-cache curl libstdc++ ruby ruby-json sqlite-dev && gem install mailcatcher --no-ri --no-rdoc && apk del .build-deps' returned a non-zero code: 2
ERROR: No container found for php_1
ERROR: No container found for php_1
Waiting for MySQL to become ready... ERROR: No container found for php_1
ERROR: No container found for php_1
philipnewcomer commented 7 years ago

@morganestes in your log I see some network-related errors, which are keeping the mailcatcher container from being built. I can't see the logs for the php containers, but I suspect that may have happened there as well, which would explain the No container found for php_1 message, as the containers were unable to be built.

Try running dockerbox compose build (which is a shortcut for docker-compose build which sets required environment variables), and make sure that all the containers can be built successfully first. If that fails, can you post the full output of the dockerbox compose build command?

morganestes commented 7 years ago

Running dockerbox compose build didn't throw any errors, but now there's an error with nginx ☹️ .

$ dockerbox compose build
Building php-xdebug
Step 1/10 : FROM php:7.0-fpm-alpine
 ---> 1a487c2a3b9b
Step 2/10 : RUN apk add --no-cache --virtual .build-deps    git autoconf g++ libtool make imagemagick-dev libmemcached-dev libjpeg-turbo-dev libpng-dev zlib-dev cyrus-sasl-dev     && docker-php-source extract
 ---> Using cache
 ---> 7c46a42dbad2
Step 3/10 : RUN git clone https://github.com/websupport-sk/pecl-memcache.git /usr/src/php/ext/memcache/     && docker-php-ext-configure memcache    && docker-php-ext-install memcache
 ---> Using cache
 ---> b54624895ab9
Step 4/10 : RUN git clone --branch php7 https://github.com/php-memcached-dev/php-memcached /usr/src/php/ext/memcached/  && docker-php-ext-configure memcached   && docker-php-ext-install memcached
 ---> Using cache
 ---> 63bc83f2c77a
Step 5/10 : RUN apk add --no-cache imagemagick libmemcached mysql-client    && pecl install imagick     && docker-php-ext-install calendar gd mysqli opcache pdo_mysql zip  && docker-php-ext-enable imagick
 ---> Using cache
 ---> 697d66931816
Step 6/10 : RUN pecl install xdebug     && docker-php-ext-enable xdebug
 ---> Using cache
 ---> 403368adc111
Step 7/10 : RUN rm -rf /usr/src/php/ext/memcache    && rm -rf /usr/src/php/ext/memcached    && docker-php-source delete     && apk del .build-deps
 ---> Using cache
 ---> 012208cd4c57
Step 8/10 : RUN apk add --no-cache less ssmtp
 ---> Using cache
 ---> 63809eb8e65b
Step 9/10 : RUN ln -s /usr/local/vendor/wp-cli/wp-cli/bin/wp /usr/local/bin/wp
 ---> Using cache
 ---> 51fe99eb016e
Step 10/10 : RUN mkdir -p /home/www-data/.wp-cli && chown -R www-data:www-data /home/www-data/.wp-cli
 ---> Using cache
 ---> 2e5622978db8
Successfully built 2e5622978db8
Building mailcatcher
Step 1/4 : FROM alpine:latest
 ---> 14e13b07dc83
Step 2/4 : RUN apk add --no-cache --virtual .build-deps     build-base curl ruby-dev && apk add --no-cache curl libstdc++ ruby ruby-json sqlite-dev && gem install mailcatcher --no-ri --no-rdoc && apk del .build-deps
 ---> Using cache
 ---> 66c7efacd071
Step 3/4 : EXPOSE 1025 1080
 ---> Using cache
 ---> 4b80e347037d
Step 4/4 : ENTRYPOINT mailcatcher --foreground --ip=0.0.0.0
 ---> Using cache
 ---> 7e933269b896
Successfully built 7e933269b896
nginx uses an image, skipping
mysql uses an image, skipping
Building php
Step 1/9 : FROM php:7.0-fpm-alpine
 ---> 1a487c2a3b9b
Step 2/9 : RUN apk add --no-cache --virtual .build-deps     git autoconf g++ libtool make imagemagick-dev libmemcached-dev libjpeg-turbo-dev libpng-dev zlib-dev cyrus-sasl-dev     && docker-php-source extract
 ---> Using cache
 ---> 7c46a42dbad2
Step 3/9 : RUN git clone https://github.com/websupport-sk/pecl-memcache.git /usr/src/php/ext/memcache/  && docker-php-ext-configure memcache    && docker-php-ext-install memcache
 ---> Using cache
 ---> b54624895ab9
Step 4/9 : RUN git clone --branch php7 https://github.com/php-memcached-dev/php-memcached /usr/src/php/ext/memcached/   && docker-php-ext-configure memcached   && docker-php-ext-install memcached
 ---> Using cache
 ---> 63bc83f2c77a
Step 5/9 : RUN apk add --no-cache imagemagick libmemcached mysql-client     && pecl install imagick     && docker-php-ext-install calendar gd mysqli opcache pdo_mysql zip  && docker-php-ext-enable imagick
 ---> Using cache
 ---> 697d66931816
Step 6/9 : RUN rm -rf /usr/src/php/ext/memcache     && rm -rf /usr/src/php/ext/memcached    && docker-php-source delete     && apk del .build-deps
 ---> Using cache
 ---> b52f2b6e9e86
Step 7/9 : RUN apk add --no-cache less ssmtp
 ---> Using cache
 ---> 4e335194f0cd
Step 8/9 : RUN ln -s /usr/local/vendor/wp-cli/wp-cli/bin/wp /usr/local/bin/wp
 ---> Using cache
 ---> 3de3324cd195
Step 9/9 : RUN mkdir -p /home/www-data/.wp-cli && chown -R www-data:www-data /home/www-data/.wp-cli
 ---> Using cache
 ---> 9d6a57896505
Successfully built 9d6a57896505
memcached uses an image, skipping

$ dockerbox up
Creating network "dockerbox_default" with the default driver
Creating dockerbox_nginx_1
Creating dockerbox_memcached_1
Creating dockerbox_mailcatcher_1
Creating dockerbox_mysql_1
Creating dockerbox_php_1
Creating dockerbox_php-xdebug_1

ERROR: for nginx  Cannot start service nginx: driver failed programming external connectivity on endpoint dockerbox_nginx_1 (28f28c7964d9b338dc15d9043d1395ea5324a296e49908b0514a9c8871bb9b7b): Error starting userland proxy: Bind for 0.0.0.0:80: unexpected error (Failure EADDRINUSE)
ERROR: Encountered errors while bringing up the project.
Waiting for MySQL to become ready... done.
philipnewcomer commented 7 years ago

The EADDRINUSE error means that Docker could not bind port 80 on your machine to the Nginx container, because port 80 is already is use by another service. Is there any other software on your machine already using port 80, such as another local environment?

philipnewcomer commented 7 years ago

@morganestes are you still having problems or can this be closed out?

morganestes commented 7 years ago

I'm still getting a variation of this problem with new sites, but not sure where the conflict is. Since I can't reproduce it consistently, I'll close it and revisit if I can narrow it down later.

Jaace commented 7 years ago

I just got this error - Docker and my dockerbox was up and running with only one site. I created a new site and saw the output below. The site was created however, so I'm not seeing issues on that end. Looking at the Kitematic PHP logs for Docker, I didn't see anything out of the ordinary on dockerbox_php_1 either:

dockerbox_php_1:

[11-Feb-2017 00:28:29] NOTICE: Terminating ...
[11-Feb-2017 00:28:29] NOTICE: exiting, bye-bye!
[11-Feb-2017 13:31:44] NOTICE: fpm is running, pid 1
[11-Feb-2017 13:31:44] NOTICE: ready to handle connections
172.18.0.5 -  11/Feb/2017:13:33:29 +0000 "GET /index.php" 200

My output:

dockerbox create jason-boyle
Domain to use (leave blank for jason-boyle.dev):
URL to proxy images from (leave blank to disable):
Creating site jason-boyle.dev.
ERROR: No container found for php_1
Password:
Starting dockerbox_mailcatcher_1
Starting dockerbox_php-xdebug_1
Starting dockerbox_nginx_1
Starting dockerbox_php_1
Starting dockerbox_memcached_1
Starting dockerbox_mysql_1
Downloading WordPress 4.7.2 (en_US)...
Using cached file '/home/www-data/.wp-cli/cache/core/wordpress-4.7.2-en_US.tar.gz'...
Success: WordPress downloaded.
Success: Generated 'wp-config.php' file.
Success: WordPress installed successfully.
Restarting dockerbox_nginx_1 ... done
Adding hosts file entry for jason-boyle.dev.
jason-boyle.dev successfully created.