# Exception from Healthcheck

**URL:** <https://community.passbolt.com/t/exception-from-healthcheck/991>\
**Category:** Installation Issues\
**Created:** [August 29, 2018, 10:11pm UTC](https://community.passbolt.com/t/exception-from-healthcheck/991 "2018-08-29T22:11:52Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![jlittle](https://avatars.discourse-cdn.com/v4/letter/j/9fc348/32.png) [@jlittle](https://community.passbolt.com/u/jlittle)\
**Post date:** [August 29, 2018, 10:11pm UTC](https://community.passbolt.com/t/exception-from-healthcheck/991/1 "2018-08-29T22:11:52Z")

</div>

Hello,

I am installing Passbolt on Debian 9.5. using Apache.

I tried moving the key into www-data’s keyring using the command below:

> sudo su -s /bin/bash -c “gpg --import /var/www/passbolt/config/gpg/serverkey\_private.asc” www-data

Here the output of that command:

> gpg: key B1A356…: “James Little [jlittle@email.com](mailto:jlittle@email.com)” not changed  
> gpg: key B1A356…/B1A356…: error sending to agent: Permission denied  
> gpg: error building skey array: Permission denied  
> gpg: Total number processed: 1  
> gpg: unchanged: 1  
> gpg: secret keys read: 1

I don’t know why I keep getting permission denied.

However, after I try doing that, everything breaks.

Here the new output from health check:

> Healthcheck shell…Exception: get\_key failed in [/var/www/passbolt/src/Utility/Healthchecks/GpgHealthchecks.php, line 301]

Here what the error.log says:

> 2018-08-29 21:41:11 Error: [Exception] get\_key failed  
> Request URL: /auth/verify.json?api-version=v1

And here is what I am getting from the web application:

> Could not verify server key. An Internal Error Has Occurred.

Before I tried importing the key into the keyring the only error Health check was returning was I needed to import the key into the keyring.

Any help would be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![remy](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/remy/32/17_2.png) [@remy](https://community.passbolt.com/u/remy)\
**Post date:** [August 30, 2018, 8:31am UTC](https://community.passbolt.com/t/exception-from-healthcheck/991/2 "2018-08-30T08:31:04Z")

</div>

Hello,

Do you have a passphrase on your key?  
What are the permissions for the www-data keyring?

---

<div class="post-metadata">

**Author:** ![jlittle](https://avatars.discourse-cdn.com/v4/letter/j/9fc348/32.png) [@jlittle](https://community.passbolt.com/u/jlittle)\
**Post date:** [August 30, 2018, 1:29pm UTC](https://community.passbolt.com/t/exception-from-healthcheck/991/3 "2018-08-30T13:29:19Z")

</div>

Hi remy,

I do have a passphrase on my key, should I create a new one without a passphrase?

The permissions are below:

> -rw-r----- 1 www-data www-data 1769 Aug 29 16:20 serverkey.asc  
> -rw-r----- 1 www-data www-data 3661 Aug 29 16:20 serverkey\_private.asc

Thank You!

---

<div class="post-metadata">

**Author:** ![remy](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/remy/32/17_2.png) [@remy](https://community.passbolt.com/u/remy)\
**Post date:** [August 30, 2018, 1:36pm UTC](https://community.passbolt.com/t/exception-from-healthcheck/991/4 "2018-08-30T13:36:59Z")

</div>

> I do have a passphrase on my key, should I create a new one without a passphrase?

Yes, passphrases are not supported by php-gnupg (due to limitations introduced by gnupg pinentry afaik).

---

<div class="post-metadata">

**Author:** ![jlittle](https://avatars.discourse-cdn.com/v4/letter/j/9fc348/32.png) [@jlittle](https://community.passbolt.com/u/jlittle)\
**Post date:** [August 30, 2018, 1:42pm UTC](https://community.passbolt.com/t/exception-from-healthcheck/991/5 "2018-08-30T13:42:16Z")

</div>

I will generate a new key without a passphrase this time and report back to confirm that fixed the issue.

Thanks again.

---

<div class="post-metadata">

**Author:** ![jlittle](https://avatars.discourse-cdn.com/v4/letter/j/9fc348/32.png) [@jlittle](https://community.passbolt.com/u/jlittle)\
**Post date:** [August 30, 2018, 2:16pm UTC](https://community.passbolt.com/t/exception-from-healthcheck/991/6 "2018-08-30T14:16:55Z")

</div>

Well, I created a new key without a passphrase, I was really frustrated the installation manual didn’t mention this, but there it was in big bold letters

> “Important: Currently php-gnupg does not support keys with a passphrase so you will need to leave that field empty.”

At any rate, I am super annoyed, because I am pretty sure I did this correctly, but I took screen shots as verification I did it right, but I sure hope someone finds my mistake.

The only error I am receiving from health check now (well other than I need to update, this is a new one) is a fingerprint mismatch.

> [FAIL] The server key fingerprint doesn’t match the one defined in config/passbolt.php.

So I found the fingerprint for the key:

![35%20AM](https://canada1.discourse-cdn.com/flex031/uploads/passbolt/original/1X/d8f53de7f04a53d712ad570f975163b706e2bb0e.png)

Notice the user (www-data), See the key was generated today (the 30th) this is the key without the passphrase.

So I copied the fingerprint (so I think), and pasted it in the config/passbolt.php and removed all the spaces

> ‘serverKey’ =\> [  
> // Server private key fingerprint.  
> ‘fingerprint’ =\> ‘EA9C … 7055’,  
> ‘public’ =\> CONFIG . ‘gpg’ . DS . ‘serverkey.asc’,  
> ‘private’ =\> CONFIG . ‘gpg’ . DS . ‘serverkey\_private.asc’,  
> ],

I run health check again, and the same errors.

What am I doing wrong this time?

Thanks.

---

<div class="post-metadata">

**Author:** ![remy](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/remy/32/17_2.png) [@remy](https://community.passbolt.com/u/remy)\
**Post date:** [August 30, 2018, 2:19pm UTC](https://community.passbolt.com/t/exception-from-healthcheck/991/7 "2018-08-30T14:19:11Z")

</div>

Do you have spaces in your fingerprint in your configuration file? If so try removing them.

---

<div class="post-metadata">

**Author:** ![jlittle](https://avatars.discourse-cdn.com/v4/letter/j/9fc348/32.png) [@jlittle](https://community.passbolt.com/u/jlittle)\
**Post date:** [August 30, 2018, 2:23pm UTC](https://community.passbolt.com/t/exception-from-healthcheck/991/8 "2018-08-30T14:23:04Z")

</div>

@remy I removed all the spaces. 😧

---

<div class="post-metadata">

**Author:** ![remy](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/remy/32/17_2.png) [@remy](https://community.passbolt.com/u/remy)\
**Post date:** [August 30, 2018, 2:28pm UTC](https://community.passbolt.com/t/exception-from-healthcheck/991/9 "2018-08-30T14:28:32Z")

</div>

You can check other existing solutions for this new issue:

> [@The server key fingerprint doesn't match the one defined in app/config.php](https://community.passbolt.com/t/the-server-key-fingerprint-doesnt-match-the-one-defined-in-app-config-php/228):
>
> There was a recent thread regarding this same issue, but was never resolved: This is on ubuntu 16.04. When I run: sudo -H -u www-data /bin/bash -c “gpg --list-keys --fingerprint --home /var/www/.gnupg” I do see the correct name and email address I created the keys with. /var/www/passbolt/app/Config/app.php has the correct values for: home fingerprint public private 'home' =\> '/var/www/.gnupg', ], // Main server key 'serverKey' =\>…

> [@Server key fingerprint doesn't match](https://community.passbolt.com/t/server-key-fingerprint-doesnt-match/118):
>
> Server Configuration: Debian 9.2.1 Apache 2.4.25 mySQL 10.1.26 PHP Version 7.0.19-1 Passbolt Version: Not installed yet When running install (or healthcheck), I get an error that “The server key fingerprint doesn’t match the one defined in app/config.php”. I’ve looked for that file and can’t find it. I’ve gone through where I created the GPG key and done it a few times. I’ve edited the php file to have the correct GPG key each time still with the same error. I’ve got to be missing somethin…

---

<div class="post-metadata">

**Author:** ![jlittle](https://avatars.discourse-cdn.com/v4/letter/j/9fc348/32.png) [@jlittle](https://community.passbolt.com/u/jlittle)\
**Post date:** [August 30, 2018, 3:35pm UTC](https://community.passbolt.com/t/exception-from-healthcheck/991/10 "2018-08-30T15:35:23Z")

</div>

I cannot say for certain what fixed the issue.

I deleted all keys, and started the key generation process over again.

All is fixed, I successfully updated the software. No errors from healthcheck.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex031/uploads/passbolt/original/2X/b/bee7d3f9329f668000d46e9fcb2e5db1e9d31348.svg) [@system](https://community.passbolt.com/u/system)\
**Post date:** [September 4, 2018, 3:42pm UTC](https://community.passbolt.com/t/exception-from-healthcheck/991/11 "2018-09-04T15:42:36Z")

</div>

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.
