# Secure Connection on LocalHost (C API)

**URL:** <https://community.solace.com/t/secure-connection-on-localhost-c-api/902>\
**Category:** General Discussions\
**Tags:** security\
**Created:** [August 24, 2021, 1:02pm UTC](https://community.solace.com/t/secure-connection-on-localhost-c-api/902 "2021-08-24T13:02:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![chaudharys](https://avatars.discourse-cdn.com/v4/letter/c/a88e57/32.png) [@chaudharys](https://community.solace.com/u/chaudharys)\
**Post date:** [August 24, 2021, 1:02pm UTC](https://community.solace.com/t/secure-connection-on-localhost-c-api/902/1 "2021-08-24T13:02:10Z")

</div>

Hi, I am using the solace localhost to connect to my applications.  
I am able to do a default connection, but the secure connection is giving me an issue.

I am running my localhost as:  
./farePub tcps://localhost:55443 default admin admin topic …/ssl

The error I am getting is:  
SDK NOTICE Thu Aug 19 18:47:26.741 2021 solClientOS.c:5942 (7f522324f700) TCP: Could not read from socket 7, error = Connection reset by peer (104) SDK NOTICE Thu Aug 19 18:47:26.742 2021 solClientSmf.c:7232 (7f522324f700) Read failed from transport ‘TCP’ of session ‘(c0,s1)\_default’ due to ‘TCP: Could not read from socket 7, error = Connection reset by peer (104)’, client name ‘chaudharylin/6219/#00000001/69n7eehmiw’, VPN name ‘default’, peer host ‘localhost:55443’ address ‘IP 127.0.0.1’, connection ‘tcp\_TxRx’ local address ‘IP 127.0.0.1:56032’

Please guide me with what the issue is and how to resolve.

---

<div class="post-metadata">

**Author:** ![uherbst](https://yyz1.discourse-cdn.com/solace/user_avatar/community.solace.com/uherbst/32/291_2.png) [@uherbst](https://community.solace.com/u/uherbst)\
**Post date:** [August 24, 2021, 1:46pm UTC](https://community.solace.com/t/secure-connection-on-localhost-c-api/902/2 "2021-08-24T13:46:23Z")

</div>

Hi @chaudharys ,

Please try to test your TLS connection as described here: [How to test TLS connection and server certificate — Solace Community](https://community.solace.com/discussion/510/how-to-test-tls-connection-and-server-certificate#latest).

If there are still issues, have a look in the event.log.

---

<div class="post-metadata">

**Author:** ![Aaron](https://yyz1.discourse-cdn.com/solace/user_avatar/community.solace.com/aaron/32/843_2.png) [@Aaron](https://community.solace.com/u/Aaron)\
**Post date:** [August 28, 2021, 6:44pm UTC](https://community.solace.com/t/secure-connection-on-localhost-c-api/902/3 "2021-08-28T18:44:18Z")

</div>

Do you have a server certificate installed on the broker? [Managing Server Certificates](https://docs.solace.com/Configuring-and-Managing/Managing-Server-Certs.htm)

Have you enabled/opened the secure port, 55443?

You can check the “details” of the Message VPN Services tab, make sure that it’s showing “Up”:

 ![image.png](https://canada1.discourse-cdn.com/solace/original/1X/4e20edae1fb29d811d87651c872cd8726839aeea.png)

 ![image.png](https://canada1.discourse-cdn.com/solace/original/2X/f/f0e180936c0e5c87d3d63aa4799f32cbb67420a1.png)
