Troubleshooting the BMC Server Automation adapter
This topic provides information for troubleshooting the BMC Server Automation adapter.
Troubleshooting issues while running Jython scripts
When you configure Jython on the BMC Server Automation server for executing Jython scripts, sometimes the commands fail to execute and the adapter request fails.
The following figure shows the error that appears in the adapter response when you run the Jython request.
Workaround:
- Create a local system account on your server with administrator privileges.
- Log on to your application server with the account.
- Launch the BLAutomation console and create your session and profile to BSA application.
- Configure the BAO Peer service to run as the account you configured in step 1.
- Also create the environment variable BL_AUTH_PROFILE_NAME on AO peer machine.We need to set profile name that we created in step 3.
- Restart the BMC Atrium Orchestrator peer.
Configuration errors
Message:
Explanation: You receive the preceding message under the following conditions:
- If you did not configure the blclient_login.conf file for BMC BladeLogic SSO.
- The Microsoft Active Directory user you attempted to authenticate is not present in the BMC Server Automation Console.
Message:
<command-output>
<metadata>
<command>blcred cred -acquire -profile defaultProfile
-username ###### -password #######</command>
<line-count>1</line-count>
<execution-milliseconds>4734</execution-milliseconds>
<exit-code>0</exit-code>
<status>success</status>
</metadata>
<output>
<line index="1">No authentication profile by the name of
defaultProfile</line>
</output>
</command-output>
</commands-output>
Explanation: If you have logged into the BMC Server Automation SSO Console at least once, the authenticationProfiles.xml file is created by default and you can use the same profile name to configure the adapter. If you have not logged into the BMC Server Automation SSO Console and are using the adapter directly, the preceding message is displayed.
User response: Create an authentication profile by creating the authenticationProfiles.xml file manually in the BMC Server Automation application. For example, you could create the authenticationProfiles.xml file at installationDirectory\BladeLogic\8.0\NSH\br.
Sample authenticationProfiles.xml file
<ServiceProfiles>
<ServiceProfile>
<Name>defaultProfile</Name>
<ServiceURL>service:authsvc.bladelogic:blauth://
10.128.248.121:9840</ServiceURL>
<AuthenticationType>SRP</AuthenticationType>
</ServiceProfile>
</ServiceProfiles>
In the preceding example,
- Name: Specifies the service profile name
- ServiceURL: Specifies the IP Address and the port for the BMC Server Automation application server. In this case, the IP address is 10.128.248.121 and the port is 9840.
- Authentication Type: Specifies the authentication mechanism used for the the BMC Server Automation application
Executing an operation in an Oracle Solaris environment creates a core dump file
Explanation: If you get a core dump or a segmentation error while executing any operation with BMC Server Automation version 7.5 or later in an Oracle Solaris environment, you must ensure that BMC Atrium Orchestrator uses the same Java Virtual Machine (JVM) that is used by BLCLI.
User response: To enable BMC Atrium Orchestrator to use the same JVM as BLCLI:
- Navigate to the AO_HOME/bin/server.sh file on the peer where the adapter is enabled.
Edit the server.sh file to specify the BLJVM_PATH, below the line specifying the JAVA_HOME variable:
JAVA_HOME="/usr/jdk/jdk1.5.0_10"
BLJVM_PATH=${JAVA_HOME}/jre/lib/sparc/server/libjvm.so
export BLJVM_PATH
<bladelogic-response>
<metadata>
<status>success</status>
</metadata>
<targets-output>
<target-output>
<metadata>
<os-id>Windows Server 2008</os-id>
<os-version>6.1</os-version>
<os-arch>amd64</os-arch>
<status>success</status>
</metadata>
<commands-output>
<command-output>
<metadata>
<command>/C/"Program Files"/"BMC Software"/BladeLogic/appserver/NSH/bin/bljython.bat "C:\jy_Scripts\list-all-servers.jy"</command>
<line-count>18</line-count>
<execution-milliseconds>35953</execution-milliseconds>
<exit-code>1</exit-code>
<status>error</status>
<error>Exit code indicates error</error>
</metadata>
<output>
<line index="1">bl-debug: BL - initializing</line>
<line index="2">bl-debug: BL - Connecting</line>
<line index="3">Traceback (most recent call last):</line>
<line index="4"> File "C:\jy_Scripts\list-all-servers.jy", line 31, in <module></line>
<line index="5"> jli.connect()</line>
<line index="6"> File "C:\Program Files\BMC Software\BladeLogic\appserver\NSH\br\jython\bladelogic\cli\CLI.py", line 84, in connect</line>
<line index="7"> cli.loginToAppServer();</line>
<line index="8"> at com.bladelogic.om.infra.cli.CliLoginOperations.getSessionCredentialFromCache(CliLoginOperations.java:198)
</line>
<line index="9"> at com.bladelogic.om.infra.cli.CliLoginOperations.obtainSessionCredential(CliLoginOperations.java:96)
</line>
<line index="10"> at com.bladelogic.om.infra.session.client.SessionLoginManager.connect(SessionLoginManager.java:164)
</line>
<line index="11"> at com.bladelogic.om.infra.session.client.SessionLoginManager.login(SessionLoginManager.java:93)
</line>
<line index="12"> at com.bladelogic.om.infra.cli.CLIMain.loginToAppServer(CLIMain.java:820)
</line>
<line index="13"> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
</line>
<line index="14"> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
</line>
<line index="15"> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
</line>
<line index="16"> at java.lang.reflect.Method.invoke(Unknown Source)
</line>
<line index="17"></line>
<line index="18">com.bladelogic.om.infra.session.client.SessionLoginException: com.bladelogic.om.infra.session.client.SessionLoginException: No cached Session Credential for named service profile - please login.</line>
</output>
</command-output>
</commands-output>
</target-output>
</targets-output>
</bladelogic-response>