Red Hat AMQ 6
As of February 2025, Red Hat is no longer supporting Red Hat AMQ 6. If you are using AMQ 6, please upgrade: Migrating to AMQ 7.このコンテンツは選択した言語では利用できません。
10.2. Shutting Down a Broker Remotely
Abstract
You have a number of options for stopping a broker running on a remote machine. You can stop the broker using a console or without using a console. You can also step a broker remotely using the management console.
Overview リンクのコピーリンクがクリップボードにコピーされました!
リンクのコピーリンクがクリップボードにコピーされました!
For many use cases logging into the machine running a broker instance is impractical. In those cases, you need a way to stop a broker from a remote machine. Red Hat JBoss A-MQ offers a number of ways to accomplish this task:
- using the stop command—the stop command does not require starting an instance of the broker
- using a remote console connection—a broker's console can be used to remotely shutdown a broker on another machine
- using a fabric member's console—brokers that are part of a fabric can stop members of their fabric
- using the management console—brokers that are part of a fabric can be stopped using a management console connected to their fabricFor more information see Using the Management Console.
Using the stop command リンクのコピーリンクがクリップボードにコピーされました!
リンクのコピーリンクがクリップボードにコピーされました!
You can stop a remote instance without starting up Red Hat JBoss A-MQ on your local host by running the stop command in the
InstallDir/bin
directory. The commands syntax is shown in Example 10.2, “Stop Command Syntax”.
Example 10.2. Stop Command Syntax
stop
[
-a port
] {
-h hostname
} {
-u username
} {
-p password
}
-a port
- Specifies the SSH port of the remote instance. The default is 8101.
-h hostname
- Specifies the hostname of the machine on which the remote instance is running.
-u username
- Specifies the username used to connect to the remote broker.NoteThe default username for a broker is
karaf
. -p password
- Specifies the password used to connect to the remote broker.NoteThe default password for a broker is
karaf
.
Example 10.3, “Stopping a Remote Broker” shows how to stop a remote broker on a machine named
NEBrokerHost2
.
Example 10.3. Stopping a Remote Broker
bin/stop -u karaf -p karaf -h NEBrokerHost2
bin/stop -u karaf -p karaf -h NEBrokerHost2
Using a remote console リンクのコピーリンクがクリップボードにコピーされました!
リンクのコピーリンクがクリップボードにコピーされました!
Red Hat JBoss A-MQ's console can be connected to a remote broker using the ssh:ssh command. Once the console is connected to the remote broker, you can shut it down by running the osgi:shutdown command. Example 10.4, “Shutting Down a Broker using a Remote Console Connection” shows the command sequence for using a remote console connection to shutdown a broker running on a machine named
NWBrokerHost
.
Example 10.4. Shutting Down a Broker using a Remote Console Connection
Important
Pressing Control+D when connected to a remote broker closes the remote connection and returns you to the local shell.
Shutting down remote brokers in a fabric リンクのコピーリンクがクリップボードにコピーされました!
リンクのコピーリンクがクリップボードにコピーされました!
If the broker you want to shutdown is part of a fabric, you can shut it down from any of the brokers in the fabric using the fabric:container-stop console command. fabric:container-stop takes the name of the fabric container hosting the broker as an argument. The command can be run either from a broker in console mode or using the broker's administration client.
Example 10.5, “Shutting Down a Broker in a Fabric” shows how to use the administration client to shutdown a broker running in a container named
fabric-broker3
.
Example 10.5. Shutting Down a Broker in a Fabric
./bin/client fabric-broker3 fabric:container-stop
./bin/client fabric-broker3 fabric:container-stop