More detailed Error message?

I get the following error message from Redis which means it has a name resolution problem:

2019-03-29 21:59:55.716 +01:00 [ERR] [ServiceStack.Redis.RedisNativeClient] [ThreadId 9] n/a ClientRestCall n/a 
(n/a)  SocketException in SendReceive, retrying...
System.Net.Internals.SocketExceptionFactory+ExtendedSocketException (00000005, 6): No such device or address
   at System.Net.Dns.InternalGetHostByName(String hostName)
  at System.Net.Dns.ResolveCallback(Object context)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw(Exception source)
   at System.Net.Dns.HostResolutionEndHelper(IAsyncResult asyncResult)
   at System.Net.Dns.EndGetHostAddresses(IAsyncResult asyncResult)
   at System.Net.Dns.<>c.<GetHostAddressesAsync>b__25_1(IAsyncResult asyncResult)
   at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 
endAction, Task`1 promise, Boolean requiresSynchronization)

Unfortunately there is no information about
a) Where in MY code this was thrown
b) Which hostname or address could not be resolved

Any idea how I could get more information. I have hundreds of redis calls in my server all over the place…

Do you have ClientRestCall in your App? as it’s not in an error message in ServiceStack.Redis.

Have you tried enabling logging?

The only place DNS resolution happens is when making the TCP SocketConnection inside Connect().

Yep, I call a REST API to retrieve config values from another server which gets it from the Redis Replica Set.

I use native SeriLog. It was the only framework which FULLY supported .NETCore 2.0 on LINUX when I ported my stuff from Windows to Linux and Docker. I also need support for the GELF protocol since in the datacenter we log everything to Graylogger.

And I have also implemented ServiceExceptionHandlers.Add(...) and UncaughtExceptionHandlers.Add(...) but I do net get anything more than what I posted.

But why do you write it is NOT Redis? This exception is thrown every 500 ms or so during exactly 10 seconds. This is the timeout which is configured as the default retry-time if you access a Redis ReplicaSet. On the client I then see Error: RedisException: Exceeded timeout of 00:00:10

I didn’t, I said that ClientRestCall is not in ServiceStack.Redis code base, so look in proximity to where you’re using that in your App.

If you’re already catching the Exception than you’ll be able to inspect it and any Inner Exceptions or Custom properties it has, i.e. if you already have a handler with the Exception then that’s all you’re going to be able to get.

Thanks, Demis, found it! Disabled the Redis based CacheClient and replaced it with the MemoryCacheClient. Everything worked as expected… So I could track it down and figured out that a wrong ENV parameter was passed in my docker run command in case the runtime environment supports Senitels…

Pretty challenging these containerized cloud deployments. Its high time to manage all those hundreds of config files and shell programs with Ansible, so I have centralized configuration repositories. The system is getting too big and too complex to manage such stuff manually…

1 Like

ok great, glad to hear you’ve ended up finding the cause - environment-specific integration issues are usually the hardest to track down.