# Unable to connect to Solace Event Broker Cloud

**URL:** <https://community.solace.com/t/unable-to-connect-to-solace-event-broker-cloud/4095>\
**Category:** Solace Event Broker\
**Created:** [April 8, 2025, 9:02am UTC](https://community.solace.com/t/unable-to-connect-to-solace-event-broker-cloud/4095 "2025-04-08T09:02:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![funghai](https://yyz1.discourse-cdn.com/solace/user_avatar/community.solace.com/funghai/32/2292_2.png) [@funghai](https://community.solace.com/u/funghai)\
**Post date:** [April 8, 2025, 9:02am UTC](https://community.solace.com/t/unable-to-connect-to-solace-event-broker-cloud/4095/1 "2025-04-08T09:02:06Z")

</div>

I downloaded the PEM file (`DigiCertGlobalRootCA.pem`) from Solace PubSub+ Cloud and used the following Python code to connect:

```auto
trust_store_path = r"DigiCertGlobalRootCA.pem"

props = {
    "solace.messaging.transport.host": "tcps://XXXXXXX:55443",
    "solace.messaging.service.vpn-name": "XXX",
    "solace.messaging.authentication.scheme.basic.username": "XXXX",
    "solace.messaging.authentication.scheme.basic.password": "XXXXX",
}

# Create a TLS transport security strategy
transport_security = TLS.create().with_certificate_validation(
    validate_server_name=True,
    ignore_expiration=False,
    trust_store_file_path=trust_store_path
)

service = MessagingService.builder() \
    .from_properties(props) \
    .with_transport_security_strategy(transport_security) \
    .build()

service.connect()

```

However, when I run this code using Python, I encounter the following error:

```auto
SESSION CREATION UNSUCCESSFUL. Untrusted certificate.
{'caller_description': 'From service event callback',
 'return_code': 'Ok',
 'sub_code': 'SOLCLIENT_SUBCODE_UNTRUSTED_CERTIFICATE',
 'error_info_sub_code': 99,
 'error_info_contents': "Session '(c0,s1)_cfh_test': The peer certificate is not trusted, rc='unable to get local issuer certificate'"}

```

It seems the Solace client cannot verify the server’s certificate due to a missing intermediate certificate in the trust store. I would appreciate any guidance or working examples from the community on how to properly configure the trust store to include the full certificate chain.

---

<div class="post-metadata">

**Author:** ![Solly-AI](https://yyz1.discourse-cdn.com/solace/user_avatar/community.solace.com/solly-ai/32/2305_2.png) [@Solly-AI](https://community.solace.com/u/Solly-AI)\
**Post date:** [April 8, 2025, 9:02am UTC](https://community.solace.com/t/unable-to-connect-to-solace-event-broker-cloud/4095/2 "2025-04-08T09:02:49Z")

</div>

**Hi there, I’m Solly AI, I generate responses to your questions using the power of the [Solace Agent Mesh](https://github.com/SolaceLabs/solace-agent-mesh)**:

**Please remember that AI technology can make mistakes so ensure that you read our [Disclaimer](https://docs.solace.com/docs-ai-disclaimer.htm).**

**AI Generated responses are a work in progress, your help in evaluating my response would be awesome! If my response makes sense, please mark it as a solution or give a 👍. If my response doesn’t make sense for your topic, please react to it with a 🫨.**

Looking at the documentation, I can explain how to configure the trust store with the complete certificate chain for connecting to PubSub+ Cloud using Python.

The key points are:

1. When connecting securely to PubSub+ Cloud, you need to:

2. For Python, you can configure the trust store in two ways:

Relevant documentation:

- [How to connect to Solace broker using truststore credentials using Python](https://community.solace.com/t/how-to-connect-to-solace-broker-using-truststore-credentials-using-python/364)
- [Configuring an Event Broker Service to use Client Certificate Authentication](https://docs.solace.com/Cloud/ght_client_certs.htm)

---

<div class="post-metadata">

**Author:** ![funghai](https://yyz1.discourse-cdn.com/solace/user_avatar/community.solace.com/funghai/32/2292_2.png) [@funghai](https://community.solace.com/u/funghai)\
**Post date:** [April 8, 2025, 9:17am UTC](https://community.solace.com/t/unable-to-connect-to-solace-event-broker-cloud/4095/3 "2025-04-08T09:17:41Z")

</div>

i have amended the code as below  
props = {  
“solace.messaging.transport.host”: “xxxx:55443”,  
“solace.messaging.service.vpn-name”: “XXXX”,  
“solace.messaging.authentication.scheme.basic.username”: “XXXX”,  
“solace.messaging.authentication.scheme.basic.password”: “XXXXX”,  
}

transport\_security\_strategy = TLS.create().with\_certificate\_validation(True, False, “D:\cert”)

```
service = MessagingService.builder().from_properties(props) \
    .with_transport_security_strategy(transport_security_strategy) \
    .build()

```

However i still encounter the below error  
File “C:\Users\MSTR-ChooFungHai\PycharmProjects\PythonProject.venv\Lib\site-packages\solace\messaging\messaging\_service.py”, line 1263, in connect  
raise error  
solace.messaging.errors.pubsubplus\_client\_error.PubSubPlusCoreClientError: SESSION CREATION UNSUCCESSFUL. Untrusted certificate. {‘caller\_description’: ‘do\_connect’, ‘return\_code’: ‘Not ready’, ‘sub\_code’: ‘SOLCLIENT\_SUBCODE\_UNTRUSTED\_CERTIFICATE’, ‘error\_info\_sub\_code’: 99, ‘error\_info\_contents’: “Session ‘(c0,s1)\_cfh\_test’: The peer certificate is not trusted, rc=‘unable to get local issuer certificate’”}  
2025-04-08 17:12:24,852 [WARNING] solace.messaging.core: [\_solace\_transport.py:72] [[SERVICE: 0x1f1d3231090] - [APP ID: FUNGHAI/34048/00000001/22ow5g7\_mK]] SESSION CREATION UNSUCCESSFUL. Untrusted certificate. {‘caller\_description’: ‘From service event callback’, ‘return\_code’: ‘Ok’, ‘sub\_code’: ‘SOLCLIENT\_SUBCODE\_UNTRUSTED\_CERTIFICATE’, ‘error\_info\_sub\_code’: 99, ‘error\_info\_contents’: “Session ‘(c0,s1)\_cfh\_test’: The peer certificate is not trusted, rc=‘unable to get local issuer certificate’”}  
2025-04-08 17:12:24,853 [WARNING] solace.messaging.core: [\_solace\_transport.py:72] [[SERVICE: 0x1f1d3231090] - [APP ID: FUNGHAI/34048/00000001/22ow5g7\_mK]] SESSION CREATION UNSUCCESSFUL. Untrusted certificate. {‘caller\_description’: ‘do\_connect’, ‘return\_code’: ‘Not ready’, ‘sub\_code’: ‘SOLCLIENT\_SUBCODE\_UNTRUSTED\_CERTIFICATE’, ‘error\_info\_sub\_code’: 99, ‘error\_info\_contents’: “Session ‘(c0,s1)\_cfh\_test’: The peer certificate is not trusted, rc=‘unable to get local issuer certificate’”}  
2025-04-08 17:12:24,853 [WARNING] solace.messaging.connections: [messaging\_service.py:1262] [[SERVICE: 0x1f1d3231090] - [APP ID: FUNGHAI/34048/00000001/22ow5g7\_mK]] Connection failed. Status code: 3

---

<div class="post-metadata">

**Author:** ![rey](https://yyz1.discourse-cdn.com/solace/user_avatar/community.solace.com/rey/32/2192_2.png) [@rey](https://community.solace.com/u/rey)\
**Post date:** [April 8, 2025, 1:59pm UTC](https://community.solace.com/t/unable-to-connect-to-solace-event-broker-cloud/4095/4 "2025-04-08T13:59:12Z")

</div>

Hey @funghai,

I noticed in your broker properties you didn’t put a `solace.messaging.tls.trust-store-path` as suggested by @Solly-AI, was there a particular reason for that?

Additionally, did you happen to have a look at the response @swenhelge provided [here](https://community.solace.com/t/how-to-connect-to-solace-broker-using-truststore-credentials-using-python/364/2) regarding the possibility of needing to provide a full certificate chain?
