GetDKAN / dkan-tools

CLI tools for DKAN site management
https://getdkan.github.io/dkan-tools/
15 stars 14 forks source link

Failed to drop or create the database #268

Closed janette closed 4 years ago

janette commented 4 years ago

Describe the bug

  1. Checkout master branch of payments
  2. Run dktl make
  3. Run dktl install

    
    Executing ../vendor/bin/drush site:install standard --site-name "DKAN" -y
    [ExecStack] Running ../vendor/bin/drush site:install standard --site-name "DKAN" -y in /var/www/docroot
    
    You are about to:
    * CREATE the 'drupal' database.
    
    // Do you want to continue?: yes.                                                                                      
    
    [warning] Failed to drop or create the database. Do it yourself before installing. ERROR 2005 (HY000): Unknown MySQL server host 'db' (2)
    
    [notice] Starting Drupal installation. This takes a while.
    [notice] Performed install task: install_select_language
    [notice] Performed install task: install_select_profile
    [notice] Performed install task: install_load_profile

In install.core.inc line 2300:

Database settings:

Array

site:install [--db-url DB-URL] [--db-prefix DB-PREFIX] [--db-su DB-SU] [--db-su-pw DB-SU-PW] [--account-name [ACCOUNT-NAME]] [--account-mail [ACCOUNT-MAIL]] [--site-mail [SITE-MAIL]] [--account-pass ACCOUNT-PASS] [--locale [LOCALE]] [--site-name [SITE-NAME]] [--site-pass SITE-PASS] [--sites-subdir SITES-SUBDIR] [--config-dir CONFIG-DIR] [--existing-config] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-d|--debug] [-y|--yes] [--no] [--remote-host REMOTE-HOST] [--remote-user REMOTE-USER] [-r|--root ROOT] [-l|--uri URI] [--simulate] [--pipe] [-D|--define DEFINE] [--notify [NOTIFY]] [--druplicon] [--xh-link XH-LINK] [--] []...

[ExecStack] Exit code 1 Time 0.476s [Exec] Running chmod u+w sites/default in /var/www/docroot [Exec] Done in 0.004s


4. run `docker ps -a`

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 0ef20a87a376 getdkan/dkan-cli:v0.2.1 "/opt/startup.sh /us…" About a minute ago Up About a minute 0.0.0.0:32772->8888/tcp payments3_cli_1 59ca1948977b getdkan/dkan-web:v0.2.0 "httpd-foreground" About a minute ago Up About a minute 0.0.0.0:32771->80/tcp, 0.0.0.0:32770->443/tcp, 0.0.0.0:32769->8888/tcp payments3_web_1 685cd3410171 wodby/mariadb:10.3-3.8.5 "/docker-entrypoint.…" About a minute ago Exited (1) About a minute ago payments3_db_1 99cb3daadb38 traefik:v2.0 "/entrypoint.sh --lo…" 5 minutes ago Up 5 minutes 0.0.0.0:80->80/tcp, 0.0.0.0:433->433/tcp, 0.0.0.0:8080->8080/tcp dktl-proxy



**Troubleshooting efforts**
- `dktl down --remove-orphans`
- restart docker
- `docker system prune -a`
- start from new directory

**Expected behavior**
Should install fresh db
janette commented 4 years ago

re-installed docker, working as expected