简体   繁体   中英

Mule ESB: Is it possible to start 2 instances of the Mule ESB

I created two sepaerate directories in which I installed the Standalone Mule ESB server:

/ee/mmc-distribution-mule-console-bundle-3.5.2-HF1
/ee2/mmc-distribution-mule-console-bundle-3.5.2-HF1

I start up the first server, and below is the status:

[root@x240perf2 mmc-distribution-mule-console-bundle-3.5.2-HF1]# ./status.sh
MMC is running as PID=1998.
Mule Enterprise Edition is running as PID=2619.

Then I try to start the second instance:

[root@x240perf2 mmc-distribution-mule-console-bundle-3.5.2-HF1]# ./startup.sh
Port 8585 is in use, please make it available and try again.

So apparently the port 8585 is being used by the original instnace

So I stop the first instnace, and start the second istance, which comes up successfully, as follows:

./startup.sh
Please enter the desired port for Mule [Default 7777]:

Starting MMC, please wait...

  class com.sun.jersey.multipart.impl.MultiPartConfigProvider
  class com.sun.jersey.multipart.impl.MultiPartReader
  class com.sun.jersey.multipart.impl.MultiPartWriter
[11-13 16:49:19] WARN  HttpSessionSecurityContextRepository [http-bio-8585-exec-1]: Failed to create a session, as response has been committed. Unable to store SecurityContext.
[11-13 16:49:32] WARN  HttpMethodBase [http-bio-8585-exec-12]: Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended.
[11-13 16:49:38] WARN  HttpSessionSecurityContextRepository [http-bio-8585-exec-12]: Failed to create a session, as response has been committed. Unable to store SecurityContext.
Nov 13, 2014 4:49:50 PM org.apache.catalina.core.StandardServer await
INFO: A valid shutdown command was received via the shutdown port. Stopping the Server instance.
Nov 13, 2014 4:49:50 PM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["http-bio-8585"]

But notice it seems to be using 8585 for tomcat (of which I know little about, except it some sort of app server, never used it)

I examined this site:

http://www.mulesoft.org/documentation/display/33X/Running+Multiple+Mule+Instances

but it does nto discuss the issue., and the page it points do does not seem current. Did I misunderstand something

Is it possible to run two separate instances of Mule ESB at the same time

and if so, how ? (how would I change the port its using, what file should I modify)

Thanks


Edit: my second post in response to answer:

(BTW: I am using Mule ESB standalone Enterprise Edition 3.5.2)

To make sure I did not have any apps that were running on port 8585, I shutdown my original instance, and created two new instances, and made sure no apps were deployed to either instance.

I brought up the first instance without issue, but the second instance I brought up still gives me the port 8585 in use error (from startup.sh)

This site says that the MMC default port is 7777, but the tomcat default port on which it runs is 8585

http://www.mulesoft.org/documentation/display/current/Setting+Up+MMC-Mule+ESB+Communications

I used the following command to find all files within my second instance of por t 8585

find . -type f |xargs grep  "8585

Other than log files I got two hits

startup.sh

   and

/mmc-3.5.2-HF1/apache-tomcat-7.0.52/conf/server.xml

I did NOT find in either instance the $MULE_HOME/apps/mmc/mule-config.xml (probably because I have no apps deployed)

In the server.xml, the MMC apparently uses tomcat to handle the MMC applicaiton, and server.xml contains the following:

<Connector port="8585" protocol="HTTP/1.1"

So I guess I could change 8585 to 8586 at this point, but ...

The startup.sh has serveral (about 9 or 10) hardcode dreferences to 8585 to check that the MMC is running and take action if it is or is not running

So do I actually have to change the entire startup.sh to replace 8585 with 8586 i the second instance as well as change the server.xml port 8585 reference ?

Thanks

You can run as many instances as you want, as long they don't use the same ports. Looks like you are deploying something in port 8585, so in the second instance you have to select a different port. Is that port being used in any application that you developed and deployed in the Mule runtime?

Also, if you are using the Mule runtime with the MMC agent activated, you also have to change the port for the agent in the second instance. I think you can do that in the /conf/wrapper.conf or by passing to the startup script the following parameter:

-Dmule.mmc.bind.port=7778 

(or any port that is free).

You can run as many as you want. In MMC we can able to deploy and run many applications each applications has its own instance

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM