This is an automated email from the ASF dual-hosted git repository. morningman pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push: new 4c40b4eb88a [Fix](case) Ensure Kerberos starts after other components (#46361) 4c40b4eb88a is described below commit 4c40b4eb88acec8e4d16ecd039eb30457cffead4 Author: Calvin Kirs <guoqi...@selectdb.com> AuthorDate: Sun Jan 5 21:49:27 2025 +0800 [Fix](case) Ensure Kerberos starts after other components (#46361) ### What problem does this PR solve? ``` Init kerberos test data WARNING: Use "yarn jar" to launch YARN applications. SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/usr/hdp/3.1.0.0-78/hive/lib/log4j-slf4j-impl-2.10.0.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/usr/hdp/3.1.0.0-78/hadoop/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory] Connecting to jdbc:hive2://localhost:10000/default;password=root;principal=hive/hadoop-mas...@labs.teradata.com;user=root 25/01/03 13:37:16 [main]: WARN jdbc.HiveConnection: Failed to connect to localhost:10000 Could not open connection to the HS2 server. Please check the server URI and if the URI is correct, then ask the administrator to check the server status. Error: Could not open client transport with JDBC Uri: jdbc:hive2://localhost:10000/default;password=root;principal=hive/hadoop-mas...@labs.teradata.com;user=root: java.net.ConnectException: Connection refused (Connection refused) (state=08S01,code=0) beeline> CREATE DATABASE IF NOT EXISTS `test_krb_hive_db`; ``` Kerberos initialization depends on the startup of some other components To avoid potential resource conflicts during parallel startup 1. Keep parallel startup for other components 2. Wait for all parallel components to complete 3. Start Kerberos sequentially after other components 4. Add error checking and logging for Kerberos startup --- .../docker-compose/kerberos/kerberos.yaml.tpl | 2 ++ docker/thirdparties/run-thirdparties-docker.sh | 16 +++++++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/docker/thirdparties/docker-compose/kerberos/kerberos.yaml.tpl b/docker/thirdparties/docker-compose/kerberos/kerberos.yaml.tpl index 47a7c8d7625..6aa353f3e0c 100644 --- a/docker/thirdparties/docker-compose/kerberos/kerberos.yaml.tpl +++ b/docker/thirdparties/docker-compose/kerberos/kerberos.yaml.tpl @@ -26,6 +26,7 @@ services: - ./common/hadoop/hadoop-run.sh:/usr/local/hadoop-run.sh - ./health-checks/hadoop-health-check.sh:/etc/health.d/hadoop-health-check.sh - ./entrypoint-hive-master.sh:/usr/local/entrypoint-hive-master.sh + restart: on-failure hostname: hadoop-master entrypoint: /usr/local/entrypoint-hive-master.sh healthcheck: @@ -45,6 +46,7 @@ services: image: doristhirdpartydocker/trinodb:hdp3.1-hive-kerberized-2_96 container_name: doris--kerberos2 hostname: hadoop-master-2 + restart: on-failure volumes: - ./two-kerberos-hives:/keytabs - ./sql:/usr/local/sql diff --git a/docker/thirdparties/run-thirdparties-docker.sh b/docker/thirdparties/run-thirdparties-docker.sh index 33a5ae2bad1..d00fdcea3aa 100755 --- a/docker/thirdparties/run-thirdparties-docker.sh +++ b/docker/thirdparties/run-thirdparties-docker.sh @@ -703,11 +703,6 @@ if [[ "${RUN_LAKESOUL}" -eq 1 ]]; then pids["lakesoul"]=$! fi -if [[ "${RUN_KERBEROS}" -eq 1 ]]; then - start_kerberos > start_kerberos.log 2>&1 & - pids["kerberos"]=$! -fi - if [[ "${RUN_MINIO}" -eq 1 ]]; then start_minio > start_minio.log 2>&1 & pids["minio"]=$! @@ -727,4 +722,15 @@ for compose in "${!pids[@]}"; do fi done +if [[ "${RUN_KERBEROS}" -eq 1 ]]; then + echo "Starting Kerberos after all other components..." + start_kerberos > start_kerberos.log 2>&1 + if [ $? -ne 0 ]; then + echo "Kerberos startup failed" + cat start_kerberos.log + exit 1 + fi +fi +echo "docker started" +docker ps -a --format "{{.ID}} | {{.Image}} | {{.Status}}" echo "all dockers started successfully" --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org