Jboss容器特定重启
我们有一个 jboss 服务器,里面有多个容器。 Container1 部署 war1,container2 部署 war2。
我们使用命令 $JBOSS_HOME/bin/shutdown.sh -S -s
此命令是否重新启动所有容器;或者有一个 ip 端口配置来触发特定容器的重新启动/关闭?
是否有重新启动单个/所有容器的选项?如果能看到一些关于如何从部署角度管理它们的文档,那就太好了。
We have a jboss server with multiple containers in it. Container1 deploying war1 and container2 deploying war2.
We use the command
$JBOSS_HOME/bin/shutdown.sh -S -s
Does this command restarts all the containers; or there is a ip-port config to trigger restart/shutdown for specific containers?
Is there even an option to restart individual/all containters? It would be great to see some documentation as to how they are managed from deployment perspective.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
JBOSS_HOME/server
下的目录称为“configurations”,代表 JBoss 服务器单个实例的配置。当您使用run.sh -c serverX
(或任何启动脚本)启动 JBoss 实例时,-c serverX
引用server/ 中的配置serverX
,并且 JBoss 将使用server/serverX
作为其配置来启动。当您关闭 JBoss 实例时,关闭脚本不会引用其中一项配置,它实际上会打开与正在运行的服务器的网络连接并告诉其关闭。因此,如果只有一台服务器正在运行,则该服务器将被关闭。如果多个服务器同时运行,它们必然运行在不同的 IP 地址或端口上,因此关闭脚本必须知道使用哪个地址/端口与该服务器通信。
JBoss 不提供同时启动/停止多个服务器的方法 - 每个服务器都是一个单独的操作系统进程,您需要自己管理。
The directories under
JBOSS_HOME/server
are called "configurations", and represent the configuration of a single instance of the JBoss server. When you start JBoss instance usingrun.sh -c serverX
(or whatever your startup script looks like), the-c serverX
refers to the configuration inserver/serverX
, and a JBoss will be started usingserver/serverX
as its configuration.When you shutdown a JBoss instance, the shutdown script doesn't refer to one of the configurations, it actually opens a network connection to the running server and tells it to shut down. So if only one server is running, that's the one that will be shutdown. If multiple servers are running at the same time, they must, by necessity, be running on different IP addresses or ports, and so the shutdown script must know which address/port to use to talk to that server.
JBoss provides no means to start/stop multiple servers at once - each one is a separate OS proces that you need to manage yourself.
要使用 shutdown.sh 关闭服务器,您需要知道服务器的 JNDI 服务正在哪里运行/侦听。 JNDI 服务 URL 使用
-s
或--server
选项指定:如果您不使用
-s
,关闭脚本将(尝试)通过在 localhost:1099 上侦听/运行 JNDI 来关闭服务器。To shutdown a server using
shutdown.sh
you need to know where the server's JNDI-service is running/listening. The JNDI-service URL is specified with the-s
or--server
option:If you don't use
-s
the shutdown script will (try to) shutdown the server with JNDI listening/running onlocalhost:1099
.