|
|
遇到一个问题,部署服务器,需要用rabbitmq自带的一个web UI监控组件,但是15672的端口没有对外映射。尝试了几种办法。开始修改rabbitmq.config,rabbitmq-ebv.config,总是不成功,因为修改的是rabbitmq-server的启动端口号,从外面访问的是web UI组件启动的端口号,两个是不一样的。然后尝试的rabbitmqadmin,因为web UI 监控页面也是调用的httpapi ,rabbitmqadmin是从官网下载一个文本文件赋予可执行权限才可,注意你放置这个文件的位置要在你的PATH里面。
; y6 n4 f) J: p. ]国外网站显示:! j0 c" |. X& |+ W; J
I’m new to RabbitMQ, but after a bit of googling and experimentation,
7 v8 P) G# E% u. b; ^( x4 h; yI was able to run the management console.
1 L: f1 M9 W( M+ Y: I) M8 UThe problem is that only port 8080 is forwarded from your Cloud9 2 I# M# c9 S: A! W
workspace, and RabbitMQ’s default port is explained here:
5 @, ?. b* f7 M q- o& }7 x& p$ lThe web UI is located at: http://server-name:15672/ To fix, we need to 0 n6 q' v2 U; W* w, t* c$ T. \& G
modify the configuration to start the web UI at port 8080. Here are + @5 @. u! e4 E/ l- z- W1 C% \- u1 Z
the steps I followed to get that working:& z. o. M# r: R2 N) }! m3 D% F$ J
Install RabbitMQ (Steps outlined here: 4 L+ e- v8 f, \$ `) I
http://www.rabbitmq.com/install-debian.html) Enable the management
( Y$ W/ {% i3 @4 o7 R( d' ?console: sudo rabbitmq-plugins enable rabbitmq_management There wasn’t * [7 S, s3 L. W' H! l: E
a rabbitmq.config file for me in RABBITMQHOME/etc/rabbitmq/,soIcopiedtheexamplefrom/usr/share/doc/rabbitmq−server/(afterunzippingit).EditedRABBITMQHOME/etc/rabbitmq/,soIcopiedtheexamplefrom/usr/share/doc/rabbitmq−server/(afterunzippingit).EditedRABBITMQ_HOME/etc/rabbitmq/rabbitmq.config and 8 S" p* m; ^: L) r7 ^
found the rabbitmq_management key. There’s already an existing setup 0 f) s$ M; c4 K$ F( j
that’s commented out. I replaced it with:
& T5 i8 ~) Z0 @2 H* w0 ^4 {7 i+ b+ @{listener, [{port, 8080},
F$ O( \! }, f, i& z{ip, “0.0.0.0”}, ) L s" j- P4 h# }
{ssl, false}]}% A. B5 t( c* H& i% H7 F( J- V% p
Then I restarted the RabbitMQ server and visiting my url, i.e.:
' U& O; q3 C3 J X3 q" ~$ Khttps://-.c9.io showed me the RabbitMQ
, x7 j: O; j1 H1 {! Cmanagement login screen.
/ G! T3 |' E; dHope this helps!
6 O! N! R$ c2 m, `
4 U: J4 Y* P. ^/ B( U) j3 P |
|