Skip to Content
author's profile photo Former Member
Former Member

Programmatically restart cluster

Hello,

In

How to get server status

i found an interesting hint how to programmatically get instance information from the cluster controller.

Now i still miss some more information about the method JStartupClusterController.restartCluster.

I guess the argument to pass to this method is a timeout value in ms. Anyway, the method didn't work for me. I guess i need to specify more authentication information somewhere else.

Can anyone help me?

Best regards

Dieter

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Jun 20, 2006 at 05:03 PM

    Hi Dieter,

    Here is implementation of JStartupClusterController.restartCluster

    public void restartCluster(long l) throws JStartupClusterControlException
    {
    	connection.sendCommandToCluster((byte)2);
    	connection.sendState((byte)0);
    	connection.waitForClusterState(l, (byte)4, (byte)5);
    }

    So, this parameter is "how long waitForClusterState" :-).

    Best regards, Maksim Rashchynski.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Maksim,

      Thank's a lot for your answer. It's worth 10 points 😊

      I found out that restartCluster actually just starts a cluster, so the cluster must have been stopped before. It does not shutdown and restart the cluster as i expected from the name of the method.

      Best soccer greetings from Germany

      Dieter

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.