Announcement Announcement Module
No announcement yet.
Running two instances of DM Server Page Title Module
Move Remove Collapse
Conversation Detail Module
  • 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 and some files under config directory. I changed those ports so that two instances would not clash.
    3. Started both instances with their corresponding scripts. Looked good.
    4. Called 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 and


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

      if [ -z "$JMX_PORT" ]

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


      • #4

        I now looked at, 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$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.




        • #5
          If you specify the -jmxport option to 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.


          • #6
            Thanks Glyn, that works.

            I actually figured it out before reading your reply. However, I preferred to slightly fix the 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.


            • #7
              Glad you're sorted.