If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Auto Startup script for cognos

Started by Daljith, 07 Apr 2015 06:23:57 PM

Previous topic - Next topic

Daljith

Hi Cognoisers,

I need to create a script to auto start the cognos services in linux.
If anyone has any already existing script for reference or if someone can guide me how do we do that?

I know below command might start the services but not sure. Also I would have to check the cogserver.log file to check if all the services started perfectly.

./cogconfig.sh -s

Apart from that, I found that cogserver.log file is not having details on if LDAP connectivity is done successfully.

Please suggest.

MFGF

Quote from: Ana on 07 Apr 2015 06:23:57 PM
Hi Cognoisers,

I need to create a script to auto start the cognos services in linux.
If anyone has any already existing script for reference or if someone can guide me how do we do that?

I know below command might start the services but not sure. Also I would have to check the cogserver.log file to check if all the services started perfectly.

./cogconfig.sh -s

Apart from that, I found that cogserver.log file is not having details on if LDAP connectivity is done successfully.

Please suggest.

If you look in /etc/init.d do you see a service in there for Cognos? If so, the command /etc/init.d/<cognos service name> start ought to work

MF.
Meep!

Daljith

Hi MF,

Currently there is nothing in init file for cognos.
Acutally, the approach you are mentioning is about starting cognos on server startup by putting in init file.

But here the situation is different.
We have two LDAP servers, sometimes when the server1 goes down suddenly, then the script need to check if the server1 is down, check if  server2 is running fine. If yes,  then replace the server1 in cogstartup.xml with server2 and restart cognos services again using LDAP server 2.

Please let me know if you have any other suggestion.


Ana

redstang

So you're looking for a script that will monitor the status of your LDAP servers and then forcibly restart Cognos if one goes down, thereby interrupting your connected users and aborting anything they have running?  That doesn't seem like a good solution.
Timing is everything.

Daljith

Hi Redstand,

I agree this is not a good solution. But here is more details on the situation. We have some 60 reports that execute from 12 AM till 8 AM morning. And the reports need to be delivered before that time. This LDAP server issue (even though the concerned team is looking into it), for me it becomes a big headache when every week (mostly around mid night time ......... :(     ) somehow the currently used LDAP goes down and then I have to check what all scheduled reports failed due to this issue and all this.   I am trying to fix my issue here. Thinking of possible solution to reduce my night duties................ :)

Let me know if there is any other solution.

Ana

redstang

Ok, that makes sense considering the situation.  The key to your issue is being able to detect the LDAP error somehow from a script.  That means that the error needs to show up in some sort of a file somewhere on the server that you can scan for the error and if found, restart the service.  If the error isn't showing up in the cogserver.log you'll have to figure out if it produces an error in any other log or report file.  Otherwise you would have to be able to detect the problem in some other way, like pinging the LDAP server itself and if it doesn't respond then you know it is down.  I'm not a great LDAP mind, and it's hard to give you advice beyond that without knowing exactly how the error manifests itself.

But, once you can detect the error the rest is academic.  You could schedule the script to run every 10 minutes between 12am and 8am to check for that error and if it finds it, it can run the shutdown command, swap your cogstartup.xml for a different file you have already configured with the other LDAP server, and then run the startup command.  Or the start the script running at 12am and it could loop and sleep X number of seconds between checks.  Regardless though, you need to be able to detect the LDAP error from a command line.
Timing is everything.

Daljith

Nice idea. Thanks redstand.

I have created a script the same way and swapping it with first or second configuration file based on the issue found on one of the LDAP server.

Thanks a lot once again.

Ana