http handler problem

11 views
Skip to first unread message

Evgeny Lavrinenko

unread,
Apr 19, 2021, 5:59:26 AMApr 19
to ClickHouse
Hello everyone.

I want to implement http handler but when  I change settings in config.xml from the example:
<http_handlers>
    <rule>
        <url><![CDATA[/query_param_with_url/\w+/(?P<name_1>[^/]+)(/(?P<name_2>[^/]+))?]]></url>
        <method>GET</method>
        <headers>
            <XXX>TEST_HEADER_VALUE</XXX>
            <PARAMS_XXX><![CDATA[(?P<name_1>[^/]+)(/(?P<name_2>[^/]+))?]]></PARAMS_XXX>
        </headers>
        <handler>
            <type>predefined_query_handler</type>
            <query>SELECT value FROM system.settings WHERE name = {name_1:String}</query>
            <query>SELECT name, value FROM system.settings WHERE name = {name_2:String}</query>
        </handler>
    </rule>
</http_handlers>

then server stops to respond: Code: 210. DB::NetException: Connection refused (localhost:9000)

I thought I could be an issue of wrong version of clickhouse, so I updated server to the latst release but I am still getting the same behaviour.

Can anyone help me with this issue, please? 

Reply all
Reply to author
Forward
0 new messages