Giter Club home page Giter Club logo

circus-web's Introduction

circus-web's People

Contributors

bendemaree avatar diyan avatar lambdafu avatar lothiraldan avatar mrijken avatar natim avatar riklaunim avatar tarekziade avatar usrlocalben avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

circus-web's Issues

pre-select the endpoint

if there's a single endpoint, we should pre-select it in the drop-down menu when starting the web UI.

I also think we don't really need an empty selector (the "------")

potential memory leak on circus httpd

Circus Top

circus
PID CPU (%) MEMORY (%) AGE (s)
31765 (circusd-stats) 2.00 0.10 504226.03
31764 (circushttpd) 1.00 9.70 504226.04
31756 (circusd) 0.00 0.20 504226.22
1.00 (avg) 10.00 (sum) 504226.22 (older)

I have the feeling this is related to me having left a firefox opened on the circus httpd server for some days. Because this is new to me.

I checked this morning. I had my browser displaying the memory use of circus. With the amazing amount of 10% for circushttpd.

I then closed the browser. I watched the tcp connection in CLOSE-WAIT state, then made sure the connection was not there anymore.

I expected the memory to be released as soon as the session would be closed.

After the connection (20 minutes) was closed I still see 10% use of circushttp.

Is it a false alarm? (memory is not really 10% because of some linux black magic)
It it a true positive?
If so my guess is the objects used to present the results for my "too long" connection are memory leaking server side, and not GCed at the connection close.

On my over servers I did not connected to for a long time (same distro/env/python/zmq) I have this result

Circus Top

circus
PID CPU (%) MEMORY (%) AGE (s)
6594 (circusd-stats) 2.00 0.20 592294.42
6474 (circushttpd) 0.00 0.30 592319.19
6466 (circusd) 0.00 0.20 592319.50
0.67 (avg) 0.70 (sum) 592319.50 (older)

Tout étant égal par ailleurs, I dare assume there is a memory leak that could be appearing after long connection.

Isn't it ironic that my only memory leak comes from the tool I use to survey memory leaks ? :)

when using python3.4, error occured:TypeError: the JSON object must be str, not 'bytes'

root@ubuntu:/etc# /usr/local/bin/circusd /etc/circus.ini
2018-01-19 09:23:51 circus[25281] [INFO] Starting master on pid 25281
2018-01-19 09:23:51 circus[25281] [INFO] sockets started
2018-01-19 09:23:51 circus[25281] [INFO] Arbiter now waiting for commands
2018-01-19 09:23:51 circus[25281] [INFO] add_host started
2018-01-19 09:23:51 circus[25281] [INFO] celerybeat started
2018-01-19 09:23:51 circus[25281] [INFO] celeryflower started
2018-01-19 09:23:51 circus[25281] [INFO] create_vm started
2018-01-19 09:23:51 circus[25281] [INFO] other_operate started
2018-01-19 09:23:51 circus[25281] [INFO] schedule_task started
2018-01-19 09:23:51 circus[25281] [INFO] circushttpd started
2018-01-19 09:23:52 circus-web[25296] [INFO] Starting circus web ui on fd 20
2018-01-19 09:23:52 tornado.application[25296] [ERROR] Exception in callback (14, <function wrap..null_wrapper at 0x7f84c2cb5488>)
Traceback (most recent call last):
File "/usr/local/lib/python3.4/dist-packages/tornado/ioloop.py", line 888, in start
handler_func(fd_obj, events)
File "/usr/local/lib/python3.4/dist-packages/tornado/stack_context.py", line 277, in null_wrapper
return fn(*args, **kwargs)
File "/usr/local/lib/python3.4/dist-packages/circus_web-1.1.0.dev0-py3.4.egg/circusweb/util.py", line 86, in get_message
data = json.loads(data)
File "/usr/lib/python3.4/json/init.py", line 312, in loads
s.class.name))
TypeError: the JSON object must be str, not 'bytes'

can't start circushttpd using python 3.7.0 on my Archlinux machine

Hi, is it because of the python version ?
`

    (.env) [karim@anarchy]: ~/Workspace/github.com/me/ngmax/p1>$ circushttpdTraceback (most recent call last):
    File "/home/karim/Workspace/github.com/me/ngmax/p1/.env/lib/python3.7/site-packages/circusweb/circushttpd.py", line 25, in <module>    import tornadio2  File "/home/karim/Workspace/github.com/me/ngmax/p1/.env/lib/python3.7/site-packages/tornadio2/__init__.py", line 25, in <module>
        from tornadio2.router import TornadioRouter  File "/home/karim/Workspace/github.com/me/ngmax/p1/.env/lib/python3.7/site-packages/tornadio2/router.py", line 27, in <module>
        from tornadio2 import persistent, polling, sessioncontainer, session, proto, preflight, stats  File "/home/karim/Workspace/github.com/me/ngmax/p1/.env/lib/python3.7/site-packages/tornadio2/session.py", line 24, in <module>
        import urlparse
    ModuleNotFoundError: No module named 'urlparse'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File "/home/karim/Workspace/github.com/me/ngmax/p1/.env/bin/circushttpd", line 7, in <module>
        from circusweb.circushttpd import main
    File "/home/karim/Workspace/github.com/me/ngmax/p1/.env/lib/python3.7/site-packages/circusweb/circushttpd.py", line 34, in <module>
        '%s"\nInitial error: %s' % (reqs, str(e)))
    ImportError: You need to install dependencies to run the webui. You can do so by using "pip install -r /home/karim/Workspace/github.com/me/ngmax/p1/.
    env/lib/python3.7/site-packages/circusweb/web-requirements.txt"
    Initial error: No module named 'urlparse'`

Start and stop all watchers from within web

I wonder if there is a plan to add functionality of start/stop all watches for from web interface? Also, " status" icon is not super intuitive, to be honest -- click on it does start/stop for the watcher.

We consider migration from supervisor to circus, some of our servers do supervise dozens of "watchers" in terminology of circus.

Loading circus web results in an AssertionError

When I try to connect to an instance I'm getting. Not sure what exactly I'm doing wrong.

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/tornado/web.py", line 1401, in _stack_context_handle_exception
    raise_exc_info((type, value, traceback))
  File "/usr/local/lib/python2.7/site-packages/tornado/stack_context.py", line 314, in wrapped
    ret = fn(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/tornado/web.py", line 1613, in future_complete
    f.result()
  File "/usr/local/lib/python2.7/site-packages/tornado/concurrent.py", line 232, in result
    raise_exc_info(self._exc_info)
  File "/usr/local/lib/python2.7/site-packages/tornado/gen.py", line 282, in wrapper
    yielded = next(result)
  File "/usr/local/lib/python2.7/site-packages/circusweb/circushttpd.py", line 164, in post
    endpoints = self.get_arguments('endpoint_list', [])
  File "/usr/local/lib/python2.7/site-packages/tornado/web.py", line 394, in get_arguments
    assert isinstance(strip, bool)
AssertionError

My circus.ini

[socket:web]
host = 0.0.0.0
port = 8000

[watcher:web]
cmd = chaussette test.wsgi.application
args = --fd $(circus.sockets.web) --backend gevent
working_dir = /usr/src/app
copy_env = True
use_sockets = True
numprocesses = 2

[circus]
httpd = True
httpd_host = 0.0.0.0
httpd_port = 8050
statsd = True
endpoint = tcp://127.0.0.1:5555
pubsub_endpoint = tcp://127.0.0.1:5556
stats_endpoint = tcp://127.0.0.1:5557

nginx config:

server {

    listen 0.0.0.0:80;
    server_name circus.test.com;
    charset utf-8;

    location / {
        proxy_pass http://web:8050;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto http;
        proxy_redirect off;
    }

    location ~/media/\*(.png|.jpg|.css|.js|.ico)$ {
        alias /usr/local/lib/python2.7/site-packages/circusweb/media;
    }

}

TypeError: unicode not allowed, use setsockopt_string when use python3

the exception is:

 File "<string>", line 4, in raise_exc_info
  File "/usr/lib/python3.6/site-packages/tornado/gen.py", line 622, in Task
    func(*args, callback=_argument_adapter(set_result), **kwargs)
  File "/usr/lib/python3.6/site-packages/circusweb/client.py", line 52, in send_message
    return self.call(make_message(command, **props), callback)
  File "/usr/lib/python3.6/site-packages/circusweb/client.py", line 62, in call
    socket.setsockopt(zmq.IDENTITY, uuid.uuid4().hex)
  File "zmq/backend/cython/socket.pyx", line 374, in zmq.backend.cython.socket.Socket.set (zmq/backend/cython/socket.c:4610)
TypeError: unicode not allowed, use setsockopt_string

operate circus-web ,a error occur:tornado.web.HTTPError: HTTP 401: Unauthorized (Invalid Session)

2018-01-19 14:29:25 tornado.access[4365] [INFO] 101 GET /socket.io/1/websocket/b43e6e58de95aa518b34ece16258a22f (10.65.128.5) 0.78ms
2018-01-19 14:29:25 tornado.application[4365] [ERROR] Uncaught exception in /socket.io/1/websocket/b43e6e58de95aa518b34ece16258a22f
Traceback (most recent call last):
File "/usr/local/lib/python3.4/dist-packages/tornado/websocket.py", line 494, in _run_callback
result = callback(*args, **kwargs)
File "/usr/local/lib/python3.4/dist-packages/TornadIO2-0.0.3-py3.4.egg/tornadio2/persistent.py", line 91, in open
raise HTTPError(401, "Invalid Session")
tornado.web.HTTPError: HTTP 401: Unauthorized (Invalid Session)

Specified --endpoint parameter not used

Circus-web's expected behavior when --endpoint is not specified is to prompt the user via the web interface regarding which endpoint to connect to. The default is tcp://127.0.0.1:5555.

But when I specify the --endpoint parameter, it still goes on to do the behavior as if there's no --endpoint parameter specified. My specified endpoint wasn't even inputted on the endpoint field via the web interface.

Tests don't seem to work

I'm running Ubuntu Precise.

At the following revision

commit 6f1ee2d464860c85f11dd0c152169ca211a5f780
Author: FELD Boris <[email protected]>
Date:   Sun Jun 29 13:22:00 2014 +0200

Log output below;

$ tox -e py27
GLOB sdist-make: /home/tansell/foss/slidelint/circus-web/setup.py
py27 create: /home/tansell/foss/slidelint/circus-web/.tox/py27
py27 installdeps: -r/home/tansell/foss/slidelint/circus-web/test-requirements.txt
py27 inst: /home/tansell/foss/slidelint/circus-web/.tox/dist/circus-web-0.6.zip
py27 runtests: PYTHONHASHSEED='1069897473'
py27 runtests: commands[0] | python setup.py develop
running develop
running egg_info
writing circus_web.egg-info/PKG-INFO
writing top-level names to circus_web.egg-info/top_level.txt
writing dependency_links to circus_web.egg-info/dependency_links.txt
writing entry points to circus_web.egg-info/entry_points.txt
writing requirements to circus_web.egg-info/requires.txt
reading manifest file 'circus_web.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'NOTICE'
warning: no files found matching 'LICENSE'
warning: no files found matching '*.html' under directory 'circusweb/media'
writing manifest file 'circus_web.egg-info/SOURCES.txt'
running build_ext
Creating /home/tansell/foss/slidelint/circus-web/.tox/py27/lib/python2.7/site-packages/circus-web.egg-link (link to .)
Adding circus-web 0.6 to easy-install.pth file
Installing circushttpd script to /home/tansell/foss/slidelint/circus-web/.tox/py27/bin

Installed /home/tansell/foss/slidelint/circus-web
Processing dependencies for circus-web==0.6
Searching for tomako==0.1.0
Best match: tomako 0.1.0
Adding tomako 0.1.0 to easy-install.pth file

Using /home/tansell/foss/slidelint/circus-web/.tox/py27/lib/python2.7/site-packages
Searching for TornadIO2==0.0.4
Best match: TornadIO2 0.0.4
Adding TornadIO2 0.0.4 to easy-install.pth file

Using /home/tansell/foss/slidelint/circus-web/.tox/py27/lib/python2.7/site-packages
Searching for tornado==4.0
Best match: tornado 4.0
Adding tornado 4.0 to easy-install.pth file

Using /home/tansell/foss/slidelint/circus-web/.tox/py27/lib/python2.7/site-packages
Searching for circus==0.11.1
Best match: circus 0.11.1
Adding circus 0.11.1 to easy-install.pth file
Installing circusd-stats script to /home/tansell/foss/slidelint/circus-web/.tox/py27/bin
Installing circus-plugin script to /home/tansell/foss/slidelint/circus-web/.tox/py27/bin
Installing circus-top script to /home/tansell/foss/slidelint/circus-web/.tox/py27/bin
Installing circusd script to /home/tansell/foss/slidelint/circus-web/.tox/py27/bin
Installing circusctl script to /home/tansell/foss/slidelint/circus-web/.tox/py27/bin

Using /home/tansell/foss/slidelint/circus-web/.tox/py27/lib/python2.7/site-packages
Searching for pyzmq==14.3.1
Best match: pyzmq 14.3.1
Adding pyzmq 14.3.1 to easy-install.pth file

Using /home/tansell/foss/slidelint/circus-web/.tox/py27/lib/python2.7/site-packages
Searching for anyjson==0.3.3
Best match: anyjson 0.3.3
Adding anyjson 0.3.3 to easy-install.pth file

Using /home/tansell/foss/slidelint/circus-web/.tox/py27/lib/python2.7/site-packages
Searching for MarkupSafe==0.23
Best match: MarkupSafe 0.23
Adding MarkupSafe 0.23 to easy-install.pth file

Using /home/tansell/foss/slidelint/circus-web/.tox/py27/lib/python2.7/site-packages
Searching for Mako==1.0.0
Best match: Mako 1.0.0
Adding Mako 1.0.0 to easy-install.pth file
Installing mako-render script to /home/tansell/foss/slidelint/circus-web/.tox/py27/bin

Using /home/tansell/foss/slidelint/circus-web/.tox/py27/lib/python2.7/site-packages
Searching for simplejson==3.5.3
Best match: simplejson 3.5.3
Adding simplejson 3.5.3 to easy-install.pth file

Using /home/tansell/foss/slidelint/circus-web/.tox/py27/lib/python2.7/site-packages
Searching for backports.ssl-match-hostname==3.4.0.2
Best match: backports.ssl-match-hostname 3.4.0.2
Adding backports.ssl-match-hostname 3.4.0.2 to easy-install.pth file

Using /home/tansell/foss/slidelint/circus-web/.tox/py27/lib/python2.7/site-packages
Searching for certifi==14.05.14
Best match: certifi 14.05.14
Adding certifi 14.05.14 to easy-install.pth file

Using /home/tansell/foss/slidelint/circus-web/.tox/py27/lib/python2.7/site-packages
Searching for psutil==2.1.1
Best match: psutil 2.1.1
Adding psutil 2.1.1 to easy-install.pth file

Using /home/tansell/foss/slidelint/circus-web/.tox/py27/lib/python2.7/site-packages
Searching for iowait==0.2
Best match: iowait 0.2
Adding iowait 0.2 to easy-install.pth file

Using /home/tansell/foss/slidelint/circus-web/.tox/py27/lib/python2.7/site-packages
Finished processing dependencies for circus-web==0.6
py27 runtests: commands[1] | unit2 discover -v circusweb
test_auto_discovery (tests.test_utils.TestAutoDiscovery) ... FAIL
test_disconnect (tests.test_web.TestHttpd) ... ERROR
test_index (tests.test_web.TestHttpd) ... ERROR
test_watcher_page (tests.test_web.TestHttpd) ... ERROR
test_watcher_status (tests.test_web.TestHttpd) ... ERROR

======================================================================
ERROR: test_disconnect (tests.test_web.TestHttpd)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tansell/foss/slidelint/circus-web/.tox/py27/local/lib/python2.7/site-packages/tornado/testing.py", line 118, in __call__
    result = self.orig_method()
  File "/home/tansell/foss/slidelint/circus-web/circusweb/tests/test_web.py", line 103, in test_disconnect
    self.assertFalse('Connect' in self.app.get('/').body)
  File "/home/tansell/foss/slidelint/circus-web/.tox/py27/local/lib/python2.7/site-packages/webtest/app.py", line 759, in get
    expect_errors=expect_errors)
  File "/home/tansell/foss/slidelint/circus-web/.tox/py27/local/lib/python2.7/site-packages/webtest/app.py", line 1102, in do_request
    res = req.get_response(app, catch_exc_info=True)
  File "/home/tansell/foss/slidelint/circus-web/.tox/py27/local/lib/python2.7/site-packages/webob/request.py", line 1316, in send
    application, catch_exc_info=True)
  File "/home/tansell/foss/slidelint/circus-web/.tox/py27/local/lib/python2.7/site-packages/webob/request.py", line 1284, in call_application
    app_iter = application(self.environ, start_response)
  File "/home/tansell/foss/slidelint/circus-web/.tox/py27/local/lib/python2.7/site-packages/webtest/lint.py", line 179, in lint_app
    iterator = application(environ, start_response_wrapper)
