2017-01-24 12 views
0

RabbitMQ - MQTTプラグインを設定しようとしています。しかし、プラグインを有効にした後はサービスを再開できません。RabbitMQ MQTTプラグインの起動に失敗する

私はドキュメントで見つかったガイドを追っ:https://www.rabbitmq.com/mqtt.html

私の行動をおさらいするには:

私はこれが応答

ある

sudo rabbitmq-plugins enable rabbitmq_mqtt 

コマンドを使用してプラグインを有効に

[[email protected] rabbitmq]# rabbitmq-plugins enable rabbitmq_mqtt 
The following plugins have been enabled: 
    rabbitmq_mqtt 

Applying plugin configuration to [email protected] failed. 
Error: {could_not_start,rabbitmq_mqtt, 
     {{shutdown, 
      {failed_to_start_child,'rabbit_mqtt_listener_sup_:::1883', 
      {shutdown, 
      {failed_to_start_child, 
      {ranch_listener_sup,{acceptor,{0,0,0,0,0,0,0,0},1883}}, 
      {shutdown, 
       {failed_to_start_child,ranch_acceptors_sup, 
       {listen_error,{acceptor,{0,0,0,0,0,0,0,0},1883},eacces}}}}}}}, 
     {rabbit_mqtt,start,[normal,[]]}}} 

有効なプラグインリストを印刷しました

[[email protected] rabbitmq]# rabbitmq-plugins list 
Configured: E = explicitly enabled; e = implicitly enabled 
| Status: [failed to contact [email protected] - status not shown] 
|/ 
[e ] amqp_client      3.6.1 
[ ] cowboy       1.0.3 
[ ] cowlib       1.0.1 
[e ] mochiweb       2.13.0 
[ ] rabbitmq_amqp1_0     3.6.1 
[ ] rabbitmq_auth_backend_ldap  3.6.1 
[ ] rabbitmq_auth_mechanism_ssl  3.6.1 
[ ] rabbitmq_consistent_hash_exchange 3.6.1 
[ ] rabbitmq_event_exchange   3.6.1 
[ ] rabbitmq_federation    3.6.1 
[ ] rabbitmq_federation_management 3.6.1 
[E ] rabbitmq_management    3.6.1 
[e ] rabbitmq_management_agent   3.6.1 
[ ] rabbitmq_management_visualiser 3.6.1 
[E ] rabbitmq_mqtt      3.6.1 
[ ] rabbitmq_recent_history_exchange 1.2.1 
[ ] rabbitmq_sharding     0.1.0 
[ ] rabbitmq_shovel     3.6.1 
[ ] rabbitmq_shovel_management  3.6.1 
[ ] rabbitmq_stomp     3.6.1 
[ ] rabbitmq_tracing     3.6.1 
[e ] rabbitmq_web_dispatch    3.6.1 
[ ] rabbitmq_web_stomp    3.6.1 
[ ] rabbitmq_web_stomp_examples  3.6.1 
[ ] sockjs       0.3.4 
[e ] webmachine      1.10.3 

ご覧のとおり、[E ] rabbitmq_management 3.6.1は、プラグインが明示的に有効になっています。

ので、私は正しく起動しているように見えるサービス

[[email protected] rabbitmq]# /sbin/service rabbitmq-server start 
Starting rabbitmq-server (via systemctl):     [ OK ] 

を起動しようとしました。そうではありません。

[[email protected] rabbitmq]# rabbitmqctl status 
Status of node '[email protected]' ... 
Error: unable to connect to node '[email protected]': nodedown 

DIAGNOSTICS 
=========== 

attempted to contact: ['[email protected]'] 

[email protected]: 
    * connected to epmd (port 4369) on iot-rabbit01 
    * epmd reports: node 'rabbit' not running at all 
        no other nodes on iot-rabbit01 
    * suggestion: start the node 

current node details: 
- node name: '[email protected]' 
- home dir: /var/lib/rabbitmq 
- cookie hash: pNNE23Tq7SUKunVAXkqReg== 

これはこれは/var/log/rabbitmq/[email protected]ファイル

