From e15ebfd3d4cc934f218e3fa0fb1bfecc04fc0e80 Mon Sep 17 00:00:00 2001 From: lzh Date: Fri, 13 Feb 2026 11:39:37 +0800 Subject: [PATCH] =?UTF-8?q?fix(iot-gateway):=20=E4=BF=AE=E6=AD=A3RPC?= =?UTF-8?q?=E7=8E=AF=E5=A2=83=E5=8F=98=E9=87=8F=E5=90=8D=E4=B8=8D=E5=8C=B9?= =?UTF-8?q?=E9=85=8D=E5=AF=BC=E8=87=B4=E8=BF=9E=E6=8E=A5=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit docker-compose中VIEWSH_IOT_GATEWAY_RPC_URL与yaml期望的VIEWSH_GATEWAY_RPC_URL不一致, 导致iot-gateway回退到默认值127.0.0.1:48091,容器间无法通信。 Co-Authored-By: Claude Opus 4.6 --- docker-compose.core.yml | 2 +- .../src/main/resources/application-prod.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose.core.yml b/docker-compose.core.yml index 51d5c99..4872054 100644 --- a/docker-compose.core.yml +++ b/docker-compose.core.yml @@ -212,7 +212,7 @@ services: ROCKETMQ_NAME_SERVER: rmq-4wd73bxpv.rocketmq.sh.qcloud.tencenttdmq.com:8080 # 添加这一行 - VIEWSH_IOT_GATEWAY_RPC_URL: "http://aiot-iot-server:48091" + VIEWSH_GATEWAY_RPC_URL: "http://aiot-iot-server:48091" volumes: - app-logs:/app/logs deploy: diff --git a/viewsh-module-iot/viewsh-module-iot-gateway/src/main/resources/application-prod.yaml b/viewsh-module-iot/viewsh-module-iot-gateway/src/main/resources/application-prod.yaml index dffe699..4430f21 100644 --- a/viewsh-module-iot/viewsh-module-iot-gateway/src/main/resources/application-prod.yaml +++ b/viewsh-module-iot/viewsh-module-iot-gateway/src/main/resources/application-prod.yaml @@ -36,7 +36,7 @@ viewsh: gateway: # 设备 RPC 配置 rpc: - url: ${VIEWSH_GATEWAY_RPC_URL:http://127.0.0.1:48091} + url: ${VIEWSH_GATEWAY_RPC_URL:http://aiot-iot-server:48091} connect-timeout: ${VIEWSH_RPC_CONNECT_TIMEOUT:30s} read-timeout: ${VIEWSH_RPC_READ_TIMEOUT:30s} # 设备 Token 配置