diff --git a/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterFormationTasks.groovy b/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterFormationTasks.groovy index d87e33166e74d..aaf48266620ff 100644 --- a/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterFormationTasks.groovy +++ b/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterFormationTasks.groovy @@ -371,7 +371,7 @@ class ClusterFormationTasks { } esConfig['node.max_local_storage_nodes'] = node.config.numNodes esConfig['http.port'] = node.config.httpPort - esConfig['transport.tcp.port'] = node.config.transportPort + esConfig['transport.port'] = node.config.transportPort // Default the watermarks to absurdly low to prevent the tests from failing on nodes without enough disk space esConfig['cluster.routing.allocation.disk.watermark.low'] = '1b' esConfig['cluster.routing.allocation.disk.watermark.high'] = '1b' diff --git a/buildSrc/src/main/java/org/elasticsearch/gradle/testclusters/ElasticsearchNode.java b/buildSrc/src/main/java/org/elasticsearch/gradle/testclusters/ElasticsearchNode.java index fa4415bbe1e91..da807b95ade67 100644 --- a/buildSrc/src/main/java/org/elasticsearch/gradle/testclusters/ElasticsearchNode.java +++ b/buildSrc/src/main/java/org/elasticsearch/gradle/testclusters/ElasticsearchNode.java @@ -333,7 +333,7 @@ private void configure() { config.put("node.attr.testattr", "test"); config.put("node.portsfile", "true"); config.put("http.port", "0"); - config.put("transport.tcp.port", "0"); + config.put("transport.port", "0"); // Default the watermarks to absurdly low to prevent the tests from failing on nodes without enough disk space config.put("cluster.routing.allocation.disk.watermark.low", "1b"); config.put("cluster.routing.allocation.disk.watermark.high", "1b"); diff --git a/client/sniffer/src/test/resources/create_test_nodes_info.bash b/client/sniffer/src/test/resources/create_test_nodes_info.bash index f4f1c09882ea8..27f1c60743c67 100644 --- a/client/sniffer/src/test/resources/create_test_nodes_info.bash +++ b/client/sniffer/src/test/resources/create_test_nodes_info.bash @@ -60,7 +60,7 @@ node${attr}.dummy: everyone_has_me node${attr}.number: ${node:1} node${attr}.array: [${node:0:1}, ${node:1}] http.port: ${http_port} -transport.tcp.port: ${transport_port} +transport.port: ${transport_port} discovery.zen.minimum_master_nodes: 3 discovery.zen.ping.unicast.hosts: ['localhost:9300','localhost:9301','localhost:9302'] __ES_YML diff --git a/docs/reference/modules/discovery/zen.asciidoc b/docs/reference/modules/discovery/zen.asciidoc index e9be7aa52e890..98967bf7ebaf4 100644 --- a/docs/reference/modules/discovery/zen.asciidoc +++ b/docs/reference/modules/discovery/zen.asciidoc @@ -43,7 +43,7 @@ The list of hosts is set using the `discovery.zen.ping.unicast.hosts` static setting. This is either an array of hosts or a comma-delimited string. Each value should be in the form of `host:port` or `host` (where `port` defaults to the setting `transport.profiles.default.port` falling back to -`transport.tcp.port` if not set). Note that IPv6 hosts must be bracketed. The +`transport.port` if not set). Note that IPv6 hosts must be bracketed. The default for this setting is `127.0.0.1, [::1]` Additionally, the `discovery.zen.ping.unicast.resolve_timeout` configures the diff --git a/docs/reference/modules/network.asciidoc b/docs/reference/modules/network.asciidoc index 9b239e5321dd5..e8dd3adef6ed7 100644 --- a/docs/reference/modules/network.asciidoc +++ b/docs/reference/modules/network.asciidoc @@ -50,7 +50,7 @@ range. + Defaults to `9200-9300`. -`transport.tcp.port`:: +`transport.port`:: Port to bind for communication between nodes. Accepts a single value or a range. If a range is specified, the node will bind to the first available port diff --git a/docs/reference/modules/remote-clusters.asciidoc b/docs/reference/modules/remote-clusters.asciidoc index 4bf3073abd359..768eb7d6117bf 100644 --- a/docs/reference/modules/remote-clusters.asciidoc +++ b/docs/reference/modules/remote-clusters.asciidoc @@ -161,6 +161,14 @@ PUT _cluster/settings are sent according to the global `transport.ping_schedule` setting, which defaults to ``-1` meaning that pings are not sent. +`cluster.remote.${cluster_alias}.transport.compress`:: + + Per cluster boolean setting that enables you to configure compression for + requests to a specific remote cluster. This setting impacts only requests + sent to the remote cluster. If the inbound request is compressed, + Elasticsearch compresses the response. If unset, the global + `transport.compress` is used as the fallback setting. + [float] [[retrieve-remote-clusters-info]] === Retrieving remote clusters info diff --git a/docs/reference/modules/transport.asciidoc b/docs/reference/modules/transport.asciidoc index c1bc83230e597..bc9a4fb544d67 100644 --- a/docs/reference/modules/transport.asciidoc +++ b/docs/reference/modules/transport.asciidoc @@ -15,21 +15,21 @@ being the ideal solution for scatter (broadcast) / gather operations such as search in Elasticsearch. [float] -=== TCP Transport +=== Transport Settings -The TCP transport is an implementation of the transport module using -TCP. It allows for the following settings: +The internal transport communicates over TCP. You can configure it with the +following settings: [cols="<,<",options="header",] |======================================================================= |Setting |Description -|`transport.tcp.port` |A bind port range. Defaults to `9300-9400`. +|`transport.port` |A bind port range. Defaults to `9300-9400`. |`transport.publish_port` |The port that other nodes in the cluster should use when communicating with this node. Useful when a cluster node -is behind a proxy or firewall and the `transport.tcp.port` is not directly +is behind a proxy or firewall and the `transport.port` is not directly addressable from the outside. Defaults to the actual port assigned via -`transport.tcp.port`. +`transport.port`. |`transport.bind_host` |The host address to bind the transport service to. Defaults to `transport.host` (if set) or `network.bind_host`. @@ -38,11 +38,11 @@ addressable from the outside. Defaults to the actual port assigned via |`transport.host` |Used to set the `transport.bind_host` and the `transport.publish_host` Defaults to `transport.host` or `network.host`. -|`transport.tcp.connect_timeout` |The socket connect timeout setting (in +|`transport.connect_timeout` |The connect timeout for initiating a new connection (in time setting format). Defaults to `30s`. -|`transport.tcp.compress` |Set to `true` to enable compression (`DEFLATE`) -between all nodes. Defaults to `false`. +|`transport.compress` |Set to `true` to enable compression (`DEFLATE`) between +all nodes. Defaults to `false`. |`transport.ping_schedule` | Schedule a regular application-level ping message to ensure that transport connections between nodes are kept alive. Defaults to @@ -57,7 +57,7 @@ It also uses the common <>. [float] -==== TCP Transport Profiles +==== Transport Profiles Elasticsearch allows you to bind to multiple ports on different interfaces by the use of transport profiles. See this example configuration @@ -82,11 +82,11 @@ example above: * `port`: The port to bind to * `bind_host`: The host to bind * `publish_host`: The host which is published in informational APIs -* `tcp_no_delay`: Configures the `TCP_NO_DELAY` option for this socket -* `tcp_keep_alive`: Configures the `SO_KEEPALIVE` option for this socket -* `reuse_address`: Configures the `SO_REUSEADDR` option for this socket -* `tcp_send_buffer_size`: Configures the send buffer size of the socket -* `tcp_receive_buffer_size`: Configures the receive buffer size of the socket +* `tcp.no_delay`: Configures the `TCP_NO_DELAY` option for this socket +* `tcp.keep_alive`: Configures the `SO_KEEPALIVE` option for this socket +* `tcp.reuse_address`: Configures the `SO_REUSEADDR` option for this socket +* `tcp.send_buffer_size`: Configures the send buffer size of the socket +* `tcp.receive_buffer_size`: Configures the receive buffer size of the socket [float] ==== Long-lived idle connections @@ -97,7 +97,7 @@ period of time. Nonetheless, Elasticsearch requires these connections to remain open, and it can disrupt the operation of the cluster if any inter-node connections are closed by an external influence such as a firewall. It is important to configure your network to preserve long-lived idle connections -between Elasticsearch nodes, for instance by leaving `tcp_keep_alive` enabled +between Elasticsearch nodes, for instance by leaving `tcp.keep_alive` enabled and ensuring that the keepalive interval is shorter than any timeout that might cause idle connections to be closed, or by setting `transport.ping_schedule` if keepalives cannot be configured. diff --git a/docs/reference/settings/audit-settings.asciidoc b/docs/reference/settings/audit-settings.asciidoc index 011a66d62b3b8..b7a3446ae9691 100644 --- a/docs/reference/settings/audit-settings.asciidoc +++ b/docs/reference/settings/audit-settings.asciidoc @@ -176,8 +176,8 @@ To index audit events to a remote {es} cluster, you configure the following `xpack.security.audit.index.client.hosts`:: Specifies a comma-separated list of `host:port` pairs. These hosts should be nodes in the remote cluster. If you are using default values for the -<> setting, you can omit the -`port` value. Otherwise, it must match the `transport.tcp.port` setting. +<> setting, you can omit the +`port` value. Otherwise, it must match the `transport.port` setting. `xpack.security.audit.index.client.cluster.name`:: Specifies the name of the remote cluster. diff --git a/docs/reference/setup/important-settings/discovery-settings.asciidoc b/docs/reference/setup/important-settings/discovery-settings.asciidoc index e0c67ffb22da8..0587484f50c61 100644 --- a/docs/reference/setup/important-settings/discovery-settings.asciidoc +++ b/docs/reference/setup/important-settings/discovery-settings.asciidoc @@ -26,7 +26,7 @@ discovery.zen.ping.unicast.hosts: - seeds.mydomain.com <2> -------------------------------------------------- <1> The port will default to `transport.profiles.default.port` and fallback to - `transport.tcp.port` if not specified. + `transport.port` if not specified. <2> A hostname that resolves to multiple IP addresses will try all resolved addresses. diff --git a/server/src/test/java/org/elasticsearch/discovery/single/SingleNodeDiscoveryIT.java b/server/src/test/java/org/elasticsearch/discovery/single/SingleNodeDiscoveryIT.java index c3ffbb82081b7..7fc226b3b8145 100644 --- a/server/src/test/java/org/elasticsearch/discovery/single/SingleNodeDiscoveryIT.java +++ b/server/src/test/java/org/elasticsearch/discovery/single/SingleNodeDiscoveryIT.java @@ -65,7 +65,7 @@ protected Settings nodeSettings(int nodeOrdinal) { .builder() .put(super.nodeSettings(nodeOrdinal)) .put("discovery.type", "single-node") - .put("transport.tcp.port", "0") + .put("transport.port", "0") .build(); } @@ -130,7 +130,7 @@ public Settings nodeSettings(int nodeOrdinal) { * We align the port ranges of the two as then with zen discovery these two * nodes would find each other. */ - .put("transport.tcp.port", port + "-" + (port + 5 - 1)) + .put("transport.port", port + "-" + (port + 5 - 1)) .build(); } diff --git a/test/fixtures/old-elasticsearch/src/main/java/oldes/OldElasticsearch.java b/test/fixtures/old-elasticsearch/src/main/java/oldes/OldElasticsearch.java index bd4c3f8ccd105..b185c2c7f627d 100644 --- a/test/fixtures/old-elasticsearch/src/main/java/oldes/OldElasticsearch.java +++ b/test/fixtures/old-elasticsearch/src/main/java/oldes/OldElasticsearch.java @@ -82,7 +82,7 @@ public static void main(String[] args) throws IOException { Path bin = esDir.resolve("bin").resolve("elasticsearch" + (Constants.WINDOWS ? ".bat" : "")); Path config = esDir.resolve("config").resolve("elasticsearch.yml"); - Files.write(config, Arrays.asList("http.port: 0", "transport.tcp.port: 0", "network.host: 127.0.0.1"), StandardCharsets.UTF_8); + Files.write(config, Arrays.asList("http.port: 0", "transport.port: 0", "network.host: 127.0.0.1"), StandardCharsets.UTF_8); List command = new ArrayList<>(); command.add(bin.toString()); diff --git a/test/framework/src/main/java/org/elasticsearch/transport/AbstractSimpleTransportTestCase.java b/test/framework/src/main/java/org/elasticsearch/transport/AbstractSimpleTransportTestCase.java index 8c173625cce43..43542d48a6c39 100644 --- a/test/framework/src/main/java/org/elasticsearch/transport/AbstractSimpleTransportTestCase.java +++ b/test/framework/src/main/java/org/elasticsearch/transport/AbstractSimpleTransportTestCase.java @@ -2603,34 +2603,34 @@ public void testProfileSettings() { .build(); Settings transportSettings = Settings.builder() - .put("transport.tcp_no_delay", enable) + .put("transport.tcp.no_delay", enable) .put("transport.tcp.keep_alive", enable) .put("transport.tcp.reuse_address", enable) .put("transport.tcp.send_buffer_size", "43000b") .put("transport.tcp.receive_buffer_size", "42000b") .put("transport.publish_host", "the_publish_host") - .put("transport.tcp.port", "9700-9800") + .put("transport.port", "9700-9800") .put("transport.bind_host", "the_bind_host") .put(globalSettings2) .build(); Settings transportSettings2 = Settings.builder() - .put("transport.tcp_no_delay", !enable) + .put("transport.tcp.no_delay", !enable) .put("transport.tcp.keep_alive", !enable) .put("transport.tcp.reuse_address", !enable) .put("transport.tcp.send_buffer_size", "5b") .put("transport.tcp.receive_buffer_size", "6b") .put("transport.publish_host", "another_publish_host") - .put("transport.tcp.port", "9702-9802") + .put("transport.port", "9702-9802") .put("transport.bind_host", "another_bind_host") .put(globalSettings2) .build(); Settings defaultProfileSettings = Settings.builder() - .put("transport.profiles.default.tcp_no_delay", enable) - .put("transport.profiles.default.tcp_keep_alive", enable) + .put("transport.profiles.default.tcp.no_delay", enable) + .put("transport.profiles.default.tcp.keep_alive", enable) .put("transport.profiles.default.reuse_address", enable) - .put("transport.profiles.default.send_buffer_size", "43000b") - .put("transport.profiles.default.receive_buffer_size", "42000b") + .put("transport.profiles.default.tcp.send_buffer_size", "43000b") + .put("transport.profiles.default.tcp.receive_buffer_size", "42000b") .put("transport.profiles.default.port", "9700-9800") .put("transport.profiles.default.publish_host", "the_publish_host") .put("transport.profiles.default.bind_host", "the_bind_host") @@ -2639,11 +2639,11 @@ public void testProfileSettings() { .build(); Settings profileSettings = Settings.builder() - .put("transport.profiles.some_profile.tcp_no_delay", enable) - .put("transport.profiles.some_profile.tcp_keep_alive", enable) + .put("transport.profiles.some_profile.tcp.no_delay", enable) + .put("transport.profiles.some_profile.tcp.keep_alive", enable) .put("transport.profiles.some_profile.reuse_address", enable) - .put("transport.profiles.some_profile.send_buffer_size", "43000b") - .put("transport.profiles.some_profile.receive_buffer_size", "42000b") + .put("transport.profiles.some_profile.tcp.send_buffer_size", "43000b") + .put("transport.profiles.some_profile.tcp.receive_buffer_size", "42000b") .put("transport.profiles.some_profile.port", "9700-9800") .put("transport.profiles.some_profile.publish_host", "the_publish_host") .put("transport.profiles.some_profile.bind_host", "the_bind_host") diff --git a/x-pack/docs/en/security/auditing/forwarding-logs.asciidoc b/x-pack/docs/en/security/auditing/forwarding-logs.asciidoc index 0b79af593b6ea..f08945a6f8a0d 100644 --- a/x-pack/docs/en/security/auditing/forwarding-logs.asciidoc +++ b/x-pack/docs/en/security/auditing/forwarding-logs.asciidoc @@ -20,7 +20,7 @@ xpack.security.audit.index.client.cluster.name: logging-prod <2> xpack.security.audit.index.client.xpack.security.user: myuser:mypassword <3> -------------------------------------------------- <1> A list of hosts in the remote cluster. If you are not using the default -value for the `transport.tcp.port` setting on the remote cluster, you must +value for the `transport.port` setting on the remote cluster, you must specify the appropriate port number (prefixed by a colon) after each host. <2> The remote cluster name. <3> A valid user and password, which must have authority to create the diff --git a/x-pack/qa/vagrant/src/test/resources/packaging/tests/certgen.bash b/x-pack/qa/vagrant/src/test/resources/packaging/tests/certgen.bash index fbf0c9efcfcc9..4e7454530a0a2 100644 --- a/x-pack/qa/vagrant/src/test/resources/packaging/tests/certgen.bash +++ b/x-pack/qa/vagrant/src/test/resources/packaging/tests/certgen.bash @@ -256,7 +256,7 @@ xpack.ssl.certificate: $ESCONFIG/certs/node-master/node-master.crt xpack.ssl.certificate_authorities: ["$ESCONFIG/certs/ca/ca.crt"] xpack.security.transport.ssl.enabled: true -transport.tcp.port: 9300 +transport.port: 9300 xpack.security.http.ssl.enabled: true http.port: 9200 @@ -339,7 +339,7 @@ xpack.ssl.certificate: $ESCONFIG/certs/node-data/node-data.crt xpack.ssl.certificate_authorities: ["$ESCONFIG/certs/ca/ca.crt"] xpack.security.transport.ssl.enabled: true -transport.tcp.port: 9301 +transport.port: 9301 xpack.security.http.ssl.enabled: true http.port: 9201