Database connection issue while installing

hey guys,
i´m trying to setup passbolt on my virtualized debian 10 envioronment. I used the installation script from github from the Debian 10 Installation Tutorial.

When i´m finished and try to run the installation wizard it stucks on step 7 with “Installing database” for hours.

i did:

su -c “/var/www/passbolt/bin/cake passbolt healthcheck” -s /bin/bash www-data

and it says:

Healthcheck shell…Exception: SQLSTATE[HY000] [1045] Access denied for user ‘’@‘localhost’ (using password: NO) in [/var/www/passbolt/vendor/cakephp/cakephp/src/Database/Driver.php, line 92]

so can anyone help me pls and tell me whats wrong? i use a password with only letters and numbers, no special characters

thx!
Checklist
[x] I have read intro post: About the Installation Issues category
[x] I have read the tutorials, help and searched for similar issues
[x] I provide relevant information about my server (component names and versions, etc.)
[x] I provide a copy of my logs and healthcheck
[x] I describe the steps I have taken to trouble shoot the problem
[x] I describe the steps on how to reproduce the issue

Hello,

It seems that you have an issue when connecting to the database. Maybe there is an ‘-’ in the database name or user, if password is fine. I’d say try again from scratch, it will be easier, than trying to fix it from there.

Hey Remy,
it isnt. I choose passwords and names without conflicting characters. I set it up three times yesterday, but it always failed.

Ok, maybe it’s an issue when connecting to the database, or there is an issue when writting the config file that contains the credentials to connect to the database.

Can you tell us more:

  • Which user do you us to run the script / install passbolt?
  • Do you have any errors when running the installation scripts?
  • Is your database on the same server? (e.g. do you use localhost or something else?)
  • Is the file system writable in your passbolt directory, under config?
  • What happen if you update manually the credentials in config/passbolt.php?

Hey remy, sure i*ll answer your questions:

  1. root
  2. Definitly no
  3. yes, used localhost and 127.0.0.1 during install process
  4. yes, it is
  5. you mean before or after running web insallation?

Yes after. It seems to me maybe the web installer is not able to write the main passbolt.php configuration on the file system.

Hey remy, i retried today on a Hetzner V Server and it worked instant on the first try. So it seems theres something wrong with my machine. I’ll check the setup of my vserver and i’ll come back on you soon.
thanks

Hey remy, now i’m back with new information. I installed it again on my self hosted v server and it took 13 Minutes to do the Script. On Cloud V-Server it only took 1,5 minutes to be ready. The webinstallation ist now stuck on check status.

When i’m connecting on a new tab it says:

Nice one! The plugin is installed and configured. You are good to go!

and

Could not verify server key. There is no user associated with this key. User not found.

But i wasnt at the page to create a new user. so i cant recover the plugin/account.

 Open source password manager for teams
---------------------------------------------------------------
 Healthcheck shell
---------------------------------------------------------------

 Environment

 [PASS] PHP version 7.3.14-1~deb10u1.
 [PASS] PCRE compiled with unicode support.
 [FAIL] The temporary directory and its content are not writable.
  [HELP] Ensure the temporary directory and its content are writable by the webserver user.
  [HELP] you can try:
  [HELP] sudo chown -R www-data:www-data /var/www/passbolt/tmp/
  [HELP] sudo chmod 775 $(find /var/www/passbolt/tmp/ -type d)
  [HELP] sudo chmod 664 $(find /var/www/passbolt/tmp/ -type f)
 [PASS] The public image directory and its content are writable.
 [PASS] The logs directory and its content are writable.
 [PASS] GD or Imagick extension is installed.
 [PASS] Intl extension is installed.
 [PASS] Mbstring extension is installed.

 Config files

 [PASS] The application config file is present
 [PASS] The passbolt config file is present

 Core config

 [PASS] Debug mode is off.
 [PASS] Cache is working.
 [PASS] Unique value set for security.salt
 [PASS] Full base url is set to https://pwm.japasp.de
 [PASS] App.fullBaseUrl validation OK.
 [PASS] /healthcheck/status is reachable.

 SSL Certificate

 [FAIL] SSL peer certificate does not validate
 [FAIL] Hostname does not match when validating certificates.
 [WARN] Using a self-signed certificate
  [HELP] fopen(): SSL operation failed with code 1. OpenSSL Error messages:
error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed
fopen(): Failed to enable crypto
fopen(https://pwm.japasp.de/healthcheck/status.json): failed to open stream: operation failed

 Database

 [PASS] The application is able to connect to the database
 [PASS] 23 tables found
 [PASS] Some default content is present
 [PASS] The database schema up to date.

 GPG Configuration

 [PASS] PHP GPG Module is installed and loaded.
 [PASS] The environment variable GNUPGHOME is set to /home/www-data/.gnupg.
 [PASS] The directory /home/www-data/.gnupg containing the keyring is writable by the webserver user.
 [PASS] The server gpg key is not the default one
 [PASS] The public key file is defined in config/passbolt.php and readable.
 [PASS] The private key file is defined in config/passbolt.php and readable.
 [PASS] The server key fingerprint matches the one defined in config/passbolt.php.
 [PASS] The server public key defined in the config/passbolt.php (or environment variables) is in the keyring.
 [PASS] There is a valid email id defined for the server key.
 [PASS] The public key can be used to encrypt a message.
 [PASS] The private key can be used to sign a message.
 [PASS] The public and private keys can be used to encrypt and sign a message.
 [PASS] The private key can be used to decrypt a message.
 [PASS] The private key can be used to decrypt and verify a message.
 [PASS] The public key can be used to verify a signature.

 Application configuration

 [PASS] Using latest passbolt version (2.12.1).
 [PASS] Passbolt is configured to force SSL use.
 [PASS] App.fullBaseUrl is set to HTTPS.
 [PASS] Selenium API endpoints are disabled.
 [PASS] Search engine robots are told not to index content.
 [PASS] Registration is closed, only administrators can add users.
 [PASS] Serving the compiled version of the javascript app
 [PASS] All email notifications will be sent.

  3 error(s) found. Hang in there!

and here are the directory permissions:

root@vm25-pwm:/var/www/passbolt# ls -la /var/www/passbolt/tmp/
insgesamt 24
drwxr-xrwx  6 www-data www-data 4096 Apr 29 17:59 .
drwxr-xr-x 14 www-data www-data 4096 Apr 29 17:59 ..
drwxr-xrwx  6 www-data www-data 4096 Apr 29 20:38 cache
-rw-r--r--  1 www-data www-data    0 Apr 29 17:58 empty
drwxr-xrwx  2 www-data www-data 4096 Apr 29 17:58 selenium
drwxr-xrwx  2 www-data www-data 4096 Apr 29 17:59 sessions
drwxr-xrwx  2 www-data www-data 4096 Apr 29 17:59 tests

Hey.
i’m back on you with a few more information. I changed the way i set up my vm’s and i got a slight increase in installation time, but its far away from hetzners v servers…

I tested around 9 installations this night, one time, the installation was successfull, but i cant figure out why. The time the installation was successfull, i used firefox and installed the plugin right before the installation.

i also tested this with chrome again - stuck on checking status. i tried it again with firefox (reinstalled plugin) - stuck at checking status. i cant figure out a pattern of what went wrong every time…

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.