tabixio / tabix

Tabix.io UI
https://tabix.io
Other
2.14k stars 265 forks source link

Unable to connect to clickhouse #253

Open Hua777 opened 1 year ago

Hua777 commented 1 year ago

Version

Tabix version: Tabix ©2022 Version: 22.05.25 is last ClickHouse version: 21.8.15.1

Error

I got this error always:

image image

Step URL returns

  1. http://url:8123/

OK.

  1. http://url:8123/?user=xxxxx&password=xxxxx&query=SELECT%20version()%20as%20version%20FORMAT%20JSON
{
    "meta":
    [
        {
            "name": "version",
            "type": "String"
        }
    ],

    "data":
    [
        {
            "version": "21.8.15.1"
        }
    ],

    "rows": 1,

    "statistics":
    {
        "elapsed": 0.000170965,
        "rows_read": 1,
        "bytes_read": 1
    }
}
  1. http://url:8123/?add_http_cors_header=1&user=xxxxx&password=xxxxx&query=SELECT%20version()%20as%20version%20FORMAT%20JSON
{
    "meta":
    [
        {
            "name": "version",
            "type": "String"
        }
    ],

    "data":
    [
        {
            "version": "21.8.15.1"
        }
    ],

    "rows": 1,

    "statistics":
    {
        "elapsed": 0.000103174,
        "rows_read": 1,
        "bytes_read": 1
    }
}
  1. http://url:8123/?max_result_rows=123&add_http_cors_header=1&user=xxxxx&password=xxxxx&query=SELECT%20version()%20as%20version%20FORMAT%20JSON
{
    "meta":
    [
        {
            "name": "version",
            "type": "String"
        }
    ],

    "data":
    [
        {
            "version": "21.8.15.1"
        }
    ],

    "rows": 1,

    "statistics":
    {
        "elapsed": 0.000097852,
        "rows_read": 1,
        "bytes_read": 1
    }
}

Other Information

None

RapidCodeLab commented 1 year ago

having absolutely same problems, both on http://dash.tabix.io/ and self installed version

isublimity commented 1 year ago

having absolutely same problems, both on http://dash.tabix.io/ and self installed version

Version is "version": "21.8.15.1" ?

Hua777 commented 1 year ago

having absolutely same problems, both on http://dash.tabix.io/ and self installed version

Version is "version": "21.8.15.1" ?

I use http://dash.tabix.io/ is okay. Only self installed has this problem.

RapidCodeLab commented 1 year ago

having absolutely same problems, both on http://dash.tabix.io/ and self installed version

Version is "version": "21.8.15.1" ?

nope, on my side version is "version": "22.6.9.11"

isublimity commented 1 year ago

try open console for more information, what error write?

Снимок экрана 2022-11-15 в 09 37 03
isublimity commented 1 year ago

I think problem in parameter add_http_cors_header

isublimity commented 1 year ago
 /// Add CORS header if 'add_http_cors_header' setting is turned on send * in Access-Control-Allow-Origin
    /// Note that whether the header is added is determined by the settings, and we can only get the user settings after authentication.
    /// Once the authentication fails, the header can't be added.
    if (settings.add_http_cors_header && !request.get("Origin", "").empty() && !config.has("http_options_response"))
        used_output.out->addHeaderCORS(true);
isublimity commented 1 year ago

https://github.com/ClickHouse/ClickHouse/pull/41792

isublimity commented 1 year ago

If you use 21.X, < 22.10 send me console.log

sherlockwhite commented 1 year ago

try open console for more information, what error write?

Снимок экрана 2022-11-15 в 09 37 03

I am using clickhouse version 23.6.2.18, and I have the same problem as the picture, how to solve it?

sherlockwhite commented 1 year ago

Is tabix not available now?