SSL 'SSL-client' cannot read, sslErr = 5 in python client

Shijo
Shijo Member Posts: 10 ✭✭

Not able to connect to the solace broker using the python client library.

Below mentioned how i connected:

SOLACE_BROKER_PROPERTIES = {
    "solace.messaging.client.name": "test-client",
    "solace.messaging.transport.host": "tcps://mr-test.messaging.solace.cloud:55443",
    "solace.messaging.service.vpn-name": "com-test"),
    "solace.messaging.authentication.oauth2.issuer-identifier":
        "auth issuer url",
    "solace.messaging.tls.cert-validated": False,
    "solace.messaging.tls.cert-validated-date": False,
}

token = OAuthClient().get_token()
authentication_strategy = OAuth2.of(token, None,
                                    properties[authentication_properties.SCHEME_OAUTH2_ISSUER_IDENTIFIER])
self.messaging_service = MessagingServiceClientBuilder().from_properties(configuration=properties).\
    with_authentication_strategy(authentication_strategy=authentication_strategy).\
    build()
self.messaging_service.connect()

It throwing an error like this:

2024-01-18 11:42:22,988 [INFO] solace.messaging.core: [_solace_session.py:1071]  [[SERVICE: 0x10f1a3340] - [APP ID: mbo-mpl-client]] {'caller_description': 'From service event callback', 'return_code': 'Ok', 'sub_code': 'SOLCLIENT_SUBCODE_COMMUNICATION_ERROR', 'error_info_sub_code': 14, 'error_info_contents': "SSL 'SSL-client' cannot read, sslErr = 5: 'Peer closed socket"}
2024-01-18 11:42:22,988 [WARNING] solace.messaging.core: [_solace_transport.py:89] [[SERVICE: 0x10f1a3340] - [APP ID: mbo-mpl-client]] {'caller_description': 'From service event callback', 'return_code': 'Ok', 'sub_code': 'SOLCLIENT_SUBCODE_COMMUNICATION_ERROR', 'error_info_sub_code': 14, 'error_info_contents': "SSL 'SSL-client' cannot read, sslErr = 5: 'Peer closed socket"}
2024-01-18 11:42:22,988 [DEBUG] solace.messaging.core: [_solace_session.py:1142] [[SERVICE: 0x10f1a3340] - [APP ID: mbo-mpl-client]] Session Event: [2]
2024-01-18 11:42:22,989 [WARNING] solace.messaging.core: [_solace_transport.py:89] [[SERVICE: 0x10f1a3340] - [APP ID: mbo-mpl-client]] {'caller_description': 'do_connect', 'return_code': 'Not ready', 'sub_code': 'SOLCLIENT_SUBCODE_COMMUNICATION_ERROR', 'error_info_sub_code': 14, 'error_info_contents': "SSL 'SSL-client' cannot read, sslErr = 5: 'Peer closed socket"}
2024-01-18 11:42:22,989 [WARNING] solace.messaging.connections: [messaging_service.py:1244] [[SERVICE: 0x10f1a3340] - [APP ID: mbo-mpl-client]] Connection failed. Status code: 3

using the python solace-pubsubplus1.6.0 client library.

Comments

  • Shijo
    Shijo Member Posts: 10 ✭✭

    Ignore this,

    I thought this issue was because of my python package versions since I tried to upgrade some of the packages(eg: PyOpenSSL)

    This is a kind of cache/network related. Issue got resolved once i restarted everything.

    Thanks