Deprecation warnings since the upgrade to 7.4.0

Hi, since the upgrade from 7.3.2 to 7.4.0, i see many errors of:

[WARN ][o.e.d.t.TransportInfo    ] [es-data001.tab.com] transport.publish_address was printed as [ip:port] instead of [hostname/ip:port]. This format is deprecated and will change to [hostname/ip:port] in a future version. Use -Des.transport.cname_in_publish_address=true to enforce non-deprecated formatting.

[WARN ][o.e.d.h.HttpInfo         ] [es-data001.tab.com] es.http.cname_in_publish_address system property is deprecated and no longer affects http.publish_address formatting. Remove this property to get rid of this deprecation warning.

From startup log i see:

[2019-10-02T08:33:24,555][INFO ][o.e.t.TransportService   ] [es-data001.tab.com] publish_address {es-data001.tab.com/161.14.112.45:9300}, bound_addresses {[::]:9300}

Version:

elasticsearch-7.4.0-1.x86_64

yml:

cluster.name: dba
discovery.seed_hosts:
- es-data001.tab.com
- es-data002.tab.com
- es-data003.tab.com
network.bind_host: 0.0.0.0
network.host: 0.0.0.0
network.publish_host: es-data001.tab.com
node.name: es-data001.tab.com
path.data: "/var/lib/elasticsearch/data/dba"
path.logs: "/var/log/elasticsearch/dba"
xpack.ml.enabled: false
xpack.security.enabled: false
xpack.watcher.enabled: false

Not sure what need to change in order to fix the warnings.
Thanks, Yakir.

The warnings tell you this information, although it's perhaps not worded very clearly:

... Use -Des.transport.cname_in_publish_address=true to enforce non-deprecated formatting.

and

... es.http.cname_in_publish_address system property is deprecated ... Remove this property to get rid of this deprecation warning.

So you need to set the es.transport.cname_in_publish_address property and stop setting the es.http.cname_in_publish_address property.

Thanks @DavidTurner, but i don't not see es.http.cname_in_publish_address in my conf:

Current JVM conf:

-Dfile.encoding=UTF-8
-Dio.netty.noKeySetOptimization=true
-Dio.netty.noUnsafe=true
-Dio.netty.recycler.maxCapacityPerThread=0
-Djava.awt.headless=true
-Djna.nosys=true
-Dlog4j.shutdownHookEnabled=false
-Dlog4j2.disable.jmx=true
-XX:+AlwaysPreTouch
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow
-XX:GPGCTargetPeakHeapOccupancyPercent=95
-Xloggc:/var/log/elasticsearch/dba/gc.log
-Xms32g
-Xmx32g
-Xss1m
-server
-verbose:gc
[root@es-data001 ~]# curl -s "http://localhost:9200/_nodes" | jq ".nodes[].transport.publish_address"
"171.18.137.79:9300"
"171.18.137.80:9300"
"171.18.137.81:9300"

[root@es-data001 ~]# curl -s "http://localhost:9200/_nodes" | jq ".nodes[].http.publish_address"
"es-data002.taboolasyndication.com/171.18.137.79:9200"
"es-data003.taboolasyndication.com/171.18.137.81:9200"
"es-data001.taboolasyndication.com/171.18.137.80:9200"```

**yml:**

```cluster.name: dba
discovery.seed_hosts:
- es-data001.tab.com
- es-data002.tab.com
- es-data003.tab.com
network.bind_host: 0.0.0.0
network.host: 0.0.0.0
network.publish_host: es-data001.tab.com
node.name: es-data001.tab.com
path.data: "/var/lib/elasticsearch/data/dba"
path.logs: "/var/log/elasticsearch/dba"
xpack.ml.enabled: false
xpack.security.enabled: false
xpack.watcher.enabled: false```

Thanks.

Hmm, yes, I also see this now that I'm setting my publish host like yours. Do you need to set your network.publish_host to a host name like that? You normally don't need to set network.bind_host or network.publish_host at all.

I think this might be a bug so I opened https://github.com/elastic/elasticsearch/issues/47436.

Thanks @DavidTurner for very fast response, anyway, I'll try to remove network.bind_host and network.publish_host.

Seen the same now on 7.4 using:

network.host: _global_,_local_

EDIT: Appears that this only plays out on the elastic nodes that my kibana instance are pointed to

Thanks @stefws, I think that is consistent with the issue mentioned above, and a fix will be available in 7.4.1. This other thread has a temporary workaround for 7.4.0 if the warnings are intolerable, but otherwise I'd recommend leaving it alone and upgrading when the fix is released.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.