Skip to content
  • 版块
  • 最新
  • 标签
  • 热门
  • 用户
  • 群组
皮肤
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • 默认(不使用皮肤)
  • 不使用皮肤
折叠
品牌标识

AIRIOT智慧系统搭建平台经验交流

  1. 主页
  2. 平台安装
  3. 创建mqtt驱动不成功,导致平台崩溃

创建mqtt驱动不成功,导致平台崩溃

已定时 已固定 已锁定 已移动 平台安装
帖子 发布者 浏览
  • 从旧到新
  • 从新到旧
  • 最多赞同
回复
  • 在新帖中回复
登录后回复
此主题已被删除。只有拥有主题管理权限的用户可以查看。
  • S 离线
    S 离线
    szj
    编写 最后由 编辑
    #5

    我原本core的版本是 v4.4.191,我升级到:v4.5.5。
    接着就很多服务不能运行了。

    image.png
    image.png
    image.png
    image.png

    redis日志:

    image.png

    1 条回复 最后回复
    0
  • hpH 离线
    hpH 离线
    hp
    编写 最后由 编辑
    #6

    看下处于重启中的服务的日志

    1 条回复 最后回复
    0
  • S 离线
    S 离线
    szj
    编写 最后由 编辑
    #7

    升级core前:
    image.png

    升级后:
    db-backup 的日志:
    z2026/07/30 14:33:18 文件配置: {App:{Version: ServerID: ServerName:db-backup RunMode: EtcdConfig:/airiot/config/pro.json Platform: Etcd:{Endpoints:[etcd:2379] DialTimeout:10 Username:root Password:dell123 AutoSyncInterval:0s} PrintConfig:false Swagger:false Captcha:{Store: Length:0 Width:0 Height:0 RedisDB:0 RedisPrefix:} Log:{Level:5 Format: Output: OutputFile: MaxAge:0 RotationTime:0 RotationSize:0 RotationCount:0 Syslog:{ServiceName: ProjectId:}} Gorm:{Debug:false LogLevel:0 DBType: MaxLifetime:0 MaxOpenConns:0 MaxIdleConns:0 TablePrefix: EnableAutoMigrate:false QueryMaxLength:0 MySQL:{Host: Port:0 User: Password: DBName: Parameters:} DM:{Host: Port:0 User: Password: Parameters:} Postgres:{Host: Port:0 User: Password: DBName: SSLMode: Distributed:false} Sqlite3:{Path:}} JWTAuth:{Enable:false SigningMethod: SigningKey: Expired:0 Store: FilePath: RedisDB:0 RedisPrefix:} Sessions:{StoreType: Key: MaxAge:0 RedisPrefix:} Redis:{Type: Addrs:[] Password: PoolSize:0} Server:{Metadata:map[env:local] HealthCheckCycle:0s HTTP:{Host: Port:9102 Timeout:0 CertFile: KeyFile: ShutdownTimeout:0 MaxContentLength:0 MaxLoggerLength:0} GRPC:{Host: Port:9235 Timeout:60 Limit:0}} Endpoints:[] LocaleDir: Root:{UserName:} CORS:{Enable:false AllowOrigins:[] AllowMethods:[] AllowHeaders:[] AllowCredentials:false MaxAge:0} GZIP:{Enable:false ExcludedExtentions:[] ExcludedPaths:[]} Casbin:{Enable:false Debug:false Model: AutoLoad:false AutoLoadInternal:0} RateLimiter:{Enable:false Count:0 RedisDB:0} API:{Gateway: EtcdConfig: Metadata:map[] Services:map[] Type: ProjectId: AK: SK: Timeout:0 Limit:0 Debug:false Service:{Expire:0s}} Flow:{Host: Port:0 WriteTimeout:0} FileServer:{FileServerType: FileServer:/app/fileServer MediaLibraryPath: SystemDefaultMediaLibrary: OnlineDefaultMediaLibrary: SystemDefaultMediaLibraryMod:false UserFilesPath: MinioConfig:{UseIndividualBucket:false BucketName: SystemDefaultBucketName: Endpoint: AccessKeyID: SecretAccessKey: UseSSl:false ExpireIn:0}} MQ:{MQType: MQTT:{Schema: Host: Port:0 Username: Password: KeepAlive:0 ConnectTimeout:0 ProtocolVersion:0 PubQos:0 Qos:0 Order:false ClientIdPrefix: ServerName: EnableSubShare:false TLSConfig:<nil>} RabbitMQ:{Host: Port:0 Username: Password: VHost: Exchange: Queue:} Kafka:{Brokers:[] Version: GroupID: ClientID: MaxOpenRequests:0 Balancer: Partition:<nil> AutoCommit:<nil> AutoMark:false}} TSDB:{DBType: DBName: Timeout:0 MaxConn:0 Influx:{Protocol: Addr: HttpAddr: Username: Password: Sharding:false CreateDatabaseSql: RetentionPolicy:} Influx2:{Addr: Token: Org: Bucket: Username: Password: UseGZip:<nil> LogLevel:<nil> MaxRetries:<nil> MaxIdleConns:<nil> MaxIdleConnsPerHost:<nil> IdleConnTimeout:<nil> DialTimeout:<nil> TLSHandshakeTimeout:<nil>} TDengine:{DriverName: Addr: Field:{Time: ID:0 Department:0 Tag:0 Nchar:0 Varchar:0} WriteBatchSize:0} Cassandra:{Addrs:[] Username: Password: Consistency:}} Pprof:{Enable:false Prefix: Host: Port:0} Trace:{Enable:false} Operation:{Address: Timeout:0} Lock:{Type:}} HTML:/app/html AllowRestoreHTML:false MaxFreeDiskSpaceForBackup:10 BackupDir:/app/backup SuperRoleName: Postgres:{PsqlBinPath:psql DumpBinPath:pg_dump TempDBNamePrefix:airiot_restore_temp_ RowsPerInsert:1000 ExcludeTables:[] ExcludeTableData:[db_backup backup task_manager]} KingBase:{PsqlBinPath:ksql DumpBinPath:sys_dump TempDBNamePrefix:airiot_restore_temp_ RowsPerInsert:1000 ExcludeTables:[] ExcludeTableData:[db_backup backup task_manager]} MySQL:{MySQLBinPath:mysql DumpBinPath:mysqldump RowsPerInsert:0 ExcludeTables:[] ExcludeTableData:[db_backup backup task_manager]} DM:{DImpBinPath: DExpBinPath: RowsPerInsert:0 ExcludeTables:[] ExcludeTableData:[]} FTP:{Enabled:true CheckInterval:1m0s}}
    1INFO msg=watcher's ctx cancel : context canceled
    1INFO msg=watcher's ctx cancel : context canceled
    2DEBUG msg=config loaded: config.yaml format: yaml
    &DEBUG msg=config loaded: format:
    'DEBUG msg=config loaded: PATH format:
    +DEBUG msg=config loaded: HOSTNAME format:
    0DEBUG msg=config loaded: App.Log.Level format:
    'DEBUG msg=config loaded: HOME format:
    1INFO msg=watcher's ctx cancel : context canceled
    1INFO msg=watcher's ctx cancel : context canceled
    &DEBUG msg=config loaded: format:
    'DEBUG msg=config loaded: PATH format:
    +DEBUG msg=config loaded: HOSTNAME format:
    0DEBUG msg=config loaded: App.Log.Level format:
    'DEBUG msg=config loaded: HOME format:
    z2026/07/30 14:33:19 合并配置: {App:{Version: ServerID: ServerName:db-backup RunMode: EtcdConfig:/airiot/config/pro.json Platform: Etcd:{Endpoints:[etcd:2379] DialTimeout:10 Username:root Password:dell123 AutoSyncInterval:0s} PrintConfig:false Swagger:false Captcha:{Store: Length:0 Width:0 Height:0 RedisDB:0 RedisPrefix:} Log:{Level:5 Format: Output: OutputFile: MaxAge:0 RotationTime:0 RotationSize:0 RotationCount:0 Syslog:{ServiceName: ProjectId:}} Gorm:{Debug:false LogLevel:0 DBType: MaxLifetime:0 MaxOpenConns:0 MaxIdleConns:0 TablePrefix: EnableAutoMigrate:false QueryMaxLength:0 MySQL:{Host: Port:0 User: Password: DBName: Parameters:} DM:{Host: Port:0 User: Password: Parameters:} Postgres:{Host: Port:0 User: Password: DBName: SSLMode: Distributed:false} Sqlite3:{Path:}} JWTAuth:{Enable:false SigningMethod: SigningKey: Expired:0 Store: FilePath: RedisDB:0 RedisPrefix:} Sessions:{StoreType: Key: MaxAge:0 RedisPrefix:} Redis:{Type: Addrs:[] Password: PoolSize:0} Server:{Metadata:map[env:local] HealthCheckCycle:0s HTTP:{Host: Port:9102 Timeout:0 CertFile: KeyFile: ShutdownTimeout:0 MaxContentLength:0 MaxLoggerLength:0} GRPC:{Host: Port:9235 Timeout:60 Limit:0}} Endpoints:[] LocaleDir: Root:{UserName:} CORS:{Enable:false AllowOrigins:[] AllowMethods:[] AllowHeaders:[] AllowCredentials:false MaxAge:0} GZIP:{Enable:false ExcludedExtentions:[] ExcludedPaths:[]} Casbin:{Enable:false Debug:false Model: AutoLoad:false AutoLoadInternal:0} RateLimiter:{Enable:false Count:0 RedisDB:0} API:{Gateway: EtcdConfig: Metadata:map[] Services:map[] Type: ProjectId: AK: SK: Timeout:0 Limit:0 Debug:false Service:{Expire:0s}} Flow:{Host: Port:0 WriteTimeout:0} FileServer:{FileServerType: FileServer:/app/fileServer MediaLibraryPath: SystemDefaultMediaLibrary: OnlineDefaultMediaLibrary: SystemDefaultMediaLibraryMod:false UserFilesPath: MinioConfig:{UseIndividualBucket:false BucketName: SystemDefaultBucketName: Endpoint: AccessKeyID: SecretAccessKey: UseSSl:false ExpireIn:0}} MQ:{MQType: MQTT:{Schema: Host: Port:0 Username: Password: KeepAlive:0 ConnectTimeout:0 ProtocolVersion:0 PubQos:0 Qos:0 Order:false ClientIdPrefix: ServerName: EnableSubShare:false TLSConfig:<nil>} RabbitMQ:{Host: Port:0 Username: Password: VHost: Exchange: Queue:} Kafka:{Brokers:[] Version: GroupID: ClientID: MaxOpenRequests:0 Balancer: Partition:<nil> AutoCommit:<nil> AutoMark:false}} TSDB:{DBType: DBName: Timeout:0 MaxConn:0 Influx:{Protocol: Addr: HttpAddr: Username: Password: Sharding:false CreateDatabaseSql: RetentionPolicy:} Influx2:{Addr: Token: Org: Bucket: Username: Password: UseGZip:<nil> LogLevel:<nil> MaxRetries:<nil> MaxIdleConns:<nil> MaxIdleConnsPerHost:<nil> IdleConnTimeout:<nil> DialTimeout:<nil> TLSHandshakeTimeout:<nil>} TDengine:{DriverName: Addr: Field:{Time: ID:0 Department:0 Tag:0 Nchar:0 Varchar:0} WriteBatchSize:0} Cassandra:{Addrs:[] Username: Password: Consistency:}} Pprof:{Enable:false Prefix: Host: Port:0} Trace:{Enable:false} Operation:{Address: Timeout:0} Lock:{Type:}} HTML:/app/html AllowRestoreHTML:false MaxFreeDiskSpaceForBackup:10 BackupDir:/app/backup SuperRoleName: Postgres:{PsqlBinPath:psql DumpBinPath:pg_dump TempDBNamePrefix:airiot_restore_temp_ RowsPerInsert:1000 ExcludeTables:[] ExcludeTableData:[db_backup backup task_manager]} KingBase:{PsqlBinPath:ksql DumpBinPath:sys_dump TempDBNamePrefix:airiot_restore_temp_ RowsPerInsert:1000 ExcludeTables:[] ExcludeTableData:[db_backup backup task_manager]} MySQL:{MySQLBinPath:mysql DumpBinPath:mysqldump RowsPerInsert:0 ExcludeTables:[] ExcludeTableData:[db_backup backup task_manager]} DM:{DImpBinPath: DExpBinPath: RowsPerInsert:0 ExcludeTables:[] ExcludeTableData:[]} FTP:{Enabled:true CheckInterval:1m0s}}
    k2026/07/30 14:33:19 INFO 服务启动,运行模式:,版本号:v4.0.31,进程号:1 tag=main
    ;panic: runtime error: index out of range [0] with length 0
    
    goroutine 1 [running]:
    agithub.com/air-iot/service/v4/redisdb.NewRedisDB({{0x0, 0x0}, {0x0, 0x0, 0x0}, {0x0, 0x0}, 0x0})
    U /go/pkg/mod/git.airiot.tech/core/service.git/v4@v4.4.82/redisdb/client.go:68 +0x434
    %db-backup/internal/app.InitRedisDB()
    > /builds/core/server/db-backup/internal/app/redis.go:11 +0x79
    'db-backup/internal/app.BuildInjector()
    A /builds/core/server/db-backup/internal/app/wire_gen.go:25 +0x46
    Wdb-backup/internal/app.Init({0x2290ee0, 0xc00065df20}, {0xc000599a88, 0x2, 0x411f85?})
    = /builds/core/server/db-backup/internal/app/app.go:56 +0x28a
    main.main.func1.1.1()
    4 /builds/core/server/db-backup/cmd/main.go:54 +0xc7
    Ogithub.com/air-iot/service/v4/app.Run({0x2290ee0, 0xc00065df20}, 0xc000599bc0)
    M /go/pkg/mod/git.airiot.tech/core/service.git/v4@v4.4.82/app/app.go:58 +0xfb
    main.main.func1(0xc000c03140?)
    4 /builds/core/server/db-backup/cmd/main.go:52 +0x4a
    ^github.com/urfave/cli/v2.(*Command).Run(0xc000899600, 0xc000c03140, {0xc000050570, 0x3, 0x3})
    D /go/pkg/mod/github.com/urfave/cli/v2@v2.27.1/command.go:279 +0x97d
    kgithub.com/urfave/cli/v2.(*App).RunContext(0xc000840800, {0x2290ea8, 0x3c15780}, {0xc000050570, 0x3, 0x3})
    @ /go/pkg/mod/github.com/urfave/cli/v2@v2.27.1/app.go:337 +0x58b
    )github.com/urfave/cli/v2.(*App).Run(...)
    9 /go/pkg/mod/github.com/urfave/cli/v2@v2.27.1/app.go:311
     main.main()
    5 /builds/core/server/db-backup/cmd/main.go:60 +0x2b1

    auth的日志:
    _2026/07/30 14:33:32 INFO 服务启动: 运行模式=,版本号=v4.3.4,进程号=1 tag=main
    ;panic: runtime error: index out of range [0] with length 0
    
    goroutine 1 [running]:
    agithub.com/air-iot/service/v4/redisdb.NewRedisDB({{0x0, 0x0}, {0x0, 0x0, 0x0}, {0x0, 0x0}, 0x0})
    U /go/pkg/mod/git.airiot.tech/core/service.git/v4@v4.4.82/redisdb/client.go:68 +0x434
    auth/internal.InitRedisDB()
    5 /builds/core/server/auth/internal/redis.go:11 +0x79
    auth/internal.BuildInjector()
    8 /builds/core/server/auth/internal/wire_gen.go:27 +0xd4
    Nauth/internal.Init({0x26cdfa0, 0xc002bf60c0}, {0xc001f67bf0, 0x2, 0x412025?})
    4 /builds/core/server/auth/internal/app.go:49 +0x25d
    main.main.func1.1.1()
    4 /builds/core/server/auth/cmd/auth/main.go:54 +0xc7
    Ogithub.com/air-iot/service/v4/app.Run({0x26cdfa0, 0xc002bf60c0}, 0xc001f67d28)
    M /go/pkg/mod/git.airiot.tech/core/service.git/v4@v4.4.82/app/app.go:58 +0xfb
    main.main.func1(0xc001f83140?)
    4 /builds/core/server/auth/cmd/auth/main.go:52 +0x4a
    kgithub.com/urfave/cli/v2.(*App).RunContext(0xc001f92340, {0x26cdf68, 0x4290d60}, {0xc0001440f0, 0x3, 0x3})
    ? /go/pkg/mod/github.com/urfave/cli/v2@v2.4.0/app.go:322 +0x928
    )github.com/urfave/cli/v2.(*App).Run(...)
    8 /go/pkg/mod/github.com/urfave/cli/v2@v2.4.0/app.go:224
     main.main()
    5 /builds/core/server/auth/cmd/auth/main.go:59 +0x2b1

    其他的一些日志,我上传到https://wormhole.app/ 了

    1 条回复 最后回复
    0
  • hpH 离线
    hpH 离线
    hp
    编写 最后由 编辑
    #8

    etcd不对,看 etcd 里配置中心配置有吗,还有看看etcd服务日志,是新安装的平台吗

    1 条回复 最后回复
    0
  • S 离线
    S 离线
    szj
    编写 最后由 编辑
    #9

    “看 etcd 里配置中心配置有吗“,哪里看?
    不是新安装的平台。

    1 条回复 最后回复
    0
  • hpH 离线
    hpH 离线
    hp
    编写 最后由 编辑
    #10

    进入 etcd 容器看,etcdctl --user="root" --password="dell123" get --prefix "/airiot/config/pro.json" 或者58080 端口访问

    1 条回复 最后回复
    0
  • S 离线
    S 离线
    szj
    编写 最后由 编辑
    #11

    {"App":{"RunMode":"release","PrintConfig":false,"Swagger":true,"Platform":"Multiple","Pprof":{"Enable":true,"Prefix":"","Port":9000},"Gorm":{"Debug":false,"LogLevel":3,"DBType":"postgres","MaxLifetime":24,"MaxOpenConns":20,"MaxIdleConns":1,"TablePrefix":"","EnableAutoMigrate":true,"Postgres":{"Host":"postgres","Port":5432,"User":"root","Password":"ENC(S2E1S2V3dVdBWQ==)","DBName":"postgres","SSLMode":"disable"}},"TSDB":{"DBType":"influx","DBName":"tsdb","Timeout":5,"MaxConn":50,"Influx":{"Protocol":"HTTP","Addr":"http://influx:8086","Username":"admin","Password":"ENC(S2E1S2V3dVdBWQ==)","Sharding":true,"CreateDatabaseSql":"create database "%s""}},"Redis":{"Type":"","Addrs":["redis:6379"],"Password":"ENC(S2E1S2V3dVdBWQ==)","PoolSize":10},"MQ":{"MQType":"mqtt","TopicPrefix":"data/","MQTT":{"Host":"mqtt","Port":1883,"Username":"admin","Password":"ENC(S2E1S2V3dVdBWQ==)","Order":true}},"Flow":{"Host":"flow-engine","Port":2333,"WriteTimeout":60},"CORS":{"Enable":false,"AllowOrigins":["*"],"AllowMethods":["GET","POST","PUT","DELETE","PATCH"],"AllowHeaders":["Authorization","Origin","X-Requested-With","Content-Type","Accept"],"AllowCredentials":true,"MaxAge":7200},"JWTAuth":{"Enable":true,"SigningMethod":"HS512","SigningKey":"Cx0Lvc0Jsj3bSfLixX44","Expired":1209600,"Store":"file","FilePath":"data/jwt_auth.db","RedisDB":"10","RedisPrefix":"auth_"},"Captcha":{"Store":"memory","Length":4,"Width":400,"Height":160,"RedisDB":10,"RedisPrefix":"captcha_"},"GZIP":{"Enable":true,"ExcludedExtentions":[".png",".gif",".jpeg",".jpg"],"ExcludedPaths":[]},"RateLimiter":{"Enable":true,"Count":10000,"RedisDB":1},"Root":{"UserName":"admin","Password":"admin"},"API":{"Metadata":{"env":"local"},"Type":"tenant","AK":"0C5CE0BF-4FBD-42DD-B-C3-3E34-0FC0-9626","SK":"533316D1-8516-4962-8-26-C857-A935-D687","Timeout":60},"Log":{"Level":4,"Format":"text","Output":"stdout","OutputFile":"log/service.log"},"FileServer":{"FileServerType":"localhost","FileServer":"/app/fileServer","MediaLibraryPath":"mediaLibrary","SystemDefaultMediaLibrary":"systemDefaultMediaLibrary","SystemDefaultMediaLibraryMod":true,"UserFilesPath":"userFiles"},"LocaleDir":"/app/configs/locale","Operation":{"Address":"http://operation:10088","Timeout":60},"Endpoints":[]}}

    1 条回复 最后回复
    0
  • hpH 离线
    hpH 离线
    hp
    编写 最后由 编辑
    #12

    还要看下etcd服务日志

    1 条回复 最后回复
    0
  • hpH 离线
    hpH 离线
    hp
    编写 最后由 编辑
    #13

    您那能远程或外网访问吗,可以的话私发我一下

    1 条回复 最后回复
    0
  • S 离线
    S 离线
    szj
    编写 最后由 编辑
    #14

    已经发给你了,看看

    1 条回复 最后回复
    0
  • S 离线
    S 离线
    szj
    编写 最后由 编辑
    #15

    现在所有服务已经 up。

    1 条回复 最后回复
    0

  • 登录

  • 没有帐号? 注册

  • 登录或注册以进行搜索。
  • 第一个帖子
    最后一个帖子
0
  • 版块
  • 最新
  • 标签
  • 热门
  • 用户
  • 群组