pilot 连接上云api 服务后 Test group one一直 disconnect
已完成如题:pilot 连接上云api 服务后 Test group one一直 disconnect;
相关页面信息如下:
* 存在的疑问:
- 如何判断emqx 工作是否正常,客户端如何连接;
* 上云api 服务采用的 docker 部署,相关修改配置如下:
-- application.yml
-- 关于此处的配置的疑问
1. 核心需要配置的内容包括哪些方面,目前配置 datasource,redis,mqtt (关于ip问题是内网ip还是外网ip), oss 以及 livestream;
2. mqtt 的ip配置是否应该是公网ip,实际上 pilot需要访问emqx?
server:
port: 6789
spring:
main:
allow-bean-definition-overriding: true
application:
name: cloud-api-sample
datasource:
druid:
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://cloud_api_sample_mysql:3306/cloud_sample?useSSL=false&allowPublicKeyRetrieval=true
username: root
password: root
initial-size: 10
min-idle: 10
max-active: 20
max-wait: 60000
redis:
host: cloud_api_sample_redis
port: 6379
database: 0
username: # if you enable
password:
lettuce:
pool:
max-active: 8
max-idle: 8
min-idle: 0
servlet:
multipart:
max-file-size: 2GB
max-request-size: 2GB
jwt:
issuer: DJI
subject: CloudApiSample
secret: CloudApiSample
age: 86400
mqtt:
# @see com.dji.sample.component.mqtt.model.MqttUseEnum
# BASIC parameters are required.
BASIC:
protocol: MQTT # @see com.dji.sample.component.mqtt.model.MqttProtocolEnum
host: 172.18.130.33 【此处mqtt的ip 是需要用内网ip还是外网ip,实际是需要外网ip的是吗?】
port: 1883
username: JavaServer
password: 123456
client-id: 123456
# If the protocol is ws/wss, this value is required.
path:
DRC:
protocol: WS # @see com.dji.sample.component.mqtt.model.MqttProtocolEnum
host: 172.18.130.33 【此处mqtt的ip 是需要用内网ip还是外网ip,实际是需要外网ip的是吗?】
port: 8083
path: /mqtt
username: JavaServer
password: 123456
cloud-sdk:
mqtt:
# Topics that need to be subscribed when initially connecting to mqtt, multiple topics are divided by ",".
inbound-topic: sys/product/+/status,thing/product/+/requests
oss:
enable: false
provider: ALIYUN # @see com.dji.sample.component.OssConfiguration.model.enums.OssTypeEnum
endpoint: https://oss-cn-hangzhou.aliyuncs.com
access-key: LTAI5tJrkrGwMRNwsMX**
secret-key: yEiRfIay4X1K8TsncImrT2Vz4**
expire: 3600
region: oss-cn-hangzhou
role-session-name: cloudApi
role-arn: acs:ram::1694213497**:role/aliyunstsassumeroleaccess
bucket: lingzhou-dji
object-dir-prefix: sample
livestream:
url:
# It is recommended to use a program to create Token. https://github.com/AgoraIO/Tools/blob/master/DynamicKey/AgoraDynamicKey/java/src/main/java/io/agora/media/RtcTokenBuilder2.java
agora:
channel: Please enter the agora channel.
token: Please enter the agora temporary token.
uid: 654321
# RTMP Note: This IP is the address of the streaming server. If you want to see livestream on web page, you need to convert the RTMP stream to WebRTC stream.
rtmp:
url: Please enter the rtmp access address. # Example: 'rtmp://192.168.1.1/live/'
rtsp:
username: Please enter the username.
password: Please enter the password.
port: 8554
# GB28181 Note:If you don't know what these parameters mean, you can go to Pilot2 and select the GB28181 page in the cloud platform. Where the parameters same as these parameters.
gb28181:
serverIP: 172.18.130.33
serverPort: 8898
serverID: 172.18.130.33
agentID: 172.18.130.33
agentPassword: 123456
localPort: 8899
channel: channel1
# Webrtc: Only supports using whip standard
whip:
url: Please enter the rtmp access address. # Example:http://192.168.1.1:1985/rtc/v1/whip/?app=live&stream=
--- b. 前端配置 config.js
export const CURRENT_CONFIG = {
// license
appId: '1453**', // You need to go to the development website to apply.
appKey: '7be39ad409577bc74e675**, // You need to go to the development website to apply.
appLicense: 'ijr4BaQqh9liHwR0JSnQdGw87/nkyNYMaTVqR+8LUvy26VgbiwmNpaFw9fQSqk3OHzZZ9w8CMQgS1a3jlbE8uMLbiCnQ28pcB4LVuyMpJe8/WPXf7AdahiacZGo918SkEWuDI0//Zr8eWZw2Lv3t6S9g***', // You need to go to the development website to apply.
// http
baseURL: 'http://${外网}:6789/', // This url must end with "/". Example: 'http://192.168.1.1:6789/'
websocketURL: 'ws://${外网}:6789/api/v1/ws', // Example: 'ws://192.168.1.1:6789/api/v1/ws'
// livestreaming
// RTMP Note: This IP is the address of the streaming server. If you want to see livestream on web page, you need to convert the RTMP stream to WebRTC stream.
rtmpURL: 'Please enter the rtmp access address.', // Example: 'rtmp://192.168.1.1/live/'
// GB28181 Note:If you don't know what these parameters mean, you can go to Pilot2 and select the GB28181 page in the cloud platform. Where the parameters same as these parameters.
gbServerIp: 'Please enter the server ip.',
gbServerPort: 'Please enter the server port.',
gbServerId: 'Please enter the server id.',
gbAgentId: 'Please enter the agent id',
gbPassword: 'Please enter the agent password',
gbAgentPort: 'Please enter the local port.',
gbAgentChannel: 'Please enter the channel.',
// RTSP
rtspUserName: 'Please enter the username.',
rtspPassword: 'Please enter the password.',
rtspPort: '8554',
// Agora
agoraAPPID: 'Please enter the agora app id.',
agoraToken: 'Please enter the agora temporary token.',
agoraChannel: 'Please enter the agora channel.',
// map
// You can apply on the AMap website.
amapKey: 'Please enter the amap key.',
}
-
尊敬的开发者, 您好,感谢您联系DJI 大疆创新。 --pilot 连接上云api 服务后 Test group one一直 disconnect; 具体配置配置可以查看以下文章。3.1 上云API代码结构 请检查后端配置的mqtt参数是否准确,mqtt地址不能使用localhost或者127.0.0.1。您可以参考以下文章进行问题排查:在pilot2 上登录后,demo主页一直显示disconnect 上云API使用内网还是外网是由您自身需求决定,只要保证机场和上云,无人机相互可以ping通过,就可以使用。 ---另外修改 application.yml 和 config.js之后 都需要重新 build docker 并启动的么---是的 希望我们的解决方案能够帮到您,感谢您的邮件,祝您生活愉快! Best Regards, DJI 大疆创新SDK技术支持 -
mqtt:
# @see com.dji.sample.component.mqtt.model.MqttUseEnum
# BASIC parameters are required.
BASIC:
protocol: MQTT # @see com.dji.sample.component.mqtt.model.MqttProtocolEnum
host: 172.18.130.33 【此处mqtt的ip 是需要用内网ip还是外网ip,实际是需要外网ip的是吗?】
port: 1883
username: JavaServer
password: 123456
client-id: 123456
# If the protocol is ws/wss, this value is required.
path:
DRC:
protocol: WS # @see com.dji.sample.component.mqtt.model.MqttProtocolEnum
host: 172.18.130.33 【此处mqtt的ip 是需要用内网ip还是外网ip,实际是需要外网ip的是吗?】
port: 8083
path: /mqtt
username: JavaServer
password: 123456cloud-sdk:
mqtt:
# Topics that need to be subscribed when initially connecting to mqtt, multiple topics are divided by ",".
inbound-topic: sys/product/+/status,thing/product/+/requests这个是mqtt的配置,其中的 ip是 阿里云ecs的 内网ip,似乎这样是不对的,应该用外网ip 是的么?
当前build时间非常长,主要是 => [5/5] RUN mvn clean package -Dmaven.test.skip=true 367.3s
=> => # Downloading from central: https://repo.maven.apache.org/maven2/commons-cli/commons-cli/1.0/commons-cli-1.0.pom
=> => # Downloaded from central: https://repo.maven.apache.org/maven2/commons-cli/commons-cli/1.0/commons-cli-1.0.pom (2.1 kB at 1.3 kB/s)
=> => # Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/maven-plugin-descriptor/2.0.6/maven-plugin-descriptor-2.0.6.pom
=> => # Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/maven-plugin-descriptor/2.0.6/maven-plugin-descriptor-2.0.6.pom (2.0 kB at 1.0 kB/s)
=> => # Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-interactivity-api/1.0-alpha-4/plexus-interactivity-api-1.0-alpha-4.pom
=> => # Progress (1): 7.1 kB这部分从maven 官网下载,需要改成 aliyun的镜像,应该修改哪个配置呢?
请先登录再写评论。
评论
5 条评论