Closed push-22 closed 3 months ago
Looking at the stack and lines, it doesn't appear connecting is your issue, nor can I repro any issue. It looks like you have a GetServer()
call somewhere further down doing this, and you'd need to look at that calling code.
yup, you're right, tracked it down to an extension method
public static (long pCount, long sCount) SMSubscriberCount(this IConnectionMultiplexer muxer) {
var svr = muxer.GetServer(muxer.Configuration);
return (svr.SubscriptionPatternCount(), svr.SubscriptionSubscriberCount(SubscriptionData.SubscriptionAllChannel));
}
Hi,
I'm on a mac laptop, which is running redis/redis-stack under docker desktop, on the same laptop I'm also running Windows 11 inside VMWare fusion.
From the windows, I can connect to the redis-stack browser ok, but from code (c#) if I try to connect I get the exception: Unhandled exception. System.ArgumentException: The specified host and port could not be parsed: 192.164.14.220:6379,abortConnect=True (Parameter 'hostAndPort') at StackExchange.Redis.ConnectionMultiplexer.GetServer(String hostAndPort, Object asyncState) in //src/StackExchange.Redis/ConnectionMultiplexer.cs:line 1224 at SM3.Shared.ConnectionData.SMSubscriberCount(IConnectionMultiplexer muxer) in C:\Pub-Sub-Demo\common\ConnectionData.cs:line 69 at Program.<>c__DisplayClass0_0.<<$>b_0>d.MoveNext() in C:\Pub-Sub-Demo\servicemonitoring\Program.cs:line 25
My code is very simple:
If I change the code to
Then everything works as expected.
This also fails:
host = '192.164.14.220:' / port = standard
But when I comment out the AllowAdmin it works again.
Not sure what i'm doing wrong here, it appears to be trying to parse the cfg json and combining both the Endpoints data and attributes together.
stackexchange.redis: 2.7.27 docker container is running Redis version=7.2.3, bits=64