0

我正在尝试在 Windows 7(java 1.7.0_71)上启动 wso2mb,当我尝试(在本地)运行命令时:

wso2server.bat --run

我收到以下错误:

[2016-09-02 12:53:09,162] ERROR {org.wso2.andes.server.Main} -  Exception during startup. Triggering shutdown
org.wso2.andes.kernel.AndesException: Unable to initialise application registry
    at org.wso2.andes.server.Broker.startupImpl(Broker.java:308)
    at org.wso2.andes.server.Broker.startup(Broker.java:110)
    at org.wso2.andes.server.Main.startBroker(Main.java:217)
    at org.wso2.andes.server.Main.execute(Main.java:206)
    at org.wso2.andes.server.Main.<init>(Main.java:54)
    at org.wso2.andes.server.Main.main(Main.java:47)
    at org.wso2.carbon.andes.internal.QpidServiceComponent.startAndesBroker(
QpidServiceComponent.java:391)
    at org.wso2.carbon.andes.internal.QpidServiceComponent.activate(QpidServ
iceComponent.java:155)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.eclipse.equinox.internal.ds.model.ServiceComponent.activate(Servi
ceComponent.java:260)
    at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.activate(S
erviceComponentProp.java:146)
    at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(Serv
iceComponentProp.java:345)
    at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(Instan
ceProcess.java:620)
    at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(Insta
nceProcess.java:197)
    at org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:34
3)
    at org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SCRManager.
java:222)
    at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.ser
viceChanged(FilteredServiceListener.java:107)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEv
ent(BundleContextImpl.java:861)
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventM
anager.java:230)
    at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchr
onous(ListenerQueue.java:148)
    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServ
iceEventPrivileged(ServiceRegistry.java:819)
    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServ
iceEvent(ServiceRegistry.java:771)
    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.reg
ister(ServiceRegistrationImpl.java:130)
    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerSer
vice(ServiceRegistry.java:214)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerSe
rvice(BundleContextImpl.java:433)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerSe
rvice(BundleContextImpl.java:451)
    at org.wso2.carbon.server.admin.internal.ServerAdminServiceComponent.act
ivate(ServerAdminServiceComponent.java:106)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.eclipse.equinox.internal.ds.model.ServiceComponent.activate(Servi
ceComponent.java:260)
    at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.activate(S
erviceComponentProp.java:146)
    at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(Serv
iceComponentProp.java:345)
    at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(Instan
ceProcess.java:620)
    at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(Insta
nceProcess.java:197)
    at org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:34
3)
    at org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SCRManager.
java:222)
    at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.ser
viceChanged(FilteredServiceListener.java:107)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEv
ent(BundleContextImpl.java:861)
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventM
anager.java:230)
    at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchr
onous(ListenerQueue.java:148)
    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServ
iceEventPrivileged(ServiceRegistry.java:819)
     at           org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServ
iceEvent(ServiceRegistry.java:771)
    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.reg
ister(ServiceRegistrationImpl.java:130)
    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerSer
vice(ServiceRegistry.java:214)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerSe
rvice(BundleContextImpl.java:433)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerSe
rvice(BundleContextImpl.java:451)
    at org.wso2.carbon.core.init.CarbonServerManager.initializeCarbon(Carbon
ServerManager.java:514)
    at org.wso2.carbon.core.init.CarbonServerManager.start(CarbonServerManag
er.java:219)
    at org.wso2.carbon.core.internal.CarbonCoreServiceComponent.activate(Car
bonCoreServiceComponent.java:94)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.eclipse.equinox.internal.ds.model.ServiceComponent.activate(Servi
ceComponent.java:260)
    at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.activate(S
erviceComponentProp.java:146)
    at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(Serv
iceComponentProp.java:345)
    at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(Instan
ceProcess.java:620)
    at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(Insta
nceProcess.java:197)
    at org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:34
3)
    at org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SCRManager.
java:222)
    at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.ser
viceChanged(FilteredServiceListener.java:107)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEv
ent(BundleContextImpl.java:861)
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventM
anager.java:230)
    at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchr
onous(ListenerQueue.java:148)
    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServ
iceEventPrivileged(ServiceRegistry.java:819)
    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServ
iceEvent(ServiceRegistry.java:771)
    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.reg
ister(ServiceRegistrationImpl.java:130)
    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerSer
vice(ServiceRegistry.java:214)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerSe
rvice(BundleContextImpl.java:433)
    at org.eclipse.equinox.http.servlet.internal.Activator.registerHttpServi
ce(Activator.java:81)
    at org.eclipse.equinox.http.servlet.internal.Activator.addProxyServlet(A
ctivator.java:60)
    at org.eclipse.equinox.http.servlet.internal.ProxyServlet.init(ProxyServ
let.java:40)
    at org.wso2.carbon.tomcat.ext.servlet.DelegationServlet.init(DelegationS
ervlet.java:38)
    at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.
