Jrun ColdFusion 服务间歇性无法启动

发布于 2024-08-06 19:24:47 字数 505 浏览 5 评论 0原文

我们偶尔会遇到这样的问题:尝试启动 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

断舍离 2024-08-13 19:24:47

我们的一些服务器上也遇到过类似的问题。不幸的是,netstat 从未向我们表明任何类型的实际端口冲突。我怀疑这与我们最近在服务器上部署 ColdFusion“累积修补程序”有关。我们使用 CF 8.0.1 企业版的多服务器版本,每台机器上都有大量实例——每个实例都有自己的 JVM 和自己独特的端口集。每个 CF 实例都附加到其自己的 IIS 网站,并作为其自己的 Windows 服务运行。

在过去的几周内,我们开始在启动时遇到类似的“端口正在使用”异常,在我们的 32 位计算机和 64 位计算机上,所有这些计算机都运行 Windows Server 2003。我发现了几个可能的罪魁祸首并尝试了以下内容:

  1. 在每个 CF 实例的 jrun-jms.xml 中,有一个 RMI 传输层条目,内容为 0 —— 根据 JRun 文档,意思是“选择一个随机端口”。我将每个实例设置为非随机且不同的(在 2600-2650 范围内)并重新启动每个实例。事情暂时有所改善,也许是巧合。
  2. 在同一个文件中,稍后在 TCPIP 传输条目下,每个实例默认为 2522 ——因此我将这些更改为 2500-2550 中每个实例的不同端口范围并重新启动每个实例。这似乎根本没有帮助。
  3. 我尝试研究 2500-3000 范围内的端口是否可用于任何其他目的,但我找不到任何明显的东西,此外,netstat 没有告诉我我的任何选择都在使用中。
  4. 我在网上发现一些有关 Windows 将 1024 到 5000 的端口指定为“动态端口”范围的信息,因此我将 10000 添加到在 jrun-jms.xml 中设置的端口号中,并再次重新启动每个实例。还是没有帮助。
  5. 我尝试更改 jndi.properties 中的端口,同时在端口号中添加 10000。不幸的是,这意味着清除我与 IIS 的所有 wsconfig 连接并从头开始重新创建它们。我还必须编辑 wsconfig_jvm.config,将 -DWSConfig.PortScanStartPort=12900 添加到 java.args,以便它可以检测我的 CF 实例。 (默认情况下,它仅扫描端口 2900-3000。请参阅 bpurcell。 org 了解详细信息。这是一篇旧帖子,但仍然相关。)到目前为止一切顺利!

我最好的猜测是 Adob​​e(或 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:

  1. In jrun-jms.xml for each CF instance, there's an entry for the RMI transport layer that reads <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.
  2. In the same file, under the entry for the TCPIP transport later, every instance defaulted to <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.
  3. I tried researching whether ports in the 2500-3000 range might be used for any other purpose, and I couldn't find anything obvious, and besides, netstat wasn't telling me that any of my choices were in use.
  4. I found something online about Windows designating ports from 1024 to 5000 as the "dynamic port" range, so I added 10000 to the port numbers I had set in jrun-jms.xml and restarted each instance again. Still didn't help.
  5. I tried changing the port in jndi.properties, also by adding 10000 to the port numbers. Unfortunately this meant wiping out all my wsconfig connections to IIS and creating them again from scratch. I had to edit wsconfig_jvm.config as well, adding -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.

淡笑忘祈一世凡恋 2024-08-13 19:24:47

您是否已确认服务确实已停止?任务管理器不应显示 jrun.exe 的任何实例。 来检查绑定到该端口的内容。

您还可以通过打开命令窗口并运行netstat -a -b

这将列出所有打开的端口,以及正在使用它们的程序。您还可以使用

netstat -a -o

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

netstat -a -o

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文