4 Replies Latest reply on Nov 22, 2016 6:51 AM by Bill Robinson

    SSO Error: No credentials in credential cache file "/root/.bladelogic/bl_sesscc".

    Mohammed Bilal

      Hi,

       

      I am trying to execute a custom (non NSH) script. But I am receiving this error "SSO Error: No credentials in credential cache file "/root/.bladelogic/bl_sesscc".

       

      The script works fine if executed manually.

       

      This script basically gets the data of (Memory used, total Memory, Free Memory & Used memory) from the servers. But I don't get any output, instead i get this SSO error.

       

      Any help on this would be appreciated.

       

      Thanks, Mohammed Bilal.

        • 1. Re: SSO Error: No credentials in credential cache file "/root/.bladelogic/bl_sesscc".
          Bill Robinson

          You are trying to run it how and where when you get the error?  as a job?  from the command line?

          • 2. Re: SSO Error: No credentials in credential cache file "/root/.bladelogic/bl_sesscc".
            Mohammed Bilal

            Hi Bill,

             

            I am trying to run it as a NSH script job (Type - 3). Please find the script that we use.. 'serverlist' is the file where we give the input servers list. We get this SSO error listed under the error output file 'error1'. All the input servers are getting listed under 'noaccess1' file. But we don't get any required output in 'Output1' file.

             

            But on executing this script manually, we get the required output on 'Output1' file as expected.

             

            Please let me know for any further info.

             

             

            Script:

             

            for i in `cat /tmp/serverlist`

            do

            echo $i

            nexec $i uname -n 2>> /tmp/error1

            if [ $? -eq 0 ]; then

            a=`nexec $i uname -a | awk '{$1=" ";print}';echo ","`

            echo -n $a \ >> /tmp/output1

            b=`nexec $i uptime; echo " ,"`

            echo -n $b \ >> /tmp/output1

            um=`nexec $i svmon -G | head -2|tail -1| awk {'print $3'}`

            um=`expr $um / 256`

            tm=`nexec $i lsattr -El sys0 -a realmem | awk {'print $2'}`

            tm=`expr $tm / 1024`

            fm=`expr $tm - $um`

            ump=`expr $um \* 100`

            ump=`expr $ump / $tm`

            echo -n Memory Used :- $ump"%" \ >> /tmp/output1

            echo -n total memory = $tm MB \  >> /tmp/output1

            echo -n free memory = $fm MB \  >> /tmp/output1

            echo -n used memory = $um MB \  >> /tmp/output1

            c=`nexec $i lsps -s | awk '{print $2}'`

            echo -n $c \ >> /tmp/output1

            nexec $i df -g | grep -i /var | awk '{print $4}' | sort -r | head -1 >> /tmp/output1

            else

            echo $i >> /tmp/noaccess1

            fi

            done

            • 3. Re: SSO Error: No credentials in credential cache file "/root/.bladelogic/bl_sesscc".
              Ashish Vijay

              This error occur when you try to run any nsh/blcli command with root user. If you have to first do below steps to work it

               

              1. Login to server as user "root"

              2. type command "nsh"

              3. run command "blcred cred -acquire"

              4. Provide Profile, User, Password when prompted.

               

              These steps will create a session file called bl_sesscc under "/root/.bladelogic/" directory.

               

              After these steps, you should be able to run your script. Make sure ".bladelogic" directory has permission 700.

              • 4. Re: SSO Error: No credentials in credential cache file "/root/.bladelogic/bl_sesscc".
                Bill Robinson

                why is this running as a type 3 script if it is actually a nsh script?  why not a type 1 or type 2?

                 

                probably you have nsh installed on the job target, and that nsh is configured to use a nsh proxy.  but because there are no creds as mentioned above, when your script makes the call to nexec, it fails.