I have migrated my passbolt old version to new version. But the new version is configured on the new server. All the data are restored perfectly but now when I try to decrypt, copy or export any password, it gives me the error: An internal error has occurred.
To solve the same I tried running below command which threw some errors:
sudo -u www-data /bin/cake migrations migrate
OUTPUT:
using migration paths
/etc/passbolt/Migrations
using seed paths
/etc/passbolt/Seeds
using environment default
using adapter mysql
using database passbolt
ordering by creation time
I was before running with the 2.04 version on the Ubuntu 18.04 server. Then I changed it on new Ubuntu 20.04 server with the latest verison of passbolt and added the backups in there.
I uploaded the old database from the old server to the new server.
1.) sudo -u www-data bin/cake migrations status
OUTPUT:
using migration paths
- /etc/passbolt/Migrations
using seed paths
- /etc/passbolt/Seeds
using environment default
Status Migration ID Migration Name
-----------------------------------------
up 20170830064410 V162InitialMigration
up 20170830065037 V200ActiveMustBeBoolean
up 20170830065038 V200DropUnusedProfileFields
up 20170830065039 V200IncreaseEmailSize
up 20170830065040 V200DropUnusedCreatedBy
up 20170830065041 V200MigrateUUID
up 20170830065042 V200MigrateKeyField
up 20171002061834 V200DropUnusedResourceFields
up 20171006141922 V200AddFavoriteModifiedField
up 20171009093000 V200DropUnusedPermissionTypesTable
up 20171009093001 V200MigrateEmailsTable
up 20171009093002 V200MigrateFileStorageTable
up 20171025154754 V200AddCommentsUserIdField
up 20180102065042 V200MigrateForeignIdField
up 20180102180000 V200DropUnusedTables
up 20180102221500 V200AddMissingTablesIndexes
up 20180413171600 V202ForceColumnsCharset
**down 20180503135810 V210InstallAccountSettingsPlugin**
up 20180930151500 V240AddAuthenticationTokenType
**down 20181002171600 V240ExtendAccountSettingsPlugin**
up 20181210170000 V270AddMissingIndexes
up 20190106170300 V280AdditionalEmailMigration
up 20190106170301 V280AdditionalFileStorageMigration
up 20190106170302 V280FileDirectoryPathsMigrations
up 20190112124290 V270AddActionsTable
up 20190112124300 V270AddActionLogsTable
up 20190121111100 V270AddEntitiesHistoryTable
up 20190121121100 V270AddPermissionsHistoryTable
up 20190211124300 V270AddSecretsHistoryTable
up 20190221124300 V270AddSecretAccessesTable
up 20190512115400 V2100AddOrganizationSettingsTable
up 20190623143400 V2110ExtendKeyIdSizeField
up 20190923103000 V2120UpdateEmailQueue
up 20191119160000 V2120DropUnusedTables
**down 20200108135000 V2130DropLegacyAnonymousUser**
** down 20200319135000 V2130SoftDeleteGpgKeysForSoftDeletedUsers**
** down 20200501182000 V2130ReconcileLoginHistory**
** down 20200806110200 V300ExtendSecretsDataField**
** down 20200806110201 V300AddResourceTypeIdField**
** down 20200806110202 V300AddResourceTypesTable**
** down 20200806110203 V300AddResourceTypesDefaultData**
** down 20200806110204 V300AddResourceTypesToResources**
** down 20200824191900 V2136CleanupUnusedActionLogs**
** down 20200824191901 V2136AddActionLogsRelatedIndexes**
** down 20201221093528 V300DeleteMetadataOfSoftDeletedResources**
** down 20210111163200 V300AddActionLogsExtraIndex**
** down 20210121141742 V320AddAvatarsTable**
** down 20210125212543 V320TransferFileStorageToAvatars**
** down 20210206521254 V320DropFileStorage**
** down 20210329110000 V320FixResourceTypesDefaultData**
** down 20210427124200 V330AddMobileTransferTable**
** down 20211027202137 V331ConvertEmailVariablesToJson**
** down 20211121231300 V340MigrateASCIIFieldsEncoding**
Database
[PASS] The application is able to connect to the database
[PASS] 27 tables found
[PASS] Some default content is present
[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. https://www.passbolt.com/help/tech/update
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.
[PASS] The server OpenPGP 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 (3.4.0).
[FAIL] Passbolt is not configured to force SSL use.
[HELP] Set passbolt.ssl.force to true in config/passbolt.php.
[FAIL] App.fullBaseUrl is not set to HTTPS.
[HELP] Check App.fullBaseUrl url scheme in config/passbolt.php.
[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 config/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
[FAIL] The /etc/passbolt/jwt/ directory should not be writable.
[HELP] You can try:
[HELP] sudo chown -R www-data:www-data /etc/passbolt/jwt/
[HELP] sudo chmod 550 /etc/passbolt/jwt/
[HELP] sudo chmod 440 $(find /etc/passbolt/jwt/ -type f)
[FAIL] A valid JWT key pair is missing
[HELP] Run the create JWT keys script to create a valid JWT secret and public key pair:
[HELP] sudo su -s /bin/bash -c "/usr/share/php/passbolt/bin/cake passbolt create_jwt_keys" www-data
On the other hand, the migration for the account_settings table has not been run. I’m pretty sure this table is empty on your server, so you can delete this table and only this table.
To check its content:
SELECT * FROM account_settings;
It should return 0 rows.
Drop it:
DROP TABLE account_settings;
Then run migrations again:
sudo su -s /bin/bash -c "/usr/share/php/passbolt/bin/cake migrations migrate --no-lock" www-data
It is the same story, you have to drop the resource_types table. This happens because you have installed a new passbolt with its new tables, then you restored your old database who don’t contains the new tables. So all new tables have to be deleted.
@AnatomicJC Headed towards success!! Thanks to you! I cleared resource_types, transfers and avatars table and boom!! I am able to copy passwords now… But there is a bit thing happening now.
When I try to decrpyt the password, I am getting little more information… something like this.
{“description”:“Password for gmail account is also same.”,“password”:“XXXXXXX”}