Jrun ColdFusion 服务间歇性无法启动
我们偶尔会遇到这样的问题:尝试启动 Jrun 服务但失败并出现以下两个错误:
错误 JRun 命名服务无法在端口 2902 上启动 java.net.BindException:另一个服务或进程正在使用端口:2902
信息 尚未为此服务器配置 JDBC 数据源(请参阅 jrun-resources.xml) error java.net.BindException: Port in use by another service or process: 8300
然后我们必须重新启动机器,Jrun 就没有问题了。这是非常间歇性的 - 可能每 10 次我们重新启动 Jrun 服务时就会发生一次。
我在 StackOverflow 上看到另一个参考,如果 Windows 服务重新启动时间超过 30 秒,Windows 将关闭启动过程。也许这就是问题所在?日志确实表明这些错误是在发出重新启动命令后大约 37 秒以上抛出的。
我们使用的是 WinServer 2008 上的 64 位平台。
谢谢!
We occasionaly have a problem where we attempt to start the Jrun service and it fails with the following two errors:
error JRun Naming Service unable to start on port 2902
java.net.BindException: Port in use by another service or process: 2902
info No JDBC data sources have been configured for this server (see jrun-resources.xml)
error java.net.BindException: Port in use by another service or process: 8300
We then have to reboot the machine and Jrun comes up with no problem. This is very intermittent - happens perhaps one out of every 10 times we restart Jrun services.
I saw another reference on StackOverflow that if Windows Services take longer than 30 seconds to restart Windows shuts down the startup proccess. Perhaps that is the issue here? The logs indeed indicate that these errors are thrown about 37+ seconds after the restart command is issued.
We are on a 64bit platform on WinServer 2008.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我们的一些服务器上也遇到过类似的问题。不幸的是,netstat 从未向我们表明任何类型的实际端口冲突。我怀疑这与我们最近在服务器上部署 ColdFusion“累积修补程序”有关。我们使用 CF 8.0.1 企业版的多服务器版本,每台机器上都有大量实例——每个实例都有自己的 JVM 和自己独特的端口集。每个 CF 实例都附加到其自己的 IIS 网站,并作为其自己的 Windows 服务运行。
在过去的几周内,我们开始在启动时遇到类似的“端口正在使用”异常,在我们的 32 位计算机和 64 位计算机上,所有这些计算机都运行 Windows Server 2003。我发现了几个可能的罪魁祸首并尝试了以下内容:
0
—— 根据 JRun 文档,意思是“选择一个随机端口”。我将每个实例设置为非随机且不同的(在 2600-2650 范围内)并重新启动每个实例。事情暂时有所改善,也许是巧合。2522
——因此我将这些更改为 2500-2550 中每个实例的不同端口范围并重新启动每个实例。这似乎根本没有帮助。-DWSConfig.PortScanStartPort=12900
添加到 java.args,以便它可以检测我的 CF 实例。 (默认情况下,它仅扫描端口 2900-3000。请参阅 bpurcell。 org 了解详细信息。这是一篇旧帖子,但仍然相关。)到目前为止一切顺利!我最好的猜测是 Adobe(或 MS Windows)改变了其某些代码获取“随机”端口的方式。但到目前为止我所确定的是,上述步骤似乎已经解决了问题。
We've been experiencing a similar problem on some of our servers. Unfortunately, netstat never indicated any sort of actual port conflict for us. My suspicion is that it's related to our recent deployment of a ColdFusion "cumulative hotfix" to our servers. We use the multi-server edition of CF 8.0.1 enterprise with a large number of instances on each machine -- each with its own JVM and its own distinct set of ports. Each CF instance is attached to its own IIS website and runs as its own Windows Service.
Within the past few weeks, we started getting similar "port in use" exceptions on startup, on our 32-bit machines as well as our 64-bit machines, all of which are running Windows Server 2003. I found several possible culprits and tried the following:
<port>0</port>
-- which, according to the JRun documentation, means "choose a random port." I made that non-random and distinct per instance (in the 2600-2650 range) and restarted each instance. Things improved temporarily, perhaps coincidentally.<port>2522</port>
-- so I changed those to distinct ports per instance in the 2500-2550 range and restarted each instance. That didn't seem to help at all.-DWSConfig.PortScanStartPort=12900
to java.args, so it could detect my CF instances. (By default it only scans ports 2900-3000. See bpurcell.org for details. It's an old post but still relevant.) So far so good!My best guess is that Adobe (or MS Windows) changed the way some of its code grabs "random" ports. But all I know for sure so far is that the steps outlined above appear to have fixed the problem.
您是否已确认服务确实已停止?任务管理器不应显示 jrun.exe 的任何实例。 来检查绑定到该端口的内容。
您还可以通过打开命令窗口并运行netstat -a -b
这将列出所有打开的端口,以及正在使用它们的程序。您还可以使用
Which 执行与上面相同的操作,但会列出进程 ID 而不是程序名称。然后,您可以使用任务管理器交叉引用这些内容。您需要通过转到“查看”->“选择列”并确保选中 PID 来启用在任务管理器中显示 PID。我的猜测是 jrun 进程没有及时关闭。
Have you verified that the services are in fact stopping? Task manager should show no instances of jrun.exe. You can also check to see what is bound to that port by opening a command window and running
netstat -a -b
This will list all your open ports, plus what program is using them. You can also use
Which does the same thing as the above, but will list the process id instead of the program name. You can then cross-reference those with task manager. You'll need to enable showing the PIDs in task manager by going to View->Select Columns and making sure PID is checked. My guess would be that the jrun processes are not shutting down in a timely fashion.