python using tls : error connecting to a Solace pubsub broker

Hi Didier,

Thanks for posting to the Solace Community forum. I’m not sure I’m the right expert here but will try to help anyway :slight_smile:
Looks like the (tls) connection is not established properly? Does the messaging_service.connect() run successfully, can you test that?

In the code I see solace.messaging.transport.host can either pick an environment variable and if not set fall back to a default hardcoded host name. In this case it is ‘tcps://pubsub.preops.nm.eurocontrol.int:5671’ address ‘IP 193.58.21.120’. Is that the expected value for the host? Would be useful to check if the service is up and reachable on the IP address mentioned. Also the VPN value seems to be empty, is that expected?

The description for ‘sub_code’: ‘SOLCLIENT_SUBCODE_PROTOCOL_ERROR’ is:
‘An API call failed due to a protocol error with the broker (not an application fault).’

By default port 5671 is AMQP TLS / SSL. Is this AMQP TLS port enabled on the broker, assuming you want to connect using TLS? Are you working against a software broker or appliance?

More questions than answers maybe, but hopefully it helps you to check some settings and find the right direction.

Regards,

Emil