执行bat文件并返回提示符
我在 Cruisecontrol 上遇到问题,其中 ant 脚本执行的 bat 文件没有给我返回提示。结果, Cruisecontrol 中的项目一直在不断增加,直到我重新启动 CruiseControl。我该如何解决这个问题?
这是我正在执行的来自 wowza(流媒体服务器)的startup.bat:
@echo off
call setenv.bat
if not %WMSENVOK% == "true" goto end
set _WINDOWNAME="Wowza Media Server 2"
set _EXESERVER=
if "%1"=="newwindow" (
set _EXESERVER=start %_WINDOWNAME%
shift
)
set CLASSPATH="%WMSAPP_HOME%\bin\wms-bootstrap.jar"
rem cacls jmxremote.password /P username:R
rem cacls jmxremote.access /P username:R
rem NOTE: Here you can configure the JVM's built in JMX interface.
rem See the "Server Management Console and Monitoring" chapter
rem of the "User's Guide" for more information on how to configure the
rem remote JMX interface in the [install-dir]/conf/Server.xml file.
set JMXOPTIONS=-Dcom.sun.management.jmxremote=true
rem set JMXOPTIONS=%JMXOPTIONS%
-Djava.rmi.server.hostname=192.168.1.7
rem set JMXOPTIONS=%JMXOPTIONS%
-Dcom.sun.management.jmxremote.port=1099
rem set JMXOPTIONS=%JMXOPTIONS%
-Dcom.sun.management.jmxremote.authenticate=false
rem set JMXOPTIONS=%JMXOPTIONS%
-Dcom.sun.management.jmxremote.ssl=false
rem set JMXOPTIONS=%JMXOPTIONS%
-Dcom.sun.management.jmxremote.password.file=
"%WMSCONFIG_HOME%/conf/jmxremote.password"
rem set JMXOPTIONS=%JMXOPTIONS% -Dcom.sun.management.jmxremote.access.file=
"%WMSCONFIG_HOME%/conf/jmxremote.access"
rem log interceptor com.wowza.wms.logging.LogNotify
- see Javadocs for ILogNotify
%_EXESERVER% "%_EXECJAVA%" %JAVA_OPTS% %JMXOPTIONS%
-Dcom.wowza.wms.AppHome="%WMSAPP_HOME%"
-Dcom.wowza.wms.ConfigURL="%WMSCONFIG_URL%"
-Dcom.wowza.wms.ConfigHome="%WMSCONFIG_HOME%"
-cp %CLASSPATH% com.wowza.wms.bootstrap.Bootstrap start
:end
I have a problem with cruisecontrol where an ant scripts executes a bat file that doesn't give me the prompt back. As a result, the project in cruisecontrol keeps on bulding forever until I restart cruisecontrol. How can I resolve this?
It's a startup.bat from wowza (Streaming Server) that I'm executing:
@echo off
call setenv.bat
if not %WMSENVOK% == "true" goto end
set _WINDOWNAME="Wowza Media Server 2"
set _EXESERVER=
if "%1"=="newwindow" (
set _EXESERVER=start %_WINDOWNAME%
shift
)
set CLASSPATH="%WMSAPP_HOME%\bin\wms-bootstrap.jar"
rem cacls jmxremote.password /P username:R
rem cacls jmxremote.access /P username:R
rem NOTE: Here you can configure the JVM's built in JMX interface.
rem See the "Server Management Console and Monitoring" chapter
rem of the "User's Guide" for more information on how to configure the
rem remote JMX interface in the [install-dir]/conf/Server.xml file.
set JMXOPTIONS=-Dcom.sun.management.jmxremote=true
rem set JMXOPTIONS=%JMXOPTIONS%
-Djava.rmi.server.hostname=192.168.1.7
rem set JMXOPTIONS=%JMXOPTIONS%
-Dcom.sun.management.jmxremote.port=1099
rem set JMXOPTIONS=%JMXOPTIONS%
-Dcom.sun.management.jmxremote.authenticate=false
rem set JMXOPTIONS=%JMXOPTIONS%
-Dcom.sun.management.jmxremote.ssl=false
rem set JMXOPTIONS=%JMXOPTIONS%
-Dcom.sun.management.jmxremote.password.file=
"%WMSCONFIG_HOME%/conf/jmxremote.password"
rem set JMXOPTIONS=%JMXOPTIONS% -Dcom.sun.management.jmxremote.access.file=
"%WMSCONFIG_HOME%/conf/jmxremote.access"
rem log interceptor com.wowza.wms.logging.LogNotify
- see Javadocs for ILogNotify
%_EXESERVER% "%_EXECJAVA%" %JAVA_OPTS% %JMXOPTIONS%
-Dcom.wowza.wms.AppHome="%WMSAPP_HOME%"
-Dcom.wowza.wms.ConfigURL="%WMSCONFIG_URL%"
-Dcom.wowza.wms.ConfigHome="%WMSCONFIG_HOME%"
-cp %CLASSPATH% com.wowza.wms.bootstrap.Bootstrap start
:end
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
乍一看,在服务器启动的行添加
start
命令似乎会有所帮助,即:From a first look it seems that adding a
start
command to the line where the server is started might help, i.e.: