I'm trying to subscribe to an Apache Pulsar topic, and I know for certain the tenant, namespace, and topic all exist because other consumers are able to subscribe to this exact same topic. I've double-checked that my URL and port are correct and that I'm using the correct trust cert. However, I'm getting the exception Error Checking/Getting Partition Metadata while Subscribing, and it won't connect. I'm attempting to connect with SSL over TLS.
My Python code looks like this, but as I mention below, I've used the same approach in Java and in Go, and I get the same result in each language:
import pulsar
client = pulsar.Client('pulsar+ssl://my-pulsar-ms-tls.mydomain.com:6651',
tls_trust_certs_file_path='./ca.cert.pem')
consumer = client.subscribe(topic='persistent://my-tenant/ingest/my-topic-name',
subscription_name='my-topic-name-source')
The exception I'm getting is detailed below:
2020-06-05 19:55:05.347 INFO Client:88 | Subscribing on Topic :persistent://my-tenant/ingest/my-topic-name
2020-06-05 19:55:05.348 INFO ConnectionPool:72 | Created connection for pulsar+ssl://my-pulsar-ms-tls.mydomain.com:6651
2020-06-05 19:55:05.540 INFO ClientConnection:324 | [10.90.3.86:59058 ->
10.20.13.58:6651] Connected to broker
2020-06-05 19:55:05.582 ERROR ClientConnection:382 | [10.90.3.86:59058 -> 10.20.13.58:6651] Handshake failed: Connection reset by peer
2020-06-05 19:55:05.582 INFO ClientConnection:1337 | [10.90.3.86:59058 -> 10.20.13.58:6651] Connection closed
2020-06-05 19:55:05.582 ERROR ClientImpl:384 | Error Checking/Getting Partition Metadata while Subscribing on persistent://my-tenant/ingest/my-topic-name -- 5
2020-06-05 19:55:05.582 INFO ClientConnection:229 | [10.90.3.86:59058 ->
10.20.13.58:6651] Destroyed connection Traceback (most recent call last): File "/Users/exampleUser/PycharmProjects/ledger/test.py", line 7, in <module>
subscription_name='my-topic-name-source') File "/Users/exampleUser/PycharmProjects/ledger/venv/lib/python3.7/site-packages/pulsar/__init__.py", line 604, in subscribe
c._consumer = self._client.subscribe(topic, subscription_name, conf) Exception: Pulsar error: ConnectError
I got the same exception when using Java, as well as Go, so it's not Python-specific.
What is the issue?