9 Replies Latest reply on Oct 13, 2012 9:21 AM by Bill Robinson

    Provisioning RHEL 6.2 - RSCD not getting installed

    Mike Reider

      We have a system pacakge setup for RHEL62, the provisioning goes fine, everything looks good but the agent never gets installed correctly.

       

      We have a customized kickstart file with generic parameters for installing the agent

       

      cp /etc/rc.d/rc.local /etc/rc.d/rc.local.bak

      echo "chmod +x /root/provscript" >> /etc/rc.d/rc.local

      echo "/root/provscript" >> /etc/rc.d/rc.local

      touch /root/provscript

      echo DHCP_HOSTNAME=??NAME?? >> /etc/sysconfig/network

      echo 127.0.0.1 ??NAME?? >> /etc/hosts

      echo "# turn off firewall" >> /root/provscript

      echo "/etc/init.d/iptables save" >> /root/provscript

      echo "/etc/init.d/iptables stop" >> /root/provscript

      echo "sh /root/rscd.sh -silent">> /root/provscript

      echo "echo ??LINUX_USERS_FILE_ENTRY?? > /etc/rsc/users">> /root/provscript

      echo "cd /root" >> /root/provscript

      echo "tar -xvf bmilinux.tar">> /root/provscript

      echo "chmod +x bmilinux">> /root/provscript

      echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/root">> /root/provscript

      echo "./bmilinux PROV_SOCKET_APP_SERVER_IP ??MAC_ADDRESS?? >> /root/bmilinux.log" >> /root/provscript

      echo "rm -f /root/bmilinux" >> /root/provscript

      echo "rm -f /root/bmilinux.tar" >> /root/provscript

      echo "rm -f /root/libblssl.so.0.9.8" >> /root/provscript

      echo "rm -f /root/libblcrypto.so.0.9.8" >> /root/provscript

      echo "rm -f /root/random.byt" >> /root/provscript

      cd /root;wget -nc -v -a /root/http.log http://??DATA_STORE_IP??/??DATA_STORE.VIRTUAL_DIR??/bmilinux.tar

      cd /root;wget -nc -v -a /root/http.log http://??DATA_STORE_IP??/??DATA_STORE.VIRTUAL_DIR??/??RSCD_DIR??/rscd.sh

      cd /tmp;wget -nc -v -a /root/http.log http://??DATA_STORE_IP??/??DATA_STORE.VIRTUAL_DIR??/??RSCD_DIR??/nsh-install-defaults; cd /root

      chmod +x /root/bmilinux

      echo "mv /etc/rc.d/rc.local /etc/rc.d/rc.local.tmp" >> /root/provscript

      echo "mv /etc/rc.d/rc.local.bak /etc/rc.d/rc.local" >> /root/provscript

      echo "rm -f /etc/rc.d/rc.local.tmp" >> /root/provscript

       

      The NSH INSTALL DEFAULTS looks like this,

       

      INSTALL_DIR="/opt/bmc" 

      export INSTALL_DIR

      COMPONENT_CHECKED=1  //checks off just the agent installer

      export COMPONENT_CHECKED

      NSH_USER_FROM = "BLAdmins:*"   //specifies the users.local setting

      export NSH_USER_FROM

      NSH_USER_TO="root"

      export NSH_USER_TO

      KEEPLOCAL=1

      export KEEPLOCAL

      NSH_INSTALL_SKEL="n"

      export NSH_INSTALL_SKEL

       

      After the OS is installed, when I putty to the target, looking at the Bladelogic_install log I am getting errors reading the silent install file, the agent never gets installed and the secure files arent updated correctly.

       

      The BSA app servers is 8.2, Win2008R2  with SQL 2008 R2. The RSCD agent is RSCD82-SP2-LIN64.sh

       

      I've provisioned OEL 6.2 with the same silent install file and it worked ok. Any ideas?

       

       

       

       

      [root@redhatTest tmp]# cat BladeLogic_Install

      nohup: ignoring input

      : command not foundfaults: line 1:

      ': not a valid identifier: line 2: export: `INSTALL_DIR

      /tmp/nsh-install-defaults: line 3: //checks: No such file or directory

      ': not a valid identifier: line 4: export: `COMPONENT_CHECKED

      /tmp/nsh-install-defaults: line 5: NSH_USER_FROM: command not found

      ': not a valid identifier: line 6: export: `NSH_USER_FROM

      ': not a valid identifier: line 8: export: `NSH_USER_TO

      ': not a valid identifier: line 10: export: `KEEPLOCAL

      ': not a valid identifier: line 12: export: `NSH_INSTALL_SKEL

      : integer expression expected

       

      Welcome to the BMC BladeLogic Server Automation Suite 8.2.02 installation script                               ...

       

      : integer expression expected

      : integer expression expected

       

      Before we install the software you must read and agree to the terms

      and conditions set forth by the variety of authors whose software

      has been used in this release.

       

       

       

      You have chosen to install the following:

       

        RSCD Agent

       

      Do you wish to continue (y/n) ?

      : integer expression expected

       

      ========== Creating Directories in Target Directory ==========

       

      [--------------------]

      [####################]

       

      ... Done

       

      ============ Copying Files into Target Directory =============

       

      [--------------------]

      [####################]

      : integer expression expected

      : integer expression expected

      : integer expression expected

      : integer expression expected

      : integer expression expected

      : integer expression expected

      : integer expression expected

      : integer expression expected

      : integer expression expected

      : integer expression expected

      : integer expression expected

      : integer expression expected

      : integer expression expected

      : integer expression expected

      : integer expression expected

      : integer expression expected

      : integer expression expected

      : integer expression expected

      : integer expression expected

      : integer expression expected

      : integer expression expected

       

      ... Done

       

      ============== Setting Up Operating Environment ==============

       

      Creating HOME file in /etc/rsc

       

      : integer expression expected

      ... Done

       

      ===================== Configuring Logging ====================

       

      ... Done

       

      =============== Installing the Shared Libraries ==============

       

      : integer expression expected

      ... Done

       

      ===================== Installing SysInfo =====================

       

      ... Done

       

      ====================== Installing blyum ======================

       

       

      ... Done

       

      ================= Installing Agent Component =================

       

       

      Entry for host rscd successfully added

       

      Entry for host default successfully added

      : integer expression expected

       

      : integer expression expected

      Updating file /etc/rc.d/init.d/rscd for automatic daemon startup ... ./Install:                               : integer expression expected

       

      : integer expression expected

      ===================== Starting the Agent =====================

       

      Starting the RSCD Daemon ... rscd: Unknown host: 'redhatTest' 'redhatTest'

      ... Done

       

      =================== Installation Complete ====================

       

      The installation is complete. You are now ready to begin using

      BMC BladeLogic Server Automation software.

       

      : integer expression expected1

      For support please e-mail us at customer_support@bmc.com

        • 1. Re: Provisioning RHEL 6.2 - RSCD not getting installed
          John O'Toole

          Hi,

           

          Regarding this error when starting the agent:

           

          Starting the RSCD Daemon ... rscd: Unknown host: 'redhatTest' 'redhatTest'

          ... Done

           

          I believe we have seen this before and it was related to problems with the /etc/hosts file (e.g. duplicate entries in there for the server in question)

           

          Are you able to run "ping redhatTest" from that server?

           

          Can you check the hosts file to see how it looks?

           

          Thanks.

           

          John

          • 2. Re: Provisioning RHEL 6.2 - RSCD not getting installed
            John O'Toole

            Also, I found an internal KB article regarding the ": integer expression expected" messages:

             

            Solution

            The error ": not a valid identifier" messages usually indicate that the install is not able to interpret the script or the nsh defaults file. Confirm by creating the nsh defaults file with text editor or application other than notepad. Also, on the Linux system check if there is any Carriage-Return characters in the script if you open using "vi" editor on the Linux machine, to confirm if this is the cause.

            • 3. Re: Provisioning RHEL 6.2 - RSCD not getting installed
              Mike Reider

              Hi John, I checked the /etc/hosts, it looks ok,

               

               

              [root@red1 ~]# cat /etc/hosts

              127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4

              ::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

              127.0.0.1 red1

               

               

               

              also I checked the /root/provscript file - this is the install file thats compiled by kickstart

              For some reason its installign the RSCD agent to /etc/rsc instead of the usual /usr/lib/rsc and its updating the users, but not the "export" and "users.local" < these 2 are empty and my prov. job fails when it tries to enroll the server since it has no access to target. I checked the running processes, rscd process is running, but the export and users.local files are not updated correctly based on the NSH-INSTALL-DEFAULTS (I checked this file for carriage returns, it looks normal)

               

               

               

              [root@red1 ~]# cat provscript

              # turn off firewall

              /etc/init.d/iptables save

              /etc/init.d/iptables stop

              sh /root/rscd.sh -silent

              echo BLAdmins:boss rw,map=root > /etc/rsc/users

              cd /root

              tar -xvf bmilinux.tar

              chmod +x bmilinux

              export LD_LIBRARY_PATH=/tmp/product:/tmp/updates:/lib64:/usr/lib64:/lib:/usr/lib:/tmp/DD/lib64:/tmp/DD/usr/lib64:/tmp/DD/lib:/tmp/DD/usr/lib:/root

              ./bmilinux 178.6.40.3 9831 00-50-56-A5-7B-87 >> /root/bmilinux.log

              rm -f /root/bmilinux

              rm -f /root/bmilinux.tar

              rm -f /root/libblssl.so.0.9.8

              rm -f /root/libblcrypto.so.0.9.8

              rm -f /root/random.byt

              mv /etc/rc.d/rc.local /etc/rc.d/rc.local.tmp

              mv /etc/rc.d/rc.local.bak /etc/rc.d/rc.local

              rm -f /etc/rc.d/rc.local.tmp

              • 4. Re: Provisioning RHEL 6.2 - RSCD not getting installed
                Joe Piotrowski

                It appears as though the parameters aren't getting passed properly with all the "integer expression expected" messages.

                 

                As a test can you try stripping the nsh-install-defaults file to just:

                 

                NSH_USER_FROM="BLAdmins:*"

                NSH_USER_TO="root"

                export NSH_USER_FROM

                export NSH_USER_TO

                • 5. Re: Provisioning RHEL 6.2 - RSCD not getting installed
                  Joe Piotrowski

                  Also, I remember running into an issue where running the installer as an external command was having issues. Try adding "nohup" to the beginning of your rscd.sh install string to see if that helps.

                  • 6. Re: Provisioning RHEL 6.2 - RSCD not getting installed
                    Mike Reider

                    Found the problem, originally the nsh-install-defaults was created in windows, I used it to provision other Linux OS like Oracle Linux, and it ran fine, but for some reason RHEL doesnt like this file. I recreated it in linux, saved it to my pxestore (transfer as binary using WinSCP), and the agent install ran fine.

                     

                    Lesson learned: Never create nsh-install-defaults in Windows.

                    • 7. Re: Provisioning RHEL 6.2 - RSCD not getting installed
                      Joe Piotrowski

                      Glad you found it. Out of curiousity, what program in Windows did you use to initially create it? I use Notepad++ or built-in Notepad. Anything else (Write or Word) and you run the risk of hidden characters in your text.

                      • 8. Re: Provisioning RHEL 6.2 - RSCD not getting installed
                        Mike Reider

                        I think I used wordpad, or notepad, the built in windows version. Apparently it writes metadata to the file header that will screw up the content when Linux parses it.

                        • 9. Re: Provisioning RHEL 6.2 - RSCD not getting installed
                          Bill Robinson

                          you can also use 'dos2unix' to get rid of the ^M in the file - i'm assuming that is what was screwing up the install.