dosubot[bot] commented on issue #36069:
URL: https://github.com/apache/superset/issues/36069#issuecomment-3520213727

   <!-- Answer -->
   To get superset-websocket working and avoid the 404 WebSocket errors, you 
need to:
   
   1. Copy `config.example.json` to `config.json` in the `superset-websocket` 
directory and set the `"port"` field to the port you want (e.g., 8080). Make 
sure Redis connection details, `"jwtSecret"`, and `"jwtCookieName"` are set and 
match the values in your Superset Flask app config. These values must be 
consistent for authentication and async events to work. You can also use 
environment variables to override these settings if needed. See the full config 
options in the example file and code comments [[config.json 
example]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-websocket/config.example.json)
 
[[config.ts]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-websocket/src/config.ts).
   
   2. In your Superset `superset_config.py`, set:
      ```python
      GLOBAL_ASYNC_QUERIES = True
      GLOBAL_ASYNC_QUERIES_TRANSPORT = "ws"
      GLOBAL_ASYNC_QUERIES_WEBSOCKET_URL = "ws://localhost:8080/"
      ```
      Replace `8080` with whatever port you set in `config.json`. The hostname 
(`localhost` vs `127.0.0.1`) must match how you access Superset in your browser 
[[README]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-websocket/README.md#L23-L130).
   
   3. Start Redis if it’s not already running.
   
   4. In the `superset-websocket` directory, run `npm run dev-server`. This 
starts the WebSocket server on the port you set in `config.json` 
[[package.json]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-websocket/package.json#L5-L56).
   
   5. Make sure your Flask app and the WebSocket server are running at the same 
hostname (but different ports), and that the WebSocket URL in your Superset 
config matches.
   
   If you still see 404 errors, double-check that the WebSocket server is 
running, the port matches in both configs, and that you’re not mixing up 
`localhost` and `127.0.0.1` in your browser and config. There are no known 
Windows-specific blockers, but make sure Node and Redis are installed and 
running properly.
   
   Let me know if you need a sample config or run into a specific error!
   
   
   <!-- Dosu Comment Footer -->
   *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*
   
   ---
   <sup>How did I do? 
[Good](https://app.dosu.dev/response-feedback/f4003970-f9f2-4298-925d-dd20615dcb63?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/f4003970-f9f2-4298-925d-dd20615dcb63?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/f4003970-f9f2-4298-925d-dd20615dcb63?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/f4003970-f9f2-4298-925d-dd20615dcb63?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/f4003970-f9f2-4298-925d-dd20615dcb63?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/f4003970-f9f2-4298-925d-dd20615dcb63?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/f4003970-f9f2-4298-925d-dd20615dcb63?feedback_type=other)</sup>&nbsp;&nbsp;[![Chat
 with 
Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=githu
 b)&nbsp;[![Join 
Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share
 on 
X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/36069)


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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to