如何在没有后台的情况下启动 Glassfish v3
Glassfish v3 的启动方式如下:
./bin/asadmin start-domain <domain-name>
该脚本最终运行:
exec "$JAVA" -jar "$AS_INSTALL_LIB/admin-cli.jar" "$@"
admin-cli.jar 最终启动另一个进程,有效地将自身置于后台。
我想启动 glassfish,而不将其置于后台,以便使用 daemontools 进行监控(即:svc)。这可能吗?
该文档讨论了如何使用 inittab 此处似乎还需要一种无需分叉或后台启动的方法,以便其他进程(例如:inittab、evc 等)可以监视进程 ID 并在崩溃时重新启动它。然而,在这个 inittab 示例中,它是否使用相同的后台 cmd 行,所以我不知道当 inittab 不知道要监视哪个进程 id 时,它如何可能重新生成进程。我错过了什么吗?
Glassfish v3 is launched as follows:
./bin/asadmin start-domain <domain-name>
This script eventually runs:
exec "$JAVA" -jar "$AS_INSTALL_LIB/admin-cli.jar" "$@"
admin-cli.jar eventually launches another process, effectively putting itself into the background.
I would like to launch glassfish without putting itself in the background for the purpose of monitoring with daemontools (ie: svc). Is this possible?
The documentation talks about using inittab here which seems like it would also require a way to launch it without forking or backgrounding so some other process (eg: inittab, evc, etc.) can watch the process id and restart it if it crashes. However, in this inittab example, is it using the same backgrounding cmd line, so I don't know how inittab can possibly respawn the process when it doesn't know what process id to watch. Am I missing something?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该能够使用 asadmin start-domain -v...
注意:日志语句将发送到日志文件 AND System.out/System.err。
You should be able to use asadmin start-domain -v...
Note: log statements are sent to the log file AND System.out/System.err.