Opening socket connection to server 192.168.153.12/192.168.153.12:2181.Will not attempt to authentic

通过zookeeper搭建dubbo注册中心遇到的问题

在linux下安装,配置并启动zookeeper。

在window环境下启动服务提供方时,未成功启动,报以下错误:

Opening socket connection to server 192.168.153.128/192.168.153.128:2181.Will not attempt to authentic

2017-03-02 19:52:32,270 INFO [org.apache.zookeeper.ZooKeeper] - Initiating client connection, connectString=192.168.153.128:2181 sessionTimeout=30000 watcher=org.I0Itec.zkclient.ZkClient@1d6ba2b
2017-03-02 19:52:32,288 INFO [org.apache.zookeeper.ClientCnxn] - Opening socket connection to server 192.168.153.128/192.168.153.128:2181. Will not attempt to authenticate using SASL (unknown error)
2017-03-02 19:52:53,291 WARN [org.apache.zookeeper.ClientCnxn] - Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection timed out: no further information
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
    at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361)
    at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1081)
2017-03-02 19:52:54,394 INFO [org.apache.zookeeper.ClientCnxn] - Opening socket connection to server 192.168.153.128/192.168.153.128:2181. Will not attempt to authenticate using SASL (unknown error)

检查之后发现两个问题:

1.  zookeeper的服务没有开启

    执行./zkServer.sh start

2.  访问不到zookeeper中心是因为   需要关闭防火墙:service iptables stop 否则访问不到2181端口

 

 

 

连接数据库时报错信息如下: Unknown system variable 'language'

上网查了问题大部分都说是jdbc驱动和mysql版本不匹配,于是将maven中mysql的版本调整

mysql-connector-java的jar包不匹配,原来是mysql-connector-java-5.1.36.jar,换成mysql-connector-java-5.1.6.jar之后连接成功

你可能感兴趣的:(Zookeeper)