michaelklishin / quartz-mongodb

A MongoDB-based store for the Quartz scheduler. This fork strives to be as feature complete as possible. Originally by MuleSoft.
Other
248 stars 203 forks source link

Connection to the mongodb, which is in replica set on another host. #104

Open iburtsev opened 8 years ago

iburtsev commented 8 years ago

Hi, guys! I am trying to connect to the one of the seed of the mongo replica set, to master seed, and have no success. I am using such kind of properties file

org.quartz.jobStore.class=com.novemberain.quartz.mongodb.MongoDBJobStore
org.quartz.jobStore.mongoUri=
org.quartz.jobStore.addresses=seed-host1:27017, seed-host2:27017
org.quartz.jobStore.dbName=quartz
org.quartz.jobStore.collectionPrefix=prefix
org.quartz.threadPool.threadCount=1

seeds have no login\password and closed for the access from the "world". I use SpringData in the project, and it connects well if use without JobStore. I mean basic CRUD operations with the mongos.

With MongoJobStore, ajusted in such way i got an exception -

{
D 1023-1148:42,006 o.q.s.SimpleThreadPool Shutdown of threadpool complete. [main]
I 1023-1148:42,009 o.q.c.QuartzScheduler Scheduler QuartzScheduler_$_NON_CLUSTERED shutdown complete. [main]
E 1023-1148:42,009 c.p.o.c.s.p.s.NotificationSchedulerService Error while initializing the indexes [main]
org.quartz.SchedulerConfigException: Error while initializing the indexes [See nested exception: com.mongodb.MongoTimeoutException: Timed out after 300s while waiting for a server that matches PrimaryServerSelector. Client view of cluster state is {type=UNKNOWN, servers=[{address=localhost:27017, typeNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.ConnectException: Connection red}}]]
}

Could you please bring the light on this please.

michaelklishin commented 7 years ago

@pwojnowski this sounds like a sensible feature request. Any objections?

Teja-Joveo commented 4 years ago

Hi! Any update on how to resolve this issue?