简体   繁体   English

Mule ESB:是否可以启动Mule ESB的2个实例

[英]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: 我创建了两个独立的目录,我在其中安装了Standalone Mule ESB服务器:

/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 显然,端口8585正在被原始实体使用

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) 但请注意,它似乎是使用8585 for tomcat(其中我知之甚少,除了某种app服务器,从未使用它)

I examined this site: 我检查了这个网站:

http://www.mulesoft.org/documentation/display/33X/Running+Multiple+Mule+Instances 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 是否可以同时运行两个单独的Mule ESB实例

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) (顺便说一句:我使用的是Mule ESB独立企业版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. 为了确保我没有在端口8585上运行的任何应用程序,我关闭了我的原始实例,并创建了两个新实例,并确保没有应用程序部署到任一实例。

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) 我提出第一个没有问题的实例,但我提出的第二个实例仍然给我端口8585使用错误(来自startup.sh)

This site says that the MMC default port is 7777, but the tomcat default port on which it runs is 8585 此站点表示MMC默认端口为7777,但运行它的tomcat默认端口为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 我使用以下命令查找我的第二个实例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) 我在任何一个实例中都找不到$ MULE_HOME / apps / mmc / mule-config.xml(可能是因为我没有部署应用程序)

In the server.xml, the MMC apparently uses tomcat to handle the MMC applicaiton, and server.xml contains the following: 在server.xml中,MMC显然使用tomcat来处理MMC应用程序,server.xml包含以下内容:

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

So I guess I could change 8585 to 8586 at this point, but ... 所以我想我现在可以将8585改为8586,但......

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 startup.sh有多个(大约9或10个)硬编码引用到8585以检查MMC是否正在运行并在运行或未运行时采取措施

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 ? 那么我实际上是否需要更改整个startup.sh以将8585替换为第二个实例8586,以及更改server.xml端口8585引用?

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. 看起来你在端口8585中部署了一些东西,所以在第二个实例中你必须选择一个不同的端口。 Is that port being used in any application that you developed and deployed in the Mule runtime? 该端口是否在您在Mule运行时中开发和部署的任何应用程序中使用?

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. 此外,如果您在激活MMC代理程序时使用Mule运行时,则还必须在第二个实例中更改代理程序的端口。 I think you can do that in the /conf/wrapper.conf or by passing to the startup script the following parameter: 我想你可以在/conf/wrapper.conf中这样做,或者通过向启动脚本传递以下参数:

-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 在MMC中,我们可以部署和运行许多应用程序,每个应用程序都有自己的实例

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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