TypeError: __call__() takes exactly 2 arguments (3 given)

======================================================================
ERROR: test_index (tests.test_web.TestHttpd)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tansell/foss/slidelint/circus-web/.tox/py27/local/lib/python2.7/site-packages/tornado/testing.py", line 118, in __call__
    result = self.orig_method()
  File "/home/tansell/foss/slidelint/circus-web/circusweb/tests/test_web.py", line 41, in test_index
    res = self.app.get('/')
  File "/home/tansell/foss/slidelint/circus-web/.tox/py27/local/lib/python2.7/site-packages/webtest/app.py", line 759, in get
    expect_errors=expect_errors)
  File "/home/tansell/foss/slidelint/circus-web/.tox/py27/local/lib/python2.7/site-packages/webtest/app.py", line 1102, in do_request
    res = req.get_response(app, catch_exc_info=True)
  File "/home/tansell/foss/slidelint/circus-web/.tox/py27/local/lib/python2.7/site-packages/webob/request.py", line 1316, in send
    application, catch_exc_info=True)
  File "/home/tansell/foss/slidelint/circus-web/.tox/py27/local/lib/python2.7/site-packages/webob/request.py", line 1284, in call_application
    app_iter = application(self.environ, start_response)
  File "/home/tansell/foss/slidelint/circus-web/.tox/py27/local/lib/python2.7/site-packages/webtest/lint.py", line 179, in lint_app
    iterator = application(environ, start_response_wrapper)
TypeError: __call__() takes exactly 2 arguments (3 given)

======================================================================
ERROR: test_watcher_page (tests.test_web.TestHttpd)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tansell/foss/slidelint/circus-web/.tox/py27/local/lib/python2.7/site-packages/tornado/testing.py", line 118, in __call__
    result = self.orig_method()
  File "/home/tansell/foss/slidelint/circus-web/circusweb/tests/test_web.py", line 56, in test_watcher_page
    watcher_page = self.app.get('/watchers/sleeper')
  File "/home/tansell/foss/slidelint/circus-web/.tox/py27/local/lib/python2.7/site-packages/webtest/app.py", line 759, in get
    expect_errors=expect_errors)
  File "/home/tansell/foss/slidelint/circus-web/.tox/py27/local/lib/python2.7/site-packages/webtest/app.py", line 1102, in do_request
    res = req.get_response(app, catch_exc_info=True)
  File "/home/tansell/foss/slidelint/circus-web/.tox/py27/local/lib/python2.7/site-packages/webob/request.py", line 1316, in send
    application, catch_exc_info=True)
  File "/home/tansell/foss/slidelint/circus-web/.tox/py27/local/lib/python2.7/site-packages/webob/request.py", line 1284, in call_application
    app_iter = application(self.environ, start_response)
  File "/home/tansell/foss/slidelint/circus-web/.tox/py27/local/lib/python2.7/site-packages/webtest/lint.py", line 179, in lint_app
    iterator = application(environ, start_response_wrapper)
TypeError: __call__() takes exactly 2 arguments (3 given)

======================================================================
ERROR: test_watcher_status (tests.test_web.TestHttpd)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tansell/foss/slidelint/circus-web/.tox/py27/local/lib/python2.7/site-packages/tornado/testing.py", line 118, in __call__
    result = self.orig_method()
  File "/home/tansell/foss/slidelint/circus-web/circusweb/tests/test_web.py", line 87, in test_watcher_status
    watcher_page = self.app.get('/watchers/sleeper')
  File "/home/tansell/foss/slidelint/circus-web/.tox/py27/local/lib/python2.7/site-packages/webtest/app.py", line 759, in get
    expect_errors=expect_errors)
  File "/home/tansell/foss/slidelint/circus-web/.tox/py27/local/lib/python2.7/site-packages/webtest/app.py", line 1102, in do_request
    res = req.get_response(app, catch_exc_info=True)
  File "/home/tansell/foss/slidelint/circus-web/.tox/py27/local/lib/python2.7/site-packages/webob/request.py", line 1316, in send
    application, catch_exc_info=True)
  File "/home/tansell/foss/slidelint/circus-web/.tox/py27/local/lib/python2.7/site-packages/webob/request.py", line 1284, in call_application
    app_iter = application(self.environ, start_response)
  File "/home/tansell/foss/slidelint/circus-web/.tox/py27/local/lib/python2.7/site-packages/webtest/lint.py", line 179, in lint_app
    iterator = application(environ, start_response_wrapper)
TypeError: __call__() takes exactly 2 arguments (3 given)

