Server Management - Systems Insight Manager
1833238 Members
2681 Online
110051 Solutions
New Discussion

Re: unable to execute custom commands

 
SOLVED
Go to solution
Alain Staelen
Advisor

unable to execute custom commands

I'm running HPSIM on a new W2K box.

I have tasks for alert forwarding to email working without problems but I can not execute a custom batch file.

I remember something with IM7 requiring a special account for the IM7 service but I have no info for HPSIM.

Maybe someone can shed some light on this for me ?

Thanks

Alain
5 REPLIES 5
Rob Buxton
Honored Contributor

Re: unable to execute custom commands

The mechanism for running custom commands is very different from IM 7. I've had a lot of problems with it.
Note that the Custom command uses SSH to log back into the IM Server.

Are you seeing any errors in the Task Log display?

I had problems when I created notification tasks under my account to call Custom Commands. I changed the "Run As" parameter for the Notification Task to be the Admin Account I created HPSIM in and also logged into this account to create the Custom Command. This worked.
Keep the Notification Task and Custom Command names different, you should see the Task results for both.
Alain Staelen
Advisor

Re: unable to execute custom commands

I'm still unclear as how a custom command is actually executed.
As a test
1) I made a custom command "test batchfile" that runs a batchfile test123.bat
2) I then select Tools/Custom Command/"test batchfile"
3) select Run Now
4) select my management server as the target and excute

The custom command fails and in de Stderr I find
EXCEPTION CLASS: com.hp.mx.exceptions.MxFailedAuthenticationException
EXCEPTION: Authentication failed

I'm not yet building a notification task, just trying to manually run a custom command.
Do you mean that the custom command gets executed via OpenSSL on the system instead of opening a shell ?

Thanks for your clarification,

Alain

David Claypool
Honored Contributor

Re: unable to execute custom commands

Yes, since hpSIM is available on Windows, Linux and HP-UX, a common method using SSH on all of those OS choices is what's implemented. Your error indicates the trust relationship between hpSIM and SSH hasn't been established. Even on W2K you can benefit from using the instructions in the readme for W2003.
Rob Buxton
Honored Contributor
Solution

Re: unable to execute custom commands

Alain,
As David has said it logs back in using SSH.

If you created the task under an Account that was added rather than the Account HPSIM was installed in, try deleting and recreating the custom command under that account.

Also, try logging into SSH. There's a SSH Utility in the OpenSSH bin directory or you can use putty. You should be able to login.

Also, as David suggested there are a number of steps to enabling OpenSSH on windows.
Alain Staelen
Advisor

Re: unable to execute custom commands

I am now able to manually run a batchfile via a custom command.

The resolution was indeed to login to HPSIM with the same user that was used to install HPSIM and run the HPSIM service.
After editing the custom command with this account I was able to run the custom command manually.

I used the putty application to verify that that account could login to the SSL service on the HPSIM service. (The user administrator does not seem to be able to login via OpenSSL to the server.)

I will now try and link the custom command with events via Automatic Event Handling.

Thanks for the help,

Alain