I am getting this exception. Any clue?
StackExchange.Redis.RedisConnectionException:
It was not possible to connect to the redis server(s); to create a disconnected multiplexer, disable AbortOnConnectFail.
Possible reasons:
Is Redis up and running? Try to connect to it using redis-cli.
Is your connection settings to Redis right in your code (i.e. you're connecting to the right host and port...)?
The exception is quite expressive: ConnectionMultiplexer couldn't reach target Redis server.
Related
I'm trying to get Celery to connect to an Azure GOV Redis resource.
Found and have tried this answer How to setup Celery to talk ssl to Azure Redis Instance for the connection string.
When I used port 6380 I get a ('time-out') - "ERROR/MainProcess] consumer: Cannot connect to rediss://:#*.redis.cache.usgovcloudapi.net:6380/0: Error while reading from socket: ('timed out',)" ...So I added BROKER_CONNECTION_TIMEOUT and TRANSPORT OPTIONS to try and give me a different result but no change.
My last thought was to try 6379 which I believe is the port that azure suggests... with this I get "Cannot connect to rediss://:#*.redis.cache.usgovcloudapi.net:6379/0: Error 111 connecting to ***.redis.cache.usgovcloudapi.net:6379. ECONNREFUSED"
I know GOV is more restrictive and therefore different than normal Azure so I was wondering if anyone has been able to connect this way successfully, thanks!
I am using ServiceStack 5.0.2 with Redis Sentinel (3 + 3) and having issues in case of a failover: commands being issued during or after a failover fail with timeout.
I have come up with an idea to implement retry pattern via custom IRedisClient. But probably there is a better strategy to employ in this case.
Answer given in the post How does ServiceStack PooledRedisClientManager failover work? does not seem to be the right way to go.
Thank you,
Redis Clients wrap a TCP connection with a Redis Server, a Redis Client that was connected with the instance that failed over will fail, but any new Redis Clients retrieved from the pool after failover will be connected to the new failed over instance.
I am trying to connect our asp.net application through Stack exchange client to Redis Cluster, but I am getting an connection error shown below :
No connection is available to service this operation:
I am using the connection string :
< add key="SearchCacheRedisConnectionString" value="IP:6379,IP:6379,connectTimeout=1000,abortConnect=false,ConnectRetry=3,syncTimeout=500,keepAlive=180" />
I have used the same connection string to connect to a standalone redis instance and everything works perfectly.
Its only when i try to connect to a cluster ( 3 master 3 slave ) architecture that i am getting a connection error.
Is there a different connection string i am supposed to use to connect to a Redis Cluster or is there any specific changes i am supposed to make in my code to connect to a Cluster.
Any help will be much appreciated. Thank you
Could your connectTimeout be too low? The StackExchange.Redis default is 5000
According to the git commit messages, ServiceStack has recently added failover support. I initially assumed this meant that I could pull one of my Redis instances down, and my pooled client manager would handle the failover elegantly and try to connect with one of my alternate Redis instances. Unfortunately, my code just bugs out and says that it can't connect with the initial Redis instance.
I am currently running instances of Redis 2.6.12 on a Windows, with the master at port 6379 and a slave at 6380, with sentinels set up to automatically promote the slave to a master if the master goes down. I am currently instantiating my client manager like this:
PooledRedisClientManager pooledClientManager =
new PooledRedisClientManager(new string[1] { "localhost:6379"},
new string[1] {"localhost:6380"});
where the first array is read-write hosts (for the master), and the second array is read-only hosts (for the slave).
When I terminate the master at port 6379, the sentinels promote the slave to a master. Now, when I try to run my C# code, instead of failing over to port 6380, it simply breaks and returns the error "could not connect to redis Instance at localhost:6379".
Is there a way around this, or will failover simply not work the way I want it to?
PooledRedisClientManager.FailoverTo allows you to reset which are the read/write hosts, vs readonly hosts, and restart the factory. This allows for a quick transition without needing to recreate clients.
Glassfish 3.1.2
Ubuntu 12.04
I've created a cluster of two nodes and have a JMS queue.
I'm having issues trying to connect to this JMS queue using a remote standalone client.
The cluster JMS listener is on port 27676 and the queue is deployed to the cluster.
mq://Glassfish2:27676/,mq://Glassfish3:27676
When I connect using the code I'd use to connect to a stand alone instance the message is not received by the cluster.
I believe it is using the default 7676 port. When the IIOP port is changed to use port 23700 which is the one the cluster (DAS) is using I get a connection refused exception as it is trying to connect to localhost:27676. At least it's the right port.
WARNING: [C4003]: Error occurred on connection creation [localhost:27676]. - cause: java.net.ConnectException: Connection refused: connect
I've also updated the following values in node config file (domain.xml) to remove references to localhost. jms-host and node-host values.
I had this issue before with a stand alone instance and it was resolved by adding entries to the /etc/hosts file. However, this does not seem to resolve the issue.
I also have all server instance IPs in the hosts file.
Am I missing something very basic here?
Any help would be greatly appreciated.
Thanks
If you look log files under
${glassfish_home}/glassfish/nodes/cluster-name/instance-name/imq/instances/instance-name/log
folder, you will see that
master brockers does not match
Every your node has different master brockers, probably every node know its own brocker as master brocker..
I had the same error and after a few days find this..