我正在尝试使用Terraform在Elasticache上旋转一个Redis实例,并遇到以下错误。
* module.main.module.redis.aws_elasticache_security_group.redis: 1 error(s) occurred:
* aws_elasticache_security_group.redis: Error creating CacheSecurityGroup: InvalidParameterValue: Use of cache security groups is not permitted in this API version
我在amazon弹性缓存上创建了一个redis端点,并设置了vpc & NAT网关。我需要连接创建的redis端点与redis-cli。我用这样的命令
redis-cli -h dev-redis.434dffsdsf.0094.ustyue1.cache.amazonaws.com
但我收到了这样的错误信息
Could not connect to Redis at dev-redis.a35gy4.0001.use1.cache.amazonaws.com:6379: Connection timed out
我尝试了几种方法
试着从我本地的ubuntu机器上连接。
试图
我有一个运行.NET核心应用程序的Lambda函数,我尝试使用StackExchange.Redis与ElastiCache Redis集群进行交互。集群是一个单一节点。Lambda配置在与ElastiCache Redis集群相同的VPC和安全组中。安全组为端口6379的VPC中的所有子网设置入站规则。所有这些子网都连接到Lambda上。
当我的代码试图连接到Redis集群时,我一直收到以下错误:
{
"errorType": "RedisConnectionException",
"errorMessage": "No con
我发现redis 6.0+添加了acl,现在我想使用默认用户登录,如下所示:
I have no name!@cruise-redis-master-0:/$ redis-cli -h 127.0.0.1 -a doGT233U7 -u default
Invalid URI scheme
我读取了文档,但没有找到任何命令登录到redis上的用户名和密码,我应该做什么来登录6.0+之上的新版本的redis?
关于这个我有两个问题。
创建一个全局实例并在每个线程中重用,还是在每个线程中创建一个新实例?
使用
pool = redis.ConnectionPool(host='localhost',port=6379,db=0)
R= redis.Redis(connection_pool=pool)
或
R= redis.StrictRedis(host='localhost',port=6379,db=0)
关于ConnectionPool:You may choose to do this in order to implement client side
我制作了一个elasticache redis实例
Engine: Redis
Size: cache.t2.micro
Number of nodes: 1 node
Status available
我对它正在使用的安全组制定了入站规则。它允许所有端口上的所有通信量,这使我能够从lambda查询postgres,所以我认为这不是问题所在。
然后,我尝试通过lambda函数进行连接。
我把我的env变量设为..。
REDIS_HOST=endpoint from elasticache
REDIS_PORT=6379
我的lambda代码
const { REDIS_HOST, REDIS_
运行一段时间后,我的redis实例出现写入错误: (error) MISCONF Redis is configured to save RDB snapshots, but it is currently not able to persist on disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsav