# Nextcloud Music : "Trust anchor for certification path not found" error with Power Ampache 2

**URL:** <https://help.nextcloud.com/t/nextcloud-music-trust-anchor-for-certification-path-not-found-error-with-power-ampache-2/196057>\
**Category:** ℹ️ Support\
**Tags:** music, fail2ban, linuxserverio, android, letsencrypt\
**Created:** [June 24, 2024, 8:11am UTC](https://help.nextcloud.com/t/nextcloud-music-trust-anchor-for-certification-path-not-found-error-with-power-ampache-2/196057 "2024-06-24T08:11:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pled](https://help.nextcloud.com/user_avatar/help.nextcloud.com/pled/32/62782_2.png) [@pled](https://help.nextcloud.com/u/pled)\
**Post date:** [June 24, 2024, 8:11am UTC](https://help.nextcloud.com/t/nextcloud-music-trust-anchor-for-certification-path-not-found-error-with-power-ampache-2/196057/1 "2024-06-24T08:11:26Z")

</div>

> **Support intro**
>

Hello,  
I cannot connect to my Nextcloud Music using Power Ampache 2 from Android. I can successfully connect using the web browser using the same URL (using https).

My configuration is made with a docker stack from [Linuxserver.io](http://Linuxserver.io) : Nextcloud + Mariadb + Swag.  
Swag is essentially nginx + fail2ban + letsencrypt cert validation built-in.  
Swag logs show that Letsencrypt certificate is OK for my domain, Nextcloud instance is a subdomain of it. As said above, I can connect using HTTPS connection.

Nextcloud version : 25.0.13  
Operating system and version: Armbian 24.5.1 bookworm (x32)  
Apache or nginx version : 1.20.2  
PHP version : 8.1.16

The issue you are facing:

Looking at Power Ampache logs, I can see :

```auto
2024-06-23 15:51:54
authorize() - cannot load data HttpException {"code":404,"message":"{ \"exception\" : \"java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.\" }","detailMessage":"HTTP 404 { \"exception\" : \"java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.\" }","stackTrace":[],"suppressedExceptions":[]}

2024-06-23 15:51:54
retrofit2.HttpException: HTTP 404 { "exception" : "java.security.cert.CertPathValidatorException: Trust anchor for certification path not found." }
    at retrofit2.KotlinExtensions$await$2$2.onResponse(KotlinExtensions.kt:53)
    at retrofit2.OkHttpCall$1.onResponse(OkHttpCall.java:161)
    at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:535)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
    at java.lang.Thread.run(Thread.java:1012)

```

Is this the first time you’ve seen this error? _(Y/N)_: Y

Steps to replicate it:

1. Run Power Ampache 2 on Android
2. Choose login and enter URL prposed by Nextcloud Music ([https://nextcloud.mydomain/apps/music/ampache](https://nextcloud.mydomain/apps/music/ampache))
3. Check logs

The output of your Nextcloud log in **Admin \> Logging** :

Nothing. I can only see this in the nginx log :

```auto
92.xxx.yyy.zzz - - [23/Jun/2024:18:11:56 +0200] "GET /apps/music/ampache/server/json.server.php?action=handshake&auth=0dc8eab854xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx289e9ded5423&user=xxxxxxx&timestamp=1719159117 HTTP/2.0" 404 146 "-" "PowerAmpache2-1.00-60-fdroid" 

```

The output of your config.php file in `/path/to/nextcloud` (make sure you remove any identifiable information!):

```auto
PASTE HERE

```

The output of your Apache/nginx/system log in `/var/log/ ____ `:

```auto
92.xxx.yyy.zzz - - [23/Jun/2024:18:11:56 +0200] "GET /apps/music/ampache/server/json.server.php?action=handshake&auth=0dc8eab854xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx289e9ded5423&user=xxxxxxx&timestamp=1719159117 HTTP/2.0" 404 146 "-" "PowerAmpache2-1.00-60-fdroid" 

```

What’s wrong on my server ?

---

<div class="post-metadata">

**Author:** ![pled](https://help.nextcloud.com/user_avatar/help.nextcloud.com/pled/32/62782_2.png) [@pled](https://help.nextcloud.com/u/pled)\
**Post date:** [July 3, 2024, 8:20am UTC](https://help.nextcloud.com/t/nextcloud-music-trust-anchor-for-certification-path-not-found-error-with-power-ampache-2/196057/2 "2024-07-03T08:20:24Z")

</div>

After some investigations, it appears that nginx configuration file needs some specific directives when using Ampache client with Nextcloud music.

See [Add specific setting to nginx proxy server configuration when using Nextcloud Music app with Ampache client · Issue #11951 · nextcloud/documentation · GitHub](https://github.com/nextcloud/documentation/issues/11951) issue asking for documentation to be amended with that information.

---

<div class="post-metadata">

**Author:** ![system](https://help.nextcloud.com/user_avatar/help.nextcloud.com/system/32/29333_2.png) [@system](https://help.nextcloud.com/u/system)\
**Post date:** [July 11, 2024, 8:20am UTC](https://help.nextcloud.com/t/nextcloud-music-trust-anchor-for-certification-path-not-found-error-with-power-ampache-2/196057/3 "2024-07-11T08:20:44Z")

</div>

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