Client will not SASL-authenticate

Client will not SASL-authenticate


问题描述

  • 同事本地启动项目,控制台报错

[05-17 09:34:22,290] INFO [.170:2182)][] org.apache.zookeeper.ClientCnxn[933] - Opening socket connection to server xxx.xxx.xxx.xxx/xxx.xxx.xxx.xxx:2182
[05-17 09:34:22,290] INFO [.170:2182)][] o.a.z.client.ZooKeeperSaslClient[125] - Client will not SASL-authenticate because the default JAAS configuration section ‘Client’ could not be found. If you are not using SASL, you may ignore this. On the other hand, if you expected SASL to work, please fix your JAAS configuration.
[05-17 09:34:43,290] WARN [.170:2182)][] org.apache.zookeeper.ClientCnxn[1057] - 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) ~[na:1.7.0_80]
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:744) ~[na:1.7.0_80]
at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:286) ~[zookeeper-3.4.3.jar:3.4.3-1240972]
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1035) ~[zookeeper-3.4.3.jar:3.4.3-1240972]
[05-17 09:34:44,391] INFO [.170:2182)][] org.apache.zookeeper.ClientCnxn[933] - Opening socket connection to server xxx.xxx.xxx.xxx/xxx.xxx.xxx.xxx:2182
[05-17 09:34:44,392] INFO [.170:2182)][] o.a.z.client.ZooKeeperSaslClient[125] - Client will not SASL-authenticate because the default JAAS configuration section ‘Client’ could not be found. If you are not using SASL, you may ignore this. On the other hand, if you expected SASL to work, please fix your JAAS configuration.


问题分析

  • 从异常信息上看是获取连接失败了,百度的结果基本都是提示服务器上连接失败,但服务器稳定无运行异常
  • 是否连接地址配置错误?在自己的IDEA本地启动服务,无报错

问题解决

  • 地址配置错误,换成正确的地址后启动正常
  • 开发、测试环境的服务进行过迁移,迁移后第一次配置正确,但本地的配置文件信息修正后未上传到远程服务器,代码时Git管理,开发工具是IDEA,切换项目分支时,提示代码合并或提示Accept yours or Accept Theirs ,选择后覆盖了上次的修改内容,本次启动就出错了

心得体会

  • 忌:大惊小怪;看到问题百度结果是服务器连接不到,就认为是服务器问题;自己没有权限查看,就骚扰运维;最后却是连接不正常导致的;很尴尬啊,因为运维那边也很忙,还很肯定的说是服务出问题了
  • 益:全面分析问题,同事启动出问题,自己首先复现一下,若能复现,说明问题是公共的;若不能,说明问题是同事自身,检查配置文件

猜你喜欢

转载自blog.csdn.net/mingyundezuoan/article/details/80380918