我有以下circus
配置:
[circus]
pidfile = /tmp/circus.pid
check_delay = 5
statsd = True
httpd = True
httpd_host = 10.3.2.1
httpd_port = 8888
endpoint = tcp://127.0.0.1:5555
pubsub_endpoint = tcp://127.0.0.1:5556
stats_endpoint = tcp://127.0.0.1:5557
stream_backend = thread
[watcher:my_app]
working_dir = /var/www/my_app/
cmd = /usr/local/bin/waitress-serve
args = --unix-socket='/tmp/my_app.socket' --threads=16 --http_app:main
uid = www-data
gid = www-data
numprocesses = 1
warmup_delay = 0
use_sockets = True
graceful_timeout = 2
stderr_stream.class = StdoutStream
起初似乎有效:
# circusd circus.ini
2016-12-02 18:21:15 circus[6406] [INFO] Starting master on pid 6406
2016-12-02 18:21:15 circus[6406] [INFO] sockets started
2016-12-02 18:21:15 circus[6406] [INFO] Arbiter now waiting for commands
2016-12-02 18:21:15 circus[6406] [INFO] my_app started
2016-12-02 18:21:15 circus[6406] [INFO] circusd-stats started
2016-12-02 18:21:15 circus[6406] [INFO] circushttpd started
2016-12-02 18:21:16 circus[6414] [INFO] Starting the stats streamer
Serving on http://unix:/tmp/my_app.socket
2016-12-02 18:21:16 circus-web[6415] [INFO] Starting circus web ui on fd 6
但是如果我尝试从endpoint
连接到WEBUI
( 127.0.0.1:5555 ):
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/tornado/web.py", line 1425, in _stack_context_handle_exception
raise_exc_info((type, value, traceback))
File "/usr/local/lib/python2.7/dist-packages/tornado/stack_context.py", line 314, in wrapped
ret = fn(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/tornado/web.py", line 1638, in future_complete
f.result()
File "/usr/local/lib/python2.7/dist-packages/tornado/concurrent.py", line 237, in result
raise_exc_info(self._exc_info)
File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 285, in wrapper
yielded = next(result)
File "/usr/local/lib/python2.7/dist-packages/circusweb/circushttpd.py", line 164, in post
endpoints = self.get_arguments('endpoint_list', [])
File "/usr/local/lib/python2.7/dist-packages/tornado/web.py", line 412, in get_arguments
assert isinstance(strip, bool)
AssertionError
可能有什么不对?似乎是circus
代码中的错误。
答案 0 :(得分:1)
有cure:
@@ -161,11 +161,11 @@ def get(self):
@gen.coroutine
def post(self):
endpoints_list = list(self.session.endpoints)
- endpoints = self.get_arguments('endpoint_list', [])
+ endpoints = self.get_arguments('endpoint_list')
# If no selection in list
if not endpoints:
- endpoints = self.get_arguments('endpoint_direct', [])
+ endpoints = self.get_arguments('endpoint_direct')
if not endpoints:
self.redirect(self.reverse_url('disconnect'))
很遗憾它没有找到pip
的路。