question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot assign request address

See original GitHub issue

NEST/Elasticsearch.Net version:6.6

Elasticsearch version:6.7

Description of the problem including expected versus actual behavior: When big data index IB BIMMD}BWZPNM930NK}OK

Steps to reproduce: 1. 2. 3.

Provide ConnectionSettings (if relevant): var path = Environment.GetEnvironmentVariable(“ESURL”); if (string.IsNullOrWhiteSpace(path)) { throw new Exception(“the Environment vairable ESURL is not exist”); }

        var pathArr = path.Split(",", StringSplitOptions.RemoveEmptyEntries);
        IEnumerable<Uri> nodes = pathArr.ToList().Select(s => new Uri(s));
        var pool = new StaticConnectionPool(nodes);
        var settings = new ConnectionSettings(pool).DefaultTypeName(ESClient.DOCUMENTTYPE).ConnectionLimit(1000);

Provide DebugInformation (if relevant):

Describe the feature:

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:21 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
biaotangcommented, Jun 25, 2019

Looks like this may be dotnet/corefx#37044

Not the same Exception, I have restored the configuration “ConnectionLimit” to 80, and cancel the ping request for single ES node, I saw the connection had been recycled。 Hope these will help !
I will continue to follow up and update . Thanks for your help , @russcam @Mpdreamz

1reaction
biaotangcommented, Jun 1, 2019

Thanks for the detailed response!

I have reported on socket reuse issues on linux with .NET Core before:

dotnet/corefx#21227

It’s one of the reasons our connection limit on linux is so conservative

https://github.com/elastic/elasticsearch-net/blob/master/src/Elasticsearch.Net/Configuration/ConnectionConfiguration.cs#L24

Going from Environment.ProcessorCount to 1000 might amplify the bleed.

Are you compiling AND running on .NET Core 2.1? Can you share the <TargetFramework> of your csproj?

I am sorry, the information provided before is a bit wrong.

I confirmed that the dotnet runtime of application is using version 2.2, compiling and running on .NET Core 2.2 .

The <TargetFramework> of edoc2 application is .NET Core 2.2 .

Output of dotnet --info

root@edoc2:/app# dotnet --info

Host (useful for support):
  Version: 2.2.4
  Commit:  f95848e524

.NET Core SDKs installed:
  No SDKs were found.

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.2.4 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.2.4 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.2.4 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
  https://aka.ms/dotnet-download

The logs are written very frequently and we have not implemented bulk writes yet.

Before trying to modify the default value 80 to 1000, i have tried the default value of “80”, also got an exception Cannot assign request address, I thought it would be fine to increase this value,however it doesn’t work and large amount of ESTABLISHED connection appear

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot assign requested address - possible causes?
I have a program that consists of a master server and distributed slave servers. The slave servers send status updates to the server,...
Read more >
Failed to set up listener: SocketException: Cannot assign ...
The message “Cannot assign requested address” suggests that the hostname/IP you are trying to bind does not resolve to a local network ......
Read more >
What do I do if the "Cannot assign requested address" error ...
This topic describes how to resolve the Cannot assign requested address error that occurs when a client accesses an ApsaraDB for Redis ...
Read more >
Cannot Assign Requested Address: A Step-By-Step Guide
The requested address that the system cannot assign a bug usually happens when the binding hostname does not have a local network interface....
Read more >
Docker Containers and localhost: Cannot Assign ...
The website's API proxy class kept barfing up this error message every time I tried to call any API endpoints. Cannot assign requested...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found