question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

websocket meet 404 when create producer in standalone mode

See original GitHub issue

Describe the bug This issue is split from issue #5979, which reported by @jeffgrunewald

I am attempting to build and run pulsar locally for development mode but I receive a 404 whenever attempting to connect to the websocket to create a producer due to a missing “serviceUrl” param. I have set this value to my local host/port in the conf/websocket.conf file but the result is the same. Is there somewhere else this should be set or an undocumented requirement for connecting from the websocket client?

I have not experienced this issue when using the standard Pulsar docker image (apache/pulsar:latest) and running the command bin/pulsar standalone as the CMD directive.

Just to be clear, I am attempting this off a clone of the tip of the master branch, not the latest release tarball. I do see in the logs the ConsumerStatsRecorderImpl Pulsar client config is listing the serviceUrl as "serviceUrl" : "pulsar://127.0.0.1:6650". Are the current websocket client connection instructions accurate for the latest unreleased version?

For further context, I am writing a pulsar client library for the Elixir language based on the websocket api. My producer and consumer is connecting to the endpoint ws://localhost:8080/ws/v2/producer/persistent... where localhost is dynamically supplied as part of the client configuration and my dockerized pulsar for development purposes is mapping the default service port 8080 from the container to the host.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
bwalendzcommented, Jan 20, 2020

Having the same issue with 2.5.0 standalone.

WS receives unexpected server response: 400 on connect.

Param serviceUrl must not be blank.

This is a complete blocker for anyone using WS. So reverting back to 2.4.2 is working.

0reactions
sijiecommented, Jan 21, 2020

@bwalendz 2.5.0 has a regression about initializing websocket introduced from #5486. I am working on a fix.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error 404 when connecting to websocket - Stack Overflow
WebSocket connection to 'ws://localhost:8080/chp/mediador' failed: Error during WebSocket handshake: Unexpected response code: 404.
Read more >
Pulsar WebSocket API
In non-standalone mode, there are two ways to deploy the WebSocket service: ... Pulsar will enforce only one producer with same name can...
Read more >
Secure Websocket 404 error - support - Lucee Dev
I now got the websocket plugin working on localhost and on the server ... For those who want to add HTTPS for Tomcat...
Read more >
Fix list for IBM WebSphere Application Server V8.5
IBM WebSphere Application Server provides periodic fixes for the base and Network Deployment editions of release V8.5. The following is a complete listing ......
Read more >
Using Spring Boot for WebSocket Implementation with STOMP
The Server-side: Spring Boot and WebSockets · Creates the in-memory message broker with one or more destinations for sending and receiving messages. ·...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found