3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

UbuntuマシンにMosquittoを入れてみる

Posted at

UbuntuマシンにMosquittoを入れてみる。

$ sudo apt-get install mosquitto
$ sudo apt-get install mosquitto-clients 

おもむろに起動すると怒られる。

$ mosquitto
1449462980: mosquitto version 1.4.3 (build date Wed, 19 Aug 2015 10:31:10 +0100) starting
1449462980: Using default config.
1449462980: Opening ipv4 listen socket on port 1883.
1449462980: Error: Address already in use

こちらの記事によると、mosquittoをインストールしたときに既に起動しているとのこと。かわりにmosquitto_sub -t '$SYS/#' -vで状態を確かめてみろ、と書いてある。

$mosquitto_sub -t '$SYS/#' -v

$SYS/broker/version mosquitto version 1.4.3
$SYS/broker/timestamp Wed, 19 Aug 2015 10:31:10 +0100
$SYS/broker/uptime 946 seconds
$SYS/broker/clients/total 0
$SYS/broker/clients/inactive 0
$SYS/broker/clients/disconnected 0
$SYS/broker/clients/active 0
$SYS/broker/clients/connected 0
$SYS/broker/clients/expired 0

動いているようだ。

3
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?