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

RC-1 returns MaxRetrtyException when connecting to client. Downgrading to beta connects fine #809

Closed
bsee08 opened this issue Jul 18, 2014 · 4 comments

Comments

@bsee08
Copy link

bsee08 commented Jul 18, 2014

I have an existing index that I try to connect to. My production environment has 3 nodes, my test environment has 1. Trying to connect to either fails with RC-1, but works on both when I connect with the beta. All nodes are running ElasticSearch 1.1. All nodes are pingable, running properly, and the index exists. Has the connection api changed? I don't see it mentioned in the docs.

static ElasticClient GetClient()
{
    var uriArray = (from string ip in ConfigurationManager.AppSettings["SearchNodes"].Split(',') select new Uri(ip)).ToArray();
    var connectionPool = new SniffingConnectionPool(uriArray);
    var settings = new ConnectionSettings(connectionPool, ConfigurationManager.AppSettings["IndexName"]);
    var client = new ElasticClient(settings);
    return client;
}

The code calling that function:

var esClient = GetClient();
bool validConnection = esClient.RootNodeInfo().ConnectionStatus.Success;  //This throws a MaxRetryException
@Mpdreamz
Copy link
Member

@bsee08 can you inspect the maxretry innerexception and show us what that holds ?

@bsee08
Copy link
Author

bsee08 commented Jul 18, 2014

The innerException is null.

image

Stacktrace:
at Elasticsearch.Net.Connection.Transport.RetryRequest[T](TransportRequestState1 requestState, Exception e) in c:\code\elasticsearch-net\src\Elasticsearch.Net\Connection\Transport.cs:line 344 at Elasticsearch.Net.Connection.Transport.DoRequest[T](TransportRequestState1 requestState) in c:\code\elasticsearch-net\src\Elasticsearch.Net\Connection\Transport.cs:line 322
at Elasticsearch.Net.Connection.Transport.DoRequest[T](String method, String path, Object data, IRequestParameters requestParameters) in c:\code\elasticsearch-net\src\Elasticsearch.Net\Connection\Transport.cs:line 263
at Elasticsearch.Net.ElasticsearchClient.DoRequest[T](String method, String path, Object data, IRequestParameters requestParameters) in c:\code\elasticsearch-net\src\Elasticsearch.Net\ElasticsearchClient.cs:line 56
at Elasticsearch.Net.ElasticsearchClient.Info[T](Func2 requestParameters) in c:\code\elasticsearch-net\src\Elasticsearch.Net\ElasticsearchClient.Generated.cs:line 22938 at Nest.RawDispatch.InfoDispatch[T](ElasticsearchPathInfo1 pathInfo) in c:\code\elasticsearch-net\src\Nest\RawDispatch.generated.cs:line 2549
at Nest.ElasticClient.b__7b(ElasticsearchPathInfo1 p, InfoDescriptor d) in c:\code\elasticsearch-net\src\Nest\ElasticClient-RootNodeInfo.cs:line 16 at Nest.ElasticClient.Dispatch[D,Q,R](D descriptor, Func3 dispatch) in c:\code\elasticsearch-net\src\Nest\ElasticClient.cs:line 84
at Nest.ElasticClient.Dispatch[D,Q,R](Func2 selector, Func3 dispatch) in c:\code\elasticsearch-net\src\Nest\ElasticClient.cs:line 72
at Nest.ElasticClient.RootNodeInfo(Func`2 selector) in c:\code\elasticsearch-net\src\Nest\ElasticClient-RootNodeInfo.cs:line 14
at OnDemandSearchIndexer.OnDemandIndexer.dep_onchange(Object sender, SqlNotificationEventArgs e) in c:\RIMS\Search\OnDemandSearchIndexer\OnDemandIndexer.cs:line 102

@Mpdreamz
Copy link
Member

@bsee08 are you able to join https://jabbr.net/#/rooms/elasticsearch ?

@Mpdreamz
Copy link
Member

PR #666 was evil afterall

#666

This introduced a change where we default to setting proxy on webrequests to null to combat random first call stalls of well over 10 seconds. From what we saw on @bsee08 system setting it to null actually caused a first request stall of well over 10 seconds. Clearly there is no correct default so we default to what the CLR defaults to.

If you notice the first request takes too long then you can now call .DisableAutoProxyDetection(true|false) to control setting it to null or not explicitly.

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

No branches or pull requests

2 participants