Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No route named "sys" #178

Open
D-3lf opened this issue Nov 19, 2015 · 4 comments
Open

No route named "sys" #178

D-3lf opened this issue Nov 19, 2015 · 4 comments

Comments

@D-3lf
Copy link

D-3lf commented Nov 19, 2015

Trying to follow the server monitor tutorial and I'm receiving this error in the "server.py" terminal when attempting to access http://127.0.0.1:8000

 File "/home/anon/servermon/django18py3xswamp/lib/python3.4/site-packages/swampdragon/connections/sockjs_connection.py", line 86, in on_message
    handler = route_handler.get_route_handler(data['route'])
  File "/home/anon/servermon/django18py3xswamp/lib/python3.4/site-packages/swampdragon/route_handler.py", line 334, in get_route_handler
    raise RouteException('No route named "{}"'.format(name))
swampdragon.route_handler.RouteException: No route named "sys"

Redis is running and swampdragon_host shows http://localhost:9999

Monitor.js is:

var sent = document.getElementById("sent");
var rcvd = document.getElementById("rcvd");
var cpu = document.getElementById("cpu");

swampdragon.onChannelMessage(function (channels, message) {
    sent.innerText = message.data.kb_sent;
    rcvd.innerText = message.data.kb_received;
    cpu.innerText = message.data.cpu + '%';
});


swampdragon.ready(function() {
    swampdragon.subscribe('sys', 'sysinfo', null);
});

and routers.py:

from swampdragon import route_handler
from swampdragon.route_handler import BaseRouter
from .system_info import broadcast_sys_info


class SysInfoRouter(BaseRouter):
    route_name = 'sys'

    def get_subscription_channels(self, **kwargs):
        broadcast_sys_info()
        return ['sysinfo']


route_handler.register(SysInfoRouter)
@shdwpuppet
Copy link

ensure that the app your routers.py is in (I believe the tutorial calls it "monitor"), is included in the installed apps in your settings.py

@abdulwahid24
Copy link

@mwgreenjr I am also getting the similar problem, Did you get any solution ?

@D-3lf
Copy link
Author

D-3lf commented Mar 1, 2016

No. What you see here is what I got. We ended up just using a different product instead.

@oluyinkos
Copy link

To fix this issue, you need to add 'servermon.monitor' to your INSTALLED_APPS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants