Ah - you use the perl scripts individually, I was expecting that we called the python script once and it in turn calls all the perl scripts.
So the command would be something like:
perl epaplugins/RabbitMQ/RabbitMQ_Connections.pl --host=localhost --port=5672 --user=guest --pswd=guest
right? I tried that though, and I get this if I run it myself from the command line:
[root@myhost RabbitMQ]# perl epaplugins/RabbitMQ/RabbitMQ_Connections.pl --host=localhost --port=5672 --user=guest --pswd=guest
Traceback (most recent call last):
File "/opt/wily/RabbitMQ/epaplugins/RabbitMQ/rabbitmqadmin.py", line 943, in <module>
main()
File "/opt/wily/RabbitMQ/epaplugins/RabbitMQ/rabbitmqadmin.py", line 384, in main
method()
File "/opt/wily/RabbitMQ/epaplugins/RabbitMQ/rabbitmqadmin.py", line 526, in invoke_list
format_list(self.get(uri), cols, obj_info, self.options)
File "/opt/wily/RabbitMQ/epaplugins/RabbitMQ/rabbitmqadmin.py", line 407, in get
return self.http("GET", "/api%s" % path, "")
File "/opt/wily/RabbitMQ/epaplugins/RabbitMQ/rabbitmqadmin.py", line 436, in http
resp = conn.getresponse()
File "/usr/lib64/python2.6/httplib.py", line 990, in getresponse
response.begin()
File "/usr/lib64/python2.6/httplib.py", line 391, in begin
version, status, reason = self._read_status()
File "/usr/lib64/python2.6/httplib.py", line 349, in _read_status
line = self.fp.readline()
File "/usr/lib64/python2.6/socket.py", line 433, in readline
data = recv(1)
socket.error: [Errno 104] Connection reset by peer
And the same thing in the epa.log when running it in the agent:
9/12/14 03:36:59 PM BST [INFO] [EPAgent.EPAgent RABBITMQ_CONNECTIONS] Starting plugin 'RABBITMQ_CONNECTIONS'.
9/12/14 03:36:59 PM BST [ERROR] [EPAgent.EPAgent RABBITMQ_CONNECTIONS] [ stderr ] Traceback (most recent call last):
9/12/14 03:36:59 PM BST [ERROR] [EPAgent.EPAgent RABBITMQ_CONNECTIONS] [ stderr ] File "/opt/wily/RabbitMQ/epaplugins/RabbitMQ/rabbitmqadmin.py", line 943, in <module>
9/12/14 03:36:59 PM BST [ERROR] [EPAgent.EPAgent RABBITMQ_CONNECTIONS] [ stderr ] main()
9/12/14 03:36:59 PM BST [ERROR] [EPAgent.EPAgent RABBITMQ_CONNECTIONS] [ stderr ] File "/opt/wily/RabbitMQ/epaplugins/RabbitMQ/rabbitmqadmin.py", line 384, in main
9/12/14 03:36:59 PM BST [ERROR] [EPAgent.EPAgent RABBITMQ_CONNECTIONS] [ stderr ] method()
9/12/14 03:36:59 PM BST [ERROR] [EPAgent.EPAgent RABBITMQ_CONNECTIONS] [ stderr ] File "/opt/wily/RabbitMQ/epaplugins/RabbitMQ/rabbitmqadmin.py", line 526, in invoke_list
9/12/14 03:36:59 PM BST [ERROR] [EPAgent.EPAgent RABBITMQ_CONNECTIONS] [ stderr ] format_list(self.get(uri), cols, obj_info, self.options)
9/12/14 03:36:59 PM BST [ERROR] [EPAgent.EPAgent RABBITMQ_CONNECTIONS] [ stderr ] File "/opt/wily/RabbitMQ/epaplugins/RabbitMQ/rabbitmqadmin.py", line 407, in get
9/12/14 03:36:59 PM BST [ERROR] [EPAgent.EPAgent RABBITMQ_CONNECTIONS] [ stderr ] return self.http("GET", "/api%s" % path, "")
9/12/14 03:36:59 PM BST [ERROR] [EPAgent.EPAgent RABBITMQ_CONNECTIONS] [ stderr ] File "/opt/wily/RabbitMQ/epaplugins/RabbitMQ/rabbitmqadmin.py", line 436, in http
9/12/14 03:36:59 PM BST [ERROR] [EPAgent.EPAgent RABBITMQ_CONNECTIONS] [ stderr ] resp = conn.getresponse()
9/12/14 03:36:59 PM BST [ERROR] [EPAgent.EPAgent RABBITMQ_CONNECTIONS] [ stderr ] File "/usr/lib64/python2.6/httplib.py", line 990, in getresponse
9/12/14 03:36:59 PM BST [ERROR] [EPAgent.EPAgent RABBITMQ_CONNECTIONS] [ stderr ] response.begin()
9/12/14 03:36:59 PM BST [ERROR] [EPAgent.EPAgent RABBITMQ_CONNECTIONS] [ stderr ] File "/usr/lib64/python2.6/httplib.py", line 391, in begin
9/12/14 03:36:59 PM BST [ERROR] [EPAgent.EPAgent RABBITMQ_CONNECTIONS] [ stderr ] version, status, reason = self._read_status()
9/12/14 03:36:59 PM BST [ERROR] [EPAgent.EPAgent RABBITMQ_CONNECTIONS] [ stderr ] File "/usr/lib64/python2.6/httplib.py", line 349, in _read_status
9/12/14 03:36:59 PM BST [ERROR] [EPAgent.EPAgent RABBITMQ_CONNECTIONS] [ stderr ] line = self.fp.readline()
9/12/14 03:36:59 PM BST [ERROR] [EPAgent.EPAgent RABBITMQ_CONNECTIONS] [ stderr ] File "/usr/lib64/python2.6/socket.py", line 433, in readline
9/12/14 03:36:59 PM BST [ERROR] [EPAgent.EPAgent RABBITMQ_CONNECTIONS] [ stderr ] data = recv(1)
9/12/14 03:36:59 PM BST [ERROR] [EPAgent.EPAgent RABBITMQ_CONNECTIONS] [ stderr ] socket.error: [Errno 104] Connection reset by peer
Am I doing something wrong?