As root, log in to the host MessageQueue-2.
Use the pkgadd command to install the Access Manager session failover component packages.
Add a new user and password.
This is the user and password you will use connect to the Message Queue broker on servers where Message Queue is installed. Using this new user ensures that the guest user will not be able to access the other Access Manager server.
Create a new instance named msgqbroker by running the following command:
/bin/imqbrokerd -name msgqbroker -port 7777 &
Run the netstat command to verify that the new Message Queue instance is up and running.
# netstat -an | grep 7777 *.7777 *.* 0 0 49152 0 LISTEN
Add a new user named msgquser.
# /bin/imqusermgr add -u msgquser -g admin -p m5gqu5er -i msgqbroker
Update the guest user.
# /bin/imqusermgr update -u guest -a false -i msgqbroker
User repository for broker instance: msgqbroker Are you sure you want to update user guest? (y/n) y User guest successfully updated.
Edit the /opt/SUNWam/lib/amsfo.conf file.
Make a backup of the amsfo.conf file, and then set the following properties:
CLUSTER_LIST=MessageQueue-1.example.com:7777,MessageQueue-2.example.com:7777 BROKER_INSTANCE_NAME=msgqbroker USER_NAME=msgquser lbServerPort=9443 lbServerProtocol=https lbServerHost=LoadBalancer-3.example.com SiteID=11
Run the amsfopassword command.
This command generates an encrypted password, creates a new file named .password, and stores the encrypted password in the new file.
# cd /opt/SUNWam/bin
# ./amsfopassword -e m5gqu5er -f /opt/SUNWam/.password
To view the encrypted password:
# more /opt/SUNWam/.password
M27OGb6U4ufRu+oWAzBdWw==
Edit the /opt/SUNWam/bin/amsessiondb script.
Make a backup of the /opt/SUNWam/bin/amsessiondb script before making any changes to the script.
The amsessiondb script is called by the amsfo script to start the Berkeley DB client (amsessiondb ), create the database, and set specific database values. The script contains variables that specify various default paths and directories:
JAVA_HOME=/usr/jdk/entsys-j2se/ IMQ_JAR_PATH=/usr/share/lib JMS_JAR_PATH=/usr/share/lib BDB_JAR_PATH=/usr/share BDB_SO_PATH=/usr/lib AM_HOME=/opt/SUNWam |
If any of these components are not installed in their default directories, edit the amsessiondb script and set the variables, as needed, to the correct locations.
Edit the /opt/SUNWam/bin/amsfoscript.
Make a backup of the /opt/SUNWam/bin/amsfo script before making any changes to the script. In the following line, add the parameter —name $BROKER_INSTANCE_NAME as follows:
$JMQEXECUTABLE -bgnd $BROKER_OPTIONS -vmargs $BROKER_VM_ARGS -name $BROKER_INSTANCE_NAME -port $BROKER_PORT -cluster $CLUSTER_LIST & -jmqpid=$! echo $_jmqpid > $JMQ_PID_FILE |
Restart the Access Manager session failover components.
Stop the Message Queue broker instance.
# cd /opt/SUNWam/bin # ./amsfo stop |
Run the netstat command to verify that the Message Queue broker instance is stopped.
# netstat -an | grep 7777 |
If netstat returns no result, then the Message Queue broker instance is stopped.
If the Message Queue broker instance is not stopped, run the following commands:
# cd /tmp/amsession/logs # cat *.pid |
Process IDs are displayed. Example:
4940 4924 |
Kill these Java processes. Example:
# kill -9 4940 4924 |
If you don't see the process-ids in that file, and the netstat is still listening on port 7777, then it's possible that the amsfo script did not stop properly. In this case, run the following command to identify the java processes:
# ps -ef | grep java |
Then kill those identified processes as shown in the kill command example above.
Then check with netstat again. The port socket should be relinquished before you start up amsfo again. Otherwise, session failover problems may occur.
Restart the Message Queue broker instance.
# ./amsfo start |
Run the netstat command to verify that the Message Queue port is open and listening.
# netstat -an | grep 7777 *.7777 *.* 0 0 49152 0 LISTEN
Run the netstat command to verify that the Message Queue port is open and listening.
# netstat -an | grep 7777 *.7777 *.* 0 0 49152 0 LISTEN