java:1284)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.
java:1197)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:10
87)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContex
t.java:5262)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContex
t.java:5550)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.
java:1575)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.
java:1565)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.
java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:615)
    at java.lang.Thread.run(Thread.java:745)
Caused by: org.wso2.andes.transport.TransportException: Could not bind to     /0.0.0
.0:5672
    at org.wso2.andes.transport.network.mina.MinaNetworkTransport.accept(Min
aNetworkTransport.java:147)
    at org.wso2.andes.server.Broker.startAMQPListener(Broker.java:201)
    at org.wso2.andes.server.Broker.startupImpl(Broker.java:295)
    ... 89 more
Caused by: java.net.BindException: Address already in use: bind
    at sun.nio.ch.Net.bind0(Native Method)
    at sun.nio.ch.Net.bind(Net.java:444)
    at sun.nio.ch.Net.bind(Net.java:436)
    at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:
214)
    at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
    at org.apache.mina.transport.socket.nio.SocketAcceptor.registerNew(Socke
tAcceptor.java:363)
    at org.apache.mina.transport.socket.nio.SocketAcceptor.access$800(Socket
Acceptor.java:55)
    at org.apache.mina.transport.socket.nio.SocketAcceptor$Worker.run(Socket
Acceptor.java:222)
    at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnabl
e.java:51)
    ... 1 more
[2016-09-02 12:53:09,184]  INFO     {org.wso2.andes.server.registry.ApplicationRegis
try} -  Shutting down     ApplicationRegistry(org.wso2.andes.server.registry.Configu
rationFileApplicationRegistry@517d5720)
[2016-09-02 12:53:09,189]  INFO     {org.wso2.andes.server.registry.ApplicationRegis
try} -  Shutting down   ApplicationRegistry:org.wso2.andes.server.registry.Configu
rationFileApplicationRegistry@517d5720
[2016-09-02 12:53:09,192]  INFO {org.wso2.andes.server.security.auth.manager.Pri
ncipalDatabaseAuthenticationManager} -  Unregistering UserManagementMBean
[2016-09-02 12:53:09,194]  INFO {org.wso2.carbon.core.init.CarbonServerManager}
-  Shutdown hook triggered....
[2016-09-02 12:53:09,195]  INFO {org.wso2.carbon.core.init.CarbonServerManager}
-  Gracefully shutting down WSO2 Message Broker...
[2016-09-02 12:53:09,196]  INFO {org.wso2.carbon.core.ServerManagement} -    Starting to switch to maintenance mode...
[2016-09-02 12:53:09,197]  INFO {org.wso2.carbon.core.ServerManagement} -      Stopped all transport listeners
[2016-09-02 12:53:09,197]  INFO {org.wso2.carbon.core.ServerManagement} -  Waiting for request service completion...
[2016-09-02 12:53:09,199]  INFO {org.wso2.carbon.core.ServerManagement} -  All requests have been served.
[2016-09-02 12:53:09,199]  INFO {org.wso2.carbon.core.ServerManagement} -  Waiting for deployment completion...
[2016-09-02 12:53:09,200]  INFO {org.wso2.carbon.core.ServerManagement} -     All deployment tasks have been completed.
[2016-09-02 12:53:09,200]  INFO {org.wso2.carbon.core.ServerManagement} -     Waiting for server task completion...
[2016-09-02 12:53:11,314]  INFO {org.wso2.carbon.registry.indexing.solr.SolrClient} -  Default Embedded Solr   Server Initialized
[2016-09-02 12:53:11,315]  INFO {org.wso2.carbon.core.ServerManagement} -  All server tasks have been completed.
[2016-09-02 12:53:11,315]  INFO {org.wso2.carbon.core.init.CarbonServerManager}
-  Shutting down WSO2 Message Broker...
[2016-09-02 12:53:11,317]  INFO {org.wso2.carbon.core.init.CarbonServerManager}
-  Shutting down OSGi framework...

它在http://mail.wso2.org/mailarchive/dev/2016-May/062810.html中说这可能是一个配置问题(我使用的是默认设置),但我检查了 https://docs .wso2.com/display/CLUSTER44x/Configuring+the+Broker+Nodes文件看起来正确。另外,我在https://github.com/wso2/puppet-modules/blob/master/modules/wso2mb/templates/3.1.0/repository/conf/broker.xml.erb#L37中复制了代理 xml 的代码,但是它无法解析第 37 行中的 xml (<%= @mb_thrift_server %>)

问题是我刚刚下载了 wso2mq 并且我无法启动该服务器,并且令人失望的是它仅尝试启动服务器就失败了。

提前致谢

4

1 回答 1

0

似乎端口 5672 已被使用。您可以通过发出以下命令来检查它。

netstat -a -n -o | find "5672"

如果它被其他程序使用,您可以停止它或将位于 broker.xml 中的 amqp 端口从 5672 更改为空闲端口。

于 2016-09-06T01:59:37.763 回答