Unable to read additional data from server sessionid 0x0

今天在本机安装了三个zookeeper,分别为server1,server2,server3。

tickTime=2000

initLimit=5  

syncLimit=2  

dataDir=/Users/google/Work/Program/zookeeper/server1/zookeeper-3.4.6/data

dataLogDir=/Users/google/Work/Program/zookeeper/server1/zookeeper-3.4.6/logs

clientPort=4080  

server.1=127.0.0.1:9991:7770  

server.2=127.0.0.1:9992:7771  

server.3=127.0.0.1:9993:7772  

然后启动了server3的zkServer.sh,用server1的zkCli.sh去连接,结果报了如下错误:

2015-05-25 18:06:21,667 [myid:] - INFO  [main-SendThread(127.0.0.1:4083):[email protected]] - Opening socket connection to server 127.0.0.1/127.0.0.1:4083. Will not attempt to authenticate using SASL (java.lang.SecurityException: ?????λ??¼????)
JLine support is enabled
2015-05-25 18:06:21,678 [myid:] - INFO  [main-SendThread(127.0.0.1:4083):[email protected]] - Socket connection established to 127.0.0.1/127.0.0.1:4083, initiating session
2015-05-25 18:06:21,690 [myid:] - INFO  [main-SendThread(127.0.0.1:4083):[email protected]] - Unable to read additional data from server sessionid 0x0, likely server has closed socket, closing socket connection and attempting reconnect
[zk: 127.0.0.1:4083(CONNECTING) 0] 2015-05-25 18:06:23,045 [myid:] - INFO  [main-SendThread(127.0.0.1:4083):[email protected]] - Opening socket connection to server 127.0.0.1/127.0.0.1:4083. Will not attempt to authenticate using SASL (java.lang.SecurityException: ?????λ??¼????)
2015-05-25 18:06:23,047 [myid:] - INFO  [main-SendThread(127.0.0.1:4083):[email protected]] - Socket connection established to 127.0.0.1/127.0.0.1:4083, initiating session
2015-05-25 18:06:23,048 [myid:] - INFO  [main-SendThread(127.0.0.1:4083):[email protected]] - Unable to read additional data from server sessionid 0x0, likely server has closed socket, closing socket connection and attempting reconnect
2015-05-25 18:06:24,521 [myid:] - INFO  [main-SendThread(127.0.0.1:4083):[email protected]] - Opening socket connection to server 127.0.0.1/127.0.0.1:4083. Will not attempt to authenticate using SASL (java.lang.SecurityException: ?????λ??¼????)
2015-05-25 18:06:24,522 [myid:] - INFO  [main-SendThread(127.0.0.1:4083):[email protected]] - Socket connection established to 127.0.0.1/127.0.0.1:4083, initiating session
2015-05-25 18:06:24,523 [myid:] - INFO  [main-SendThread(127.0.0.1:4083):[email protected]] - Unable to read additional data from server sessionid 0x0, likely server has closed socket, closing socket connection and attempting reconnect
2015-05-25 18:06:25,942 [myid:] - INFO  [main-SendThread(127.0.0.1:4083):[email protected]] - Opening socket connection to server 127.0.0.1/127.0.0.1:4083. Will not attempt to authenticate using SASL (java.lang.SecurityException: ?????λ??¼????)
2015-05-25 18:06:25,943 [myid:] - INFO  [main-SendThread(127.0.0.1:4083):[email protected]] - Socket connection established to 127.0.0.1/127.0.0.1:4083, initiating session
2015-05-25 18:06:25,944 [myid:] - INFO  [main-SendThread(127.0.0.1:4083):[email protected]] - Unable to read additional data from server sessionid 0x0, likely server has closed socket, closing socket connection and attempting reconnect
2015-05-25 18:06:27,717 [myid:] - INFO  [main-SendThread(127.0.0.1:4083):[email protected]] - Opening socket connection to server 127.0.0.1/127.0.0.1:4083. Will not attempt to authenticate using SASL (java.lang.SecurityException: ?????λ??¼????)
2015-05-25 18:06:27,717 [myid:] - INFO  [main-SendThread(127.0.0.1:4083):[email protected]] - Socket connection established to 127.0.0.1/127.0.0.1:4083, initiating session
2015-05-25 18:06:27,718 [myid:] - INFO  [main-SendThread(127.0.0.1:4083):[email protected]] - Unable to read additional data from server sessionid 0x0, likely server has closed socket, closing socket connection and attempting reconnect
2015-05-25 18:06:29,608 [myid:] - INFO  [main-SendThread(127.0.0.1:4083):[email protected]] - Opening socket connection to server 127.0.0.1/127.0.0.1:4083. Will not attempt to authenticate using SASL (java.lang.SecurityException: ?????λ??¼????)
2015-05-25 18:06:29,609 [myid:] - INFO  [main-SendThread(127.0.0.1:4083):[email protected]] - Socket connection established to 127.0.0.1/127.0.0.1:4083, initiating session
2015-05-25 18:06:29,610 [myid:] - INFO  [main-SendThread(127.0.0.1:4083):[email protected]] - Unable to read additional data from server sessionid 0x0, likely server has closed socket, closing socket connection and attempting reconnect
2015-05-25 18:06:31,561 [myid:] - INFO  [main-SendThread(127.0.0.1:4083):[email protected]] - Opening socket connection to server 127.0.0.1/127.0.0.1:4083. Will not attempt to authenticate using SASL (java.lang.SecurityException: ?????λ??¼????)

