Supervisor/supervisor

`supervisorctl avail` always fails on Python 3

Closed this issue · 0 comments

Seen on 01d514c2. Only happens on Python 3.

Minimal supervisord.conf:

[supervisord]
loglevel = trace

[inet_http_server]
port = 127.0.0.1:9001

[supervisorctl]
serverurl = http://127.0.0.1:9001

[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface

[program:cat]
command = /bin/cat

Start supervisord in the foreground with that config:

$ supervisord -n -c supervisord.conf 

Run the avail command:

$ supervisorctl -c supervisord.conf avail
error: <class 'xmlrpc.client.ProtocolError'>, <ProtocolError for 127.0.0.1/RPC2: 500 Internal Server Error>: file: .../supervisor/xmlrpc.py line: 546
$

Log:

2018-02-07 14:14:51,698 CRIT Handling XML-RPC request with data "<?xml version='1.0'?>\n<methodCall>\n<methodName>supervisor.getAllConfigInfo</methodName>\n<params>\n</params>\n</methodCall>\n" raised an unexpected exception: Traceback (most recent call last):
  File ".../python3.6/xmlrpc/client.py", line 510, in __dump
    f = self.dispatch[type(value)]
KeyError: <enum 'Signals'>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File ".../supervisor/xmlrpc.py", line 436, in continue_request
    body = as_bytes(xmlrpc_marshal(value))
  File ".../supervisor/xmlrpc.py", line 154, in xmlrpc_marshal
    body = xmlrpclib.dumps(value,  methodresponse=ismethodresponse)
  File ".../python3.6/xmlrpc/client.py", line 971, in dumps
    data = m.dumps(params)
  File ".../python3.6/xmlrpc/client.py", line 502, in dumps
    dump(v, write)
  File ".../python3.6/xmlrpc/client.py", line 524, in __dump
    f(self, value, write)
  File ".../python3.6/xmlrpc/client.py", line 577, in dump_array
    dump(v, write)
  File ".../python3.6/xmlrpc/client.py", line 524, in __dump
    f(self, value, write)
  File ".../python3.6/xmlrpc/client.py", line 595, in dump_struct
    dump(v, write)
  File ".../python3.6/xmlrpc/client.py", line 520, in __dump
    raise TypeError("cannot marshal %s objects" % type(value))
TypeError: cannot marshal <enum 'Signals'> objects