Installing Multiple instances of servicemix

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Installing Multiple instances of servicemix

Sanjay Jain
Hi Guys,

Could any one please tell me here how to install multiple instances of servicemix on same linux host?

I appreciate a lot for the quick reply.

Thanks in advance!
Sanjay
Reply | Threaded
Open this post in threaded view
|

Re: Installing Multiple instances of servicemix

mattrpav
Sanjay-

Its technically possible, but requires some attentiveness.  

There are two approaches:

1. An IP per instance.  Each instance listens on the same port numbers, but on specific IPs, not *:8080, but 10.0.0.10:8080 and 10.0.0.11:8080.
2. Change the ports of the second instance to not conflict with the first.

Technically, you should be able to have two instances tied to their own IP, but I've never proven that all the components support that properly.  Below is the approach for changing all the ports in the second instance.  Leave the first one alone.

Find files that have a port config:
find $SM_HOME/conf -type f -exec grep port {} \;

For sure these files..
conf/activemq.xml
conf/servicemix.properties
conf/servicemix.xml

NOTE:: *** BE SURE TO SETUP THE ACTIVEMQ PORTS CORRECTLY ***  All heck breaks loose, if you have one SM instance sending messages to another's ActiveMQ.

and if you have DEBUG enabled, you'll need to change the JVM debug port in
bin/servicemix

DEFAULT_JAVA_DEBUG_OPTS="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005

Change the '5005' to something else in the second instance.

Test just the SM setup without any deployed SA's.  Once that works, you have to remember to update you SA's to listen on different ports.. 8081 vs 8080, etc.  

Matt Pavlovich
Reply | Threaded
Open this post in threaded view
|

Re: Installing Multiple instances of servicemix

Jean-Baptiste Onofré
In reply to this post by Sanjay Jain
Do you talk about ServiceMix 3.2 or ServiceMix 4.0 ?

If you deal with ServiceMix 3.2, you need :
- in the conf directory, change the default port bound (especially in activemq.xml around the <amq:transportConnectors> tag, in servicemix.properties around the rmi.port and activemq.port)
- in the xbeans.xml of your SUs, if you define port number (such as SU using servicemix-http component for exemple)

If you deal with ServiceMix 4.0, you need :
- in the etc directory, in the org.apache.servicemix.management.cfg, you need to change the port defined in the rmiRegistryPort property
- check in your JBI services or OSGi bundles if you don't have any port bound

Once you have changed the port definition for each ServiceMix instance, you can start any SMX that you want (each SMX will use a different JVM).

Regards
--
Jean-Baptiste Onofré
[hidden email]
BuildProcess/AutoDeploy Project Leader
http://buildprocess.sourceforge.net


On Thu 23/10/08 18:04 , Sanjay Jain  wrote::


Hi Guys,

Could any one please tell me here how to install multiple instances of
servicemix on same linux host?

I appreciate a lot for the quick reply.

Thanks in advance!
Sanjay
--
View this message in context: http://www.nabble.com/Installing-Multiple-instances-of-servicemix-tp20134120p20134120.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.




Reply | Threaded
Open this post in threaded view
|

Re: Installing Multiple instances of servicemix

Jean-Baptiste Onofré
In reply to this post by Sanjay Jain
Sorry Matt, I haven't seen your answer :)

I have posted an update :)

Regards
--
Jean-Baptiste Onofré
[hidden email]
BuildProcess/AutoDeploy Project Leader
http://buildprocess.sourceforge.net


On Thu 23/10/08 19:36 , mattrpav  wrote::


Sanjay-

Its technically possible, but requires some attentiveness.  

There are two approaches:

1. An IP per instance.  Each instance listens on the same port numbers, but
on specific IPs, not *:8080, but 10.0.0.10:8080 and 10.0.0.11:8080.
2. Change the ports of the second instance to not conflict with the first.

Technically, you should be able to have two instances tied to their own IP,
but I've never proven that all the components support that properly.  Below
is the approach for changing all the ports in the second instance.  Leave
the first one alone.

Find files that have a port config:
find $SM_HOME/conf -type f -exec grep port {} \;

For sure these files..
conf/activemq.xml
conf/servicemix.properties
conf/servicemix.xml

NOTE:: *** BE SURE TO SETUP THE ACTIVEMQ PORTS CORRECTLY ***  All heck
breaks loose, if you have one SM instance sending messages to another's
ActiveMQ.

and if you have DEBUG enabled, you'll need to change the JVM debug port in
bin/servicemix

DEFAULT_JAVA_DEBUG_OPTS="-Xdebug -Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005

Change the '5005' to something else in the second instance.

Test just the SM setup without any deployed SA's.  Once that works, you have
to remember to update you SA's to listen on different ports.. 8081 vs 8080,
etc.  

