Skip to content

clickhouse-local remote() fails with localhost on default port #26712

@davidmanzanares

Description

@davidmanzanares

Describe the bug

With a clickhouse server running on local at the default port (9000), this should work:

$ clickhouse-local -q "SELECT * FROM remote('127.0.0.1:9000', 'system.parts') LIMIT 3;"
Code: 60, e.displayText() = DB::Exception: Table system.parts doesn't exist (version 21.7.2.7 (official build))

Note that no tables can be accessed, not just system.parts.

Does it reproduce on recent release?

Yes, 21.7.2.7

How to reproduce

  • Start a clickhouse server at default port
  • Make any query with clickhouse-local to the clickhouse server using the remote function

Expected behavior

Clickhouse-local should be able to access it, just like clickhouse-client can with the same query.

Additional context

The problem only happens when using localhost and the default port. Starting the server at other port works.

The issue seems to be caused by incorrectly treating the address as local instead of as remote. We are working on a PR to fix it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugConfirmed user-visible misbehaviour in official release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions