远程连接到Quartz调度

编程入门 行业动态 更新时间:2024-10-25 00:36:15
本文介绍了远程连接到Quartz调度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我试图连接到Quartz调度远程,这样我就可以得到被调度运行的作业列表。在服务器应用程序我用下面的code:

I am trying to connect to the Quartz scheduler remotely, so I can get a list of jobs that are scheduled to run. On the server application I used the below code:

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();

和安装并运行它作为一个服务,然后再从另一个应用程序我用远程连接到它:

and install and run it as a service, then to connect remotely to it from another application I used:

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"] = "170.20.20.17:1099/OIService"; IScheduler sched = new StdSchedulerFactory(properties).GetScheduler();

这是我得到的错误是:无法连接到远程服务器和无连接可以作出,因为目标机器积极地拒绝它172.22.22.17:1099我错过了什么?我使用Quartz版本1.1 RamJobStore和我的防火墙是关闭的。我认为这是我现在用的是错误的端口。任何帮助AP preciated

The error that I get is: "Unable to connect to the remote server" and "No connection could be made because the target machine actively refused it 172.22.22.17:1099" What did I miss? I am using Quartz version 1.1 with RamJobStore and my firewall is off. I think that's the port which I am using the wrong one. Any help is appreciated

推荐答案

免责声明:我不知道Quartz调度的东西! :)

disclaimer: I don't know anything about Quartz Scheduler! :)

不过,如果你怀疑你可能有错误的端口号,如果您可以登录到远程服务器,并在命令行中运行

However, if you suspect you might have the wrong port number, if you can log into the remote server and run from a command line

netstat -b

这将会打印出是由过程使用的端口。希望这将让你验证的端口号。

This will print out the ports that are in use by process. Hopefully that will allow you to verify the port number.

如果端口号是正确的,但你仍然无法与远程服务器通信,你可以尝试几件事情:

If the port number is correct, but you still can't communicate with the remote server you can try a couple of things:

  • 运行 ping.exe的[xxx.xxx.xxx.xxx] 在命令行中,看看远程服务器响应(*)
  • 验证远程服务器上的防火墙具有Quartz调度过程中的异常
  • 尝试运行 tracert命令[xxx.xxx.xxx.xxx] 来看看,如果你有两个服务器之间的路由
  • run ping.exe [xxx.xxx.xxx.xxx] from the command line to see if remote server responds(*)
  • verify the firewall on remote server has an exception for the Quartz Scheduler process
  • try running tracert [xxx.xxx.xxx.xxx] to see if you have a route between the two servers

(*)这并不总是确凿作为远程服务器,或者在中间网络硬件,可能被配置为不响应

(*) this is not always conclusive as the remote server, or networking hardware in the middle, might be configured not to respond.

更多推荐

远程连接到Quartz调度

本文发布于:2023-11-23 21:07:32,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1622863.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:连接到   Quartz

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!