Redis cannot connect to load

I get this error. What job?

Failed to connect to redis Instance at 127.0.0.1:6379 -> Stack Trace: in ServiceStack.Redis.RedisNativeClient.Connect () in ServiceStack.Redis.RedisNativeClient.AssertConnectedSocket ()
in ServiceStack.Redis.RedisNativeClient.SendCommand (Byte [] [] cmdWithBinaryArgs) in ServiceStack.Redis.RedisNative Client.SendExpectLong (Byte [] [] cmdWithBinaryArgs) in ServiceStack.Redis.RedisClientList.GetEentTool.RetE.TelTer.TelterTool.RetEnTem. checkListInt (String myKey, Int32 id) -> Internal exception: message: No cou ld connection because the target machine actively refused it 127.0.0.1:6379 -> Internal exception: stacktrace: at S ystem.Net.Sockets.Socket.Connect ( IPAddress [] addresses, Int32 port) in System.Net.Sockets.Socket.Connect (Stri ng host, Int32 port) in ServiceStack.Redis.RedisNativeClient.Connect () CurrentStack: in System.Environment. GetStackTrace (Exception e, Boolean needFileInfo) in System.Environment.get_StackTrace () in Common.Tools.E xtensionHelper.saveAsDebug (Exception myEx, String aciklama) in Common.Tools.RedisDBHelper.checkListInt (String myKey, Int32 id)

+2
source share
3 answers

I thought it might be that Radish had a load loaded. Then I thought it was a ServiceStack. But in the end, TCP on Windows was not released fast enough. TCP does not issue closed connections until the item expires. I installed TcpTimeWaitDelay for 45 seconds. http://technet.microsoft.com/en-us/library/cc938217.aspx and install MaxUserPort http://mashijie.blogspot.com/2009/05/change-default-setting-of-tcp-ports.html

Adjust port range to 1025-64511

Make sure you restart Windows

See also: Connection Prefix for Redirect / Buffer Size Exceeded

+1
source

This is what happens when RedisClient cannot create a TCP connection. Throwing an exception is the correct behavior here.

0
source

I had this problem. What Redis binaries do you use (from which source, GitHub, unofficial build)?

I found: This is actually a Redis way of saying that it cannot create a connection. (as the footnote also explains) There should be a clearer exception explaining that this comes from Redis and not from the firewall or anything, IMHO.

I assume that you are using 32-bit embedded binary in x64 architecture.

If you download the version from the link: MsOpenTech Group and build it using the MS C compiler, such as the free VS 2012 Express, you can run the resulting binaries without this problem.

It is not possible to do promises, but this is what worked for me.

EDIT: Also, be sure to run redis-server (as an administrator) and give the necessary permissions in the firewall, otherwise you will not have a server to connect your redis-cli client!

0
source

All Articles