RabbitMQ 加载页面时出现问题(连接重置错误标头 GET/FAV)

jja*_*dev 2 linux rabbitmq server

rabbitmq 已连接到我的端口,到目前为止一切看起来都很好,但是当我尝试在浏览器中连接到我的本地主机时,我收到此错误消息:

\n\n
The connection was reset\n\nThe connection to the server was reset while the page was loading.\n\n    The site could be temporarily unavailable or too busy. Try again in a few moments.\n    If you are unable to load any pages, check your computer\xe2\x80\x99s network connection.\n    If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web\n
Run Code Online (Sandbox Code Playgroud)\n\n

所以我做的第一件事就是查看我的rabbitmq日志,我看到了这个:

\n\n
 Starting RabbitMQ 3.7.9 on Erlang 20.2.2\n Copyright (C) 2007-2018 Pivotal Software, Inc.\n Licensed under the MPL.  See http://www.rabbitmq.com/\n2019-09-15 08:06:51.710 [info] <0.240.0> \n node           : rabbit@bowzer\n home dir       : /var/lib/rabbitmq\n config file(s) : (none)\n cookie hash    : XC8syc3LUBiQChoU4UJxPA==\n log(s)         : /var/log/rabbitmq/rabbit@bowzer.log\n                : /var/log/rabbitmq/rabbit@bowzer_upgrade.log\n database dir   : /var/lib/rabbitmq/mnesia/rabbit@bowzer\n2019-09-15 08:06:52.982 [info] <0.248.0> Memory high watermark set to 6421 MiB (6733540556 bytes) of 16054 MiB (16833851392 bytes) total\n2019-09-15 08:06:52.987 [info] <0.250.0> Enabling free disk space monitoring\n2019-09-15 08:06:52.987 [info] <0.250.0> Disk free limit set to 50MB\n2019-09-15 08:06:52.991 [info] <0.253.0> Limiting to approx 32668 file handles (29399 sockets)\n2019-09-15 08:06:52.991 [info] <0.254.0> FHC read buffering:  OFF\n2019-09-15 08:06:52.991 [info] <0.254.0> FHC write buffering: ON\n2019-09-15 08:06:52.993 [info] <0.240.0> Waiting for Mnesia tables for 30000 ms, 9 retries left\n2019-09-15 08:06:53.164 [info] <0.240.0> Waiting for Mnesia tables for 30000 ms, 9 retries left\n2019-09-15 08:06:53.164 [info] <0.240.0> Peer discovery backend rabbit_peer_discovery_classic_config does not support registration, skipping registration.\n2019-09-15 08:06:53.165 [info] <0.240.0> Priority queues enabled, real BQ is rabbit_variable_queue\n2019-09-15 08:06:53.219 [info] <0.278.0> Starting rabbit_node_monitor\n2019-09-15 08:06:53.241 [info] <0.306.0> Making sure data directory \'/var/lib/rabbitmq/mnesia/rabbit@bowzer/msg_stores/vhosts/628WB79CIFDYO9LJI6DKMI09L\' for vhost \'/\' exists\n2019-09-15 08:06:53.302 [info] <0.306.0> Starting message stores for vhost \'/\'\n2019-09-15 08:06:53.303 [info] <0.310.0> Message store "628WB79CIFDYO9LJI6DKMI09L/msg_store_transient": using rabbit_msg_store_ets_index to provide index\n2019-09-15 08:06:53.305 [info] <0.306.0> Started message store of type transient for vhost \'/\'\n2019-09-15 08:06:53.306 [info] <0.313.0> Message store "628WB79CIFDYO9LJI6DKMI09L/msg_store_persistent": using rabbit_msg_store_ets_index to provide index\n2019-09-15 08:06:53.308 [info] <0.306.0> Started message store of type persistent for vhost \'/\'\n2019-09-15 08:06:53.312 [warning] <0.334.0> Setting Ranch options together with socket options is deprecated. Please use the new map syntax that allows specifying socket options separately from other options.\n2019-09-15 08:06:53.313 [info] <0.348.0> started TCP listener on [::]:5672\n2019-09-15 08:06:53.314 [info] <0.240.0> Setting up a table for connection tracking on this node: tracked_connection_on_node_rabbit@bowzer\n2019-09-15 08:06:53.314 [info] <0.240.0> Setting up a table for per-vhost connection counting on this node: tracked_connection_per_vhost_on_node_rabbit@bowzer\n2019-09-15 08:06:53.315 [info] <0.33.0> Application rabbit started on node rabbit@bowzer\n2019-09-15 08:06:53.375 [notice] <0.86.0> Changed loghwm of /var/log/rabbitmq/rabbit@bowzer.log to 50\n2019-09-15 08:06:53.540 [info] <0.5.0> Server startup complete; 0 plugins started.\n2019-09-15 08:10:51.196 [info] <0.378.0> accepting AMQP connection <0.378.0> (127.0.0.1:55986 -> 127.0.0.1:5672)\n2019-09-15 08:10:51.196 [error] <0.378.0> closing AMQP connection <0.378.0> (127.0.0.1:55986 -> 127.0.0.1:5672):\n{bad_header,<<"GET / HT">>}\n2019-09-15 08:13:26.916 [info] <0.385.0> accepting AMQP connection <0.385.0> (127.0.0.1:55990 -> 127.0.0.1:5672)\n2019-09-15 08:13:26.916 [error] <0.385.0> closing AMQP connection <0.385.0> (127.0.0.1:55990 -> 127.0.0.1:5672):\n{bad_header,<<"GET / HT">>}\n2019-09-15 08:13:27.007 [info] <0.389.0> accepting AMQP connection <0.389.0> (127.0.0.1:55992 -> 127.0.0.1:5672)\n2019-09-15 08:13:27.007 [error] <0.389.0> closing AMQP connection <0.389.0> (127.0.0.1:55992 -> 127.0.0.1:5672):\n{bad_header,<<"GET /fav">>}\n
Run Code Online (Sandbox Code Playgroud)\n\n

所以我去检查了我的端口,我得到了这个:

\n\n

须藤 lsof -i -p -n | grep 兔子MQ:

\n\n
epmd      5687        rabbitmq    3u  IPv4  59822      0t0  TCP *:4369 (LISTEN)\n\nepmd      5687        rabbitmq    4u  IPv6  59823      0t0  TCP *:4369 (LISTEN)\n\nbeam.smp  5892        rabbitmq   59u  IPv4  57068  0t0  TCP *:25672 (LISTEN)\n\nbeam.smp  5892        rabbitmq   69u  IPv6  58166      0t0  TCP *:5672 (LISTEN)\n
Run Code Online (Sandbox Code Playgroud)\n\n

sudo 服务rabbitmq-服务器状态:

\n\n
\xe2\x97\x8f rabbitmq-server.service - RabbitMQ broker\n   Loaded: loaded (/lib/systemd/system/rabbitmq-server.service; enabled; vendor preset:\n   Active: active (running) since Sun 2019-09-15 07:53:32 MST; 2min 19s ago\n Main PID: 875 (beam.smp)\n   Status: "Initialized"\n    Tasks: 90 (limit: 4915)\n   CGroup: /system.slice/rabbitmq-server.service\n           \xe2\x94\x9c\xe2\x94\x80 875 /usr/lib/erlang/erts-9.2/bin/beam.smp -W w -A 64 -P 1048576 -t 500000\n           \xe2\x94\x9c\xe2\x94\x801037 /usr/lib/erlang/erts-9.2/bin/epmd -daemon\n           \xe2\x94\x9c\xe2\x94\x801387 erl_child_setup 32768\n           \xe2\x94\x9c\xe2\x94\x801691 inet_gethost 4\n           \xe2\x94\x94\xe2\x94\x801692 inet_gethost 4\n\nSep 15 07:53:27 bowzer rabbitmq-server[875]:   ##  ##\nSep 15 07:53:27 bowzer rabbitmq-server[875]:   ##  ##      RabbitMQ 3.7.9. Copyright (C\nSep 15 07:53:27 bowzer rabbitmq-server[875]:   ##########  Licensed under the MPL.  See\nSep 15 07:53:27 bowzer rabbitmq-server[875]:   ######  ##\nSep 15 07:53:27 bowzer rabbitmq-server[875]:   ##########  Logs: /var/log/rabbitmq/rabb\nSep 15 07:53:27 bowzer rabbitmq-server[875]:                     /var/log/rabbitmq/rabb\nSep 15 07:53:27 bowzer rabbitmq-server[875]:               Starting broker...\nSep 15 07:53:32 bowzer rabbitmq-server[875]: systemd unit for activation check: "rabbit\nSep 15 07:53:32 bowzer systemd[1]: Started RabbitMQ broker.\nSep 15 07:53:33 bowzer rabbitmq-server[875]:  completed with 0 plugins.\n
Run Code Online (Sandbox Code Playgroud)\n\n

我还注意到,当其他人下载并安装服务器时,他们会“使用 6 个插件完成”,而我的则从 0 个插件开始。

\n

小智 9

您的浏览器正在尝试在端口 5672上进行HTTP通信,该端口是RabbitMQ 代理的AMQP端口。

如果您想访问管理控制台,请启用管理插件并通过http://your-rabbitmq-host:15672/访问。