quartz-redis-jobstore icon indicating copy to clipboard operation
quartz-redis-jobstore copied to clipboard

ERR This instance has cluster support disabled

Open riteshpuj2013 opened this issue 8 years ago • 3 comments

Hi @jlinn

I am getting this exception when i set the redisCluster property to true:

Exception in thread "main" redis.clients.jedis.exceptions.JedisDataException: ERR This instance has cluster support disabled at redis.clients.jedis.Protocol.processError(Protocol.java:117) at redis.clients.jedis.Protocol.process(Protocol.java:151) at redis.clients.jedis.Protocol.read(Protocol.java:205) at redis.clients.jedis.Connection.readProtocolWithCheckingBroken(Connection.java:297) at redis.clients.jedis.Connection.getBinaryBulkReply(Connection.java:216) at redis.clients.jedis.Connection.getBulkReply(Connection.java:205) at redis.clients.jedis.Jedis.clusterNodes(Jedis.java:3166) at redis.clients.jedis.JedisClusterInfoCache.discoverClusterNodesAndSlots(JedisClusterInfoCache.java:48) at redis.clients.jedis.JedisClusterConnectionHandler.initializeSlotsCache(JedisClusterConnectionHandler.java:36) at redis.clients.jedis.JedisClusterConnectionHandler.(JedisClusterConnectionHandler.java:25) at redis.clients.jedis.JedisSlotBasedConnectionHandler.(JedisSlotBasedConnectionHandler.java:21) at redis.clients.jedis.JedisCluster.(JedisCluster.java:53) at redis.clients.jedis.JedisCluster.(JedisCluster.java:48) at redis.clients.jedis.JedisCluster.(JedisCluster.java:35) at redis.clients.jedis.JedisCluster.(JedisCluster.java:27) at redis.clients.jedis.JedisCluster.(JedisCluster.java:31) at net.joelinn.quartz.jobstore.RedisJobStore.initialize(RedisJobStore.java:116) at org.quartz.impl.StdSchedulerFactory.instantiate(StdSchedulerFactory.java:1321) at org.quartz.impl.StdSchedulerFactory.getScheduler(StdSchedulerFactory.java:1525) at com.quartzsamples.fromdoc.schedulers.Example1.main(Example1.java:29)

###### quartz, properties file

org.quartz.jobStore.class = net.joelinn.quartz.jobstore.RedisJobStore org.quartz.jobStore.host = localhost

org.quartz.jobStore.port =

org.quartz.jobStore.redisCluster = true

org.quartz.jobStore.redisSentinel =

org.quartz.jobStore.masterGroupName =

org.quartz.jobStore.database:

org.quartz.jobStore.keyPrefix = a_prefix_ org.quartz.jobStore.lockTimeout = 30000 org.quartz.threadPool.threadCount = 3

########### Example1 Class

package com.quartzsamples.fromdoc.schedulers;

import static org.quartz.JobBuilder.newJob; import static org.quartz.TriggerBuilder.newTrigger;

import java.util.Date;

import org.quartz.DateBuilder; import org.quartz.JobDetail; import org.quartz.Scheduler; import org.quartz.SchedulerException; import org.quartz.SchedulerFactory; import org.quartz.Trigger; import org.quartz.impl.StdSchedulerFactory; import org.slf4j.Logger; import org.slf4j.LoggerFactory;

import com.quartzsamples.fromdoc.jobs.HelloJob;

public class Example1 { public static void main(String[] args) throws SchedulerException {

    Logger log = LoggerFactory.getLogger(Example1.class);
    Date mydate = DateBuilder.evenHourDate(new Date());
    JobDetail job = newJob(HelloJob.class).withIdentity("myJob").build();
    Trigger trig = newTrigger().withIdentity("mytrigger").startAt(mydate).build();
    SchedulerFactory sf = new StdSchedulerFactory(
            "com/quartzsamples/fromdoc/properties/quartz.properties");
    Scheduler sched = sf.getScheduler();
        sched.scheduleJob(job, trig);
        sched.start();

}

}

############## Job Class

package com.quartzsamples.fromdoc.jobs;

import java.util.Date;

import org.quartz.Job; import org.quartz.JobExecutionContext; import org.quartz.JobExecutionException;

public class HelloJob implements Job{

@Override
public void execute(JobExecutionContext arg0) throws JobExecutionException {
    System.out.println("From HelloJob Class "+new Date());
    System.out.println(arg0.getFireInstanceId());
}

}

Please help me with this.

riteshpuj2013 avatar Mar 30 '16 15:03 riteshpuj2013

It looks like you're seeing that error because clustering is disabled on your target Redis instance. Is the cluster-enabled setting turned on in your Redis config?

jlinn avatar Mar 30 '16 17:03 jlinn

Thanks for pointing out. Once i did setup the cluster, the exception was gone. Can you help me with some guide which has this kind of information to use quartz with redis.

Thank you so much again.

riteshpuj2013 avatar Apr 01 '16 06:04 riteshpuj2013

related issue, but connecting to a redis pack enterprise cluster configured with the web console https://github.com/jlinn/quartz-redis-jobstore/issues/26

Danny-Hazelcast avatar Mar 15 '17 09:03 Danny-Hazelcast