======================================================================
FAIL: test_auto_discovery (tests.test_utils.TestAutoDiscovery)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tansell/foss/slidelint/circus-web/.tox/py27/local/lib/python2.7/site-packages/tornado/testing.py", line 118, in __call__
    result = self.orig_method()
  File "/home/tansell/foss/slidelint/circus-web/circusweb/tests/test_utils.py", line 25, in test_auto_discovery
    self.retry_timeout(oracle, 10)
  File "/home/tansell/foss/slidelint/circus-web/circusweb/tests/test_utils.py", line 52, in retry_timeout
    self.wait(test)
  File "/home/tansell/foss/slidelint/circus-web/.tox/py27/local/lib/python2.7/site-packages/tornado/testing.py", line 312, in wait
    self.__rethrow()
  File "/home/tansell/foss/slidelint/circus-web/.tox/py27/local/lib/python2.7/site-packages/tornado/testing.py", line 248, in __rethrow
    raise_exc_info(failure)
  File "/home/tansell/foss/slidelint/circus-web/.tox/py27/local/lib/python2.7/site-packages/tornado/testing.py", line 296, in timeout_func
    timeout)
AssertionError: Async operation timed out after 30.0 seconds

----------------------------------------------------------------------
Ran 5 tests in 30.428s

FAILED (failures=1, errors=4)
ERROR: InvocationError: '/home/tansell/foss/slidelint/circus-web/.tox/py27/bin/unit2 discover -v circusweb'
___________________________________________________________________________________ summary ____________________________________________________________________________________
ERROR:   py27: commands failed

deactivating broken

Hi,

trying to deactivate a worker gives the exception below. In this case it's a singleton, if that matters (I couldn't test a non-singleton):

Traceback (most recent call last):
  File "/media/ssd/graunt/graunt/target/local/lib/python2.7/site-packages/tornado/web.py", line 1115, in _stack_context_handle_exception
    raise_exc_info((type, value, traceback))
  File "/media/ssd/graunt/graunt/target/local/lib/python2.7/site-packages/tornado/stack_context.py", line 302, in wrapped
    ret = fn(*args, **kwargs)
  File "/media/ssd/graunt/graunt/target/local/lib/python2.7/site-packages/tornado/web.py", line 1307, in future_complete
    f.result()
  File "/media/ssd/graunt/graunt/target/local/lib/python2.7/site-packages/tornado/concurrent.py", line 129, in result
    raise_exc_info(self.__exc_info)
  File "/media/ssd/graunt/graunt/target/local/lib/python2.7/site-packages/tornado/gen.py", line 200, in handle_exception
    if runner is not None and runner.handle_exception(typ, value, tb):
  File "/media/ssd/graunt/graunt/target/local/lib/python2.7/site-packages/tornado/gen.py", line 556, in handle_exception
    self.run()
  File "/media/ssd/graunt/graunt/target/local/lib/python2.7/site-packages/tornado/gen.py", line 505, in run
    yielded = self.gen.throw(*exc_info)
  File "/media/ssd/graunt/graunt/extern/circus-web/circusweb/circushttpd.py", line 229, in get
    redirect_url=self.reverse_url('index'))
  File "/media/ssd/graunt/graunt/target/local/lib/python2.7/site-packages/tornado/stack_context.py", line 302, in wrapped
    ret = fn(*args, **kwargs)
  File "/media/ssd/graunt/graunt/target/local/lib/python2.7/site-packages/tornado/gen.py", line 196, in <lambda>
    future, lambda future: callback(future.result()))
  File "/media/ssd/graunt/graunt/target/local/lib/python2.7/site-packages/tornado/concurrent.py", line 129, in result
    raise_exc_info(self.__exc_info)
  File "/media/ssd/graunt/graunt/target/local/lib/python2.7/site-packages/tornado/gen.py", line 200, in handle_exception
    if runner is not None and runner.handle_exception(typ, value, tb):
  File "/media/ssd/graunt/graunt/target/local/lib/python2.7/site-packages/tornado/gen.py", line 556, in handle_exception
    self.run()
  File "/media/ssd/graunt/graunt/target/local/lib/python2.7/site-packages/tornado/gen.py", line 505, in run
    yielded = self.gen.throw(*exc_info)
  File "/media/ssd/graunt/graunt/extern/circus-web/circusweb/util.py", line 33, in run_command
    res = yield gen.Task(command, *args, **kwargs)
  File "/media/ssd/graunt/graunt/target/local/lib/python2.7/site-packages/tornado/stack_context.py", line 302, in wrapped
    ret = fn(*args, **kwargs)
  File "/media/ssd/graunt/graunt/target/local/lib/python2.7/site-packages/tornado/gen.py", line 196, in <lambda>
    future, lambda future: callback(future.result()))
  File "/media/ssd/graunt/graunt/target/local/lib/python2.7/site-packages/tornado/concurrent.py", line 129, in result
    raise_exc_info(self.__exc_info)
  File "/media/ssd/graunt/graunt/target/local/lib/python2.7/site-packages/tornado/stack_context.py", line 302, in wrapped
    ret = fn(*args, **kwargs)
  File "/media/ssd/graunt/graunt/target/local/lib/python2.7/site-packages/tornado/gen.py", line 550, in inner
    self.set_result(key, result)
  File "/media/ssd/graunt/graunt/target/local/lib/python2.7/site-packages/tornado/gen.py", line 476, in set_result
    self.run()
  File "/media/ssd/graunt/graunt/target/local/lib/python2.7/site-packages/tornado/gen.py", line 507, in run
    yielded = self.gen.send(next)
  File "/media/ssd/graunt/graunt/extern/circus-web/circusweb/controller.py", line 146, in switch_status
    res = yield gen.Task(self.client.call, msg)
