Red5 1.0.8M13使用.bat文件运行,但Windows服务出错

时间:2016-10-31 13:50:51

标签: java windows-services red5

我正在尝试在Windows 2008服务器上安装Red5 1.0.8 M13作为服务。从red5.bat开始,Red5和我的webapp运行正常但是当作为服务运行时它会立即停止并失败:

"Windows could not start the Red5 media server on local computer. For more information view the system event log. If this is a non-Microsoft service, contact the service vendor, and refer to service specific error code 4."

系统事件日志包含:

"The Red5 Media Server service terminated with service-specific error The system cannot open the file."

red5-error.log包含:

2016-10-31 09:27:07 Commons Daemon procrun stderr initialized
java.lang.NoClassDefFoundError: Main
Caused by: java.lang.ClassNotFoundException: Main
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option UseStringCache; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: Using the ParNew young collector with the Serial old collector is deprecated and will likely be removed in a future release
Exception in thread "main" 

JAVA_HOME = c:\ program files(x86)\ Java \ jdk1.8.0_45

服务路径是:c:\ program files(x86)\ Red5 \ amd64 \ prunsrv.exe // RS // Red5

我错过了什么?

3 个答案:

答案 0 :(得分:0)

很难说,但我猜你需要设置RED_HOME变量。请查看您的bat文件以了解您可能想要设置的变量。

答案 1 :(得分:0)

我查看了一些其他服务器,看看哪里有区别。我使用“prunmgr // ms // red5”来查看配置。在启动选项卡上,Class为空,我的其他服务器为“org.red5.server.Bootstrap”。所以,我使用prunmgr将它放在1.0.8服务器的配置中,它工作正常!不确定这一切意味着什么,但工作很好!

答案 2 :(得分:0)

当RED5路径太长时会出现此问题

只需将它放在C:\ red5就可以了