vertx-zookeeper icon indicating copy to clipboard operation
vertx-zookeeper copied to clipboard

org.apache.zookeeper.KeeperException$NoNodeException: KeeperErrorCode = NoNode for /io.vertx/syncMap/role_1071716/centerServerId

Open felix-laofan opened this issue 5 years ago • 4 comments

io.vertx.core.VertxException: io.vertx.core.VertxException: org.apache.zookeeper.KeeperException$NoNodeException: KeeperErrorCode = NoNode for /io.vertx/syncMap/role_1071716/centerServerId at io.vertx.spi.cluster.zookeeper.impl.ZKSyncMap.put(ZKSyncMap.java:114) at coolGame.hall.tcp.login.HallLoginMsgReqHandler.reCallGateway(HallLoginMsgReqHandler.java:595) at coolGame.hall.tcp.login.HallLoginMsgReqHandler.common(HallLoginMsgReqHandler.java:533) at coolGame.hall.tcp.login.HallLoginMsgReqHandler.login_channel_account(HallLoginMsgReqHandler.java:212) at coolGame.hall.tcp.login.HallLoginMsgReqHandler.process(HallLoginMsgReqHandler.java:101) at coolGame.core.process.TcpProcessUtil.process(TcpProcessUtil.java:108) at coolGame.core.vert.VertTask.execute(VertTask.java:29) at coolGame.core.exec.action.Action.run(Action.java:35) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: io.vertx.core.VertxException: org.apache.zookeeper.KeeperException$NoNodeException: KeeperErrorCode = NoNode for /io.vertx/syncMap/role_1071716/centerServerId at io.vertx.spi.cluster.zookeeper.impl.ZKSyncMap.get(ZKSyncMap.java:95) at io.vertx.spi.cluster.zookeeper.impl.ZKSyncMap.put(ZKSyncMap.java:107) ... 10 more Caused by: org.apache.zookeeper.KeeperException$NoNodeException: KeeperErrorCode = NoNode for /io.vertx/syncMap/role_1071716/centerServerId at org.apache.zookeeper.KeeperException.create(KeeperException.java:114) at org.apache.zookeeper.KeeperException.create(KeeperException.java:54) at org.apache.zookeeper.ZooKeeper.getData(ZooKeeper.java:1221) at org.apache.curator.framework.imps.GetDataBuilderImpl$4.call(GetDataBuilderImpl.java:310) at org.apache.curator.framework.imps.GetDataBuilderImpl$4.call(GetDataBuilderImpl.java:299) at org.apache.curator.RetryLoop.callWithRetry(RetryLoop.java:109) at org.apache.curator.framework.imps.GetDataBuilderImpl.pathInForeground(GetDataBuilderImpl.java:296) at org.apache.curator.framework.imps.GetDataBuilderImpl.forPath(GetDataBuilderImpl.java:287) at org.apache.curator.framework.imps.GetDataBuilderImpl.forPath(GetDataBuilderImpl.java:34) at io.vertx.spi.cluster.zookeeper.impl.ZKSyncMap.get(ZKSyncMap.java:90) ... 11 more ERROR - coolGame.hall.tcp.login.HallLoginMsgReqHandler.reCallGateway(HallLoginMsgReqHandler.java:607)^M io.vertx.core.VertxException: io.vertx.core.VertxException: org.apache.zookeeper.KeeperException$NoNodeException: KeeperErrorCode = NoNode for /io.vertx/syncMap/role_1071716/centerServerId

felix-laofan avatar Jun 26 '19 05:06 felix-laofan

my code is this; Map<Object, Object> roleMap = ZVertClusterManager.getInstance().getMgr() .getSyncMap(CoolGameMapKey.Role_Map_Key.getKey(role.getRid())); roleMap.put(VertShareMapKey.roleId, role.getRid()); roleMap.put(VertShareMapKey.sessionId, message.getSessionId()); int serverId = Config.getInt(Config.MY_SERVER_ID_KEY); int groupId = Config.getInt(Config.GROUP_ID); LogUtil.info("[%s][%s]",serverId,groupId); roleMap.put(VertShareMapKey.centerGroupId, groupId); roleMap.put(VertShareMapKey.centerServerId, serverId);

		// todo 此处如果有跨服战等功能。在登录时会通过redis检查数据
		roleMap.put(VertShareMapKey.sceneGroupId, groupId);
		roleMap.put(VertShareMapKey.sceneServerId, 501);

felix-laofan avatar Jun 26 '19 05:06 felix-laofan

when run on the "roleMap.put(VertShareMapKey.centerGroupId, groupId);" Exception

felix-laofan avatar Jun 26 '19 05:06 felix-laofan

Hi

SyncMap is not recommend in your business, AsyncMap is good for your.

BTW, that would be good to provide POC.

PS: I notice you are in China, so you could make connection with me ([email protected]) in Chinese.


Stream Liu [email protected]

On Jun 26, 2019, at 13:21, felix-laofan [email protected] wrote:

when run on the "roleMap.put(VertShareMapKey.centerGroupId, groupId);" Exception

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/vert-x3/vertx-zookeeper/issues/84?email_source=notifications&email_token=AACCWE5J6G36NTPBUIBXKM3P4L4EBA5CNFSM4H3ORMY2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYSLOJY#issuecomment-505722663, or mute the thread https://github.com/notifications/unsubscribe-auth/AACCWE6AB4IBZPKIYI4HRJTP4L4EBANCNFSM4H3ORMYQ.

stream-iori avatar Jun 26 '19 07:06 stream-iori

Need more completed code to confirm when Vertx Cluster been started.


Stream Liu [email protected]

On Jun 26, 2019, at 13:20, felix-laofan [email protected] wrote:

my code is this; Map<Object, Object> roleMap = ZVertClusterManager.getInstance().getMgr() .getSyncMap(CoolGameMapKey.Role_Map_Key.getKey(role.getRid())); roleMap.put(VertShareMapKey.roleId, role.getRid()); roleMap.put(VertShareMapKey.sessionId, message.getSessionId()); int serverId = Config.getInt(Config.MY_SERVER_ID_KEY); int groupId = Config.getInt(Config.GROUP_ID); LogUtil.info("[%s][%s]",serverId,groupId); roleMap.put(VertShareMapKey.centerGroupId, groupId); roleMap.put(VertShareMapKey.centerServerId, serverId);

  // todo 此处如果有跨服战等功能。在登录时会通过redis检查数据
  roleMap.put(VertShareMapKey.sceneGroupId, groupId);
  roleMap.put(VertShareMapKey.sceneServerId, 501);

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/vert-x3/vertx-zookeeper/issues/84?email_source=notifications&email_token=AACCWE7PDAJQTX3XN6NNCG3P4L4AXA5CNFSM4H3ORMY2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYSLNAQ#issuecomment-505722498, or mute the thread https://github.com/notifications/unsubscribe-auth/AACCWE3ZSVF43QUTIFRXXGLP4L4AXANCNFSM4H3ORMYQ.

stream-iori avatar Jun 26 '19 07:06 stream-iori