cdbartholomew commented on issue #6710: Health check fails when running Docker 
images
URL: https://github.com/apache/pulsar/issues/6710#issuecomment-612058362
 
 
   There appears to be a much larger issue here. Connecting a producer with a 
schema is timing out (I am testing using the 2.5.1 candidate). Using the 
following python code running in a bastion connecting to the broker:
   
   ```
   import pulsar
   
   from pulsar.schema import *
   
   class Test(Record):
       id = Integer(required=True)
       user_id = Integer(required=False)
   
   service_url = 'pulsar://pulsar-broker:6650'
   
   
   client = pulsar.Client(service_url)
   
   noSchemaProducer = client.create_producer(
                       topic='persistent://public/default/no_schema')
   
   schemaProducer = client.create_producer(
                       topic='persistent://public/default/with_schema',
                       schema=AvroSchema(Test) )
   
   
   client.close()
   ```
   Gives this result:
   
   ```
   python3 schema.py 
   2020-04-10 14:30:18.245 INFO  ConnectionPool:85 | Created connection for 
pulsar://pulsar-broker:6650
   2020-04-10 14:30:18.247 INFO  ClientConnection:330 | [10.32.0.7:40630 -> 
10.96.121.170:6650] Connected to broker
   2020-04-10 14:30:18.253 INFO  HandlerBase:53 | 
[persistent://public/default/no_schema, ] Getting connection from pool
   2020-04-10 14:30:18.254 INFO  ConnectionPool:85 | Created connection for 
pulsar://10.32.0.15:6650
   2020-04-10 14:30:18.254 INFO  ClientConnection:330 | [10.32.0.7:53392 -> 
10.32.0.15:6650] Connected to broker
   2020-04-10 14:30:18.258 INFO  ProducerImpl:151 | 
[persistent://public/default/no_schema, ] Created producer on broker 
[10.32.0.7:53392 -> 10.32.0.15:6650] 
   2020-04-10 14:30:18.261 INFO  HandlerBase:53 | 
[persistent://public/default/with_schema, ] Getting connection from pool
   2020-04-10 14:30:48.263 ERROR ProducerImpl:219 | 
[persistent://public/default/with_schema, ] Failed to create producer: TimeOut
   2020-04-10 14:30:48.263 INFO  ProducerImpl:474 | Producer - 
[persistent://public/default/with_schema, ] , [batching  = off]
   Traceback (most recent call last):
     File "schema.py", line 19, in <module>
       schema=AvroSchema(Test) )
     File "/usr/local/lib/python3.7/dist-packages/pulsar/__init__.py", line 
524, in create_producer
       p._producer = self._client.create_producer(topic, conf)
   Exception: Pulsar error: TimeOut
   2020-04-10 14:30:48.266 INFO  ClientConnection:1349 | [10.32.0.7:53392 -> 
10.32.0.15:6650] Connection closed
   2020-04-10 14:30:48.266 INFO  ClientConnection:235 | [10.32.0.7:53392 -> 
10.32.0.15:6650] Destroyed connection
   2020-04-10 14:30:48.267 INFO  ClientConnection:1349 | [10.32.0.7:40630 -> 
10.96.121.170:6650] Connection closed
   2020-04-10 14:30:48.267 INFO  ProducerImpl:474 | Producer - 
[persistent://public/default/no_schema, pulsar-18-5] , [batching  = off]
   2020-04-10 14:30:48.267 INFO  ClientConnection:235 | [10.32.0.7:40630 -> 
10.96.121.170:6650] Destroyed connection
   ```
   The first producer without schema is able to connect without issue. The 
second producer with a schema times out. This same Python code runs fine 
against 2.5.0.
   
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to