打印

Edgexfoundry加载设备服务的过程

[复制链接]
5943|6
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
keer_zu|  楼主 | 2020-10-31 23:18 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式
在加载device-modbus-go后,日志里看到注册失败后容器就退出了,尝试分析一下原因


先看日志:

root@ubuntu:/home/zkq/Downloads/edinburgh# docker-compose logs -f device-modbus

Attaching to edgex-device-modbus
edgex-device-modbus | level=INFO ts=2020-10-31T08:24:42.848270036Z app=edgex-device-modbus source=config.go:219 msg="Loaded configuration from /res/configuration.toml"
edgex-device-modbus | level=INFO ts=2020-10-31T08:24:42.848645165Z app=edgex-device-modbus source=config.go:167 msg="Using Configuration provider (consul) from: http://edgex-core-consul:8500 with base path of edgex/devices/1.0/edgex-device-modbus"
edgex-device-modbus | level=INFO ts=2020-10-31T08:24:42.882899665Z app=edgex-device-modbus source=config.go:330 msg="Configuration has been pushed to into Configuration Provider (0 environment overrides applied)"
edgex-device-modbus | level=ERROR ts=2020-10-31T08:24:42.882948498Z app=edgex-device-modbus source=logger.go:74 msg="logTarget cannot be blank, using stdout only"
edgex-device-modbus | level=INFO ts=2020-10-31T08:24:42.883091308Z app=edgex-device-modbus source=registry.go:79 msg="Using Registry (consul) from http://localhost:8500"
edgex-device-modbus | level=WARN ts=2020-10-31T08:24:42.912259473Z app=edgex-device-modbus source=registry.go:139 msg="registry is not available"
edgex-device-modbus | level=WARN ts=2020-10-31T08:24:43.942224395Z app=edgex-device-modbus source=registry.go:139 msg="registry is not available"
edgex-device-modbus | level=WARN ts=2020-10-31T08:24:44.983199131Z app=edgex-device-modbus source=registry.go:139 msg="registry is not available"
edgex-device-modbus | level=WARN ts=2020-10-31T08:24:46.023003154Z app=edgex-device-modbus source=registry.go:139 msg="registry is not available"
edgex-device-modbus | level=WARN ts=2020-10-31T08:24:47.051487665Z app=edgex-device-modbus source=registry.go:139 msg="registry is not available"
edgex-device-modbus | level=WARN ts=2020-10-31T08:24:48.102145115Z app=edgex-device-modbus source=registry.go:139 msg="registry is not available"
edgex-device-modbus | level=WARN ts=2020-10-31T08:24:49.142052336Z app=edgex-device-modbus source=registry.go:139 msg="registry is not available"
edgex-device-modbus | level=WARN ts=2020-10-31T08:24:51.320764465Z app=edgex-device-modbus source=registry.go:139 msg="registry is not available"
edgex-device-modbus | level=WARN ts=2020-10-31T08:24:52.362954685Z app=edgex-device-modbus source=registry.go:139 msg="registry is not available"
edgex-device-modbus | level=WARN ts=2020-10-31T08:24:53.392423592Z app=edgex-device-modbus source=registry.go:139 msg="registry is not available"
edgex-device-modbus | level=WARN ts=2020-10-31T08:24:54.422118509Z app=edgex-device-modbus source=registry.go:139 msg="registry is not available"
edgex-device-modbus | level=WARN ts=2020-10-31T08:24:55.447075414Z app=edgex-device-modbus source=registry.go:139 msg="registry is not available"
edgex-device-modbus | level=WARN ts=2020-10-31T08:24:56.472188582Z app=edgex-device-modbus source=registry.go:139 msg="registry is not available"
edgex-device-modbus | level=WARN ts=2020-10-31T08:24:57.502974713Z app=edgex-device-modbus source=registry.go:139 msg="registry is not available"
edgex-device-modbus | level=WARN ts=2020-10-31T08:24:58.52875264Z app=edgex-device-modbus source=registry.go:139 msg="registry is not available"
edgex-device-modbus | level=WARN ts=2020-10-31T08:24:59.557093942Z app=edgex-device-modbus source=registry.go:139 msg="registry is not available"
edgex-device-modbus | level=WARN ts=2020-10-31T08:25:00.60329459Z app=edgex-device-modbus source=registry.go:139 msg="registry is not available"
edgex-device-modbus | level=WARN ts=2020-10-31T08:25:01.640430577Z app=edgex-device-modbus source=registry.go:139 msg="registry is not available"
edgex-device-modbus | level=WARN ts=2020-10-31T08:25:02.68214448Z app=edgex-device-modbus source=registry.go:139 msg="registry is not available"
edgex-device-modbus | level=WARN ts=2020-10-31T08:25:03.722795915Z app=edgex-device-modbus source=registry.go:139 msg="registry is not available"
edgex-device-modbus | level=WARN ts=2020-10-31T08:25:04.76403472Z app=edgex-device-modbus source=registry.go:139 msg="registry is not available"
edgex-device-modbus | level=WARN ts=2020-10-31T08:25:05.803131314Z app=edgex-device-modbus source=registry.go:139 msg="registry is not available"
edgex-device-modbus | level=WARN ts=2020-10-31T08:25:06.836045349Z app=edgex-device-modbus source=registry.go:139 msg="registry is not available"
edgex-device-modbus | level=WARN ts=2020-10-31T08:25:07.861176081Z app=edgex-device-modbus source=registry.go:139 msg="registry is not available"
edgex-device-modbus | level=WARN ts=2020-10-31T08:25:08.902148952Z app=edgex-device-modbus source=registry.go:139 msg="registry is not available"
edgex-device-modbus | level=WARN ts=2020-10-31T08:25:09.962716024Z app=edgex-device-modbus source=registry.go:139 msg="registry is not available"
edgex-device-modbus | level=WARN ts=2020-10-31T08:25:11.006160592Z app=edgex-device-modbus source=registry.go:139 msg="registry is not available"
edgex-device-modbus | level=WARN ts=2020-10-31T08:25:12.044084896Z app=edgex-device-modbus source=registry.go:139 msg="registry is not available"
edgex-device-modbus | level=ERROR ts=2020-10-31T08:25:13.045021233Z app=edgex-device-modbus source=bootstrap.go:43 msg="unable to register with Registry in allotted time"
edgex-device-modbus exited with code 1



顺藤摸瓜,看看服务注册的过程:


从入口开始



















使用特权

评论回复
评论
keer_zu 2020-10-31 23:20 回复TA
@21ic小管家 给个编辑推荐吧 原创 

相关帖子

沙发
keer_zu|  楼主 | 2020-10-31 23:26 | 只看该作者

使用特权

评论回复
板凳
keer_zu|  楼主 | 2020-11-1 01:50 | 只看该作者
root@ubuntu:/home/zkq/Downloads/edinburgh# docker-compose logs -f device-modbus
Attaching to edgex-device-modbus
edgex-device-modbus | level=INFO ts=2020-10-31T17:28:54.347691415Z app=edgex-device-modbus source=config.go:219 msg="Loaded configuration from /res/docker/configuration.toml"
edgex-device-modbus | level=INFO ts=2020-10-31T17:28:54.399158697Z app=edgex-device-modbus source=config.go:112 msg="Config Provider URL created from Registry configuration"
edgex-device-modbus | level=INFO ts=2020-10-31T17:28:54.414804097Z app=edgex-device-modbus source=config.go:167 msg="Using Configuration provider (consul) from: http://edgex-core-consul:8500 with base path of edgex/devices/1.0/edgex-device-modbus"
edgex-device-modbus | level=INFO ts=2020-10-31T17:28:54.913274902Z app=edgex-device-modbus source=config.go:330 msg="Configuration has been pushed to into Configuration Provider (0 environment overrides applied)"
edgex-device-modbus | level=INFO ts=2020-10-31T17:28:54.914172183Z app=edgex-device-modbus source=registry.go:79 msg="Using Registry (consul) from http://edgex-core-consul:8500"
edgex-device-modbus | level=INFO ts=2020-10-31T17:28:54.997753413Z app=edgex-device-modbus source=httpserver.go:99 msg="Web server starting (0.0.0.0:49991)"
edgex-device-modbus | level=INFO ts=2020-10-31T17:28:55.000940152Z app=edgex-device-modbus source=init.go:134 msg="Check Metadata service's status via Registry..."
edgex-device-modbus | level=INFO ts=2020-10-31T17:28:55.002213917Z app=edgex-device-modbus source=init.go:134 msg="Check Data service's status via Registry..."
edgex-device-modbus | level=INFO ts=2020-10-31T17:28:55.047448576Z app=edgex-device-modbus source=init.go:42 msg="Service clients initialize successful."
edgex-device-modbus | level=INFO ts=2020-10-31T17:28:55.061234935Z app=edgex-device-modbus source=service.go:83 msg="Device Service edgex-device-modbus doesn't exist, creating a new one"
edgex-device-modbus | level=INFO ts=2020-10-31T17:28:55.068012488Z app=edgex-device-modbus source=service.go:140 msg="Addressable edgex-device-modbus doesn't exist, creating a new one"
edgex-device-modbus | level=ERROR ts=2020-10-31T17:28:55.198251001Z app=edgex-device-modbus source=profiles.go:180 msg="Error when retrieving EnableValueDescriptorManagement configuration from Core Metadata: map[LogLevel:INFO]"
edgex-device-modbus | level=INFO ts=2020-10-31T17:28:55.425458513Z app=edgex-device-modbus source=message.go:50 msg="Service dependencies resolved..."
edgex-device-modbus | level=INFO ts=2020-10-31T17:28:55.425823592Z app=edgex-device-modbus source=autodiscovery.go:19 msg="AutoDiscovery stopped: disabled by configuration"
edgex-device-modbus | level=INFO ts=2020-10-31T17:28:55.428511364Z app=edgex-device-modbus source=message.go:51 msg="Starting edgex-device-modbus 1.0.0 "
edgex-device-modbus | level=INFO ts=2020-10-31T17:28:55.449331321Z app=edgex-device-modbus source=message.go:55 msg="device modbus started"
edgex-device-modbus | level=INFO ts=2020-10-31T17:28:55.459066101Z app=edgex-device-modbus source=message.go:58 msg="Service started in: 1.125770971s"



