prestodb / presto

The official home of the Presto distributed SQL query engine for big data
http://prestodb.io
Apache License 2.0
16.06k stars 5.38k forks source link

SQL CLIENT page can not run query when configuring coordinator using port 80. #22610

Closed solody closed 6 months ago

solody commented 6 months ago

SQL CLIENT page can not run query when configuring coordinator using port 80. We found that the problem is the web ui sending query request with the wrong port. We show the web ui in http default 80 prot, but it send query statement request with 8080 port, so the actual request url is: http://localhost:8080/v1/statement.

When I config to use non-80 port, for example 9090, the web ui can detect the right port to send query request: http://localhost:9090/v1/statement.

Only not working with port 80, it will fallback to use the system default value 8080.

I don't have a test on the https default 443 port, I suppose it is also not working.

Your Environment

Expected Behavior

When configuring the coordinator using port 80 as http service, the post url shoud use the 80 port to send http request.

Current Behavior

But currently it will fallback to use the system default value 8080.

Possible Solution

I'm not sure where the bug is, but probably in the react frontend project.

Steps to Reproduce

  1. Using http-server.http.port=80 in coordinator node.
  2. Open the web ui with http://localhost, click SQL CLIENT tab.
  3. Input show catalogs, click run button.
  4. Check the networking in the browser dev tool.

Screenshots (if appropriate)

Context

yhwang commented 6 months ago

thanks for opening the issue. This was fixed here: https://github.com/prestodb/presto/pull/22478 Feel free to re-open it if you don't see it fit.