您的位置:首页 > 编程语言 > Java开发

java开发问题汇总

2016-08-04 16:38 756 查看
1、导入程序后启动异常

java.net.ConnectException: Connection refused: no further information
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:574)
at net.spy.memcached.MemcachedConnection.handleIO(MemcachedConnection.java:322)
at net.spy.memcached.MemcachedConnection.handleIO(MemcachedConnection.java:219)
at net.spy.memcached.MemcachedClient.run(MemcachedClient.java:1591)
2016-08-04 16:08:38.455 WARN net.spy.memcached.MemcachedConnection:  Closing, and reopening {QA sa=/127.0.0.1:11211, #Rops=0, #Wops=0, #iq=0, topRop=null, topWop=null, toWrite=0, interested=0}, attempt 140.
2016-08-04 16:08:54.320 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}
2016-08-04 16:08:55.322 INFO net.spy.memcached.MemcachedConnection:  Connection state changed for sun.nio.ch.SelectionKeyImpl@934c3b
2016-08-04 16:08:55.322 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}


原因:没有安装前端的缓存服务,memcached.exe。具体为什么我还不清楚

安装步骤:1、找到符合自己电脑位数的memcached.exe

2、切换到memcached.exe文件夹下,在dos命令行输入memcached.exe -d install,没有提示则安装成功。

3、 安装的时候如果提示failed to install service or service already installed

猜想可能是权限问题,毕竟是要作为服务安装的嘛,于是将cmd.exe以管理员身份运行,成功了。

以管理员身份运行的方法是在C:/windows/system32/下找到cmd.exe,之后右键“以管理员身份运行”就好了。

4、启动服务

打开 开始-->管理工具-->服务,或者 运行-->services.msc来打开服务管理界面,前面的安装环节没有出现问题的话这里会多一个 Memcached Server服务。

点击启动此服务,或者命令行输入 net start "Memcached Server" 来启动memcached.

备注:命令行分别输入 memcached -d stop 和 net start "Memcached Server" 命令可以卸载已安装的memcached
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: