COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Cognos Administration => Topic started by: Daljith on 07 Apr 2015 06:23:57 PM

Title: Auto Startup script for cognos
Post by: Daljith 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.
Title: Re: Auto Startup script for cognos
Post by: MFGF on 08 Apr 2015 03:44:36 AM
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.
Title: Re: Auto Startup script for cognos
Post by: Daljith on 08 Apr 2015 11:50:17 AM
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
Title: Re: Auto Startup script for cognos
Post by: redstang on 09 Apr 2015 03:27:59 PM
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.
Title: Re: Auto Startup script for cognos
Post by: Daljith on 09 Apr 2015 07:29:51 PM
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
Title: Re: Auto Startup script for cognos
Post by: redstang on 10 Apr 2015 10:23:51 AM
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.
Title: Re: Auto Startup script for cognos
Post by: Daljith on 13 Apr 2015 09:28:33 PM
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