# Environment Active Gate - AWS monitoring Failed to load configured trustedstore file, aborting custom certificate configuration

**URL:** <https://community.dynatrace.com/t/environment-active-gate-aws-monitoring-failed-to-load-configured-trustedstore-file-aborting-custom-certificate-configuration/47825>\
**Category:** Cloud platforms\
**Tags:** aws\
**Created:** [September 19, 2024, 3:13am UTC](https://community.dynatrace.com/t/environment-active-gate-aws-monitoring-failed-to-load-configured-trustedstore-file-aborting-custom-certificate-configuration/47825 "2024-09-19T03:13:37Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![dyn98007](https://avatars.discourse-cdn.com/v4/letter/d/5daacb/32.png) [@dyn98007](https://community.dynatrace.com/u/dyn98007)\
**Post date:** [September 19, 2024, 3:13am UTC](https://community.dynatrace.com/t/environment-active-gate-aws-monitoring-failed-to-load-configured-trustedstore-file-aborting-custom-certificate-configuration/47825/1 "2024-09-19T03:13:37Z")

</div>

Related to the AWS account connectivity error ….. _com.amazonaws.SdkClientException: Unable to execute HTTP request: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target_

I’m facing an issue where the&nbsp; trustedstore file is not getting loaded correctly from the path - _/var/lib/dynatrace/gateway/ssl/trusted.p12._

This is resulting in a **java.io.FileNotFoundException**. Details below

The trustedstore file &nbsp;file has mentioned in the _custom.properties_

_[collector]_

_trustedstore = trusted.p12_

_trustedstore-password = changeit_

_trustedstore-type = PKCS12_

The error mentioned in _dynatracegateway\_Debug.0.0.log_ file captured below

2024-09-19 00:07:00 UTC INFO&nbsp;&nbsp;&nbsp; [\<header\>] +-----------------------------------------------------------------------------

2024-09-19 00:07:00 UTC INFO&nbsp;&nbsp;&nbsp; [\<header\>] + Version 1.295.7.20240715-224910

2024-09-19 00:07:00 UTC INFO&nbsp;&nbsp;&nbsp; [\<header\>] + collector: 0x7cd018cb; tenant: fefc24a4-d245-44cb-9623-f73b0e7e190c;

2024-09-19 00:07:00 UTC INFO&nbsp;&nbsp;&nbsp; [\<collector\>] [\<com.compuware.apm.logging\>, LoggingServiceImpl] Platform: Linux, Version: 5.14.0-284.82.1.el9\_2.x86\_64, Architecture: amd64, Processors: 4

2024-09-19 00:07:00 UTC INFO&nbsp;&nbsp;&nbsp; [\<collector\>] [\<com.compuware.apm.logging\>, LoggingServiceImpl] VM: OpenJDK 64-Bit Server VM, Version: 17.0.10, Vendor: Eclipse Adoptium, Memory [maxMemory=10280M, initHeap=1024M, maxHeap=10280M, usedMeta=7M, committedMeta=7M, totalPhysicalMemory=15809M, freePhysicalMemory=10068M]

2024-09-19 00:07:00 UTC INFO&nbsp;&nbsp;&nbsp; [\<collector\>] [\<com.compuware.apm.logging\>, LoggingServiceImpl] file.encoding: UTF-8, sun.jnu.encoding: UTF-8, user.name: dtuserag

2024-09-19 00:07:00 UTC INFO&nbsp;&nbsp;&nbsp; [\<collector\>] [\<com.compuware.apm.logging\>, LoggingServiceImpl] Input Arguments: -Dcom.compuware.apm.WatchDogTimeout=180 --add-opens=java.base/java.lang=ALL-UNNAMED -Xms1024M -XX:ErrorFile=/var/log/dynatrace/gateway/hs\_err\_pid\_%p.log -XX:+UseG1GC -XX:+IgnoreUnrecognizedVMOptions -Duser.language=en -Djava.util.logging.manager=com.dynatrace.gen2.foundation.logging.impl.backend.CustomShutdownLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Dorg.xerial.snappy.lib.path=/opt/dynatrace/gateway/lib/native -Dorg.xerial.snappy.lib.name=libsnappyjava.so -Djava.io.tmpdir=/var/lib/dynatrace/gateway/temp -Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8 -Djava.security.egd=file:/dev/urandom -DZstdNativePath=/opt/dynatrace/gateway/lib/native/libzstd-jni.so -Xmx10275M -Dcom.compuware.apm.WatchDogPort=50000

2024-09-19 00:07:00 UTC INFO&nbsp;&nbsp;&nbsp; [\<collector\>] [\<collector.core\>, CollectorImpl] No keyfile detected, starting without crypto subsystem.

2024-09-19 00:07:00 UTC INFO&nbsp;&nbsp;&nbsp; [\<collector\>] [\<collector.comm\>, TrustStoreCreator] Setting up combined trust store, Java cacerts: TrustStoreSettingsImpl{path=/opt/dynatrace/gateway/jre/lib/security/cacerts, type=pkcs12}, custom: TrustStoreSettingsImpl{path=/var/lib/dynatrace/gateway/config/../ssl/concurtrusted.p12, type=PKCS12}

2024-09-19 00:07:00 UTC WARNING [\<collector\>] [\<collector.comm\>, TrustStoreCreator] _**Failed to load configured trustedstore file (full path: /var/lib/dynatrace/gateway/config/../ssl/trusted.p12), aborting custom certificate configuration**_

_**java.io.FileNotFoundException: /var/lib/dynatrace/gateway/config/../ssl/concurtrusted.p12 (Permission denied)**_

at java.base/java.io.FileInputStream.open0(Native Method)

at java.base/java.io.FileInputStream.open(Unknown Source)

at java.base/java.io.FileInputStream.\<init\>(Unknown Source)

at java.base/java.io.FileInputStream.\<init\>(Unknown Source)

at com.dynatrace.apm.collector.shared.communication.api.truststore.TrustStoreCreator.createKeyStoreFromTrustStore(TrustStoreCreator.java:146)

at com.dynatrace.apm.collector.shared.communication.api.truststore.TrustStoreCreator.handleCustomTS(TrustStoreCreator.java:96)

at com.dynatrace.apm.collector.shared.communication.api.truststore.TrustStoreCreator.setupCerts(TrustStoreCreator.java:66)

at com.compuware.apm.collector.core.CollectorImpl.setupTrustStore(CollectorImpl.java:346)

at com.compuware.apm.collector.core.CollectorImpl.\<init\>(CollectorImpl.java:314)

at com.compuware.apm.collector.core.CollectorImpl.main(CollectorImpl.java:803)

2024-09-19 00:07:01 UTC INFO&nbsp;&nbsp;&nbsp; [\<collector\>] [\<collector.comm\>, TrustStoreCreator] Effective trust store: TrustStoreSettingsImpl{path=/opt/dynatrace/gateway/jre/lib/security/cacerts, type=pkcs12}

----------------------------------------------

Due to the failure to load the configured trustedstore file..below error message show up in the **dynatracegateway\_Debug.0.0.log..&nbsp; T** he error comes up when an attempt is made to connect to an AWS account in the Dynatrace UI. Screenshot attached.

Please advise

**Error :** &nbsp;_Unable to execute HTTP request: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target}_

**Details below:**

2024-09-19 03:03:00 UTC INFO&nbsp;&nbsp;&nbsp; [\<d245-44cb-9623-f73b0e7e190c \>] [\<vtopology.provider\>, AWSClientFactory] trying to get client initial response for credentials: AWSCredentialsImpl {identifier: BEEB1840447456B1, accessKey: null, secretKey: null, tenantUUID: -d245-44cb-9623-f73b0e7e190c, iamRole: Dynatrace\_monitoring\_role, accountId: 1233445, externalId: \*\*\*\*\*, label: Integration Observe RoleBased, partition: aws, detectedPartition: null, monitorOnlyTaggedEntities: false, includeTags: [], excludeTags: [], excludedRegions: [], logConfigSQSesEnabled: false, logConfigSQSes: [], version: 2.0, legacyServices: [ebs\_builtin, lambda\_builtin, ELB\_builtin, loadbalancer\_builtin, s3\_builtin, dynamodb\_builtin, ec2\_builtin, asg\_builtin, rds\_builtin], services: [], extensionDetails: null} [Suppressing further messages for 15 minutes] [skipped logs: 1]

2024-09-19 03:03:00 UTC DEBUG&nbsp;&nbsp; [\<d245-44cb-9623-f73b0e7e190c \>] [\<vtopology.provider\>, PartitionAutoDetection] detectedPartition=aws, for credentials: Integration Observe RoleBased [7025090340361789595]

2024-09-19 03:03:01 UTC INFO&nbsp;&nbsp;&nbsp; [] [, RoleCredentialsProvider] Cannot obtain CLIENT short term credentials for arn:aws:iam::420785284875:role/Dynatrace\_monitoring\_role ; AWSCredentialsImpl {identifier: BEEB1840447456B1, accessKey: null, secretKey: null, tenantUUID: d245-44cb-9623-f73b0e7e190c iamRole: Dynatrace\_monitoring\_role, accountId: 420785284875, externalId: \*\*\*\*\*, label: Integration Observe RoleBased, partition: aws, detectedPartition: aws, monitorOnlyTaggedEntities: false, includeTags: [], excludeTags: [], excludedRegions: [], logConfigSQSesEnabled: false, logConfigSQSes: [], version: 2.0, legacyServices: [ebs\_builtin, lambda\_builtin, ELB\_builtin, loadbalancer\_builtin, s3\_builtin, dynamodb\_builtin, ec2\_builtin, asg\_builtin, rds\_builtin], services: [], extensionDetails: null} [Suppressing further identical messages for 10 minutes]

com.amazonaws.SdkClientException: Unable to execute HTTP request: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

at com.amazonaws.http.AmazonHttpClient$RequestExecutor.handleRetryableException(AmazonHttpClient.java:1219)

2024-09-19 03:03:01 UTC WARNING [\<d245-44cb-9623-f73b0e7e190c \>] [\<vtopology.provider\>, AWSFastCheckCallable] Credentials refresh failed: {status: ERROR\_BAD\_CREDENTIALS, statusInfo: Service failed to assume role provided in credentials. An unknown error related to role has occurred, credentials: AWSCredentialsImpl {identifier: BEEB1840447456B1, accessKey: null, tenantUUID: d245-44cb-9623-f73b0e7e190c,iamRole: Dynatrace\_monitoring\_role, accountId: 1233445, externalId: \*\*\*\*\*, label: Integration Observe RoleBased, version: 2.0}, exception: com.amazonaws.SdkClientException: _ **Unable to execute HTTP request: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target}** _

 ![ui-invalid-creds-error.png](https://global.discourse-cdn.com/dynatrace/original/3X/c/3/c3dce8a2148989196832d23dd437ea5d7a665efd.png)

---

<div class="post-metadata">

**Author:** ![p\_devulapalli](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/p_devulapalli/32/41590_2.png) [@p\_devulapalli](https://community.dynatrace.com/u/p_devulapalli)\
**Post date:** [September 19, 2024, 4:43am UTC](https://community.dynatrace.com/t/environment-active-gate-aws-monitoring-failed-to-load-configured-trustedstore-file-aborting-custom-certificate-configuration/47825/2 "2024-09-19T04:43:02Z")

</div>

Hi&nbsp;[@dyn98007](https://community.dynatrace.com/user/79860)

Looks like a permission issue , does the user have permissions to the directory?

> **[Trusted root certificates for ActiveGate](https://docs.dynatrace.com/docs/ingest-from/dynatrace-activegate/configuration/configure-trusted-root-certificates-on-activegate)**
>
> Learn how to configure custom trusted root certificates on ActiveGate to establish secure SSL/TLS connections.

---

<div class="post-metadata">

**Author:** ![dyn98007](https://avatars.discourse-cdn.com/v4/letter/d/5daacb/32.png) [@dyn98007](https://community.dynatrace.com/u/dyn98007)\
**Post date:** [September 19, 2024, 5:14am UTC](https://community.dynatrace.com/t/environment-active-gate-aws-monitoring-failed-to-load-configured-trustedstore-file-aborting-custom-certificate-configuration/47825/3 "2024-09-19T05:14:33Z")

</div>

Thank you&nbsp;[@p\_devulapalli](https://community.dynatrace.com/user/21657)&nbsp; for the pointer to&nbsp;check-permissions.

The ownership of the .p12 file was changed to the _dtuserag_, and the dyntracegateway service was restarted. It&nbsp; **fixed** the previous error related to&nbsp;_java.io.FileNotFoundException_ **.** _.( as seen below) …_ .

_2024-09-19 04:53:15 UTC INFO [\<collector\>] [\<collector.comm\>, TrustStoreCreator] Setting up combined trust store, Java cacerts: TrustStoreSettingsImpl{path=/opt/dynatrace/gateway/jre/lib/security/cacerts, type=pkcs12}, custom: TrustStoreSettingsImpl{path=/var/lib/dynatrace/gateway/config/../ssl/trusted.p12, type=PKCS12}_  
_2024-09-19 04:53:15 UTC INFO [\<collector\>] [\<collector.comm\>, TrustStoreCreator] overwriting existing certificate with alias trustedca_  
_2024-09-19 04:53:15 UTC INFO [\<collector\>] [\<collector.comm\>, TrustStoreCreator] overwriting existing certificate with alias /etc/pki/ca-trust/source/anchors/root-cert-0_  
_2024-09-19 04:53:15 UTC INFO [\<collector\>] [\<collector.comm\>, TrustStoreCreator] overwriting existing certificate with alias /etc/pki/ca-trust/source/anchors/root-cert-1_  
_2024-09-19 04:53:15 UTC INFO [\<collector\>] [\<collector.comm\>, TrustStoreCreator] overwriting existing certificate with alias /etc/pki/ca-trust/source/anchors/root-cert-2_  
_2024-09-19 04:53:15 UTC INFO [\<collector\>] [\<collector.comm\>, TrustStoreCreator] **Custom certificate configuration created successfully** _  
_2024-09-19 04:53:15 UTC INFO [\<collector\>] [\<collector.comm\>, TrustStoreCreator] Effective trust store: TrustStoreSettingsImpl{path=/var/lib/dynatrace/gateway/config/../ssl/runtime.cacerts, type=pkcs12}_

_---------------------------_

But unfortunately the “Invalid credentials” message still show up in the UI while trying to add an AWS account , and with the below captured error info in the&nbsp;_ **dynatracegateway\_Debug.0.0.log** _

-------------------

_2024-09-19 04:57:23 UTC WARNING [\<f44cb-9623-f73b0e7e190c\>] [\<vtopology.provider\>, AWSFastCheckCallable] Credentials refresh failed: {status: ERROR\_BAD\_CREDENTIALS, statusInfo: Service failed to assume role provided in credentials. An unknown error related to role has occurred, credentials: AWSCredentialsImpl {identifier: 9B5D617D1A7B8D61, accessKey: null, tenantUUID: f44cb-9623-f73b0e7e190c,iamRole: Dynatrace\_monitoring\_role, accountId: 484875, externalId: \*\*\*\*\*, label: Integration Observe RoleBased, version: 2.0}, exception: com.amazonaws.SdkClientException: Unable to execute HTTP request: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target}_  
_2024-09-19 04:57:33 UTC DEBUG [\<f44cb-9623-f73b0e7e190c\>] [\<vtopology.provider\>, PartitionAutoDetection] detectedPartition=aws, for credentials: Integration Observe RoleBased [-4866113436641686085]_  
_2024-09-19 04:57:34 UTC INFO [_] [_, RoleCredentialsProvider] Cannot obtain CLIENT short term credentials for arn_:aws:_iam::484875:role/Dynatrace\_monitoring\_role ; AWSCredentialsImpl {identifier: ACCC65D26456AF7B, accessKey: null, secretKey: null, tenantUUID: f44cb-9623-f73b0e7e190c, iamRole: Dynatrace\_monitoring\_role, accountId: 484875, externalId: \*\*\*\*\*, label: Integration Observe RoleBased, partition: aws, detectedPartition: aws, monitorOnlyTaggedEntities: false, includeTags: [], excludeTags: [], excludedRegions: [], logConfigSQSesEnabled: false, logConfigSQSes: [], version: 2.0, legacyServices: [ebs\_builtin, lambda\_builtin, ELB\_builtin, loadbalancer\_builtin, s3\_builtin, dynamodb\_builtin, ec2\_builtin, asg\_builtin, rds\_builtin], services: [], extensionDetails: null} [Suppressing further identical messages for 10 minutes]_  
_com.amazonaws.SdkClientException: Unable to execute HTTP request: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target_  
_at com.amazonaws.http.AmazonHttpClient$RequestExecutor.handleRetryableException(AmazonHttpClient.java:1219)_

_2024-09-19 04:57:34 UTC WARNING [\<f44cb-9623-f73b0e7e190c\>] [\<vtopology.provider\>, AWSFastCheckCallable] Credentials refresh failed: {status: ERROR\_BAD\_CREDENTIALS, statusInfo: Service failed to assume role provided in credentials. An unknown error related to role has occurred, credentials: AWSCredentialsImpl {identifier: ACCC65D26456AF7B, accessKey: null, tenantUUID: f44cb-9623-f73b0e7e190c,iamRole: Dynatrace\_monitoring\_role, accountId: 484875, externalId: \*\*\*\*\*, label: Integration Observe RoleBased, version: 2.0}, exception: com.amazonaws.SdkClientException: Unable to execute HTTP request: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target}_  
_----------------_

---

<div class="post-metadata">

**Author:** ![Peter\_Youssef](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/peter_youssef/32/14668_2.png) [@Peter\_Youssef](https://community.dynatrace.com/u/Peter_Youssef)\
**Post date:** [September 19, 2024, 5:32am UTC](https://community.dynatrace.com/t/environment-active-gate-aws-monitoring-failed-to-load-configured-trustedstore-file-aborting-custom-certificate-configuration/47825/4 "2024-09-19T05:32:52Z")

</div>

Hello&nbsp;[@dyn98007](https://community.dynatrace.com/user/79860)

validate your Activegate configurations against Dynatrace guidance references:

1. [trusted-certificates-and-custom-certificates](https://docs.dynatrace.com/managed/shortlink/ag-configuration#trusted-certificates-and-custom-certificates)
2. [activegate-ciphers](https://docs.dynatrace.com/managed/shortlink/activegate-ciphers)

Regards,

---

<div class="post-metadata">

**Author:** ![p\_devulapalli](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/p_devulapalli/32/41590_2.png) [@p\_devulapalli](https://community.dynatrace.com/u/p_devulapalli)\
**Post date:** [September 19, 2024, 5:50am UTC](https://community.dynatrace.com/t/environment-active-gate-aws-monitoring-failed-to-load-configured-trustedstore-file-aborting-custom-certificate-configuration/47825/5 "2024-09-19T05:50:41Z")

</div>

[@dyn98007](https://community.dynatrace.com/user/79860)&nbsp;- It could be a issue with the cert that you are using, please make sure its the right one

---

<div class="post-metadata">

**Author:** ![dyn98007](https://avatars.discourse-cdn.com/v4/letter/d/5daacb/32.png) [@dyn98007](https://community.dynatrace.com/u/dyn98007)\
**Post date:** [September 19, 2024, 6:57am UTC](https://community.dynatrace.com/t/environment-active-gate-aws-monitoring-failed-to-load-configured-trustedstore-file-aborting-custom-certificate-configuration/47825/6 "2024-09-19T06:57:38Z")

</div>

Hi&nbsp;[@p\_devulapalli](https://community.dynatrace.com/user/21657)&nbsp; - I did reconfirm that the right one is being used. Thanks!

---

<div class="post-metadata">

**Author:** ![dyn98007](https://avatars.discourse-cdn.com/v4/letter/d/5daacb/32.png) [@dyn98007](https://community.dynatrace.com/u/dyn98007)\
**Post date:** [September 20, 2024, 2:09am UTC](https://community.dynatrace.com/t/environment-active-gate-aws-monitoring-failed-to-load-configured-trustedstore-file-aborting-custom-certificate-configuration/47825/7 "2024-09-20T02:09:23Z")

</div>

**Update : Cert Issue was Solved:**

Hi&nbsp;[@p\_devulapalli](https://community.dynatrace.com/user/21657)&nbsp;,&nbsp;[@Peter\_Youssef](https://community.dynatrace.com/user/51369)&nbsp; :

The cert issue was finally resolved by having the&nbsp;proxy specifically for Dynatrace Cluster, while allowing outgoing monitoring traffic to connect directly to AWS . Update done for **custom.properties** by defining proxy settings in the&nbsp;**[http.client.internal]**&nbsp;section ( instead of _[http.client]_ )

---

<div class="post-metadata">

**Author:** ![p\_devulapalli](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/p_devulapalli/32/41590_2.png) [@p\_devulapalli](https://community.dynatrace.com/u/p_devulapalli)\
**Post date:** [September 20, 2024, 2:40am UTC](https://community.dynatrace.com/t/environment-active-gate-aws-monitoring-failed-to-load-configured-trustedstore-file-aborting-custom-certificate-configuration/47825/8 "2024-09-20T02:40:52Z")

</div>

[@dyn98007](https://community.dynatrace.com/user/79860)&nbsp; Good to know&nbsp;😊

---

<div class="post-metadata">

**Author:** ![Peter\_Youssef](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/peter_youssef/32/14668_2.png) [@Peter\_Youssef](https://community.dynatrace.com/u/Peter_Youssef)\
**Post date:** [September 20, 2024, 5:34am UTC](https://community.dynatrace.com/t/environment-active-gate-aws-monitoring-failed-to-load-configured-trustedstore-file-aborting-custom-certificate-configuration/47825/9 "2024-09-20T05:34:51Z")

</div>

Thanks&nbsp;[@dyn98007](https://community.dynatrace.com/user/79860)&nbsp;for the updates
