Rabbitmq tracing: Unable to enable on management console - rabbitmq

I enabled tracing, using,
rabbitmq-plugins enable rabbitmq_tracing
rabbitmqctl trace_on
rabbitmq-plugins list
[E] rabbitmq_tracing                  3.1.1
However I dont see the plugins under the admin tab. I'm using 3.1.1. Any suggestions?

After installed the plug-in, you have to restart RabbitMQ.
Then the plug-in will be available to the console.
Before restart the command rabbitmq-plugins list shows [E] rabbitmq_tracing but is not available to the console.

Related

RABBITMQ - Applying Plugin Failed

EDIT: After setting the rabbitmq variables up in System Environment Variables and trying another un/reinstall the issue is resolved.
The following plugins have been enabled: rabbitmq_shovel
Applying plugin configuration to rabbit#MSGTEST01... started 1 plugin.
END EDIT
c:\RabbitMQ\rabbitmq_server-3.6.12\sbin>rabbitmq-plugins enable
rabbitmq_shovel rabbitmq_shovel_management Plugin configuration
unchanged.
Applying plugin configuration to rabbit#M... failed. Error:
{enabled_plugins_mismatch,"c:\Users\\AppData\Roaming\RabbitMQ
\ENABLE~1",
"c:\RabbitMQ\ENABLE~1"}
I set the following then reinstalled the service:
set RABBITMQ_BASE=c:\RabbitMQ
set RABBITMQ_CONFIG_FILE=c:\RabbitMQ\rabbitmq
set RABBITMQ_LOG_BASE=c:\RabbitMQ\logs
set RABBITMQ_MNESIA_BASE=c:\RabbitMQ\db
set RABBITMQ_ENABLED_PLUGINS_FILE=c:\RabbitMQ\enabled_plugins
Why is it still looking in my roaming profile for anything? Moreover, ENABLE~1 doesn't look like a valid filename.
I've tried blowing away my roaming profile data, RabbitMQ recreates the files.
I've tried copying my C:\RabbitMQ\enables_plugins to roaming, same thing.
Tried the reverse, same thing.
I've tried uninstalling and resintalling the service, same thing.
I'm able to enable the management ui after install, but not rabbitmq_shovel and cannot figure out what the issue is.
Again, this works after install:
rabbitmq-plugins enable rabbitmq_management
This fails with the error above:
rabbitmq-plugins enable rabbitmq_shovel
I'm running these commands as Admin in CMD.
Set up the variables in System Environment Variables and perform the following in CMD as Admin:
rabbitmqctl shutdown
rabbitmqctl stop
rabbitmq-service.bat remove
rabbitmq-service.bat install
rabbitmq-service.bat start
rabbitmq-plugins enable rabbitmq_management
rabbitmq-plugins enable rabbitmq_shovel
That worked for me.
I was able to fix the issue without having to uninstall RabbitMQ
Open the files named "enabled_plugins" at the two directory locations int he error your recived.  For me, those directories were "C:\Users\UserName\AppData\Roaming\RabbitMQ" and "C:\ProgramData\RabbitMQ".
For me, one file had:
[rabbitmq_management].
while the other was empty.  I copied the config snippet above into the empty file and saved it.
Run the commands as ADMIN in Command Prompt:
rabbitmqctl shutdown
rabbitmqctl stop
rabbitmq-service.bat start
rabbitmq-plugins enable rabbitmq_management
I did receive the same "enabled_plugins_mismatch" error; however, when I browsed to my RabbitMQ UI plugin at "http://localhost:15672/#/" the UI showed up and is functioning.

Can RabbitMQ "disk free monitoring" be enabled?

In response to this curl to the RabbitMQ Management API ...
curl localhost:15672/api/nodes/{node name}/ -u {user} | jq .
... after typing the password, I am getting a response that includes this line ...
"disk_free_limit": "disk_free_monitoring_disabled",
How can I enable this, or is it a build-time choice or platform limitation?
I am using RabbitMQ 3.6.6 on CentOS release 6.8 (Final).
UPDATE: I just noticed this erlang startup flag (using ps -ef | grep rabbit):
-os_mon start_disksup false
That turned out to be unrelated. It is set by rabbitmq-server that way, even in installations where I don't get the problem.
you get this error when rabbit_disk_monitor can't execute:
/bin/df -kP ++ dir
check the logs, maybe is a permission problem and or try to execute /bin/df -kP and see the result

RabbitMQ: Unable to start rabbitmq_management plugin