后来才搞明白,由于我在zoo.cfg中配置了3台机器,但是只启动了1台,zookeeper就会认为服务处于不可用状态。

zookeeper有个选举算法,当整个集群超过半数机器宕机,zookeeper会认为集群处于不可用状态。

所有,3台机器只启动一台无法连接,如果启动2台及以上就可以连接了。

时间: 2024-10-11 04:50:53

Unable to read additional data from server sessionid 0x0的相关文章

zook 报错 Unable to read additional data from server sessionid 0x0

zook报错启动报错: 2017-09-25 18:33:46,913 - INFO  [main-SendThread(localhost:2181):[email protected]] - Unable to read additional data from server sessionid 0x0, likely server has closed socket, closing socket connection and attempting reconnect ~~~~~~~~~~

zookeeper报Unable to read additional data from server sessionid 0x0, likely server has closed socket, closing socket connection and attempting reconnect的解决

现象 服务器连不上,kafka报connection refused 测试发现kafka某台node(xx)的问题,登录上去也各种错误,zkServer.sh restart可以完成,但status报连不上.报错比较迷惑人,打开java log看到其他错误: [myid:3] - INFO [ListenerThread:[email protected]534] - My election bind port: /yy:3888 java.net.BindException: Cannot a

Zookeeper:Unable to read additional data from client sessionid 0x00, likely client has closed socket

异常信息: 2018-03-20 23:34:01,887 [myid:99] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:[email protected]] - Accepted socket connection from /10.121.82.229:33749 2018-03-20 23:34:01,887 [myid:99] - WARN [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:[e

【hbase】Unable to read additional data from client sessionid 0x15c92bd1fca0003, likely client has closed socket

启动hbase ,验证出错 Master is initializing 查看zk日志,发现Unable to read additional data from client sessionid 0x15c92bd1fca0003, likely client has closed socket

Unable to verify your data submission错误解决

如果不用Yii2提供的ActiveForm组件生成表单,而是自定义表单,那么当你提交表单的时候就会报这个错误 Unable to verify your data submission 这是因为Web网页访问的时候form表单中会有对应的一个隐藏input:_csrf进行了验证才可以正常进行访问:而非网页访问方式(不通过Web表单)是无法通过csrf验证的. 上述可以通过查看源代码发现有一个name=_csrf的hidden. 可以在所在控制器设置$enableCsrfValidation=fa

[Yii2]Unable to verify your data submission(你提交的资料无法被验证)

Yii2中,使用form提交数据,会提示: [yii\web\HttpException:400] exception 'yii\web\BadRequestHttpException' with message '您提交的資料無法被驗證.'的错误信息. 我尝试在form中添加 <?= Html::csrfMetaTags() ?> 错误依旧. 尝试在控制器中添加 public $enableCsrfValidation = false; 就可以了. 参考连接: Why get Unable

yii2 表单提交 出现Unable to verify your data submission 错误

yii2 开发 手写 form 表单, 没有使用 yii 自带的部件, 提交的时候出现错误: Unable to verify your data submission 原因: 由于 yii2 内部防止 CSRF 攻击,内部有 检测机制. 解决方案: 方案1.在对应的控制器中添加 :    public $enableCsrfValidation=false; 不建议这么做:安全性着想: 方案2.在表单中 添加 此隐藏 列: <input type="hidden" name=&

yii框架post提交遇到400 (Unable to verify your data submission. )

第一种解决办法是关闭Csrf public function init(){ $this->enableCsrfValidation = false; } 第二种解决办法是在form表单中加入隐藏域 <input name="_csrf" type="hidden" id="_csrf" value="<?= Yii::$app->request->csrfToken ?>"> 第三种

Yii2 Unable to verify your data submission

出现这种错误第一时间是怀疑CSRF没有填写的原因,不建议网上所说的关闭csrf,这存在安全隐患,于是直接在表单填写<input type="hidden" name="_csrf" id='csrf' value="<?= Yii::$app->request->csrfToken ?>"> 重新提交以下,还是同样的问题,于是追踪源码,发现name的名称有误,我使用的是yii2的高级后台模板,准确的name名称