1
我试图远程连接到Quartz调度程序,所以我可以得到计划运行的作业列表。在服务器应用程序,我用下面的代码:远程连接到Quartz Scheduler
NameValueCollection properties = new NameValueCollection();
properties.Add("quartz.scheduler.instanceName", "OlScheduler");
properties.Add("quartz.scheduler.instanceId", "Ol");
properties.Add("quartz.threadPool.type", "Quartz.Simpl.SimpleThreadPool, Quartz");
properties.Add("quartz.threadPool.threadCount", "5");
properties.Add("quartz.threadPool.threadPriority", "Normal");
properties.Add("quartz.scheduler.registryPort", "1099");
properties.Add("quartz.scheduler.rmi.export", "true");
properties.Add("quartz.scheduler.rmi.registryHost", "localhost");
properties.Add("quartz.scheduler.rmi.registryPort", "1099");
ISchedulerFactory sf = new StdSchedulerFactory(properties);
IScheduler sched = sf.GetScheduler();
和安装并运行它作为一个服务,然后从另一个应用程序,我用远程连接到它:
properties["quartz.scheduler.instanceName"] = "RemoteClient";
properties["quartz.threadPool.type"] = "Quartz.Simpl.SimpleThreadPool, Quartz";
properties["quartz.threadPool.threadCount"] = "5";
properties["quartz.threadPool.threadPriority"] = "Normal";
properties["quartz.scheduler.proxy"] = "true";
properties["quartz.scheduler.proxy.address"] = "http://170.20.20.17:1099/OIService";
IScheduler sched = new StdSchedulerFactory(properties).GetScheduler();
,我得到的错误是: “无法连接到远程服务器”和“无法连接,因为目标机器主动拒绝它172.22.22.17:1099” 我错过了什么?我正在使用Quartz.net版本1.1和RamJobStore,并且我的防火墙已关闭。 我认为这是我使用错误的端口。任何帮助表示赞赏