memcached连接问题java.net.ConnectException: Connection refused: no further information

一身正气 发布于 2013/12/12 11:29
阅读 40K+
收藏 0

这个是我运行showcase的时候遇到的,根据文档eclipse导入了showcase,修改数据库连接信息后,运行项目,能运行,但是出现下面这个错误,对于这个memcached还不是很熟悉,请问怎么修改配置才能消除这个错误?

mecached配置:memcached.url=localhost:11211

<bean id="spyMemcachedClient" class="org.springside.modules.cache.memcached.SpyMemcachedClient">
<property name="memcachedClient">
<bean class="net.spy.memcached.spring.MemcachedClientFactoryBean">
<property name="servers" value="${memcached.url}" />
<!-- 默认是TEXT -->
<property name="protocol" value="TEXT" />
<!-- 默认是ARRAY_MOD -->
<property name="locatorType" value="CONSISTENT" />
<!-- 默认是2500毫秒 -->
<property name="opTimeout" value="1000" />
</bean>
</property>
<property name="updateTimeout" value="1000"/>
<property name="shutdownTimeout" value="1000"/>
</bean>


<beans profile="development,functional,test">
<!-- 演示用的JMemcached, 模拟Memcached服务器 -->
<bean id="memcachedSimulator" class="org.springside.modules.test.cache.memcached.MemcachedSimulator" lazy-init="false">
<property name="serverUrl" value="${memcached.url}" />
</bean>
</beans>

报错信息如下:

2013-12-12 11:25:51.973 WARN net.spy.memcached.MemcachedConnection:  Closing, and reopening {QA sa=localhost/127.0.0.1:11211, #Rops=0, #Wops=0, #iq=0, topRop=null, topWop=null, toWrite=0, interested=0}, attempt 3.

2013-12-12 11:26:07.974 INFO net.spy.memcached.MemcachedConnection:  Reconnecting {QA sa=localhost/127.0.0.1:11211, #Rops=0, #Wops=0, #iq=0, topRop=null, topWop=null, toWrite=0, interested=0}
2013-12-12 11:26:08.981 INFO net.spy.memcached.MemcachedConnection:  Connection state changed for sun.nio.ch.SelectionKeyImpl@17a53be
2013-12-12 11:26:08.982 INFO net.spy.memcached.MemcachedConnection:  Reconnecting due to failure to connect to {QA sa=localhost/127.0.0.1:11211, #Rops=0, #Wops=0, #iq=0, topRop=null, topWop=null, toWrite=0, interested=0}
java.net.ConnectException: Connection refused: no further information
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(Unknown Source)
at net.spy.memcached.MemcachedConnection.handleIO(MemcachedConnection.java:485)
at net.spy.memcached.MemcachedConnection.handleIO(MemcachedConnection.java:322)
at net.spy.memcached.MemcachedConnection.run(MemcachedConnection.java:1047)
加载中
0
quyf
quyf
看下telnet 127.0.0.1  11211 能否上去
0
quyf
quyf
造成问题的原因可能也有很多种,看具体环境
0
一身正气
一身正气

引用来自“quyf”的答案

造成问题的原因可能也有很多种,看具体环境

还有啊,springside运行之前是不是要把core,exception,parent都要install一次?

maven-enforcer-plugin (goal "enforce") is ignored by m2e.

pom文件有这个警告。

除了以上问题,那个端口的确是连接不到。

返回顶部
顶部