-
Notifications
You must be signed in to change notification settings - Fork 24.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Java-REST-Client NodeSniffer Fails parsing publish_address properly #48950
Comments
Pinging @elastic/es-core-features (:Core/Features/Java High Level REST Client) |
Hi, can you clarify a few things here. Are you saying that the following line does not work?
When you say
What is giving out this address? is it consul itself? |
initalizing the client works seamlessly, it connects with the provided consul address to the cluster, connection established ( and connection stays if no sniffer is used )
then the Node Sniffer kicks in and does its round, parsing the response from the nodes endpoint. here it receives the publish_address in the es7 format hostname/ip:port. I will provide the settings file of our cluster if necessary. |
Oh no, i didnt scroll down, i see what you are saying now. The
is different so its failing, correct? |
So it looks like #32806 introduced a change in the This is a great first issue for someone to fix. |
Hi @hub-cap I can take a look at this one. |
Awesome @zacharymorn! Just so you know, it looks like the |
@hub-cap I've created a pull request to support both formats. Please let me know if this looks good to you. |
awesome, great work. Ive been on vacation and it looks like @jbaiera is reviewing the other PR. Ill sync w him to see if he needs anything from me. |
Also been on vacation. The other PR is on my radar for today. Thanks for your patience! |
Sure no problem, thanks for reviewing the changes! |
Closing as #49279 is now merged. Please re-open if more work or discussion is needed. |
Elasticsearch version (
bin/elasticsearch --version
): 7.4.2 - Java Client 7.4.2Plugins installed: []
JVM version (
java -version
): jdk11OS version (
uname -a
if on a Unix-like system): unix dockerDescription of the problem including expected versus actual behavior:
Node-Sniffer for Java-Rest-Client fails parsing the new
hostname/ip:port
format properly.Client is initalized with a consul-address containing the port. instead the hostname is just used with port 80, the sniff() fails with an ConnectionException.
=> expected IP and port are extracted 192.168.0.185:9202
=> actual only hostname is parsed integration-stack-01.com.pany
Steps to reproduce:
Please include a minimal but complete recreation of the problem, including
(e.g.) index creation, mappings, settings, query etc. The easier you make for
us to reproduce it, the more likely that somebody will take the time to look at it.
Provide logs (if relevant):
Error:
Example:
The text was updated successfully, but these errors were encountered: