看到这里应该知道他的具体位置了吧~
MacBook-Pro:rabbitmq Tony$ pwd /usr/local/Cellar/rabbitmq/3.5.6/etc/rabbitmq MacBook-Pro:rabbitmq Tony$ ls rabbitmq-env.conf rabbitmq.config.example然后我建立 rabbitmq-env.conf 之后 是然并卵的~ 我修改了一下端口号,结果还是没有生效。我就差重启电脑了。我目前在按照一台linux的rabbitmq 一会在 LINUX下测试一下。 后面补充一下:在LINUX环境当中测试的确没有任何问题,WHAT THE FUCK 为什么mac os上没有生效~? LINUX的配置文件位置 /etc/rabbitmq/rabbitmq-env.conf
关于环境配置 引用一下 官网:
好再说说rabbitmq.config 哎哟,好没有底气啊。测试不出来,算了吧··· 一会再尝试一下 linux 看看可不可以。
官方提出的最小配置如下:
[ {rabbit, [{tcp_listeners, [5673]}]} ].其实配置上非常像 JSON 只要仔细观察就能分析出它的编写格式~ 遗憾的是经过测试也是没有生效。之后后面慢慢查看原因了。
后面补充在LINUX 上同样生效,就是不知道为什么mac上不生效。
以下就是官方提供的配置文件位置:
Generic UNIX - $RABBITMQ_HOME/etc/rabbitmq/
Debian - /etc/rabbitmq/
RPM - /etc/rabbitmq/
Mac OS X (Homebrew) - ${install_prefix}/etc/rabbitmq/, the Homebrew prefix is usually /usr/local
Windows - %APPDATA%\RabbitMQ\
由于目前我已经在linux之中安装好rabbitMQ,我要抛弃mac 的rabbitMQ了。但是在远程访问rabbitMQ会出错,因为guest用户只能在回环地址中使用,也就是说你只能在本地使用。 然后我给出一下JAVA 远程连接时的错误log
Exception in thread "main" com.rabbitmq.client.PossibleAuthenticationFailureException: Possibly caused by authentication failure at com.rabbitmq.client.impl.AMQConnection.start(AMQConnection.java:355) at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:516) at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:533) at com.maxfunner.Consumer.createConnectionAndChannel(Consumer.java:35) at com.maxfunner.Consumer.main(Consumer.java:67) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147) Caused by: com.rabbitmq.client.ShutdownSignalException: connection error; reason: java.net.SocketException: Connection reset at com.rabbitmq.utility.ValueOrException.getValue(ValueOrException.java:67) at com.rabbitmq.utility.BlockingValueOrException.uninterruptibleGetValue(BlockingValueOrException.java:33) at com.rabbitmq.client.impl.AMQChannel$BlockingRpcContinuation.getReply(AMQChannel.java:343) at com.rabbitmq.client.impl.AMQChannel.privateRpc(AMQChannel.java:216) at com.rabbitmq.client.impl.AMQChannel.rpc(AMQChannel.java:202) at com.rabbitmq.client.impl.AMQConnection.start(AMQConnection.java:347) ... 9 more Caused by: java.net.SocketException: Connection reset at java.net.SocketInputStream.read(SocketInputStream.java:209) at java.net.SocketInputStream.read(SocketInputStream.java:141) at java.io.BufferedInputStream.fill(BufferedInputStream.java:246) at java.io.BufferedInputStream.read(BufferedInputStream.java:265) at java.io.DataInputStream.readUnsignedByte(DataInputStream.java:288) at com.rabbitmq.client.impl.Frame.readFrom(Frame.java:95) at com.rabbitmq.client.impl.SocketFrameHandler.readFrame(SocketFrameHandler.java:131) at com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java:515) “guest” user can only connect via localhost