使用特权

评论回复
地板
keer_zu|  楼主 | 2020-11-1 01:51 | 只看该作者
root@ubuntu:/home/zkq/Downloads/edinburgh# docker-compose logs -f device-modbus
Attaching to edgex-device-modbus
edgex-device-modbus | level=INFO ts=2020-10-31T17:28:54.347691415Z app=edgex-device-modbus source=config.go:219 msg="Loaded configuration from /res/docker/configuration.toml"
edgex-device-modbus | level=INFO ts=2020-10-31T17:28:54.399158697Z app=edgex-device-modbus source=config.go:112 msg="Config Provider URL created from Registry configuration"
edgex-device-modbus | level=INFO ts=2020-10-31T17:28:54.414804097Z app=edgex-device-modbus source=config.go:167 msg="Using Configuration provider (consul) from: http://edgex-core-consul:8500 with base path of edgex/devices/1.0/edgex-device-modbus"
edgex-device-modbus | level=INFO ts=2020-10-31T17:28:54.913274902Z app=edgex-device-modbus source=config.go:330 msg="Configuration has been pushed to into Configuration Provider (0 environment overrides applied)"
edgex-device-modbus | level=INFO ts=2020-10-31T17:28:54.914172183Z app=edgex-device-modbus source=registry.go:79 msg="Using Registry (consul) from http://edgex-core-consul:8500"
edgex-device-modbus | level=INFO ts=2020-10-31T17:28:54.997753413Z app=edgex-device-modbus source=httpserver.go:99 msg="Web server starting (0.0.0.0:49991)"
edgex-device-modbus | level=INFO ts=2020-10-31T17:28:55.000940152Z app=edgex-device-modbus source=init.go:134 msg="Check Metadata service's status via Registry..."
edgex-device-modbus | level=INFO ts=2020-10-31T17:28:55.002213917Z app=edgex-device-modbus source=init.go:134 msg="Check Data service's status via Registry..."
edgex-device-modbus | level=INFO ts=2020-10-31T17:28:55.047448576Z app=edgex-device-modbus source=init.go:42 msg="Service clients initialize successful."
edgex-device-modbus | level=INFO ts=2020-10-31T17:28:55.061234935Z app=edgex-device-modbus source=service.go:83 msg="Device Service edgex-device-modbus doesn't exist, creating a new one"
edgex-device-modbus | level=INFO ts=2020-10-31T17:28:55.068012488Z app=edgex-device-modbus source=service.go:140 msg="Addressable edgex-device-modbus doesn't exist, creating a new one"
edgex-device-modbus | level=ERROR ts=2020-10-31T17:28:55.198251001Z app=edgex-device-modbus source=profiles.go:180 msg="Error when retrieving EnableValueDescriptorManagement configuration from Core Metadata: map[LogLevel:INFO]"
edgex-device-modbus | level=INFO ts=2020-10-31T17:28:55.425458513Z app=edgex-device-modbus source=message.go:50 msg="Service dependencies resolved..."
edgex-device-modbus | level=INFO ts=2020-10-31T17:28:55.425823592Z app=edgex-device-modbus source=autodiscovery.go:19 msg="AutoDiscovery stopped: disabled by configuration"
edgex-device-modbus | level=INFO ts=2020-10-31T17:28:55.428511364Z app=edgex-device-modbus source=message.go:51 msg="Starting edgex-device-modbus 1.0.0 "
edgex-device-modbus | level=INFO ts=2020-10-31T17:28:55.449331321Z app=edgex-device-modbus source=message.go:55 msg="device modbus started"
edgex-device-modbus | level=INFO ts=2020-10-31T17:28:55.459066101Z app=edgex-device-modbus source=message.go:58 msg="Service started in: 1.125770971s"

使用特权

评论回复
5
kosten| | 2021-6-2 17:21 | 只看该作者
你解决modbus报错registry is not available 这个方法,没太明白,能详细了解下吗?  我是直接使用docker-compose拉的容器,启动的时候直接报这个错误

使用特权

评论回复
6
keer_zu|  楼主 | 2021-6-2 17:58 | 只看该作者
kosten 发表于 2021-6-2 17:21
你解决modbus报错registry is not available 这个方法,没太明白,能详细了解下吗?  我是直接使用docker-c ...

检查一下配置看看,时间久了,忘记了

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

个人签名:qq群:49734243 Email:zukeqiang@gmail.com

1349

主题

12426

帖子

53

粉丝