Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Connecting to a remote Azure Redis Cache using Redis CLI

I'm trying to use redis-cli to connect to my Redis cache hosted in MS Azure.

I created a shortcut to the executable in Windows, passing through the hostname port and pw: "C:\Program Files\Redis\redis-cli.exe" -h myredis.redis.cache.windows.net -p 6380 -a "myaccesskey"

But it just hangs there.

P.S the connecting string is valid, because it's the same one i'm using in my client library to successfully connect.

What am i doing wrong?

I need a way to remotely (e.g from my PC running windows) perform admin-style operations against my remote Redis cache, such as removing given keys, or flushing a database.

The only other thing i can think of is to write a console application that uses a library such as StackExchange.Redis to do the work i need, ad-hoc.

Any advice on what i should be doing here?

like image 522
RPM1984 Avatar asked May 18 '15 03:05

RPM1984


People also ask

How do I link my Azure Redis cache to Redis CLI?

When using stunnel, run redis-cli.exe , and pass only your port, and access key (primary or secondary) to connect to the cache. If you're using a test cache with the unsecure non-TLS port, run redis-cli.exe and pass your host name, port, and access key (primary or secondary) to connect to the test cache.

How do I access Azure cache in Redis?

Configure Azure Cache for Redis settings. To create a cache, sign in to the Azure portal and select Create a resource. On the New page, select Databases and then select Azure Cache for Redis. On the New Redis Cache page, configure the settings for your new cache.


1 Answers

You need to turn on the non SSL port. Read this for more information http://azure.microsoft.com/en-us/documentation/articles/cache-faq/#how-can-i-run-redis-commands

like image 131
pranav rastogi Avatar answered Sep 26 '22 02:09

pranav rastogi