ReinerNippes / nextcloud_on_docker

Run Nextcloud in Docker Container on various Linux Hosts
MIT License
203 stars 48 forks source link

Error while trying to create admin user: Failed to connect to the database #34

Closed ghost closed 4 years ago

ghost commented 4 years ago

I left the passwords to be generated for me (ie blank), all defaults in group_vars/all.yml and now having the following error:

fatal: [localhost]: FAILED! => changed=true
  cmd: |-
    docker exec --user www-data nextcloud php occ  maintenance:install  --database pgsql --database-host nextcloud-db --database-name nextcloud  --database-table-prefix oc_ --database-user nextcloud --database-pass somepassword  --admin-user some-user --admin-pass someotherpassword --data-dir /var/nc-data
  delta: '0:00:00.505204'
  end: '2020-02-03 18:54:33.770242'
  msg: non-zero return code
  rc: 1
  start: '2020-02-03 18:54:33.265038'
  stderr: ''
  stderr_lines: <omitted>
  stdout: |-
    Error while trying to create admin user: Failed to connect to the database: An exception occurred in driver: SQLSTATE[08006] [7] FATAL:  password authentication failed for user "nextcloud"
     ->
  stdout_lines: <omitted>

Looks like this might be related to #15 which was resolved?

ReinerNippes commented 4 years ago

could you execute

docker exec --user www-data nextcloud php occ  maintenance:install  --database pgsql --database-host nextcloud-db --database-name nextcloud  --database-table-prefix oc_ --database-user nextcloud --database-pass somepassword  --admin-user some-user --admin-pass someotherpassword --data-dir /var/nc-data

on the commandline?

is somepassword the password or does it contain some "funny" characters misinterpreted by the commandline?

ghost commented 4 years ago

Still produces the same error message. 😞

ghost commented 4 years ago

Both passwords generated by the play consist of upper, lowercase and numbers. No special characters are present.

ghost commented 4 years ago

This same issue occured for someone else in #22

ReinerNippes commented 4 years ago

Could you give me some information about your system? os version, hoster?

ghost commented 4 years ago

Ubuntu 18.04 LTS. Self host.