Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auth fails under cluster mode #24

Open
armersong opened this issue Feb 22, 2017 · 2 comments
Open

Auth fails under cluster mode #24

armersong opened this issue Feb 22, 2017 · 2 comments

Comments

@armersong
Copy link
Contributor

armersong commented Feb 22, 2017

Password is not unused when creating JedisCluster instance.
Pls see: RedisJobStore.java line 129

Set<HostAndPort> nodes = buildNodesSetFromHost();
jedisCluster = new JedisCluster(nodes);
storage = new RedisClusterStorage(redisSchema, mapper, signaler, instanceId, lockTimeout);

Related config in quartz.properties:

# set the scheduler's JobStore class (required)
org.quartz.jobStore.class = net.joelinn.quartz.jobstore.RedisJobStore
# set the Redis host (required)
# <your redis host or a comma-delimited list of host:port if clustered use is desired>
org.quartz.jobStore.host = localhost:6379,localhost:6379
# set the scheduler's trigger misfire threshold in milliseconds (optional, defaults to 60000)
org.quartz.jobStore.misfireThreshold = 60000
# set the redis password (optional, defaults null)
org.quartz.jobStore.password = 123456
# set the redis port (optional, defaults to 6379)
org.quartz.jobStore.port = 6379
# enable Redis clustering (optional, defaults to false)
org.quartz.jobStore.redisCluster = true
# enable Redis sentinel (optional, defaults to false)
#org.quartz.jobStore.redisSentinel = <true or false>
# set the sentinel master group name (required if redisSentinel = true)
#org.quartz.jobStore.masterGroupName = <your master group name>
# set the redis database (optional, defaults to 0)
org.quartz.jobStore.database: 0
# set the Redis key prefix for all JobStore Redis keys (optional, defaults to none)
org.quartz.jobStore.keyPrefix = purchase/quartz/
# set the Redis lock timeout in milliseconds (optional, defaults to 30000)
org.quartz.jobStore.lockTimeout = 30000

log info:

Caused by: redis.clients.jedis.exceptions.JedisDataException: NOAUTH Authentication required.
        at redis.clients.jedis.Protocol.processError(Protocol.java:127)
        at redis.clients.jedis.Protocol.process(Protocol.java:161)
        at redis.clients.jedis.Protocol.read(Protocol.java:215)
        at redis.clients.jedis.Connection.readProtocolWithCheckingBroken(Connection.java:340)
        at redis.clients.jedis.Connection.getRawObjectMultiBulkReply(Connection.java:285)
        at redis.clients.jedis.Connection.getObjectMultiBulkReply(Connection.java:291)
        at redis.clients.jedis.Jedis.clusterSlots(Jedis.java:3376)
        at redis.clients.jedis.JedisClusterInfoCache.discoverClusterNodesAndSlots(JedisClusterInfoCache.java:54)
        at redis.clients.jedis.JedisClusterConnectionHandler.initializeSlotsCache(JedisClusterConnectionHandler.java:39)
        at redis.clients.jedis.JedisClusterConnectionHandler.<init>(JedisClusterConnectionHandler.java:17)
        at redis.clients.jedis.JedisSlotBasedConnectionHandler.<init>(JedisSlotBasedConnectionHandler.java:20)
        at redis.clients.jedis.JedisSlotBasedConnectionHandler.<init>(JedisSlotBasedConnectionHandler.java:15)
        at redis.clients.jedis.BinaryJedisCluster.<init>(BinaryJedisCluster.java:41)
        at redis.clients.jedis.JedisCluster.<init>(JedisCluster.java:83)
        at redis.clients.jedis.JedisCluster.<init>(JedisCluster.java:70)
        at redis.clients.jedis.JedisCluster.<init>(JedisCluster.java:66)
        at redis.clients.jedis.JedisCluster.<init>(JedisCluster.java:62)
        at net.joelinn.quartz.jobstore.RedisJobStore.initialize(RedisJobStore.java:129)
        at org.quartz.impl.StdSchedulerFactory.instantiate(StdSchedulerFactory.java:1333)
        at org.quartz.impl.StdSchedulerFactory.getScheduler(StdSchedulerFactory.java:1519)
        at org.springframework.scheduling.quartz.SchedulerFactoryBean.createScheduler(SchedulerFactoryBean.java:597)
        at org.springframework.scheduling.quartz.SchedulerFactoryBean.afterPropertiesSet(SchedulerFactoryBean.java:480)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1642)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1579)
@Linone
Copy link

Linone commented Apr 3, 2017

+1

Would it be possible to release version with the fix?

@Linone
Copy link

Linone commented Apr 5, 2017

If anybody has this issue and is in need of new version, here's mirror on gitlab with built artifacts:

https://gitlab.com/LazyBun/quartz-redis-jobstore-fork/commit/43e3910193c3cb6fa3d8390e3ebae9d166c7133d/pipelines

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants