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

ERR This instance has cluster support disabled #10

Open
riteshpuj2013 opened this issue Mar 30, 2016 · 3 comments
Open

ERR This instance has cluster support disabled #10

riteshpuj2013 opened this issue Mar 30, 2016 · 3 comments

Comments

@riteshpuj2013
Copy link

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.

@jlinn
Copy link
Owner

jlinn commented Mar 30, 2016

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?

@riteshpuj2013
Copy link
Author

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.

@Danny-Hazelcast
Copy link

related issue, but connecting to a redis pack enterprise cluster configured with the web console
#26

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

3 participants