Skip to content
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

implement config.sniffedNodesProtocol #268

Merged
merged 2 commits into from
Sep 12, 2015

Conversation

spalger
Copy link
Contributor

@spalger spalger commented Sep 11, 2015

Fixes #264

If you use https to protect traffic between esjs client and the nodes in your cluster then you can't use sniffing. This is because we use the /_nodes/_all/clear API to populate the connection pool and that API does not know that the nodes speak HTTPS. This change implements the config.sniffedNodesProtocol to fix this.

sniffedNodesProtocol can be set to a string which will be used as the protocol configuration for each Host object created during sniffing, plain and simple. The default value for this configuration depends on the hosts initially passed to the client, if all of the nodes have the same protocol that protocol is used.

spalger added 2 commits September 10, 2015 18:47
If you use https to protect traffic between esjs client and the nodes in your cluster then you also can't use sniffing. This is because we use the /_nodes/_all/clear output to populate the connection pool and that API does not know that the nodes speak HTTPS at all. This change implements the config.sniffedNodesProtocol to fix this.

As it is implemented here, the sniffedNodesProtocol can be set to a string which will be used as the protocol configuration for each Host object created durring sniffing, plain and simple. The default value for this configuration depends on the hosts initially passed to the client, if all of the nodes have the same protocol that protocol is used. If your nodes list is empty or there is a mixture of protocols in this list then "http" is used, as it is the default protocol for each host.
spalger added a commit that referenced this pull request Sep 12, 2015
implement config.sniffedNodesProtocol
@spalger spalger merged commit dae7d94 into elastic:master Sep 12, 2015
@spalger spalger deleted the fix/sniffingHttpsNodes branch September 12, 2015 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sniffing broken with shield/https
1 participant