Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CentOS running RabbitMQ failed to create a trace file and log on other vhost remotely

Tags:

linux

rabbitmq

We have installed and run RabbitMQ on a CentOS server. Although it is OK to create a trace file using Firehose tracer from the management console on another computer remotely in the vhost that is under permission ofthe guest user, it is failed to create the same log file remotely in the other vhosts which are not under permission of the guest user.

For instance, in the figure below, we simply create the testLogTracer on the test vhost but it is failed to create the same log file testLogTracer2 on test2 vhost. The only difference between the two vhosts is that the guest user has permission over the test vhost.

enter image description here

Update:

The latest server error which is added to the file [email protected] at the time of creating the trace file represented below:

=ERROR REPORT==== 26-Jan-2016::13:13:19 ===
webmachine error: path="/api/traces/hafizTest/newTraceFile"
"Bad Request"

Also user "moha" has full permission like user "guest" over both vhost "test" and "test2". The permission over both virtual hosts represented in figures below.

user permission over vhost "test" user permission over vhost "test2"

like image 711
moha Avatar asked Mar 13 '23 12:03

moha


1 Answers

I have asked my question in github and RabbitMQ-users group and thank you to Micheal Klishin who answered my quesion.

Before RabbitMq 3.6.0, the only user that can create a trace file over a virtual host remotely was guest user. Fortunately, in the latest version (e.g. 3.6.0) other user can create a trace file over a virtual host by adding rabbitmq_tracing.username and rabbitmq_tracing.password to the rabbitmq.config file.

This file is not available in the installation time and you should add it in the directory /etc/rabbitmq by yourself. One can simply add the lines below to the config file in order to change the default user (e.g. guest) for creating trace file over RabbitMQ.

{rabbitmq_tracing, 
    [{username, "user"},
     {password, "pass"}]
 },
like image 138
moha Avatar answered Apr 06 '23 12:04

moha