=ERROR REPORT==== 24-Jan-2017::11:43:53 === 
Failed to start Ranch listener {acceptor,{0,0,0,0,0,0,0,0},1883} in ranch_tcp:listen([{port, 
                         1883}, 
                         {ip, 
                         {0, 
                         0, 
                         0, 
                         0, 
                         0, 
                         0, 
                         0, 
                         0}}, 
                         inet6, 
                         {backlog, 
                         128}, 
                         {nodelay, 
                         true}]) for reason eacces (permission denied) 

=INFO REPORT==== 24-Jan-2017::11:43:53 === 
stopped TCP Listener on [::]:5672 

=INFO REPORT==== 24-Jan-2017::11:43:53 === 
Error description: 
    {could_not_start,rabbitmq_mqtt, 
     {{shutdown, 
      {failed_to_start_child,'rabbit_mqtt_listener_sup_:::1883', 
       {shutdown, 
        {failed_to_start_child, 
         {ranch_listener_sup,{acceptor,{0,0,0,0,0,0,0,0},1883}}, 
         {shutdown, 
          {failed_to_start_child,ranch_acceptors_sup, 
           {listen_error, 
            {acceptor,{0,0,0,0,0,0,0,0},1883}, 
            eacces}}}}}}}, 
     {rabbit_mqtt,start,[normal,[]]}}} 

あなたはより多くの情報が必要な場合は私に連絡してくださいあるstartup_log

  RabbitMQ 3.6.1. Copyright (C) 2007-2016 Pivotal Software, Inc. 
    ## ##  Licensed under the MPL. See http://www.rabbitmq.com/ 
    ## ## 
    ########## Logs: /var/log/rabbitmq/[email protected] 
    ###### ##  /var/log/rabbitmq/[email protected] 
    ########## 
       Starting broker... 

BOOT FAILED 
=========== 

Error description: 
    {could_not_start,rabbitmq_mqtt, 
     {{shutdown, 
      {failed_to_start_child,'rabbit_mqtt_listener_sup_:::1883', 
       {shutdown, 
        {failed_to_start_child, 
         {ranch_listener_sup,{acceptor,{0,0,0,0,0,0,0,0},1883}}, 
         {shutdown, 
          {failed_to_start_child,ranch_acceptors_sup, 
           {listen_error, 
            {acceptor,{0,0,0,0,0,0,0,0},1883}, 
            eacces}}}}}}}, 
     {rabbit_mqtt,start,[normal,[]]}}} 

Log files (may contain more information): 
    /var/log/rabbitmq/[email protected] 
    /var/log/rabbitmq/[email protected] 

{"init terminating in do_boot",{could_not_start,rabbitmq_mqtt,{{shutdown,{failed_to_start_child,'rabbit_mqtt_listener_sup_:::1883',{shutdown,{failed_to_start_child,{ranch_listener_sup,{acceptor,{0,0,0,0,0,0,0,0},1883}},{shutdown,{failed_to_start_child,ranch_acceptors_sup,{listen_error,{acceptor,{0,0,0,0,0,0,0,0},1883},eacces}}}}}}},{rabbit_mqtt,start,[normal,[]]}}}} 

に表示される内容です。 ありがとうございます。

+0

ポート1883で何も実行されていないことを確認しましたか? 'sudo lsof -i -P -n'はどのポートが使用されているかを表示します – hardillb

+0

1883で何も実行されていません。 – Stefano

答えて

0

私の問題を修正しました。誰が私の同じ問題を抱えているだろうか。

カーネルが にEACCESSエラーで応答したため、プラグインはポート1883にバインドできませんでした。セキュリティツール(おそらく SELinux)には、そのポートがホワイトリストに登録されている必要があります。

私は問題を修正することができました。これは、SELinuxのホワイトリストでsemanage port --addでポート1883を追加します。二つの方法SELINUX=permissiveにまたはに文字列SELINUX=enforcingを編集するファイル/etc/selinux/configを編集

  1. に(気をつけて、それはセキュリティのせいです)SELINUX=disabled
  2. 可能です
関連する問題