执行bat文件并返回提示符

发布于 2024-09-01 13:44:10 字数 1753 浏览 8 评论 0原文

我在 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 技术交流群。

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

发布评论

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

评论(1

风透绣罗衣 2024-09-08 13:44:10

乍一看,在服务器启动的行添加 start 命令似乎会有所帮助,即:

start "" %_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

From a first look it seems that adding a start command to the line where the server is started might help, i.e.:

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