当前位置: 代码迷 >> J2EE >> JMS Connection refused,该怎么解决
  详细解决方案

JMS Connection refused,该怎么解决

热度:1283   发布时间:2016-04-17 23:35:28.0
JMS Connection refused
各位前辈,小弟有个项目中使用到了JMS(使用的是ActiveMQ),但是一启动Tomcat就报如下错误,实在在百度不到答案了,请教各位前辈指点一下,分数不是很多,tomcat用的7.0.55  jdk 1.6 ,做了数据源设置


2014-10-30 15:38:55 org.springframework.jms.listener.DefaultMessageListenerContainer refreshConnectionUntilSuccessful
严重: Could not refresh JMS Connection for destination 'ActiveMQ.Adversory.Position' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://127.0.0.1:61616. Reason: java.net.ConnectException: Connection refused: connect2014-10-30 15:38:56 org.springframework.jms.listener.DefaultMessageListenerContainer refreshConnectionUntilSuccessful
严重: Could not refresh JMS Connection for destination 'ActiveMQ.Adversory.AlarmCurrent' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://127.0.0.1:61616. Reason: java.net.ConnectException: Connection refused: connect
2014-10-30 15:38:57 org.springframework.jms.listener.DefaultMessageListenerContainer refreshConnectionUntilSuccessful

严重: Could not refresh JMS Connection for destination 'ActiveMQ.Adversory.MachineInformation' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://127.0.0.1:61616. Reason: java.net.ConnectException: Connection refused: connect
2014-10-30 15:38:58 org.springframework.jms.listener.DefaultMessageListenerContainer refreshConnectionUntilSuccessful

严重: Could not refresh JMS Connection for destination 'ActiveMQ.Adversory.Time' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://127.0.0.1:61616. Reason: java.net.ConnectException: Connection refused: connect
2014-10-30 15:38:59 org.springframework.jms.listener.DefaultMessageListenerContainer refreshConnectionUntilSuccessful

严重: Could not refresh JMS Connection for destination 'ActiveMQ.Adversory.PartCount' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://127.0.0.1:61616. Reason: java.net.ConnectException: Connection refused: connect
2014-10-30 15:39:00 org.springframework.jms.listener.DefaultMessageListenerContainer refreshConnectionUntilSuccessful

严重: Could not refresh JMS Connection for destination 'ActiveMQ.Adversory.MachineStatus' - retrying in 5000 ms. Cause: Could not connect to broker URL: tcp://127.0.0.1:61616. Reason: java.net.ConnectException: Connection refused: connect


属性文件配置:
###########ActiveMQ配置中心###########
##中间服务器URL
brokerURL=tcp://127.0.0.1:61616
##session缓存个数
sessionCacheSize=100


关于错误信息中的几个类配置:
<jms:listener-container destination-type="topic">
<jms:listener destination="ActiveMQ.Adversory.MachineInformation"           ref="machineInformationListener" />
<jms:listener destination="ActiveMQ.Adversory.Time" ref="timeListener" />
<jms:listener destination="ActiveMQ.Adversory.PartCount" ref="partCountListener" />
<jms:listener destination="ActiveMQ.Adversory.MachineStatus" ref="machineStatusListener" />
<jms:listener destination="ActiveMQ.Adversory.Position" ref="positionListener" />
<jms:listener destination="ActiveMQ.Adversory.AlarmCurrent" ref="alarmCurrentListener" />
<!-- <jms:listener destination="AlarmHistory" ref="alarmHistoryListener" /> -->
</jms:listener-container>
------解决思路----------------------
连接不上,你可以先检查下mq服务端运行是否正常
------解决思路----------------------
没有服务端怎么连接?

127.0.0.1:61616 这应该是服务端的地址 

查查这个端口是否有进程
  相关解决方案