Matt Pavlovich
--
View this message in context: http://www.nabble.com/Installing-Multiple-instances-of-servicemix-tp20134120p20135968.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.




Reply | Threaded
Open this post in threaded view
|

Re: Installing Multiple instances of servicemix

Tom Purcell
In reply to this post by mattrpav
Hello

I'm trying to do the same thing but when the second instance comes up the first instance gets the following messages:

11:21:04,408 | DEBUG | ActiveMQ Session Task | JMSFlow                  | i.nmr.flow.jms.AbstractJMSFlow  378 | ServiceMix: broadcasting info for org.apache.servicemix.jbi.event.EndpointEvent[source=ServiceEndpoint[service={http://servicemix.org/wsnotification}Publisher,endpoint=Anonymous]]
11:21:04,411 | DEBUG | ActiveMQ Session Task | JMSFlow                  | i.nmr.flow.jms.AbstractJMSFlow  378 | ServiceMix: broadcasting info for org.apache.servicemix.jbi.event.EndpointEvent[source=ServiceEndpoint[service={http://servicemix.org/wsnotification}CreatePullPoint,endpoint=Broker]]
11:21:04,411 | DEBUG | ActiveMQ Session Task | JMSFlow                  | i.nmr.flow.jms.AbstractJMSFlow  378 | ServiceMix: broadcasting info for org.apache.servicemix.jbi.event.EndpointEvent[source=ServiceEndpoint[service={http://servicemix.org/wsnotification}NotificationBroker,endpoint=Broker]]
11:21:04,443 | DEBUG | pool-flow.jca.ActiveMQ.Advisory.Consumer.Topic.org.apache.servicemix.JCAFlow-thread-3 | JCAFlow                  | cemix.jbi.nmr.flow.jca.JCAFlow  389 | ServiceMix: broadcasting info for org.apache.servicemix.jbi.event.EndpointEvent[source=ServiceEndpoint[service={http://servicemix.org/wsnotification}Publisher,endpoint=Anonymous]]
11:21:04,448 | DEBUG | pool-flow.jca.ActiveMQ.Advisory.Consumer.Topic.org.apache.servicemix.JCAFlow-thread-3 | JCAFlow                  | cemix.jbi.nmr.flow.jca.JCAFlow  389 | ServiceMix: broadcasting info for org.apache.servicemix.jbi.event.EndpointEvent[source=ServiceEndpoint[service={http://servicemix.org/wsnotification}CreatePullPoint,endpoint=Broker]]
11:21:04,457 | DEBUG | pool-flow.jca.ActiveMQ.Advisory.Consumer.Topic.org.apache.servicemix.JCAFlow-thread-3 | JCAFlow                  | cemix.jbi.nmr.flow.jca.JCAFlow  389 | ServiceMix: broadcasting info for org.apache.servicemix.jbi.event.EndpointEvent[source=ServiceEndpoint[service={http://servicemix.org/wsnotification}NotificationBroker,endpoint=Broker]]

So the underlying ActiveMqs are connected via multicast. I want my ServiceMix instances to be totally independent.   Do I need to turn off the multicasting? Should I turn off the multicasting? How do I turn off the multicasting?

Thanks
Tom


mattrpav wrote
Sanjay-

Its technically possible, but requires some attentiveness.  

There are two approaches:

1. An IP per instance.  Each instance listens on the same port numbers, but on specific IPs, not *:8080, but 10.0.0.10:8080 and 10.0.0.11:8080.
2. Change the ports of the second instance to not conflict with the first.

Technically, you should be able to have two instances tied to their own IP, but I've never proven that all the components support that properly.  Below is the approach for changing all the ports in the second instance.  Leave the first one alone.

Find files that have a port config:
find $SM_HOME/conf -type f -exec grep port {} \;

For sure these files..
conf/activemq.xml
conf/servicemix.properties
conf/servicemix.xml

NOTE:: *** BE SURE TO SETUP THE ACTIVEMQ PORTS CORRECTLY ***  All heck breaks loose, if you have one SM instance sending messages to another's ActiveMQ.

and if you have DEBUG enabled, you'll need to change the JVM debug port in
bin/servicemix

DEFAULT_JAVA_DEBUG_OPTS="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005

Change the '5005' to something else in the second instance.

Test just the SM setup without any deployed SA's.  Once that works, you have to remember to update you SA's to listen on different ports.. 8081 vs 8080, etc.  

Matt Pavlovich
Reply | Threaded
Open this post in threaded view
|

Re: Installing Multiple instances of servicemix

Tom Purcell
Hello
I think I found my answer:
http://servicemix.apache.org/javanetsocketexception-error-setting-options.html

It seems to be working.

Thanks
Tom

Tom Purcell wrote
Hello

I'm trying to do the same thing but when the second instance comes up the first instance gets the following messages:

11:21:04,408 | DEBUG | ActiveMQ Session Task | JMSFlow                  | i.nmr.flow.jms.AbstractJMSFlow  378 | ServiceMix: broadcasting info for org.apache.servicemix.jbi.event.EndpointEvent[source=ServiceEndpoint[service={http://servicemix.org/wsnotification}Publisher,endpoint=Anonymous]]
11:21:04,411 | DEBUG | ActiveMQ Session Task | JMSFlow                  | i.nmr.flow.jms.AbstractJMSFlow  378 | ServiceMix: broadcasting info for org.apache.servicemix.jbi.event.EndpointEvent[source=ServiceEndpoint[service={http://servicemix.org/wsnotification}CreatePullPoint,endpoint=Broker]]
11:21:04,411 | DEBUG | ActiveMQ Session Task | JMSFlow                  | i.nmr.flow.jms.AbstractJMSFlow  378 | ServiceMix: broadcasting info for org.apache.servicemix.jbi.event.EndpointEvent[source=ServiceEndpoint[service={http://servicemix.org/wsnotification}NotificationBroker,endpoint=Broker]]
11:21:04,443 | DEBUG | pool-flow.jca.ActiveMQ.Advisory.Consumer.Topic.org.apache.servicemix.JCAFlow-thread-3 | JCAFlow                  | cemix.jbi.nmr.flow.jca.JCAFlow  389 | ServiceMix: broadcasting info for org.apache.servicemix.jbi.event.EndpointEvent[source=ServiceEndpoint[service={http://servicemix.org/wsnotification}Publisher,endpoint=Anonymous]]
11:21:04,448 | DEBUG | pool-flow.jca.ActiveMQ.Advisory.Consumer.Topic.org.apache.servicemix.JCAFlow-thread-3 | JCAFlow                  | cemix.jbi.nmr.flow.jca.JCAFlow  389 | ServiceMix: broadcasting info for org.apache.servicemix.jbi.event.EndpointEvent[source=ServiceEndpoint[service={http://servicemix.org/wsnotification}CreatePullPoint,endpoint=Broker]]
11:21:04,457 | DEBUG | pool-flow.jca.ActiveMQ.Advisory.Consumer.Topic.org.apache.servicemix.JCAFlow-thread-3 | JCAFlow                  | cemix.jbi.nmr.flow.jca.JCAFlow  389 | ServiceMix: broadcasting info for org.apache.servicemix.jbi.event.EndpointEvent[source=ServiceEndpoint[service={http://servicemix.org/wsnotification}NotificationBroker,endpoint=Broker]]

So the underlying ActiveMqs are connected via multicast. I want my ServiceMix instances to be totally independent.   Do I need to turn off the multicasting? Should I turn off the multicasting? How do I turn off the multicasting?

Thanks
Tom


mattrpav wrote
Sanjay-

Its technically possible, but requires some attentiveness.  

There are two approaches:

1. An IP per instance.  Each instance listens on the same port numbers, but on specific IPs, not *:8080, but 10.0.0.10:8080 and 10.0.0.11:8080.
2. Change the ports of the second instance to not conflict with the first.

Technically, you should be able to have two instances tied to their own IP, but I've never proven that all the components support that properly.  Below is the approach for changing all the ports in the second instance.  Leave the first one alone.

Find files that have a port config:
find $SM_HOME/conf -type f -exec grep port {} \;

For sure these files..
conf/activemq.xml
conf/servicemix.properties
conf/servicemix.xml

NOTE:: *** BE SURE TO SETUP THE ACTIVEMQ PORTS CORRECTLY ***  All heck breaks loose, if you have one SM instance sending messages to another's ActiveMQ.

and if you have DEBUG enabled, you'll need to change the JVM debug port in
bin/servicemix

DEFAULT_JAVA_DEBUG_OPTS="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005

Change the '5005' to something else in the second instance.

Test just the SM setup without any deployed SA's.  Once that works, you have to remember to update you SA's to listen on different ports.. 8081 vs 8080, etc.  

Matt Pavlovich
Reply | Threaded
Open this post in threaded view
|

Re: Installing Multiple instances of servicemix

spedone
In reply to this post by mattrpav
Hi Sanjay

I'm trying to run more instances of service mix on one single server.
I've prepared two different virtual IP, like this:
10.102.151.30
10.102.151.32

You said:
Its technically possible, but requires some attentiveness.  

There are two approaches:

1. An IP per instance.  Each instance listens on the same port numbers, but on specific IPs, not *:8080, but 10.0.0.10:8080 and 10.0.0.11:8080.
Can you explain the sentences above ?
How can I assign an address for a specific instance of service mix ?

I've tried to configure some of the configuration files / properties of servicemix, but every time, the servicemix binds to 0.0.0.0:<PORT>

Someone can help me ?