VitalyShein opened a new issue #6079: Cannot create producer via websocket in 
standalone mode
URL: https://github.com/apache/pulsar/issues/6079
 
 
   **Describe the bug**
   Websocket api is broken - it is impossible to connect with producer to any 
existing topic.
   
   **To Reproduce**
   Steps to reproduce the behavior:
   1. Run pulsar in standalone mode (docker-compose file):
   ```
     standalone:
       image: apachepulsar/pulsar-standalone:2.5.0
       expose:
         - 8080
         - 6650
       ports:
         - "6650:6650"
         - "8080:8080"
   ```
   2. Try to create producer via websocket (python 3.7)
   ```
   import asyncio
   import websockets
   
   async def connect_test():
       TOPIC = 
'ws://localhost:8080/ws/v2/producer/persistent/public/default/my-topic'
       async with websockets.connect(TOPIC) as websocket:
           print('connected!')
   
   asyncio.get_event_loop().run_until_complete(connect_test())
   ```
   3. An exception will occur: error 400
   4. Pulsar logs in docker:
   ```
   12:46:38.002 [pulsar-web-57-6] WARN  
org.apache.pulsar.websocket.ProducerHandler - [172.18.0.1:48562] Failed in 
creating producer on topic persistent://public/default/my-topic: Param 
serviceUrl must not be blank.
   
   
   12:46:38.002 [pulsar-web-57-6] INFO  org.eclipse.jetty.server.RequestLog - 
172.18.0.1 - - [17/Jan/2020:12:46:38 +0000] "GET 
/ws/v2/producer/persistent/public/default/my-topic HTTP/1.1" 400 462 "-" 
"Python/3.7 websockets/8.1" 1
   
   ```
   5. Change version of pulsar to 2.4.2 - all is working fine!
   
   **Desktop (please complete the following information):**
    - OS: Windows 10
    - Docker-engine: 19.0.3.5 
   
   

----------------------------------------------------------------
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