I have run into a problem where a previously working install of Passbolt in a Docker container on a Synology NAS has stopped working after an unexpected shutdown (due to a power cut) of the server.
Everything was working fine prior to the power cut. I was able to access Passbolt on the desired subdomain and domain. The SSL and port forwarding in the router were all working okay.
Now the container starts but report it is ‘unhealthy’. The last output from the container is “Failed to connect to localhost port 8080 : Connection refused”. I have checked that port 8080 is not being used by another process.
I would like to try to resolve this without a full re-install as there are some users who have stored passwords that I would like to retain if possible.
I have tried re-starting the container serveral times, always with the same result. I have tried stopping all other containers and starting Passbolt on its own with no success (and the same error).
The original install was done with this guide :
I suspect the problem could be reproduced by installing as above and doing a hard-shutdown (power cut) to the server.
I have since bought a UPS. : -)
Links in this post have been removed as new users are not allowed more than 2 links in a post.
Thanks in advance to anyone who can help.
Checklist
I have read intro post : link removed
I have read the tutorials, help and searched for similar issues
I provide relevant information about my server (component names and versions, etc.)
I provide a copy of my logs and healthcheck
I describe the steps I have taken to trouble shoot the problem
I describe the steps on how to reproduce the issue
Server : Synology NAS, DSM 7.1.1-42962 Update 4
docker compose details:
version: "3.9"
services:
db:
image: mariadb:jammy
container_name: Passbolt-DB
hostname: passbolt-db
mem_limit: 512m
mem_reservation: 128m
cpu_shares: 768
security_opt:
- no-new-privileges:true
healthcheck:
test: ["CMD-SHELL", "mysqladmin ping -P 3306 -prootpass | grep 'mysqld is alive' || exit 1"]
volumes:
- /volume1/docker/passbolt/db:/var/lib/mysql:rw
environment:
TZ: Australia/Melbourne
MYSQL_ROOT_PASSWORD: rootpass
MYSQL_DATABASE: passbolt
MYSQL_USER: passboltuser
MYSQL_PASSWORD: passboltpass
restart: on-failure:5
passbolt:
image: passbolt/passbolt:latest-ce-non-root
command:
- /bin/bash
- -c
- /usr/bin/wait-for.sh -t 0 db:3306 -- /docker-entrypoint.sh
container_name: Passbolt
hostname: passbolt
mem_limit: 1g
cpu_shares: 512
security_opt:
- no-new-privileges:true
healthcheck:
test: curl -f *removed* || exit 1
ports:
- 9475:8080
volumes:
- /volume1/docker/passbolt/gpg:/etc/passbolt/gpg:rw
- /volume1/docker/passbolt/jwt:/etc/passbolt/jwt:rw
environment:
DEBUG: false
APP_FULL_BASE_URL: *removed*
DATASOURCES_DEFAULT_HOST: passbolt-db
DATASOURCES_DEFAULT_USERNAME: passboltuser
DATASOURCES_DEFAULT_PASSWORD: passboltpass
DATASOURCES_DEFAULT_DATABASE: passbolt
PASSBOLT_REGISTRATION_PUBLIC: true
EMAIL_DEFAULT_FROM: *removed*
EMAIL_TRANSPORT_DEFAULT_HOST: *removed*
EMAIL_TRANSPORT_DEFAULT_PORT: 25
EMAIL_TRANSPORT_DEFAULT_USERNAME: *removed*
EMAIL_TRANSPORT_DEFAULT_PASSWORD: *removed*
EMAIL_TRANSPORT_DEFAULT_TLS: true
restart: on-failure:5
depends_on:
db:
condition: service_started
Healthcheck :
____ __ ____
/ __ \____ _____ ____/ /_ ____ / / /_
/ /_/ / __ `/ ___/ ___/ __ \/ __ \/ / __/
/ ____/ /_/ (__ |__ ) /_/ / /_/ / / /
/_/ \__,_/____/____/_.___/\____/_/\__/
Open source password manager for teams
-------------------------------------------------------------------------------
Healthcheck shell
-------------------------------------------------------------------------------
Environment
[PASS] PHP version 7.4.33.
[PASS] PCRE compiled with unicode support.
[PASS] The temporary directory and its content are writable and not executable.
[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
[WARN] The passbolt config file is missing in /etc/passbolt/
[HELP] Copy /etc/passbolt/passbolt.default.php to /etc/passbolt/passbolt.php
[HELP] The passbolt config file is not required if passbolt is configured with environment variables
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 *link removed*
[PASS] App.fullBaseUrl validation OK.
[FAIL] Could not reach the /healthcheck/status with the url specified in App.fullBaseUrl
[HELP] Check that the domain name is correct in /etc/passbolt/passbolt.php
[HELP] Check the network settings
SSL Certificate
[FAIL] SSL peer certificate does not validate
[FAIL] Hostname does not match when validating certificates.
[WARN] Using a self-signed certificate
[HELP] Check *link removed*
[HELP] cURL Error (6) Could not resolve host: *link removed - but it did work with this link*
Database
[FAIL] The application is not able to connect to the database.
[HELP] Double check the host, database name, username and password in /etc/passbolt/passbolt.php.
[HELP] Make sure the database exists and is accessible for the given database user.
[FAIL] No table found
[HELP] Run the install script to install the database tables
[HELP] sudo su -s /bin/bash -c "/usr/share/php/passbolt/bin/cake passbolt install" www-data
[FAIL] No default content found
[HELP] Run the install script to set the default content such as roles and permission types
[HELP] sudo su -s /bin/bash -c "/usr/share/php/passbolt/bin/cake passbolt install" www-data
[FAIL] The database schema is not up to date.
[HELP] Run the migration scripts:
[HELP] sudo su -s /bin/bash -c "/usr/share/php/passbolt/bin/cake migrations migrate --no-lock" www-data
[HELP] See. *link removed*
GPG Configuration
[PASS] PHP GPG Module is installed and loaded.
[PASS] The environment variable GNUPGHOME is set to /var/lib/passbolt/.gnupg.
[PASS] The directory /var/lib/passbolt/.gnupg containing the keyring is writable by the webserver user.
[FAIL] The server OpenPGP key is not set
[HELP] Create a key, export it and add the fingerprint to /etc/passbolt/passbolt.php
[HELP] See. *link removed*
[PASS] The public key file is defined in /etc/passbolt/passbolt.php and readable.
[PASS] The private key file is defined in /etc/passbolt/passbolt.php and readable.
[FAIL] The server key fingerprint doesn't match the one defined in /etc/passbolt/passbolt.php.
[HELP] Double check the key fingerprint, example:
[HELP] sudo su -s /bin/bash -c "gpg --list-keys --fingerprint --home /var/lib/passbolt/.gnupg" www-data | grep -i -B 2 'SERVER_KEY_EMAIL'
[HELP] SERVER_KEY_EMAIL: The email you used when you generated the server key.
[HELP] See. *link removed*
[FAIL] The server public key defined in the /etc/passbolt/passbolt.php (or environment variables) is not in the keyring
[HELP] Import the private server key in the keyring of the webserver user.
[HELP] you can try:
[HELP] sudo su -s /bin/bash -c "gpg --home /var/lib/passbolt/.gnupg --import /etc/passbolt/gpg/serverkey_private.asc" www-data
[FAIL] The server key does not have a valid email id.
[HELP] Edit or generate another key with a valid email id.
Application configuration
[FAIL] Could not connect to passbolt repository to check versions It is not possible check if your version is up to date.
[HELP] Check the network configuration to allow this script to check for updates.
[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.
[WARN] Registration is open to everyone.
[HELP] Make sure this instance is not publicly available on the internet.
[HELP] Or set passbolt.registration.public to false in /etc/passbolt/passbolt.php.
[WARN] Host availability checking is disabled.
[HELP] Make sure this instance is not publicly available on the internet.
[HELP] Or set the PASSBOLT_EMAIL_VALIDATE_MX environment variable to true.
[HELP] Or set passbolt.email.validate.mx to true in /etc/passbolt/passbolt.php.
[PASS] Serving the compiled version of the javascript app.
[PASS] All email notifications will be sent.
JWT Authentication
[PASS] The JWT Authentication plugin is enabled
[PASS] The /etc/passbolt/jwt/ directory is not writable.
[PASS] A valid JWT key pair was found
SMTP Settings
[PASS] The SMTP Settings plugin is enabled.
[PASS] SMTP Settings coherent. You may send a test email to validate them.
[WARN] The SMTP Settings source is: env variables.
[HELP] It is recommended to set the SMTP Settings in the database through the administration section.
[WARN] The SMTP Settings plugin endpoints are enabled.
[HELP] It is recommended to disable the plugin endpoints.
[HELP] Set the PASSBOLT_SECURITY_SMTP_SETTINGS_ENDPOINTS_DISABLED environment variable to true.
[HELP] Or set passbolt.security.smtpSettings.endpointsDisabled to true in /etc/passbolt/passbolt.php.
[FAIL] 12 error(s) found. Hang in there!