Smoke testing MQTT server installed via docker?

huangapple go评论61阅读模式
英文:

smoke testing MQTT server installed via docker?

问题

在Raspbian中:我已经通过docker安装了Mosquitto,方法如下链接所示:

https://www.schaerens.ch/raspi-setting-up-mosquitto-mqtt-broker-on-raspberry-pi-docker/

在过去,我曾经在没有docker的情况下安装并测试过,方法如下链接所示:

https://stackoverflow.com/q/57634477

我可以期望service mosquitto status命令提供状态信息吗?如果不能,那么执行相等操作的步骤是什么?

Smoke testing MQTT server installed via docker?

英文:

Within Raspbian: I have installed Mosquito via docker per:

https://www.schaerens.ch/raspi-setting-up-mosquitto-mqtt-broker-on-raspberry-pi-docker/

In the past I have installed it without docker and tested it per:

https://stackoverflow.com/q/57634477

Can I expect the service mosquitto status to provide status? If not what is the procedure to perform the equivalent?

Smoke testing MQTT server installed via docker?

答案1

得分: 1

"service"命令用于检查在主机操作系统上以本机方式运行的事物,使用"init.d"或"system.d"(在树莓派操作系统的情况下,它将是system.d)。

如果容器出现在"docker ps"的输出中,那就表示它正在运行,这意味着配置文件(如果提供的话)至少在语法上是正确的;如果提供了不正确的配置文件,容器将立即停止,因为唯一使其运行的是mosquitto进程。

您可以尝试使用接受答案中的第2和第3部分,位于https://stackoverflow.com/questions/26716279/how-to-test-the-mosquitto-server/

英文:

No, the service command is for checking on things running natively on the host OS, using init.d or system.d (in the case of Raspberry Pi OS it will be system.d)

If the container shows up in the output of docker ps then is it running which means that the config file (if provided) is at least syntactically correct, if you supply a incorrect config file then the container will stop straight away as the only thing that keeps it running is the mosquitto process.

You may do better using parts 2 & 3 in the accepted answer to https://stackoverflow.com/questions/26716279/how-to-test-the-mosquitto-server/

huangapple
  • 本文由 发表于 2023年5月21日 13:06:20
  • 转载请务必保留本文链接:https://go.coder-hub.com/76298375.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定