You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "Hanchers (via GitHub)" <gi...@apache.org> on 2024/01/11 12:06:00 UTC

[I] [Bug] 1fe1be docker start , report Same backend already exists error [doris]

Hanchers opened a new issue, #29880:
URL: https://github.com/apache/doris/issues/29880

   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no similar issues.
   
   
   ### Version
   
   2.0.3
   
   ### What's Wrong?
   
   我使用v2.0.3版本的[脚本](https://github.com/apache/doris/tree/release-2.0.3/docker/runtime) 制作了自己的docker 镜像,然后通过docker compose在本地部署,发现be重复注册fe时,会导致fe报Same backend already exists 的错误,然后导致be一直在重试。
   in english :
   
   I use the V2.0.3 version of the [script] (https://github.com/apache/doris/tree/release-2.0.3/docker/runtime) to make my own Docker image, and then deploy it locally by Docker Compose locally.
   When it is discovered that BE repeatedly registered FE, it will cause the FE to report the error of "Same Backend Alream Exists" , and then BE has been retrying regist .
   
   fe error:
   ```
   doris-fe  | 2024-01-11 11:32:40,464 INFO (colocate group clone checker|95) [ColocateTableCheckerAndBalancer.matchGroups():571] finished to check tablets. unhealth/total/added/in_sched/not_ready: 0/0/0/0/0, cost: 0 ms
   doris-fe  | 2024-01-11 11:32:40,545 INFO (tablet checker|41) [TabletChecker.checkTablets():331] finished to check tablets. unhealth/total/added/in_sched/not_ready: 0/0/0/0/0, cost: 1 ms
   doris-fe  | 2024-01-11 11:32:41,533 WARN (mysql-nio-pool-3|293) [StmtExecutor.handleDdlStmt():2224] DDL statement(alter system add backend '192.168.202.168:9050') process failed.
   doris-fe  | org.apache.doris.common.DdlException: errCode = 2, detailMessage = Same backend already exists[192.168.202.168:9050]
   doris-fe  | 	at org.apache.doris.system.SystemInfoService.addBackends(SystemInfoService.java:187) ~[doris-fe.jar:1.2-SNAPSHOT]
   doris-fe  | 	at org.apache.doris.alter.SystemHandler.process(SystemHandler.java:118) ~[doris-fe.jar:1.2-SNAPSHOT]
   doris-fe  | 	at org.apache.doris.alter.AlterHandler.process(AlterHandler.java:185) ~[doris-fe.jar:1.2-SNAPSHOT]
   doris-fe  | 	at org.apache.doris.alter.Alter.processAlterCluster(Alter.java:736) ~[doris-fe.jar:1.2-SNAPSHOT]
   doris-fe  | 	at org.apache.doris.catalog.Env.alterCluster(Env.java:4721) ~[doris-fe.jar:1.2-SNAPSHOT]
   doris-fe  | 	at org.apache.doris.qe.DdlExecutor.execute(DdlExecutor.java:205) ~[doris-fe.jar:1.2-SNAPSHOT]
   doris-fe  | 	at org.apache.doris.qe.StmtExecutor.handleDdlStmt(StmtExecutor.java:2215) ~[doris-fe.jar:1.2-SNAPSHOT]
   doris-fe  | 	at org.apache.doris.qe.StmtExecutor.executeByLegacy(StmtExecutor.java:763) ~[doris-fe.jar:1.2-SNAPSHOT]
   doris-fe  | 	at org.apache.doris.qe.StmtExecutor.execute(StmtExecutor.java:459) ~[doris-fe.jar:1.2-SNAPSHOT]
   doris-fe  | 	at org.apache.doris.qe.StmtExecutor.execute(StmtExecutor.java:429) ~[doris-fe.jar:1.2-SNAPSHOT]
   doris-fe  | 	at org.apache.doris.qe.ConnectProcessor.handleQuery(ConnectProcessor.java:435) ~[doris-fe.jar:1.2-SNAPSHOT]
   doris-fe  | 	at org.apache.doris.qe.ConnectProcessor.dispatch(ConnectProcessor.java:583) ~[doris-fe.jar:1.2-SNAPSHOT]
   doris-fe  | 	at org.apache.doris.qe.ConnectProcessor.processOnce(ConnectProcessor.java:834) ~[doris-fe.jar:1.2-SNAPSHOT]
   doris-fe  | 	at org.apache.doris.mysql.ReadListener.lambda$handleEvent$0(ReadListener.java:52) ~[doris-fe.jar:1.2-SNAPSHOT]
   doris-fe  | 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_342]
   doris-fe  | 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_342]
   doris-fe  | 	at java.lang.Thread.run(Thread.java:750) ~[?:1.8.0_342]
   doris-fe  | 2024-01-11 11:32:42,650 WARN (mysql-nio-pool-3|293) [StmtExecutor.handleDdlStmt():2224] DDL statement(alter system add backend '192.168.202.168:9050') process failed.
   doris-fe  | org.apache.doris.common.DdlException: errCode = 2, detailMessage = Same backend already exists[192.168.202.168:9050]
   doris-fe  | 	at org.apache.doris.system.SystemInfoService.addBackends(SystemInfoService.java:187) ~[doris-fe.jar:1.2-SNAPSHOT]
   doris-fe  | 	at org.apache.doris.alter.SystemHandler.process(SystemHandler.java:118) ~[doris-fe.jar:1.2-SNAPSHOT]
   doris-fe  | 	at org.apache.doris.alter.AlterHandler.process(AlterHandler.java:185) ~[doris-fe.jar:1.2-SNAPSHOT]
   doris-fe  | 	at org.apache.doris.alter.Alter.processAlterCluster(Alter.java:736) ~[doris-fe.jar:1.2-SNAPSHOT]
   doris-fe  | 	at org.apache.doris.catalog.Env.alterCluster(Env.java:4721) ~[doris-fe.jar:1.2-SNAPSHOT]
   doris-fe  | 	at org.apache.doris.qe.DdlExecutor.execute(DdlExecutor.java:205) ~[doris-fe.jar:1.2-SNAPSHOT]
   doris-fe  | 	at org.apache.doris.qe.StmtExecutor.handleDdlStmt(StmtExecutor.java:2215) ~[doris-fe.jar:1.2-SNAPSHOT]
   doris-fe  | 	at org.apache.doris.qe.StmtExecutor.executeByLegacy(StmtExecutor.java:763) ~[doris-fe.jar:1.2-SNAPSHOT]
   doris-fe  | 	at org.apache.doris.qe.StmtExecutor.execute(StmtExecutor.java:459) ~[doris-fe.jar:1.2-SNAPSHOT]
   doris-fe  | 	at org.apache.doris.qe.StmtExecutor.execute(StmtExecutor.java:429) ~[doris-fe.jar:1.2-SNAPSHOT]
   doris-fe  | 	at org.apache.doris.qe.ConnectProcessor.handleQuery(ConnectProcessor.java:435) ~[doris-fe.jar:1.2-SNAPSHOT]
   doris-fe  | 	at org.apache.doris.qe.ConnectProcessor.dispatch(ConnectProcessor.java:583) ~[doris-fe.jar:1.2-SNAPSHOT]
   doris-fe  | 	at org.apache.doris.qe.ConnectProcessor.processOnce(ConnectProcessor.java:834) ~[doris-fe.jar:1.2-SNAPSHOT]
   doris-fe  | 	at org.apache.doris.mysql.ReadListener.lambda$handleEvent$0(ReadListener.java:52) ~[doris-fe.jar:1.2-SNAPSHOT]
   doris-fe  | 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_342]
   doris-fe  | 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_342]
   doris-fe  | 	at java.lang.Thread.run(Thread.java:750) ~[?:1.8.0_342]
   doris-fe  | 2024-01-11 11:32:43,494 INFO (Thread-54|97) [InternalCatalog.createDb():420] create database[default_cluster:__internal_schema] which already exists
   ```
   be error
   ```
   oris-be  | 2024-01-11T11:32:19+00:00 [Warn] [Entrypoint]: FE_SERVERS fe1:192.168.202.168:9010
   doris-be  | 2024-01-11T11:32:19+00:00 [Warn] [Entrypoint]: BE_ADDR 192.168.202.168:9050
   doris-be  | 2024-01-11T11:32:19+00:00 [Note] [Entrypoint]: MASTER_FE_IP 192.168.202.168
   doris-be  | 2024-01-11T11:32:19+00:00 [Note] [Entrypoint]: CURRENT_BE_IP 192.168.202.168
   doris-be  | 2024-01-11T11:32:19+00:00 [Note] [Entrypoint]: CURRENT_BE_PORT 9050
   doris-be  | 2024-01-11T11:32:19+00:00 [Note] [Entrypoint]: PRIORITY_NETWORKS 192.168.202.0/24
   doris-be  | fe_e4e00a73_cb90_4754_add2_8f685a509bf6	192.168.202.168	9010	8030	9030	9020	FOLLOWER	true	610080311	true	true	829	2024-01-11 11:32:15	true		doris-2.0.3-rc06-37d31a5	Yes
   doris-be  | 2024-01-11T11:32:19+00:00 [Note] [Entrypoint]: MASTER FE is started!
   doris-be  | 2024-01-11T11:32:19+00:00 [Note] [Entrypoint]: add priority_networks 192.168.202.0/24 to /opt/apache-doris/be/conf/be.conf
   doris-be  | 2024-01-11T11:32:19+00:00 [Note] [Entrypoint]: this node role is mix
   doris-be  | 2024-01-11T11:32:19+00:00 [Note] [Entrypoint]: ============= init args ================
   doris-be  | 2024-01-11T11:32:19+00:00 [Note] [Entrypoint]: MASTER_FE_IP  192.168.202.168
   doris-be  | 2024-01-11T11:32:19+00:00 [Note] [Entrypoint]: CURRENT_BE_IP  192.168.202.168
   doris-be  | 2024-01-11T11:32:19+00:00 [Note] [Entrypoint]: CURRENT_BE_PORT  9050
   doris-be  | 2024-01-11T11:32:19+00:00 [Note] [Entrypoint]: BE is not register. retry.
   doris-be  | 2024-01-11T11:32:19+00:00 [Note] [Entrypoint]: RUN_TYPE  ELECTION
   doris-be  | 2024-01-11T11:32:19+00:00 [Note] [Entrypoint]: PRIORITY_NETWORKS  192.168.202.0/24
   doris-be  | 10022	192.168.202.168	9050	-1	-1	-1	NULL	NULL	false	false	0	0.000 	0.000 	1.000 B	0.000 	0.00 %	0.00 %	0.000 {"location" : "default"}	java.net.ConnectException: Connection refused (Connection refused)		{"lastStreamLoadTime":-1,"isQueryDisabled":false,"isLoadDisabled":false}	435
   doris-be  | 2024-01-11T11:32:19+00:00 [Note] [Entrypoint]: Verify that BE is registered to FE successfully
   doris-be  | 2024-01-11T11:32:19+00:00 [Note] [Entrypoint]: Register BE to FE is failed. retry.
   doris-be  | 10022	192.168.202.168	9050	-1	-1	-1	NULL	NULL	false	false	0	0.000 	0.000 	1.000 B	0.000 	0.00 %	0.00 %	0.000 {"location" : "default"}	java.net.ConnectException: Connection refused (Connection refused)		{"lastStreamLoadTime":-1,"isQueryDisabled":false,"isLoadDisabled":false}	436
   doris-be  | 2024-01-11T11:32:20+00:00 [Note] [Entrypoint]: Verify that BE is registered to FE successfully
   doris-be  | 2024-01-11T11:32:20+00:00 [Note] [Entrypoint]: Register BE to FE is failed. retry.
   doris-be  | 10022	192.168.202.168	9050	-1	-1	-1	NULL	NULL	false	false	0	0.000 	0.000 	1.000 B	0.000 	0.00 %	0.00 %	0.000 {"location" : "default"}	java.net.ConnectException: Connection refused (Connection refused)		{"lastStreamLoadTime":-1,"isQueryDisabled":false,"isLoadDisabled":false}	436
   ```
   
   
   my fe docker compse.yml 
   ```
   services:
     doris-fe:
       image: doris-fe-x64:2.0.3
       hostname: doris-fe
       container_name: doris-fe
       volumes:
         - /data/apache-doris/fe/doris-meta/:/opt/apache-doris/fe/doris-meta
         - /data/apache-doris/fe/log/:/opt/apache-doris/fe/log
         - ./conf/fe.conf:/opt/apache-doris/fe/conf/fe.conf
       environment:
         - FE_SERVERS=fe1:192.168.202.168:9010
         - FE_ID=1
       network_mode: host
   ```
   
   my be docker compse.yml 
   
   ```
   services:
     doris-be:
       image: doris-be-x64:2.0.3
       hostname: doris-be
       container_name: doris-be
       environment:
         - FE_SERVERS=fe1:192.168.202.168:9010
         - BE_ADDR=192.168.202.168:9050
       volumes:
         - /data/apache-doris/be/storage/:/opt/apache-doris/be/storage
         - /data/apache-doris/be/log/:/opt/apache-doris/be/log
         - ./conf/be.conf:/opt/apache-doris/be/conf/be.conf
       network_mode: host
   ```
   
   
   
   
   ### What You Expected?
   
   be can  repeat regist fe
   
   ### How to Reproduce?
   
   _No response_
   
   ### Anything Else?
   
   i will fix this problem. 
   and my idea is is if the address exists, skip and return that method.
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [I] [Bug] 1fe1be docker start , report Same backend already exists error [doris]

Posted by "morningman (via GitHub)" <gi...@apache.org>.
morningman closed issue #29880: [Bug] 1fe1be docker start , report Same backend already exists error
URL: https://github.com/apache/doris/issues/29880


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [I] [Bug] 1fe1be docker start , report Same backend already exists error [doris]

Posted by "ccoffline (via GitHub)" <gi...@apache.org>.
ccoffline commented on issue #29880:
URL: https://github.com/apache/doris/issues/29880#issuecomment-1891659080

   你的image是怎么构建的?应该是向FE执行了多次 `ALTER SYSTEM ADD BACKEND`,后续启动不应该再执行这个sql了。
   可以看看这个 [文档](https://doris.apache.org/zh-CN/docs/admin-manual/cluster-management/elastic-expansion)。
   PR是不合理的,FE在接受到重复添加BE请求时应该拒绝。


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [I] [Bug] 1fe1be docker start , report Same backend already exists error [doris]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #29880:
URL: https://github.com/apache/doris/issues/29880#issuecomment-3287227481

   We're closing this issue because it hasn't been updated in a while.
   If you'd like to revive this issue, please reopen it and feel free a maintainer to remove the Stale tag!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [I] [Bug] 1fe1be docker start , report Same backend already exists error [doris]

Posted by "Hanchers (via GitHub)" <gi...@apache.org>.
Hanchers commented on issue #29880:
URL: https://github.com/apache/doris/issues/29880#issuecomment-1905108697

   后续用github里的be的entry_point.sh 脚本可以了。
   但是我看了一下源码,还是没有找到为什么会导致重复向FE执行`ADD BACKEND`的原因。个人觉得,FE应该有一定的容错性,防止BE因为网络或宕机或其他原因导致重试的时候也能够注册成功。
   假设一种场景:
   FE已经启动成功。
   BE启动,开始向FE注册,但因为某些原因发送了两条注册消息。
   
   现在的情况是:
   第一条消息成功注册了BE,但是紧接着收到了第二条消息,然后报错返回异常,此时BE收到了异常(返回的晚),认为没有注册成功,继续重试,发生死循环。
   
   FE可以支持一定程度的重复注册的场景:
   第一条消息成功注册了BE,第二条注册消息到达的时候,发现已经注册成功了,直接丢弃消息,然后返回一个注册成功的信息。
   这种场景个人感觉会比第一种对集群来说更健壮一些。
   
   当然,因为我只看了相关的引用代码,没有全局性的认知,可能理解有些偏差,请指正。
   
   ps: 如果官方觉得不合理,这个pr和issue都可以关闭了。
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org