Failed to start jmx connector: Cannot bind to URL[rmi://localhost:1099/jmxrmi]

 INFO  ActiveMQ JMS Message Broker (localhost, ID:cnshawlt1129-1495-1316140863881-0:0) started
INFO  Connector vm://localhost Started
 WARN  Failed to start jmx connector: Cannot bind to URL [rmi://localhost:1099/jmxrmi]: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
 java.net.ConnectException: Connection refused: connect]

 

 

Xml代码 
1. <bean id="broker" class="org.apache.activemq.xbean.BrokerFactoryBean"> 
2.   <property name="config" value="classpath:org/apache/activemq/xbean/activemq.xml" /> 
3.   <property name="start" value="true" /> 
4. </bean> 
5.  
6. <bean id="connectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory" depends-on="broker"> 
7.   <property name="brokerURL" value="vm://localhost"/> 
8. </bean> 
   如果persistent是true,那么ActiveMQ会在当前目录下创建一个缺省值是activemq-data的目录用于持久化保存数据。需要注意的是,如果程序中启动了多个不同名字的VM broker,那么可能会有如下警告:Failed to start jmx connector: Cannot bind to URL [rmi://localhost:1099/jmxrmi]: javax.naming.NameAlreadyBoundException…可以通过在transportOptions中追加 broker.useJmx=false来禁用JMX来避免这个警告

2.2.2 TCP Transport
TCP transport 允许客户端通过TCP socket连接到远程的broker。以下是配置语法:
tcp://hostname:port?transportOptions
Transport Options的可选值如下:

Option NameDefault ValueDescription
minmumWireFormatVersion0The minimum version wireformat that is allowed
tracefalseCauses all commands that are sent over the transport to be logged
useLocalHosttrueWhen true, it causes the local machines name to resolve to “localhost”.
socketBufferSize64 * 1024Sets the socket buffer size in bytes
soTimeout0sets the socket timeout in milliseconds
connectionTimeout30000A non-zero value specifies the connection timeout in milliseconds. A zero value means wait forever for the connection to be established. Negative values are ignored.
wireFormatdefaultThe name of the WireFormat to use
wireFormat.* All the properties with this prefix are used to configure the wireFormat. See Configuring Wire Formats for more information

例如:tcp://localhost:61616?trace=false

 

source:http://www.goldenbug.net/tag/java/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

[shenhonglei]

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值