AttributeError: 'Controller' object has no attribute 'client'

Support for python 3.4

import urlparse
ImportError: No module named 'urlparse'

Think this has changed name in python 3.4

'%s"\nInitial error: %s' % (reqs, str(e)))
ImportError: You need to install dependencies to run the webui. You can do so by using "pip install -r /home/dave/ap/lib/python3.4/site-packages/circusweb/web-requirements.txt"
Initial error: No module named 'urlparse'

But the file /home/dave/ap/lib/python3.4/site-packages/circusweb/web-requirements.txt does not exist, and I cannot find it in my git clone....

must be doing something wrong in trying to get this running with python 3.4 ...

Python 3.4 syntax errors: except ImportError, e:

2015-05-13 19:25:53 circus[2614] [INFO] Starting master on pid 2614
2015-05-13 19:25:53 circus[2614] [INFO] sockets started
2015-05-13 19:25:53 circus[2614] [INFO] Arbiter now waiting for commands
2015-05-13 19:25:53 circus[2614] [INFO] web started
2015-05-13 19:25:53 circus[2614] [INFO] circusd-stats started
2015-05-13 19:25:53 circus[2614] [INFO] circushttpd started
Traceback (most recent call last):
File "", line 1, in
File "/home/dave/ap/lib/python3.4/site-packages/circusweb/circushttpd.py", line 27
except ImportError, e:

Think the syntax should be like:-

http://stackoverflow.com/questions/19142231/cassandra-file-cqlsh-line-95-except-importerror-e

Circus Web

Hi guys,

I thought about asking it in IRC but there are nobody present. :(

Assuming that I have number of machines with Circus on each of them is there is a way or extension for Circus-web to view status of all my Circus instances (from all my machines)?

Thanks!

Python 3 Compatibility

On the readthedoc http://circus.readthedocs.org/en/latest/installation/ at the bottom of the page It said we can install circus-web, but we cant with python 3 as tornadio2 failed at the installation process like this :

Downloading/unpacking TornadIO2
  Downloading TornadIO2-0.0.4.tar.gz
  Running setup.py (path:/home/foxmask/.pyenv/versions/django-th-340/build/TornadIO2/setup.py) egg_info for package TornadIO2

Requirement already satisfied (use --upgrade to upgrade): simplejson>=2.1.0 in ./lib/python3.4/site-packages (from TornadIO2)
Requirement already satisfied (use --upgrade to upgrade): tornado>=2.2.0 in ./lib/python3.4/site-packages (from TornadIO2)
Installing collected packages: TornadIO2
  Running setup.py install for TornadIO2
      File "/home/foxmask/.pyenv/versions/django-th-340/lib/python3.4/site-packages/tornadio2/server.py", line 99
        except Exception, ex:
                        ^
    SyntaxError: invalid syntax

      File "/home/foxmask/.pyenv/versions/django-th-340/lib/python3.4/site-packages/tornadio2/session.py", line 429
        except Exception, ex:
                        ^
    SyntaxError: invalid syntax

      File "/home/foxmask/.pyenv/versions/django-th-340/lib/python3.4/site-packages/tornadio2/persistent.py", line 144
        except Exception, ex:
                        ^
    SyntaxError: invalid syntax

      File "/home/foxmask/.pyenv/versions/django-th-340/lib/python3.4/site-packages/tornadio2/flashserver.py", line 67
        except socket.error, ex:
                           ^
    SyntaxError: invalid syntax


Successfully installed TornadIO2
Cleaning up...

May be you can say in the doc that circus-web can only run with python 2.x to avoid to install it with python 3.

know issue about python 3 on tornadio2

Make beaker middleware session store configurable

Currently, the circus-web beaker middleware is configured with:

session_opts = {
    'session.type': 'file',
    'session.cookie_expires': 300,
    'session.data_dir': './data',
    'session.auto': True
}

where ./data is a subdirectory of the current working directory. Either let me set the working directory for the Circus httpd process or let me set an alternative directory for the session data, so I can push it into an appropriate var/ directory. :-)

