-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Closed
Labels
area/websockettype/bugThe PR fixed a bug or issue reported a bugThe PR fixed a bug or issue reported a bug
Description
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:
- Run pulsar in standalone mode (docker-compose file):
services:
standalone:
image: apachepulsar/pulsar-standalone:2.5.0
expose:
- 8080
- 6650
ports:
- "6650:6650"
- "8080:8080"
- 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())
- An exception will occur: error 400
- 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
- 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
VitalyShein
Metadata
Metadata
Assignees
Labels
area/websockettype/bugThe PR fixed a bug or issue reported a bugThe PR fixed a bug or issue reported a bug