How to check Documentum Service is UP or NOT

Options
GreatKarur
edited July 19, 2011 in Documentum #1

Hi,

We have an specific requirement in which we have to test whether the documentum repository services is up or down before getting the IDfSession. Is the following code is correct ?

testSess = sessMgr.newSession(docBaseName);
           
          if (testSess.isConnected())

           {

               System.out.println("Service is UP please proceed...");

               //Get the session

          }

          else

               System.out.println("Service id DOWN...");

Can you guys help me on this.

Regards,

Raj

Comments

  • Imran_Yusubov
    edited July 6, 2011 #2
    Options

    Hi,

    is it possible to get a session if the target repository is down?

    I think you will not be able to construct a session if the target repository is down.

    Also think of this scenario, lets say you have configured several services against a single repository.If one of them is down and another is up, you will get a session but actually one service is down.

  • Francois Dauberlieu
    edited July 7, 2011 #3
    Options

    Q: is it possible to get a session if the target repository is down?

    A: Of course not since you must log in to get a session

    Actually, the code seems correct. The thing is that if you don't get the session doesn't necesseraly mean that the service is down. It can also mean that the user informations are incorrect so you'll have to double check the error returned

  • lastnitescurry
    edited July 7, 2011 #4
    Options
    Q: is it possible to get a session if the target repository is down?

    YES, See Monitoring scripts section of High-Availability Support Scripts   in manual, EMC Documentum Content Server Administration and Configuration 6.7 Guide

    These scripts will ensure that the basic content server services are running. Depending on your environment setup, there are multiple failure points between an up an running repository and getting a valid session.

    • As Francois has already said, there could be issues with your test user account, i.e. user account not exists, login disabled or password is wrong,
    • Docbrokers could be down, if using remote docbrokers next to client aps (app servers)
    • firewalls could be up and blocking
  • Imran_Yusubov
    edited July 19, 2011 #5
    Options

    Hi,

    In my opinion you should improve your code.

    If the docbase is up this part will run and print "Service is UP please proceed...".

    testSess = sessMgr.newSession(docBaseName);
               
              if (testSess.isConnected())           {               System.out.println("Service is UP please proceed...");               //Get the session          }

    But I guess you will never see something like that "Service id DOWN..." if the service is down. Because if the service is up the if block will run, else if the service is down your program will throw an exception and none of the if else block will run.

    else               System.out.println("Service id DOWN...");

    You would better to  something like that.

         try{     testSess = sessMgr.newSession(docBaseName);
               
                   if (testSess.isConnected())                {                    System.out.println("Service is UP please proceed...");                    //Get the session                    }             }catch(Throwable e){               if( e instanceof DfException )
                         {                          System.out.println( "DFC Exception:"+e );                 }else  {
                    System.out.println( "Non-DFC Exception" +e);              
                }}

  • msroth
    edited July 7, 2011 #6
    Options

    You could also query the Docbroker for a Docbase map to determine if a specific Docbase is running.  That wa,y you could avoid an exception if it is down and throw a nice error as Imran alluded to.  I don't have an example of the DFC code handy but I'm sure you can figure it out easily enough.  For an antiquated example of this, see the dmqdocbroker.awk script in the server's /bin directory.  I wrote a series of blog posts about this utility if you are intersted:  https://msroth.wordpress.com/2010/06/06/documentum-connection-utilities/.

  • GreatKarur
    edited July 13, 2011 #7
    Options

    Hi Brain,

    I understand the following command line will bring the status of the content server, since an java file is available in server-impl.jar

    java ContentServerStatus -docbase_name repository_name -user_name user_name

    However, we are using an webservices, and this webservices is responsible for injecting documents into the repository. So to prior that operation we need to check the status of the content server.

    Is there any DFC code equivelent to the above java command line ? to check the status of the content server?.

    Your help is really appreciated.

    Regards,

    Raj

  • lastnitescurry
    edited July 14, 2011 #8
    Options

    can not be bothered answering right now as pevved that you did not mention web services up to now

  • Paddy
    edited July 14, 2011 #9
    Options

    Either you are using web services remotely in which case DFC is of no more help than the command line - or you are looking to write you own web service operation to check the status of the content server, in which case all the previous advice about using the docbroker, testing your sessions applies. SO the question is already answered is it not?

  • Paddy
    edited July 14, 2011 #10
    Options

    Brian, I like that you have now been transmogrified from LastNitesCurry into THE BRAIN ;-)

  • lastnitescurry
    edited July 14, 2011 #11
    Options
    Brian, I like that you have now been transmogrified from LastNitesCurry into THE BRAIN ;-)

    screen name is still lastnitescurry on my profile... looks like a ^^feature^^ to display real name not screen name!!

  • GreatKarur
    edited July 15, 2011 #12
    Options

    Hi Guys,

    I apologize for the delayed reponse,

    Let me add some more information to my orginal question,

    We are having an webservices and it will do the following steps,

    1. Get the content data and meta information from external source

    2. Get the session with documentum repository

    3. Using DFC api's it inject the content and meta information into the repository

    So, here between Step 1 and Step 2 we need to test the status of the repository whether it is up or down ? we need this information for Monitoring purpose,

    Is there any DFC api available to check the repository up or down ?

    Your help is really appreciated.

    Regards,

    Raj

  • muthu.vignesh
    edited July 19, 2011 #13
    Options

    Hi

    As Scott suggested, you can query the docbasemap to getthe list of running repository from the docbroker and if you get your target docbase in the list, then its running.

    IDfClientX clientx = new DfClientX();
    IDfClient client;
    try
    {
      client = clientx.getLocalClient();
         IDfDocbaseMap myMap = client.getDocbaseMap();
      for(int i = 0; i < myMap.getDocbaseCount(); i++)
         {
           System.out.println(myMap.getDocbaseName(i));
         }
    }
    catch (DfException e1)
    {
      e1.printStackTrace();
        }

    Check your target repository inside the loop.

    Regards,

    Muthu

  • How can i check all the services are running or not using DFC like Rendition service,Docbroker,CTS,Xplore etc.