Add to the endpoint list, valid endpoints setup by users.

Sometime the auto-discovery doesn't work because of network routers or firewall so we want to keep endpoint entered by users.

Maybe we should write that to a file so that after a circushttpd restart we can reload that list.

We could also have a page with a green light and red light of each endpoint and something to delete/edit/rename the endpoint and monitor the circusd all at once.

circusweb bind host lies Edit

If no bind host is specified for circusweb, it shows;

 Bottle v0.11.6 server starting up (using SocketIOServer(fd='7'))...
Listening on http://0.0.0.0:8080/

However this is not true;

$ netstat -anp | grep LISTEN
tcp        0      0 127.0.0.1:8080          0.0.0.0:*               LISTEN      48244/python    

Display bug more than anything. Seems to be quite an easy fix, should I send a PR?

Stopping a service removes the checkbox

Hi,

if I switch off a service using the status checkbox in the overview, I get a notification at the top "status switched" and the checkbox disappears.

If I reload the page or (toggle some other box), the checkbox reappears, showing the correct status.

Cant Access circus-web

I cant access the circus-web in my browser when I run circushttpd this is the output
I didn't saw anything like this " (using SocketIOServer(fd=None))" in the documentation and I guess this is a mistake that I have to change something for the circushttpd to work

> circushttpd
Bottle v0.12.7 server starting up (using SocketIOServer(fd=None))...
Listening on http://0.0.0.0:8080/
Hit Ctrl-C to quit.

DEPRECATION WARNING: use resource instead of namespace

I included the host and the port on this part because on the documentation the host and the port are defined as 127.0.0.1 and 8080 respectively

> circushttpd --host 127.0.0.1 --port 8080
Bottle v0.12.7 server starting up (using SocketIOServer(fd=None))...
Listening on http://127.0.0.1:8080/
Hit Ctrl-C to quit.

DEPRECATION WARNING: use resource instead of namespace

Here is my circus.ini file. I'm running a simple helloworld app to know that circus started my program

 [circus]
 statsd = True
 httpd = True
 httpd_host = 127.0.0.1
 httpd_port = 8080
 endpoint = tcp://127.0.0.1:5555

[watcher:webapp]
cmd = /tmp/circus/bin/chaussette --fd $(circus.sockets.web)
numprocess = 3
use_sockets = True

[watcher:hello]
cmd = php /home/kyemme/helloworld.php --fd $(circus.sockets.web)
numprocess = 2
use_sockets = True
stdout_stream.filename = /home/kyemme/test.log

[socket:web]
host = 127.0.0.1
port = 8888

Circus web on subfolder, static files absolute path should be relative

Hi, I'm configuring nginx to route circusweb on a subfolder on my app server, as in:

http://localhost/circus

It's working but all the static files are not being loaded properly, their path is absolute to the host, ie:

href="/static/circus.css?v=6d12a2ee78404c0f52c10de70df855c6"

so it's loading from:

http://localhost/static/circus.css?v=6d12a2ee78404c0f52c10de70df855c6

instead of

http://localhost/circus/static/circus.css?v=6d12a2ee78404c0f52c10de70df855c6

This is my settings on nginx

location /circus/ {

    proxy_http_version 1.1;
    proxy_set_header   Upgrade              $http_upgrade;
    proxy_set_header   Connection           "upgrade";
    proxy_set_header   Host                 $host;
    proxy_set_header   X-Real-IP            $remote_addr;
    proxy_set_header   X-Forwarded-For      $proxy_add_x_forwarded_for;
    proxy_set_header   X-Forwarded-Proto    http;

    rewrite            /circus/(.*) /$1 break;
    proxy_pass         http://circusweb_server;
    proxy_redirect     off;
}

With Chrome inspector, removing the first '/' does the trick.

href="static/circus.css?v=6d12a2ee78404c0f52c10de70df855c6"

connect_to_circus() call is broken

on startup

  File "/Users/tarek/Dev/github.com/circus-web/circusweb/client.py", line 66, in call
    stream = ZMQStream(socket, self.loop)
  File "/Users/tarek/Dev/github.com/circus/lib/python2.7/site-packages/pyzmq-13.1.0-py2.7-macosx-10.6-intel.egg/zmq/eventloop/zmqstream.py", line 100, in __init__
    self._state = self.io_loop.ERROR
AttributeError: 'str' object has no attribute 'ERROR'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.