Checklist
I have read intro post: About the Installation Issues category
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
Issue Fixed, see comment.
During migration from 3.6.0 to 4.6.2 on Ubuntu 20.04 the migration fails to create tables for passboltdb.ui_actions
, passboltdb.rbacs
, passboltdb.folders_relations
, passboltdb.folders
.
We have a backup of the 3.6.0 db that we can restore data from, but can’t migrate from it. What commands would help migrate the schema correctly?
Server specs:
- Ubuntu 20.04.6 LTS
- PHP 7.4.3-4ubuntu2.20
- Pre-migration passbolt version: ‘3.6.0 New Morning’
- Migrated to passbolt version: ‘4.6.2 One Nation Under A Groove’
Steps taken to reproduce the issue:
- Upgrade with:
apt update
apt --only-upgrade install passbolt-ce-server
apt --only-upgrade install passbolt-ce-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
python-certbot-nginx | python-certbot-apache
The following packages will be upgraded:
passbolt-ce-server
1 upgraded, 0 newly installed, 0 to remove and 38 not upgraded.
Need to get 11.1 MB of archives.
After this operation, 5567 kB of additional disk space will be used.
Get:1 https://download.passbolt.com/ce/ubuntu focal/stable amd64 passbolt-ce-server all 4.6.2-1 [11.1 MB]
Fetched 11.1 MB in 0s (23.5 MB/s)
Preconfiguring packages ...
(Reading database ... 128242 files and directories currently installed.)
Preparing to unpack .../passbolt-ce-server_4.6.2-1_all.deb ...
Unpacking passbolt-ce-server (4.6.2-1) over (4.2.0-1) ...
Setting up passbolt-ce-server (4.6.2-1) ...
Installing new version of config file /etc/passbolt/Migrations/20210125212543_V320TransferFileStorageToAvatars.php ...
Installing new version of config file /etc/passbolt/Migrations/20211121231300_V340MigrateASCIIFieldsEncoding.php ...
Configuration file '/etc/passbolt/app.default.php'
==> Modified (by you or by a script) since installation.
==> Package distributor has shipped an updated version.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** app.default.php (Y/I/N/O/D/Z) [default=N] ?
Configuration file '/etc/passbolt/app.php'
==> Modified (by you or by a script) since installation.
==> Package distributor has shipped an updated version.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** app.php (Y/I/N/O/D/Z) [default=N] ?
Configuration file '/etc/passbolt/bootstrap.php'
==> Modified (by you or by a script) since installation.
==> Package distributor has shipped an updated version.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** bootstrap.php (Y/I/N/O/D/Z) [default=N] ?
Configuration file '/etc/passbolt/default.php'
==> Modified (by you or by a script) since installation.
==> Package distributor has shipped an updated version.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** default.php (Y/I/N/O/D/Z) [default=N] ?
Configuration file '/etc/passbolt/version.php'
==> Modified (by you or by a script) since installation.
==> Package distributor has shipped an updated version.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** version.php (Y/I/N/O/D/Z) [default=N] ? D
--- /etc/passbolt/version.php
+++ /etc/passbolt/version.php.dpkg-new
@@ -1,7 +1,11 @@
<?php
return [
'passbolt' => [
- 'version' => '3.6.0',
- 'name' => 'New morning'
- ]
+ 'version' => '4.6.2',
+ 'name' => 'One Nation Under A Groove',
+ ],
+ 'php' => [
+ 'minVersion' => '7.4',
+ 'nextMinVersion' => '8.1',
+ ],
];
Configuration file '/etc/passbolt/version.php'
==> Modified (by you or by a script) since installation.
==> Package distributor has shipped an updated version.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** version.php (Y/I/N/O/D/Z) [default=N] ? Y
Installing new version of config file /etc/passbolt/version.php ...
PHP Deprecated: Use of `BaseErrorHandler` and subclasses are deprecated. Upgrade to the new `ErrorTrap` and `ExceptionTrap` subsystem. See https://book.cakephp.org/4/en/appendices/4-4-migration-guide.html
/etc/passbolt/bootstrap.php, line: 125
You can disable all deprecation warnings by setting `Error.errorLevel` to `E_ALL & ~E_USER_DEPRECATED`. Adding `php` to `Err
or.ignoredDeprecationPaths` in your `config/app.php` config will mute deprecations from that file only. in /usr/share/php/pa
ssbolt/vendor/cakephp/cakephp/src/Core/functions.php on line 318
Exception: Expected configuration key "passbolt.featurePluginAdder" not found.
In [/usr/share/php/passbolt/vendor/cakephp/cakephp/src/Core/Configure.php, line 166]
dpkg: error processing package passbolt-ce-server (--configure):
installed passbolt-ce-server package post-installation script subprocess returned error exit status 1
Processing triggers for nginx-core (1.18.0-0ubuntu1.4) ...
Errors were encountered while processing:
passbolt-ce-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
W: Operation was interrupted before it could finish
- Update /etc/passbolt/default.php with ‘featurePluginAdder’:
'passbolt' => [
// Edition.
'edition' => 'ce',
'featurePluginAdder' => \App\BaseSolutionBootstrapper::class,
- Migrate database schema with:
sudo su -s /bin/bash -c “/usr/share/php/passbolt/bin/cake migrations migrate --no-lock” www-data
PHP Deprecated: Use of `BaseErrorHandler` and subclasses are deprecated. Upgrade to the new `ErrorTrap` and `ExceptionTrap` subsystem. See https://book.cakephp.org/4/en/appendices/4-4-migration-guide.html
/etc/passbolt/bootstrap.php, line: 125
You can disable all deprecation warnings by setting `Error.errorLevel` to `E_ALL & ~E_USER_DEPRECATED`. Adding `php` to `Error.ignoredDeprecationPaths` in your `config/app.php` config will mute deprecations from that file only. in /usr/share/php/passbolt/vendor/cakephp/cakephp/src/Core/functions.php on line 318
Deprecated Error: Since 4.0.0: Cake\Database\Type is deprecated. Use Cake\Database\TypeFactory instead.
/usr/share/php/passbolt/vendor/composer/ClassLoader.php, line: 576
You can disable all deprecation warnings by setting `Error.errorLevel` to `E_ALL & ~E_USER_DEPRECATED`. Adding `vendor/composer/ClassLoader.php` to `Error.ignoredDeprecationPaths` in your `config/app.php` config will mute deprecations from that file only.
In [/usr/share/php/passbolt/vendor/cakephp/cakephp/src/Core/functions.php, line 318]
using migration paths
- /etc/passbolt/Migrations
using seed paths
- /etc/passbolt/Seeds
using environment default
using adapter mysql
using database passboltdb
ordering by creation time
== 20230911100418 V430AddUserDisabledField: migrating
== 20230911100418 V430AddUserDisabledField: migrated 0.4662s
== 20231005121310 V440MobileTransferInsertUiActions: migrating
error: There was an error in V440MobileTransferInsertUiActions
error: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'passboltdb.ui_actions' doesn't exist
== 20231005121310 V440MobileTransferInsertUiActions: migrated 0.0106s
== 20231005123634 V440MobileTransferDefaultRbacsUiActions: migrating
error: There was an error in V440MobileTransferDefaultRbacsUiActions
error: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'passboltdb.rbacs' doesn't exist
== 20231005123634 V440MobileTransferDefaultRbacsUiActions: migrated 0.0348s
== 20231108114414 V441AlterUidOnGpgkeys: migrating
== 20231108114414 V441AlterUidOnGpgkeys: migrated 0.0812s
== 20231115235026 V441DropUserAgents: migrating
== 20231115235026 V441DropUserAgents: migrated 0.1221s
== 20231211195437 V450AddExpiredDateFieldToResources: migrating
== 20231211195437 V450AddExpiredDateFieldToResources: migrated 0.1578s
== 20240226143754 V460ShareFolderUiActions: migrating
error: There was an error in V460ShareFolderUiActions
error: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'passboltdb.ui_actions' doesn't exist
== 20240226143754 V460ShareFolderUiActions: migrated 0.0059s
== 20240226145601 V460ShareFolderDefaultRbacsUiActions: migrating
error: There was an error in V460ShareFolderDefaultRbacsUiActions
error: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'passboltdb.rbacs' doesn't exist
== 20240226145601 V460ShareFolderDefaultRbacsUiActions: migrated 0.0319s
All Done. Took 0.9221s
error.log:
error: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'passboltdb.folders_relations' doesn't exist
error: [Cake\Database\Exception\DatabaseException] SQLSTATE[42S02]: Base table or view not found: 1146 Table 'passboltdb.folders_relations' doesn't exist in /usr/share/php/passbolt/vendor/cakephp/cakephp/src/Database/Schema/Collection.php on line 160
Caused by: [PDOException] SQLSTATE[42S02]: Base table or view not found: 1146 Table 'passboltdb.folders_relations' doesn't exist in /usr/share/php/passbolt/vendor/cakephp/cakephp/src/Database/Statement/MysqlStatement.php on line 39
Request URL: /resources/redacted.json?api-version=v2&contain%5Bsecret%5D=1&contain%5Bresource-type%5D=1
Health check logs:
sudo -H -u www-data bash -c "/usr/share/php/passbolt/bin/cake passbolt healthcheck"
PHP Deprecated: Use of `BaseErrorHandler` and subclasses are deprecated. Upgrade to the new `ErrorTrap` and `ExceptionTrap` subsystem. See https://book.cakephp.org/4/en/appendices/4-4-migration-guide.html
/etc/passbolt/bootstrap.php, line: 125
You can disable all deprecation warnings by setting `Error.errorLevel` to `E_ALL & ~E_USER_DEPRECATED`. Adding `php` to `Error.ignoredDeprecationPaths` in your `config/app.php` config will mute deprecations from that file only. in /usr/share/php/passbolt/vendor/cakephp/cakephp/src/Core/functions.php on line 318
Deprecated Error: Since 4.0.0: Cake\Database\Type is deprecated. Use Cake\Database\TypeFactory instead.
/usr/share/php/passbolt/vendor/composer/ClassLoader.php, line: 576
You can disable all deprecation warnings by setting `Error.errorLevel` to `E_ALL & ~E_USER_DEPRECATED`. Adding `vendor/composer/ClassLoader.php` to `Error.ignoredDeprecationPaths` in your `config/app.php` config will mute deprecations from that file only.
In [/usr/share/php/passbolt/vendor/cakephp/cakephp/src/Core/functions.php, line 318]
____ __ ____
/ __ \____ _____ ____/ /_ ____ / / /_
/ /_/ / __ `/ ___/ ___/ __ \/ __ \/ / __/
/ ____/ /_/ (__ |__ ) /_/ / /_/ / / /
/_/ \__,_/____/____/_.___/\____/_/\__/
Open source password manager for teams
-------------------------------------------------------------------------------
Healthcheck shell
-------------------------------------------------------------------------------
Environment
[PASS] PHP version 7.4.3-4ubuntu2.20.
[WARN] PHP version less than 8.1 will soon be not supported by passbolt, so consider upgrading your operating system or PHP environment.
[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
[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://redacted.com
[PASS] App.fullBaseUrl validation OK.
[PASS] /healthcheck/status is reachable.
SSL Certificate
[PASS] SSL peer certificate validates
[PASS] Hostname is matching in SSL certificate.
[PASS] Not using a self-signed certificate
Database
[PASS] The application is able to connect to the database
[PASS] 25 tables found
[PASS] Some default content is present
[PASS] The database schema up to date.
GPG Configuration
redacted (ALL OK)
Application configuration
[PASS] Using latest passbolt version (4.6.2).
[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.
[INFO] The Self Registration plugin is disabled.
[HELP] Enable the plugin in order to define self registration settings.
[INFO] Registration is closed, only administrators can add users.
[WARN] The deprecated self registration public setting was found in /etc/passbolt/passbolt.php.
[HELP] You may remove the "passbolt.registration.public" setting.
[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
[WARN] The SMTP Settings plugin is disabled. Enable the plugin in order to define SMTP settings in the database.
[PASS] No error found. Nice one sparky!