woongbinni reported two RSpec failures related to Redis configuration in a self-hosted Discourse instance. The errors indicated issues with the DiscourseRedis::FallbackHandler and the DiscourseRedis::Connector failing with ERR unknown command 'role'. sam suggested that the user was running an outdated version of Redis and recommended upgrading to the latest release. Following this advice, woongbinni upgraded from Redis 2.8.X to 3.2.6; however, the second failure regarding the role command persisted. After further investigation, woongbinni discovered the root cause: the old Redis version had not been fully removed before installing the new stable version on Ubuntu, preventing the new version from running correctly. The issue was resolved by ensuring the previous installation was completely uninstalled.
I’ve just run RSPEC and I got 2 failure
It seems to be redis setting problems, but I have no idea
Please give me some advice about this.
Failures:
1) DiscourseRedis DiscourseRedis::FallbackHandler#initiate_fallback_to_master should restrict the number of checks
Failure/Error: expect(fallback_handler.master).to eq(true)
expected: true
got: false
(compared using ==)
# ./spec/components/discourse_redis_spec.rb:106:in `block (4 levels) in <top (required)>'
2) DiscourseRedis DiscourseRedis::Connector should return the master config when master is up
Failure/Error: client.call([:role])[0]
Redis::CommandError:
ERR unknown command 'role'
# ./lib/discourse_redis.rb:107:in `resolve'
# ./spec/components/discourse_redis_spec.rb:40:in `block (3 levels) in <top (required)>'
Thanks!! I Appreciate about your help!!!
As You Said, I Upgraded Redis-server v2.8.X to v3.2.6.
But 1 Failure still left ㅠㅠ
1) DiscourseRedis DiscourseRedis::Connector should return the master config when master is up
Failure/Error: client.call([:role])[0]
Redis::CommandError:
ERR unknown command 'role'
# ./lib/discourse_redis.rb:107:in `resolve'
# ./spec/components/discourse_redis_spec.rb:40:in `block (3 levels) in <top (required)>'
Is There any specific config about redis-server on discourse??
I solved it!! It was my mistake.
I didn’t remove current version of redis before installed redis stable version(3.2.X)
so I guess new version of redis on ubuntu didn’t run.
Thanks!!