Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After failed 'dockerpresso up' now it can't install WordPress CLI #4

Open
EarthmanWeb opened this issue Oct 1, 2020 · 2 comments
Open

Comments

@EarthmanWeb
Copy link

Hello, when I was running the initial dockerpresso up command, my docker crashed.

So, to start fresh and cleanup , I used:

docker-compose down
docker-compose rm
docker-compose rmi -a

Now, when I try to re-run dockerpresso up, it runs into the error:
Error: WordPress files seem to already be present here.

Here's the total output:

$ dockerpresso up
Creating network "sos1_default" with the default driver
Pulling mysql (mariadb:)...
latest: Pulling from library/mariadb
d72e567cc804: Pull complete
0f3630e5ff08: Pull complete
b6a83d81d1f4: Pull complete
4bf2111ecf0e: Pull complete
9572d64978a0: Pull complete
bcc9953bffb3: Pull complete
de429570dda5: Pull complete
3652bc6ea9f9: Pull complete
6e4bf87041c8: Pull complete
9cb9bba22391: Pull complete
9de10906fc5c: Pull complete
2c3a798c7a1f: Pull complete
Digest: sha256:9d27dd15564ba13a8ffa93beee20b39b7c14218c47ea296c6e11878a77962d12
Status: Downloaded newer image for mariadb:latest
Pulling web (wordpress:)...
latest: Pulling from library/wordpress
d121f8d1c412: Pull complete
58b3577b786a: Pull complete
60538287851f: Pull complete
c53ff72fe225: Pull complete
79b018c8773f: Pull complete
fbe3e00ac4b0: Pull complete
ff35226e1df8: Pull complete
ab3b1d46dd82: Pull complete
b29cdd230d9a: Pull complete
d466b05cf627: Pull complete
771f930f6d23: Pull complete
b89a2786f2a3: Pull complete
c35594c34f69: Pull complete
8e3c480bd8bf: Pull complete
2d3e26ca1157: Pull complete
cc0d53b93bc3: Pull complete
dbcd12305020: Pull complete
90356c70a472: Pull complete
ceb2ac363e49: Pull complete
202d7e2f6c6c: Pull complete
Digest: sha256:7b67b32c076e9463a804182e0356966829d5533184c5064e22a7b97686e2154b
Status: Downloaded newer image for wordpress:latest
Creating sos1_mysql_1 ... done
Creating sos1_web_1   ... done
Pulling web-cli (wordpress:cli)...
Creating sos1_web-cli_run ... done
/usr/local/bin/dockerpresso: line 24: cli:: command not found
It seems wordpress was not downloaded yet, downloading
Creating sos1_web-cli_run ... done
Error: WordPress files seem to already be present here.

Can you please help with this?

@EarthmanWeb
Copy link
Author

EarthmanWeb commented Oct 1, 2020

Hmmm, ok, even though your documentation reads: dockerpresso up I see in another issue ticket that they are using: bash dockerpresso up

Using that, it does not give me the CLI error anymore, however then it cannot connect to the DB as follows: (the error repeats three times)


Creating sos1_web-cli_run ... done
[01-Oct-2020 18:46:50 UTC] PHP Warning:  Packets out of order. Expected 0 received 1. Packet size=69 in /var/www/html/wp-includes/wp-db.php on line 1635
Warning: Packets out of order. Expected 0 received 1. Packet size=69 in /var/www/html/wp-includes/wp-db.php on line 1635
[01-Oct-2020 18:46:50 UTC] PHP Warning:  mysqli_real_connect(): Error while reading greeting packet. PID=7 in /var/www/html/wp-includes/wp-db.php on line 1635
Warning: mysqli_real_connect(): Error while reading greeting packet. PID=7 in /var/www/html/wp-includes/wp-db.php on line 1635
[01-Oct-2020 18:46:50 UTC] PHP Warning:  mysqli_real_connect(): (HY000/2006): MySQL server has gone away in /var/www/html/wp-includes/wp-db.php on line 1635
Warning: mysqli_real_connect(): (HY000/2006): MySQL server has gone away in /var/www/html/wp-includes/wp-db.php on line 1635
Error: `MySQL server has gone away`
Error establishing a database connection
This either means that the username and password information in your `wp-config.php` file is incorrect or we can’t contact the database server at `mysql`. This could mean your host’s database server is down.

Are you sure you have the correct username and password?
Are you sure you have typed the correct hostname?
Are you sure the database server is running?

Here is my env file contents:

MYSQL_USER=sos_mysql
MYSQL_PASSWORD=sos_wmsql_pass
MYSQL_ROOT_PASSWORD=sos_mysql_root_pass

DB_HOST=mysql
DB_CHARSET=
DB_COLLATE=
TABLE_PREFIX=wp_

WP_DEBUG=true
WP_DEBUG_LOG=
WP_CACHE=
WPCACHEHOME=
UPLOADS=

FS_METHOD=
DISABLE_WP_CRON=
DISALLOW_FILE_EDIT=
MYSQL_DATABASE=sos1
MYSQL_USER=sos_mysql
MYSQL_PASSWORD=sos_wmsql_pass
MYSQL_ROOT_PASSWORD=sos_mysql_root_pass

DB_HOST=mysql
DB_CHARSET=
DB_COLLATE=
TABLE_PREFIX=wp_

WP_DEBUG=true
WP_DEBUG_LOG=
WP_CACHE=
WPCACHEHOME=
UPLOADS=

FS_METHOD=
DISABLE_WP_CRON=
DISALLOW_FILE_EDIT=

and my docker-compose.yml file

version: '2'
services:
    web:
        image: wordpress
        env_file: .env
        volumes:
            - wordpress_data:/var/www/html/
            # uncomment line below to start theme development
            - ./example-theme-src:/var/www/html/wp-content/themes/sos_constructx
            # uncomment line below to start plugin development
            # - ./example-plugin-src:/var/www/html/wp-content/plugins/example-plugin
        ports:
            - "80:80"
        links:
            - mysql
    mysql:
        image: mariadb
        env_file: .env
        ports:
            - "3306:3306"
        volumes:
            - mysql_data:/var/lib/mysql
volumes:
    mysql_data: {}
    wordpress_data: {}

Can you please advise?

@michaloo
Copy link
Owner

michaloo commented Oct 3, 2020

Can you just quickly let me know what dockerpresso version returns in your case?
I was changing few things around in recent versions.

The bash dockerpresso ... convention was used before and should not be used for current version (2.x).

Quick option would be to do dockerpresso destroy which will drop mysql db and wordpress data and then run dockerpresso up again. I just noticed that there may be a weird bug when first dockerpresso up fails with that "Error: WordPress files seem to already be present here." error and needs to be rerun.
Cleaning Wordpress may help as it feels that wp-config.php is not setup correctly.

I will try to reproduce your error by Monday and I will let you know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants