java - 克隆虚拟机,Java服务无法启动

标签 java windows-services virtualization windows-server-2008-r2 yajsw

在我们的软件环境中,我们有许多运行 Windows Server 2008 R2 的虚拟机。在这些服务器上,我们有 Java 1.6 并使用 YAJSW 来提供一些服务。作为升级过程的一部分,我们希望在虚拟环境中创建克隆并在部署到生产环境之前测试我们的升级。

现在是问题....Windows 服务不会在克隆的 VM 上启动。

启动服务时运行的命令示例是:

F:\app\configservice>"D:/Java/jdk1.6.0_27/bin/java.exe" "-classpath" "D:\yajsw-10.8\wrapper.jar" "-Xrs" "-Dwrapper.service=true" "-Dwrapper.working.dir=f:\app\configservice" "-Dwrapper.java.command=D:/Java/jdk1.6.0_27/bin/configservice.exe" "-Dwrapper.config=F:\app\configservice\lib\wrapper.conf" "-Dwrapper.additional.1x=-Xrs" "org.rzo.yajsw.boot.WrapperServiceBooter"

当从命令行手动运行时,它会产生此输出。

INFO|wrapper|Service ConfigService|13-02-11 14:37:49|init
INFO|wrapper|Service ConfigService|13-02-11 14:37:49|Win service: before service init
INFO|wrapper|Service ConfigService|13-02-11 14:37:49|set state IDLE->STARTING
INFO|wrapper|Service ConfigService|13-02-11 14:37:49|starting Process
INFO|wrapper|Service ConfigService|13-02-11 14:37:49|error in >StartServiceCtrlDispatcher
INFO|wrapper|Service ConfigService|13-02-11 14:37:49|1063:The service process could not connect to the service controller.
INFO|wrapper|Service ConfigService|13-02-11 14:37:49|Win service: terminated correctly

谷歌搜索错误让我相信 JVM 可能有问题,但这真的没有意义,因为它是 JVM 非常满意的 VM 的克隆。有同事提出了group rights policy,但是在两台机器上好像都一样。

最佳答案

如果您在与原始虚拟机相同的网络中运行克隆虚拟机,请确保它具有不同的 MAC 和 IP。

关于java - 克隆虚拟机,Java服务无法启动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14829449/

相关文章:

java - 当 Java Swing Action Listener 类扩展另一个类时,避免无限循环

winforms - Windows 服务与交互式应用程序中的 GDI 句柄

c# - 如何/在何处处理 Windows 服务中的 ConfigurationErrorsException?

java - 生成两种颜色之间的n种颜色

java - NIO 最佳实践——SelectableChannel 和 InterestOps

linux - 对不受信任的源代码的编译和执行进行沙箱化的架构

virtualization - 如何确定 xen DomU 是 HVM 还是 PV

在 Windows 7 上测试软件。安装与虚拟化

java - RabbitMQ – 在等待响应时取消 consumer.nextDelivery

c# - 如何使用自定义卸载程序卸载 Windows 服务