Announcement Announcement Module
Collapse
No announcement yet.
Running two instances of DM Server Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Running two instances of DM Server

    I tried to run two instances of Spring DM Server (2.0.1.RELEASE) on the same machine. Everything is OK except the shutdown does not work properly.

    Here is what I did:
    1. Made a copy of the whole installation.
    2. Searched for any kind of the port number specifications. I found them in dmk.sh and some files under config directory. I changed those ports so that two instances would not clash.
    3. Started both instances with their corresponding startup.sh scripts. Looked good.
    4. Called shutdown.sh on the second (altered) instance. The first instance shut down instead, the second one was still running.

    Is there a solution to this? Am I missing some port number or parameter?

    The same problem exists in 1.0.2 version, I hoped it would be fixed in 2.0.1.

  • #2
    Did you pass the same -jmxport parameter to both startup.sh and shutdown.sh?

    Comment


    • #3
      No, I did not use explicit "-jmxport" argument.
      Instead, in the second instance of the server, I changed dmk.sh script to set it to a different value by default:

      if [ -z "$JMX_PORT" ]
      then
      JMX_PORT=29875
      fi

      I thought it should properly apply to both startup and shutdown.

      Comment


      • #4
        Glyn,

        I now looked at dmk.sh, and I believe that it has a problem. I am not sure if the
        com.springsource.kernel.shutdown.ShutdownClient class has a problem too, I don't have the source code.

        The JMX_PORT property is not applied to the stop command at all.
        I tried to fix the script, but I don't know how to pass the port number to the ShutdownClient. Obviously the

        -Dcom.sun.management.jmxremote.port=$JMX_PORT

        is for the server, not client.

        I hope that port number 9875 is not hard-coded in the ShutdownClient .

        Please let me know what is the story.

        Thanks,

        Leonid

        Comment


        • #5
          If you specify the -jmxport option to shutdown.sh then it is parsed by ShutdownClient, so if you must change the scripts, you'll need to add "-jmxport 29875" to the options passed to ShutdownClient.

          Comment


          • #6
            Thanks Glyn, that works.

            I actually figured it out before reading your reply. However, I preferred to slightly fix the dmk.sh script, to make it transparent:

            1. I moved the default JMX_PORT setting outside of the "if" statement, so it will apply for the stop command also.
            2. Added "-jmxport $JMX_PORT" to the ShutdownClient invocation.

            Comment


            • #7
              Glad you're sorted.

              Comment

              Working...
              X