Update fails on Ubuntu 20.04 passbolt-ce-server with coinciding mysql/mariadb package update

When doing regular update I had this issue today, It hasn’t affected the running of Passbolt but it wont update.
Exception: There was a problem connecting to the database: SQLSTATE[HY000] [2002] Connection refused
In [/usr/share/php/passbolt/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/PdoAdapter.php, line 83]

Hi @caryb,

Did you use the package to update or are you using the source?

Max

I used the package manager but I just re ran the apt update command & it worked, It did do some mysql updates as well. I wonder if it was dependent on the MYSQL updating 1st?

Setting up passbolt-ce-server (3.2.1-3~1627390708.gbp663784) …

 ____                  __          ____  
/ __ \____  _____ ____/ /_  ____  / / /_ 

/ // / __ `/ / / __ / __ / / _/
/ / // ( |
) /
/ / /
/ / / /
/
/ _
,
/
//./_//__/

Open source password manager for teams


Running migration scripts.

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

All Done. Took 0.0156s
Clearing default
Cleared default cache
Clearing cake_core
Cleared cake_core cache
Clearing cake_model
Cleared cake_model cache
Clearing default
Cleared default cache
Clearing cake_core
Cleared cake_core cache
Clearing cake_model
Cleared cake_model cache
Processing triggers for nginx-core (1.18.0-0ubuntu1.2) …
Triggering nginx reload …

hmm difficult to answer like this.
What was the mysql version before? Trivial question also but does mysql was running when you made your update attempt on passbolt?

I know this is an old thread, but I am adding to it because it does appear that the post-installation script is erroring if there is also a mysql package update:

Setting up bind9-host (1:9.16.1-0ubuntu2.11) ...#########...................] 
Setting up passbolt-ce-server (3.7.2-1) ...###############..................] 
Installing new version of config file /etc/passbolt/version.php ...
Progress: [ 71%] [#########################################.................] 
     ____                  __          ____  
    / __ \____  _____ ____/ /_  ____  / / /_ 
   / /_/ / __ `/ ___/ ___/ __ \/ __ \/ / __/ 
  / ____/ /_/ (__  |__  ) /_/ / /_/ / / /    
 /_/    \__,_/____/____/_.___/\____/_/\__/   

 Open source password manager for teams
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
 Running migration scripts.
-------------------------------------------------------------------------------
using migration paths 
 - /etc/passbolt/Migrations
using seed paths 
 - /etc/passbolt/Seeds
Exception: There was a problem connecting to the database: SQLSTATE[HY000] [2002] No such file or directory
In [/usr/share/php/passbolt/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/PdoAdapter.php, line 96]

dpkg: error processing package passbolt-ce-server (--configure):
 installed passbolt-ce-server package post-installation script subprocess returned error exit status 1
Setting up mariadb-server-core-10.6 (1:10.6.10+maria~ubu2004) ...
Setting up vim (2:8.1.2269-1ubuntu5.9) ...##################................]

This has happened before and only occurs with coinciding updates. Not sure if the process is not getting permitted to finish, but running apt updates again will allow it complete without issue.

This was a Ubuntu 20.04 package install.
@max