Sun Java System Portal Server 7.1 Configuration Guide

ProcedureTo Configure HADB for Session Fail Over

Before You Begin
  1. Check the physical memory of the nodes.

    prtconf | grep Mem

  2. Calculate the value of the shminfo_shmmax parameter.

    shminfo_shmmax = ( Server's Physical Memory in MB / 256 MB ) * 10000000

    For example, if the physical memory is 512 MB, the value of the shminfo_shmmax parameter is 20000000.

  3. Add the following parameter to the /etc/system configuration file.


    set shmsys:shminfo_shmmax=0x40000000
    set shmsys:shminfo_shmseg=20
    set semsys:seminfo_semmni=16
    set semsys:seminfo_semmns=128
    set semsys:seminfo_semmnu=1000
  4. Reboot the server.

  5. Set up secure shell (ssh).

    The secure shell is used by the HADB component of the Sun Application Server Enterprise Edition to exchange file information between the server nodes in the application server cluster. Additionally, the HADB utility commands can operate on multiple server nodes at the same time to keep them in sync.


    Note –

    Root ssh login is required between servers without the need for password authentication. This is achieved by enabling non-console root login and configuring the ssh certificates.


  6. Check and implement the following steps on each application server cluster node to ensure successful installation, configuration, and operation of the software.

  7. Ensure that the hostname has a fully qualified domain name in the /etc/hosts file as the first entry after the IP address.

    For example, 10.10.10.2 as 1.example.com as1 loghost

  8. Check that hostname lookup and reverse lookup is functioning correctly.

  9. Check the contents of the /etc/nsswitch.conf file hosts entry.

    cat /etc/nsswitch.conf | grep hosts

  10. Allow non-console root login by commenting out the CONSOLE=/dev/console entry in the /etc/default/login file.

    cat /etc/default/login | grep "CONSOLE="

  11. If you need to enable remote root ftp, comment out the root entry in the /etc/ftpd/ftpusers file.

    cat /etc/ftpd/ftpusers | grep root

  12. Permit ssh root login. Set PermitRootLogin to yes in the /etc/ssh/sshd_config file, and restart the ssh daemon process.

    cat /etc/ssh/sshd_config | grep PermitRootLogin


    /etc/init.d/sshd stop
    /etc/init.d/sshd start
  13. Generate the ssh public and private key pair.

    ssh-keygen -t dsa


    Note –

    When running the ssh-keygen utility program, do NOT enter a passphrase and press Return. Otherwise, whenever ssh is used by the Application Server, the passphrase will be prompted for — breaking the automated scripts.


  14. Generate the keys on all Application Server nodes before proceeding to the next step where the public key values are combined into the authorized_keys file.

  15. Copy all the public key values to each server's authorized_keys file. Create the authorized_keys file on one server and then copy that to the other servers.


    root@as1# cd ~/.ssh
    root@as1# cp id_dsa.pub authorized_keys.as2
    root@as1# scp as2.example.com:/.ssh/id_dsa.pub authorized_keys.as2
    root@as1# cat authorized_keys.as2 >> authorized_keys
    root@as1# rm authorized_keys.as2
    root@as1# scp authorized_keys as2.example.com:/.ssh/authorized_keys
  16. Verify that ssh functions correctly between the Application Server nodes without the need for a password to be entered.

  17. Create node agents on the two server on Host A , Host B, and Host C.

  18. Create the cluster.

  19. Create a server instance for each server at the DAS.

  20. Start the ma on all the nodes.

    cd /opt/SUNWhadb/4/bin; ./ma &

  21. Create the ha cluster on Host A.

    asadmin configure-ha-cluster --user admin --devicesize 256 --hosts HostB,HostC pscluster