Closed ARTRANAV closed 4 years ago
We've never seen this Exception before, I'm assuming it's the redis-server host you're trying to connect to. Are you connecting directly to a redis server instance or something else?
Yes, I connect directly to a Redis server instance, from a Windows computer to a Linux (Redis) one. I don't know where is the issue, the error is not very clarifying.
This is an internal .NET Exception from .NET's Socket class where it's unable to establish a TCP Socket connection.
Maybe you're trying to make a connection to a Redis SSL endpoint, can you try adding ?ssl=true
to your connection string to see if it makes a difference?
var host = $"{_options.Password}@{_options.Host}:{_options.Port}?ssl=true";
Closing issue as wont be able to do anything without a repro. If you can publish a stand-alone repro on GitHub and link to it here I can investigate further.
Hi,
We are having this problem but we don't know why it is.
ServiceStack.Redis.RedisException: INTERNAL_IP:PORT ---> System.Net.Sockets.SocketException: Only one usage of each socket address (protocol/network address/port) is normally permitted INTERNAL_IP:PORT at System.Net.Sockets.Socket.Connect(IPAddress[] addresses, Int32 port) at System.Net.Sockets.Socket.Connect(String host, Int32 port) at ServiceStack.Redis.RedisNativeClient.Connect() at ServiceStack.Redis.RedisNativeClient.TryConnectIfNeeded() at ServiceStack.Redis.RedisNativeClient.AssertConnectedSocket() --- End of inner exception stack trace --- at ServiceStack.Redis.RedisNativeClient.AssertConnectedSocket() at ServiceStack.Redis.RedisNativeClient.AssertServerVersionNumber() at ServiceStack.Redis.RedisClient.GetServerRole() at ServiceStack.Redis.RedisResolver.CreateRedisClient(RedisEndpoint config, Boolean master) at ServiceStack.Redis.RedisManagerPool.GetClient()
We currently have an application working on IIS (Microsoft Internet Information Services). This application use REDIS cache and it is working simultaneously on 2 balanced servers with NLB (Microsoft Network Load Balancing). Any IIS node can write/retrieve cache keys stored in REDIS (ServiceStack).
We instantiate the REDIS client as follows:
We do not create a new instance for Redis Client for each read or write operation. We only instantiate the class in the start application. Obviously, each node create a new instance for Redis Client.
What may be the reason of this problem?
Thanks in advance!