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

System.PlatformNotSupportedException: Sockets on this platform are invalid for use after a failed connection attempt #58

Closed
artziem opened this issue Jun 17, 2018 · 2 comments

Comments

@artziem
Copy link

artziem commented Jun 17, 2018

Hi,
I'm getting an error after upgrade EnyimMemcachedCore to 2.1.7 (.NET Core 2.1).

The error occurs when run it on Linux machine in docker, memcached served on another Linux machine if it matters. Running application locally on Windows it works well (no docker).

And it was working fine on version 2.1.2 targeting on .NET Core 2.0 both Linux and Windows.

fail: Enyim.Caching.Configuration.MemcachedClientConfiguration[33323423],
      Create PooledSocket,
System.PlatformNotSupportedException: Sockets on this platform are invalid for use after a failed connection attempt.,
   at System.Net.Sockets.Socket.ThrowMultiConnectNotSupported(),
   at System.Net.Sockets.Socket.ConnectAsync(SocketAsyncEventArgs e),
   at Enyim.Caching.Memcached.PooledSocket.ConnectWithTimeout(Socket socket, DnsEndPoint endpoint, Int32 timeout),
   at Enyim.Caching.Memcached.PooledSocket..ctor(DnsEndPoint endpoint, TimeSpan connectionTimeout, TimeSpan receiveTimeout, ILogger logger),
   at Enyim.Caching.Memcached.MemcachedNode.CreateSocket(),
fail: Enyim.Caching.Configuration.MemcachedClientConfiguration[33323423],
      Create PooledSocket,
System.PlatformNotSupportedException: Sockets on this platform are invalid for use after a failed connection attempt.,
   at System.Net.Sockets.Socket.ThrowMultiConnectNotSupported(),
   at System.Net.Sockets.Socket.ConnectAsync(SocketAsyncEventArgs e),
   at Enyim.Caching.Memcached.PooledSocket.ConnectWithTimeout(Socket socket, DnsEndPoint endpoint, Int32 timeout),
   at Enyim.Caching.Memcached.PooledSocket..ctor(DnsEndPoint endpoint, TimeSpan connectionTimeout, TimeSpan receiveTimeout, ILogger logger),
   at Enyim.Caching.Memcached.MemcachedNode.CreateSocket(),
fail: Enyim.Caching.Configuration.MemcachedClientConfiguration[0],
      Could not init pool.,
fail: Enyim.Caching.Configuration.MemcachedClientConfiguration[0],
      Could not init pool.,
warn: Enyim.Caching.Configuration.MemcachedClientConfiguration[0],
      Marking node Unspecified/xxx.xxx.xx.xx:11211 as dead,
warn: Enyim.Caching.Configuration.MemcachedClientConfiguration[0],
      Marking node Unspecified/xxx.xxx.xx.xx::11211 as dead,
EnyimMemcached Started.,
Hosting environment: Production,
Content root path: /app,
Now listening on: http://0.0.0.0:5000,
Application started. Press Ctrl+C to shut down.,

Configuration from appsettings:

"enyimMemcached": {
    "Servers": [
      {
        "Address": "xxx.xxx.xx.xx:",
        "Port": 11211
      }
    ],
    "socketPool": {
      "minPoolSize": "5",
      "maxPoolSize": "25",
      "connectionTimeout": "00:00:15",
      "receiveTimeout": "00:00:15",
      "deadTimeout": "00:00:15",
      "queueTimeout": "00:00:00.150"
    },
    "KeyTransformer": "Enyim.Caching.Memcached.SHA1KeyTransformer, EnyimMemcachedCore",
    "Transcoder": "ProtoBuf.Caching.Enyim.NetTranscoder, protobuf-net.Enyim"
  }
@cnblogs-dudu
Copy link

Sorry, fixed it in EnyimMemcachedCore 2.1.8.

@artziem
Copy link
Author

artziem commented Jun 18, 2018

Thanks

catcherwong pushed a commit to catcherwong/EnyimMemcachedCore that referenced this issue Dec 29, 2018
catcherwong added a commit to catcherwong/EnyimMemcachedCore that referenced this issue Dec 29, 2018
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