Version:
> sudo rabbitmqctl status | grep '{rabbit,"RabbitMQ",'
{rabbit,"RabbitMQ","3.5.6"},
Error:
> sudo rabbitmq-plugins enable rabbitmq_management
Plugin configuration unchanged.
Applying plugin configuration to rabbit#ip-172-31-26-169... failed.
* Could not contact node rabbit#ip-172-31-26-169.
Changes will take effect at broker restart.
* Options: --online - fail if broker cannot be contacted.
--offline - do not try to contact broker.
Rabbit is running:
> sudo service rabbitmq-server status
Status of node 'rabbit#ip-172-31-26-169' ...
[{pid,22865},
..
You need not necessary to contact broker if you are on the same machine.
so try this command
>rabbitmq-plugins.bat enable rabbitmq_management --offline
offline indicates that do not try to contact the broker.
I was getting the same error when trying to enable management console. To my suprise I typed http://localhost:15672/#/ in the browser and I could get to setup stuff through the management console. I had checked the availability of all the ports and everything looked good.
So I think that error is kind of misleading. Just try to go to the console in browser.
refs: http://arcware.net/installing-rabbitmq-on-windows/
Failed to start rabbitmq-management plugin on Windows

How do I run Asterisk as user other than root?

I compiled Asterisk 11 from source as user root on CentOS. Now I want Asterisk to run as user asterisk group asterisk. I have uncommented
#AST_USER="asterisk"
#AST_USER="asterisk"
in
/etc/sysconfig/asterisk
I have also tried uncommenting the same variables in
/usr/local/src/asterisk-11.17.1/contrib/init.d/etc_default_asterisk
I restart service asterisk and even reboot the server with the referred condition and when I ps ax | grep [a]sterisk, I still get
4457 pts/0 S 0:00 /bin/sh /usr/sbin/safe_asterisk
4459 pts/0 Sl 0:01 /usr/sbin/asterisk -f -vvvg -c
instead of
4457 pts/0 S 0:00 /bin/sh /usr/sbin/safe_asterisk -U asterisk -G asterisk
4459 pts/0 Sl 0:01 /usr/sbin/asterisk -f -vvvg -c -U asterisk -G asterisk
I obviously added user asterisk and added group asterisk.
I kindly ask you to tell me how to proceed to get asterisk running as asterisk in group asterisk. By the way, if you add directions on which files and directories to change permissions on, to get asterisk running as I need, would be great.
Feedback will be more than welcome.
Stop Asterisk
First you need to create the asterisk user if not there(mostly its automatically created on install)
Then
# useradd -d /var/lib/asterisk/ asterisk
Next give ownership of the following dirs(spool,lib and run) to asterisk
#chown -R asterisk /var/spool/asterisk/ /var/lib/asterisk/ /var/run/asterisk/
copy this file form the contrib/init.d/ directory of you asterisk download
~contrib/init.d#cp etc_default_asterisk /etc/default/asterisk
Edit the file /etc/default/asterisk by uncommenting the asterisk user
AST_USER="asterisk"
AST_GROUP="asterisk"
Lastly edit the file /etc/asterisk/asterisk.conf
uncomment the runuser and rungroup as asterisk
runuser = asterisk
rungroup = asterisk
restart asterisk
#/etc/init.d/asterisk start
This should be fine
In /etc/asterisk/asterisk.conf you can specify any user
Note: you have change permission of /var/run/asterisk/ and /var/spool/asterisk/ folder, also change permission on log folder.
i got the same issue. it's a bug into contrib script /etc/rc.d/init.d/asterisk
The original line to start safe_asterisk daemon is
if [ "x$COLOR" = "xyes" ]; then
                export TERM=linux
              daemon sh -c "$DAEMON $ASTARGS -c" >/dev/null </dev/null 2>&1 &
This line doesn't pass any supplied argument, even if $ASTARGS contains all required stuff. Even -c isn't passed correctly
If you replace this line by :
daemon $DAEMON -U asterisk -G asterisk
It will do the job to bypass the problem.
Saw on CentOS 7/ Asterisk 13

RabbitMQ: Verify version of rabbitmq

How can I verify which version of rabbitmq is running on a server?
Is there a command to verify that rabbitmq is running?
sudo rabbitmqctl status
and look for line that looks like that:
{rabbit,"RabbitMQ","2.6.1"},
You can simply execute from the command line:
sudo rabbitmqctl status | grep rabbit
If rabbitimq can not start I found the only way to determine version is via installer system.
Eample Debian/Ubuntu:
dpkg -s rabbitmq-server | grep Version
If you have no access to rabbitmqctl or rabbitmq-server is not running, on linux do :
ls /usr/lib/rabbitmq/lib/
I got :
rabbitmq_server-3.5.6
As Marek said on a local server, or, on a remote server (using amqplib):
from amqplib import client_0_8 as amqp
import sys
conn = amqp.Connection(host=sys.argv[1], userid="guest", password="guest", virtual_host="/", insist=False)
for k, v in conn.server_properties.items():
print k, v
Save as checkVersion.py and run with python checkVersion.py dev.rabbitmq.com:
% python checkVersion.py dev.rabbitmq.com
information Licensed under the MPL. See http://www.rabbitmq.com/
product RabbitMQ
copyright Copyright (C) 2007-2011 VMware, Inc.
capabilities {}
platform Erlang/OTP
version 2.6.0
On debian systems, you can just run:
dpkg-query --showformat='${Version}' --show rabbitmq-server
To get RabbitMQ version using the .NET/C# RabbitMQ Client Library:
using (var connection = connectionFactory.CreateConnection())
{
if (connection.ServerProperties.ContainsKey("version"))
Console.WriteLine("Version={0}",
Encoding.UTF8.GetString((byte[])connection.ServerProperties["version"]));
}
Output:
Version=3.6.3
In the likely event you're using the "management" (web) plug-in, the RabbitMQ version appears in the upper-right corner of every web page, along with the version of the Erlang run-time.
I use following command to trim output down to version,
rabbitmqctl status | grep "{rabbit,\"RabbitMQ\""
Output:
{rabbit,"RabbitMQ","3.7.3"},
Since I was looking to do this in C# on a Windows machine and all the current answers are for *nix, I'll post the code that I ended up using:
public string GetRabbitMqVersion()
{
string prefix = "rabbitmq_server-";
var dirs = System.IO.Directory.EnumerateDirectories(#"C:\Program Files (x86)\RabbitMQ Server", string.Format("{0}*",prefix));
foreach (var dir in dirs)
{
//Just grab the text after 'rabbitmq_server-' and return the first item found
var i = dir.LastIndexOf(prefix);
return dir.Substring(i+16);
}
return "Unknown";
}
On Centos you can use yum list rabbitmq-server.
Login to management ui and in top right you can find the version. Also use the following command to find the version
# sudo bash
# rabbitmqctl status | grep rabbit