Skip to content

Sniffing uses bound_address instead of publish_address #2448

@GennadyAndreev

Description

@GennadyAndreev

Elasticsearch.Net version: 5.0.0-rc4
Elasticsearch version: 5.0.1

I have Elasticsearch server bound on both loopback interface and LAN interface:
network.host: ["_local_", "_site_"]

Here is part of /_nodes response:

"http": {
    "bound_address": [
        "[::1]:9200",
        "127.0.0.1:9200",
        "10.9.0.129:9200"
    ],
    "publish_address": "10.9.0.129:9200",
    "max_content_length_in_bytes": 104857600
}

SniffResponse class uses the first value of bound_address array. As a result, when I use SniffingConnectionPool, it is initialized with server [::1]:9200, and all subsequent requests go to local machine. If I use only _site_ binding, the client connects to the server normally.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions