Installing issue: passbolt-ce-server E: Sub-process /usr/bin/dpkg returned an error code (1)

Hi I have been here before (worked for a different comapany back then, user pimzwager)
I have set up a new server running Centos 10 and following the manual: Passbolt Help | Install Passbolt CE on Debian 10
at the end of step 1, there is an error:

Creating config file /etc/php/7.3/fpm/php.ini with new version
Created symlink /etc/systemd/system/multi-user.target.wants/php7.3-fpm.service → /lib/systemd/system/php7.3-fpm.service.
Setting up php-gnupg (1.4.0-3) …
Setting up php-fpm (2:7.3+69) …
Setting up php-cli (2:7.3+69) …
Setting up passbolt-ce-server (3.2.1-3~1627390708.gbp663784) …
/var/lib/dpkg/info/passbolt-ce-server.postinst: line 156: mysql: command not found
dpkg: error processing package passbolt-ce-server (–configure):
installed passbolt-ce-server package post-installation script subprocess returned error exit status 127
Processing triggers for systemd (241-7~deb10u7) …
Processing triggers for nginx-full (1.14.2-2+deb10u4) …
Triggering nginx reload …
Processing triggers for man-db (2.8.5-2) …
Processing triggers for libc-bin (2.28-10) …
Processing triggers for php7.3-fpm (7.3.29-1~deb10u1) …
Errors were encountered while processing:
passbolt-ce-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

starting step 2 you should go the the website, but it seems the webserver isn’t running.

Hi @pimzwagerMCS welcome back to this forum :tada:

Here is the error:

/var/lib/dpkg/info/passbolt-ce-server.postinst: line 156: mysql: command not found

It seems passbolt-ce-server post-configuration scripts didn’t find the mysql command who should be installled as a dependency of the package.

I was able to reproduce your issue by adding --no-install-recommends to the apt install command. Do you have any configuration on your Debian server who tells to apt to not install recommended packages ?

Best regards,

ok I fixed this issue by manually installing mysql (mariadb-server)

Now I am getting an errer that seems to be someting with lets’s encrypt:

urn:ietf:params:acme:error:dns :: No valid IP addresses found for (mydomainname)

following Passbolt Help | Auto configure HTTPS with Let's Encrypt on Debian and Ubuntu

I get:

root@pb:~# sudo dpkg-reconfigure passbolt-ce-server
/usr/sbin/dpkg-reconfigure: passbolt-ce-server is broken or not fully installed

Hi,

You should be able to repair your broken package with this command:

sudo apt-get --fix-broken install

Cheers,

i get

root@pb:~# sudo apt-get --fix-broken install
Reading package lists… Done
Building dependency tree
Reading state information… Done
0 upgraded, 0 newly installed, 0 to remove and 14 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up passbolt-ce-server (3.2.1-3~1627390708.gbp663784) …

Well done! Visit http://_ to finish installation

=====================================================================
Processing triggers for nginx-full (1.14.2-2+deb10u4) …
Triggering nginx reload …
Processing triggers for php7.3-fpm (7.3.29-1~deb10u1) …
root@pb:~#

but the webinterface doesn’t seem to be working.

browser is showing: ERR_CONNECTION_REFUSED

ohh i ran the command " sudo dpkg-reconfigure passbolt-ce-server" again and now it seems to be ok

when I browse to the website it shows:

Welcome to nginx!

If you see this page, the nginx web server is successfully installed and working. Further configuration is required.

For online documentation and support please refer to nginx.org.
Commercial support is available at nginx.com.

Thank you for using nginx.

I see this in your logs:

It seems you didn’t set a domain while configuring passbolt. You can configure it by running dpkg-reconfigure passbolt-ce-server

this issue was already solved when you posted this. the problem now is that i do get a reply on the browser, but not the page to continue the configuration.

@pimzwagerMCS You can modify the passbolt.php configuration file with additional changes if that works better for you.

sorry I am not sure what to do, can someone help me?

I still get the webpage:

Welcome to nginx!

If you see this page, the nginx web server is successfully installed and working. Further configuration is required.

For online documentation and support please refer to nginx.org.
Commercial support is available at nginx.com.

Thank you for using nginx.

and I am unsure what to do with the passbolt.php file… how do I get to configure Passbolt?

Hi !

I guess you still have both default and nginx-passbolt.conf files in /etc/nginx/sites-enabled/ folder.

Let’s assume your passbolt domain is passbolt.example.com, you should have at the line 33 of /etc/passbolt/passbolt/php file:

 'fullBaseUrl' => 'https://passbolt.example.com',

You should found passbolt.example.com too in /etc/nginx/sites-enabled/nginx-passbolt.conf file in side of the server_name directive:

#
#  Passbolt.conf - Nginx configuration file to run the Passbolt software.
#

server {

  listen 443 ssl http2;

  # Managed by Passbolt
  server_name passbolt.example.com;
  (...)

If you don’t have your passbolt domain name in these files, I guess this is why you got the nginx default page.

This configuration is automatically done by the sudo dpkg-reconfigure passbolt-ce-server command.

Let us know if you finally manage to fix this.

If it still doesn’t work, it means you should have missed some steps in Passbolt Help | Install Passbolt CE on Debian 10

Maybe you should retry the installation procedure on a new fresh server.

yes there are both there:

4 drwxr-xr-x 2 root root 4096 Sep 6 16:37 .
4 drwxr-xr-x 8 root root 4096 Sep 14 15:23 …
0 lrwxrwxrwx 1 root root 34 Sep 6 14:48 default → /etc/nginx/sites-available/default
4 -rw-r–r-- 1 root root 1144 Sep 6 16:37 nginx-passbolt.conf
root@pb:/etc/nginx/sites-enabled# pwd
/etc/nginx/sites-enabled

root@pb:/etc/nginx/sites-enabled# vi nginx-passbolt.conf

Passbolt.conf - Nginx configuration file to run the Passbolt software.

server {

listen 80;

Managed by Passbolt

server_name _;

client_body_buffer_size 100K;
client_header_buffer_size 1K;
client_max_body_size 5M;

client_body_timeout 10;
client_header_timeout 10;
keepalive_timeout 5 5;
send_timeout 10;

root /usr/share/php/passbolt/webroot;
index index.php;
error_log /var/log/nginx/passbolt-error.log info;
access_log /var/log/nginx/passbolt-access.log;

Managed by Passbolt

include PASSBOLT_SSL

location / {
try_files $uri $uri/ /index.php?$args;
}

location ~ .php$ {
try_files $uri =404;
include fastcgi_params;
fastcgi_pass unix:/run/php/php7.3-fpm.sock;
fastcgi_index index.php;
fastcgi_intercept_errors on;
fastcgi_split_path_info ^(.+.php)(.+)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SERVER_NAME $http_host;
fastcgi_param PHP_VALUE “upload_max_filesize=5M \n post_max_size=5M”;
}

}

i tried sudo dpkg-reconfigure passbolt-ce-server multiple times…

Hi,

You have “default” and “nginx-passbolt.conf” in your /etc/nginx/sites-enabled folder.

In nginx-passbolt.conf server_name is set to an underscore. It means it will reply to any request:

server_name _;

I guess it is the same in your default.conf file. As both files define themselves as the default website to serve, nginx choose the first one, who is default.conf.
If you want to see Passbolt, define a server_name like this in the nginx-passbolt.conf file

server_name put.here.your.passbolt.domain;

Or delete the default.conf file and restart nginx. :slight_smile:

ok, iut’s different now :slight_smile:
getting the error
Config file “passbolt.php” did not return an array

I noticed theat the ownership of passbolt.php was different than the other files, so I changed them so they are the same. Now I get: