From 507f31ae7905137c1f1954588f8f625ed0d8e1f8 Mon Sep 17 00:00:00 2001 From: "Xinwei Xiong(cubxxw-openim)" <3293172751nss@gmail.com> Date: Thu, 17 Aug 2023 18:27:38 +0800 Subject: [PATCH] fix: update config file Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> --- .env | 4 ++-- config/openim_config.yaml | 4 ++-- scripts/check_all.sh | 8 +++++++- scripts/install/environment.sh | 8 ++++---- scripts/lib/util.sh | 8 ++++---- 5 files changed, 19 insertions(+), 13 deletions(-) diff --git a/.env b/.env index 97106f1e0..9397d2b37 100644 --- a/.env +++ b/.env @@ -14,6 +14,6 @@ USER=root PASSWORD=openIM123 -MINIO_ENDPOINT=http://http://127.0.0.1:10005 -API_URL=http://http://127.0.0.1:10002/object/ +MINIO_ENDPOINT=http://113.90.85.238:10005 +API_URL=http://113.90.85.238:10002/object/ DATA_DIR=/root/workspaces/openim/openim-server diff --git a/config/openim_config.yaml b/config/openim_config.yaml index 81775361e..c2f6b4330 100644 --- a/config/openim_config.yaml +++ b/config/openim_config.yaml @@ -135,11 +135,11 @@ object: apiURL: "http://127.0.0.1:10002/object/" minio: bucket: "openim" - endpoint: "http://127.0.0.1:10005" + endpoint: "http://113.90.85.238:10005" accessKeyID: "root" secretAccessKey: "openIM123" sessionToken: '' - signEndpoint: "http://127.0.0.1:10005" + signEndpoint: "http://113.90.85.238:10005" cos: bucketURL: https://temp-1252357374.cos.ap-chengdu.myqcloud.com secretID: '' diff --git a/scripts/check_all.sh b/scripts/check_all.sh index 7a861a7ea..e704b4a64 100755 --- a/scripts/check_all.sh +++ b/scripts/check_all.sh @@ -43,4 +43,10 @@ fi echo "++++ Check all OpenIM service ports" echo "+ The port being checked: ${OPENIM_SERVER_PORT_LISTARIES[@]}" -openim::util::check_ports ${OPENIM_SERVER_PORT_LISTARIES[@]} \ No newline at end of file +openim::util::check_ports ${OPENIM_SERVER_PORT_LISTARIES[@]} +if [[ $? -ne 0 ]]; then + echo "+++ cat openim log file >>> ${LOG_FILE}" + openim::log::error_exit "The service does not start properly, please check the port, query variable definition!" +else + echo "++++ Check all openim service ports successfully !" +fi \ No newline at end of file diff --git a/scripts/install/environment.sh b/scripts/install/environment.sh index 4daae2931..fda23ef58 100755 --- a/scripts/install/environment.sh +++ b/scripts/install/environment.sh @@ -27,7 +27,7 @@ source "${OPENIM_ROOT}/scripts/lib/init.sh" IP=$(openim::util::get_server_ip) #TODO -IP=http://127.0.0.1 +# IP=http://127.0.0.1 function def() { local var_name="$1" @@ -36,7 +36,7 @@ function def() { } # app要能访问到此ip和端口或域名 -def "API_URL" "${IP}:10002/object/" +def "API_URL" "http://${IP}:10002/object/" def "DATA_DIR" "${OPENIM_ROOT}" # 设置统一的用户名,方便记忆 @@ -105,11 +105,11 @@ def "OBJECT_APIURL" "http://127.0.0.1:10002/object/" # 对 def "MINIO_BUCKET" "openim" # MinIO的存储桶名称 def "MINIO_PORT" "10005" # MinIO的端口 # MinIO的端点URL -readonly MINIO_ENDPOINT=${MINIO_ENDPOINT:-"${IP}:${MINIO_PORT}"} +readonly MINIO_ENDPOINT=${MINIO_ENDPOINT:-"http://${IP}:${MINIO_PORT}"} def "MINIO_ACCESS_KEY" "${USER}" # MinIO的访问密钥ID def "MINIO_SECRET_KEY" "${PASSWORD}" # MinIO的密钥 def "MINIO_SESSION_TOKEN" # MinIO的会话令牌 -readonly MINIO_SIGN_ENDPOINT=${MINIO_SIGN_ENDPOINT:-"${IP}:${MINIO_PORT}"} # signEndpoint为minio公网地址 # MinIO的会话令牌 +readonly MINIO_SIGN_ENDPOINT=${MINIO_SIGN_ENDPOINT:-"http://${IP}:${MINIO_PORT}"} # signEndpoint为minio公网地址 # MinIO的会话令牌 def "COS_BUCKET_URL" "https://temp-1252357374.cos.ap-chengdu.myqcloud.com" # 腾讯云COS的存储桶URL def "COS_SECRET_ID" # 腾讯云COS的密钥ID def "COS_SECRET_KEY" # 腾讯云COS的密钥 diff --git a/scripts/lib/util.sh b/scripts/lib/util.sh index 261aed13a..4c53ab397 100755 --- a/scripts/lib/util.sh +++ b/scripts/lib/util.sh @@ -287,7 +287,7 @@ openim::util::check_ports() { if [[ ${#not_started[@]} -ne 0 ]]; then openim::log::info "### Not started ports:" for port in "${not_started[@]}"; do - openim::log::error "Port $port is not started." + openim::log::error "Port $port is not started. cat openim log >>> cat ${LOG_FILE}" done fi @@ -352,7 +352,7 @@ openim::util::check_process_names() { if [[ ${#not_started[@]} -ne 0 ]]; then openim::log::info "Not started processes:" for process_name in "${not_started[@]}"; do - openim::log::error "Process $process_name is not started." + openim::log::error "Process $process_name is not started. cat openim log >>> cat ${LOG_FILE}" done fi @@ -414,7 +414,7 @@ openim::util::stop_services_on_ports() { if [[ ${#not_stopped[@]} -ne 0 ]]; then openim::log::info "Ports that couldn't be stopped:" for port in "${not_stopped[@]}"; do - openim::log::error "Failed to stop service on port $port." + openim::log::status "Failed to stop service on port $port." done fi @@ -494,7 +494,7 @@ openim::util::stop_services_with_name() { if [[ ${#not_stopped[@]} -ne 0 ]]; then openim::log::info "Services that couldn't be stopped:" for name in "${not_stopped[@]}"; do - openim::log::error "Failed to stop the $name service." + openim::log::status "Failed to stop the $name service." done fi