unable to connect to remote host with rabbitmqadmin

Gnagno picture Gnagno · Sep 14, 2016 · Viewed 7.1k times · Source

I'm trying to connect to a remote rabbitmq host using the cli rabbitmqadmin.

The command I'm trying to execute is:

rabbitmqadmin --host=$RABBITMQ_HOST --port=443 --ssl --vhost=$RABBITMQ_VHOST --username=$RABBITMQ_USERNAME --password=$RABBITMQ_PASSWORD list queues

Before you ask: the environmental variables RABBITMQ_HOST, RABBITMQ_VHOST and so on are set... I double and triple checked this already.

The error I get back is:

Traceback (most recent call last):
File "/usr/local/sbin/rabbitmqadmin", line 1007, in <module>
main()
File "/usr/local/sbin/rabbitmqadmin", line 413, in main
method()
File "/usr/local/sbin/rabbitmqadmin", line 588, in invoke_list
format_list(self.get(uri), cols, obj_info, self.options)
File "/usr/local/sbin/rabbitmqadmin", line 436, in get
return self.http("GET", "%s/api%s" % (self.options.path_prefix, path), "")
File "/usr/local/sbin/rabbitmqadmin", line 475, in http
self.options.port)
File "/usr/local/sbin/rabbitmqadmin", line 451, in __initialize_https_connection
context = self.__initialize_tls_context())
File "/usr/local/sbin/rabbitmqadmin", line 467, in __initialize_tls_context
self.options.ssl_key_file)

TypeError: coercing to Unicode: need string or buffer, NoneType found

From the last line I assume it's a python related problem, my current python version is 2.7.12, if I try to connect to the local instance of rabbitmq with

rabbitmqadmin list queues

everything works fine. Any help is greatly appreciated thanks :)

Answer

Lovisa Johansson picture Lovisa Johansson · Nov 28, 2016

Validate that you are using the same rabbitmqadmin version as the version of your remote hosted broker. Using a mismatching rabbitmqadmin version will result in that error (for example rabbitmqadmin 3.6.4 querying a 3.5.7 server).

Browse to http://server-name:15672/cli/ and download correct tool from there.

https://github.com/rabbitmq/rabbitmq-management/issues/299