Thanks Michael, that did it:

>>> x = xmlrpclib.ServerProxy('http://user:[email protected]:9001/RPC2')
>>> x.system.listMethods()
['supervisor.addProcessGroup', 'supervisor.clearAllProcessLogs', 
'supervisor.clearLog', 'supervisor.clearProcessLog', 
'supervisor.clearProcessLogs', 'supervisor.getAPIVersion', 
'supervisor.getAllConfigInfo', 'supervisor.getAllProcessInfo', 
'supervisor.getIdentification', 'supervisor.getPID', 
'supervisor.getProcessInfo', 'supervisor.getState', 
'supervisor.getSupervisorVersion', 'supervisor.getVersion', 
'supervisor.readLog', 'supervisor.readMainLog', 'supervisor.readProcessLog', 
'supervisor.readProcessStderrLog', 'supervisor.readProcessStdoutLog', 
'supervisor.reloadConfig', 'supervisor.removeProcessGroup', 
'supervisor.restart', 'supervisor.sendProcessStdin', 
'supervisor.sendRemoteCommEvent', 'supervisor.shutdown', 
'supervisor.startAllProcesses', 'supervisor.startProcess', 
'supervisor.startProcessGroup', 'supervisor.stopAllProcesses', 
'supervisor.stopProcess', 'supervisor.stopProcessGroup', 
'supervisor.tailProcessLog', 'supervisor.tailProcessStderrLog', 
'supervisor.tailProcessSt
 doutLog', 'system.listMethods', 'system.methodHelp', 'system.methodSignature', 
'system.multicall']

#########

Looks like the docs here need to be updated:

http://supervisord.org/introduction.html#supervisor-components

Where did you find the pointer to the RPC2 URI?

Thanks again!

On Aug 24, 2011, at 3:18 PM, [email protected] wrote:

> Not sure if this will work, but have you tried:
> 
> x = xmlrpclib.ServerProxy('http://user:[email protected]:9001/RPC2')
> 
> -Michael
> 
> On 8/24/11 5:11 PM, "Michael Barrett" <[email protected]> wrote:
> 
>> I'm attempting to get the XML-RPC interface working in supervisor
>> 3.0.8a-1 in Ubuntu Lucid (10.04LTS).
>> 
>> I've setup the following in the supervisor config file:
>> 
>> [inet_http_server]
>> port = 127.0.0.1:9001
>> username = user
>> password = 123
>> 
>> I then attempt to contact it via the python xmlrpclib:
>> 
>>>>> x = xmlrpclib.ServerProxy('http://user:[email protected]:9001/')
>>>>> x
>> <ServerProxy for user:[email protected]:9001/>
>>>>> x.system.listMethods()
>> Traceback (most recent call last):
>> File "<stdin>", line 1, in <module>
>> File "/usr/lib/python2.6/xmlrpclib.py", line 1199, in __call__
>>   return self.__send(self.__name, args)
>> File "/usr/lib/python2.6/xmlrpclib.py", line 1489, in __request
>>   verbose=self.__verbose
>> File "/usr/lib/python2.6/xmlrpclib.py", line 1253, in request
>>   return self._parse_response(h.getfile(), sock)
>> File "/usr/lib/python2.6/xmlrpclib.py", line 1392, in _parse_response
>>   return u.close()
>> File "/usr/lib/python2.6/xmlrpclib.py", line 836, in close
>>   raise ResponseError()
>> xmlrpclib.ResponseError: ResponseError()
>>>>> 
>> 
>> ###########
>> 
>> Watching the response via tcpdump, I notice that the response looks like
>> it's sending back a regular html response.
>> 
>> Any pointers at what I'm doing wrong here?  Thanks.
>> 
>> --
>> Michael Barrett
>> [email protected]
>> 
>> 
>> 
>> 
>> _______________________________________________
>> Supervisor-users mailing list
>> [email protected]
>> http://lists.supervisord.org/mailman/listinfo/supervisor-users
> 
> 

--
Michael Barrett
[email protected]




_______________________________________________
Supervisor-users mailing list
[email protected]
http://lists.supervisord.org/mailman/listinfo/supervisor-users

Reply via email to