I've installed the python orbited server as per the installation docs.
I have it configured like this:
# Example Orbited Configuration file
[global]
reactor=select
# reactor=epoll
# reactor=kqueue
proxy.enabled = 1
session.ping_interval = 40
session.ping_timeout = 30
user=saimon
[listen]
http://:8000
# uncomment to enable ssl on port 8043 using given .key and .crt files
#https://:8043
#
#[ssl]
#key=orbited.key
#crt=orbited.crt
[static]
[access]
# localhost:8000 ->
irc.freenode.net:6667
#websocket server
* -> localhost:8080
[logging]
debug=STDERR,debug.log
info=STDERR,info.log
access=STDERR,info.log
warn=STDERR,error.log
error=STDERR,error.log
#Don't enable debug by default
enabled.default=debug,info,access,warn,error
# Turn debug on for the "Proxy" logger
[loggers]
Proxy=debug,info,access,warn,error
I have an nginx virtual host configured like this:
upstream orbited {
server
127.0.0.1:8000;
}
server {
listen 80;
server_name jsio.localhost;
root /Users/saimon/Development/OpenSource/github/jsio-2.3.6.1/
js.io;
access_log /var/log/nginx/jsio.access.log main;
error_log /var/log/nginx/jsio.error.log debug;
location ~ (/tcp/) {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect false;
proxy_pass
http://orbited;
}
}
I have a node.js-based websocket server running on localhost:8080
The demo code:
client = new js.io.protocols.websocket.Client('ws://localhost:8080/
sync');
Note: /sync is a resource on the websocket server
In firefox I'm now getting:
connecting...
connection closed
In console:
http://screencast.com/t/NDE3NDE4ZD
From orbited python server:
saimon@artemis 0.7(master) $ sudo orbited
12/14/09 11:18:43:489 INFO orbited.start using select reactor
12/14/09 11:18:43:569 DEBUG orbited.cometsession.Port
startingListening
12/14/09 11:18:43:569 DEBUG orbited.cometsession.Port adding into
existing resource as tcp
12/14/09 11:18:43:569 INFO orbited.start proxy protocol active
12/14/09 11:18:43:571 INFO orbited.start Listening http@8000
12/14/09 11:18:43:572 INFO orbited.start switching to user saimon
(uid=501) and group saimon (gid=501)
/Library/Python/2.6/site-packages/orbited-0.7.10-py2.6.egg/orbited/
cometsession.py:455: DeprecationWarning: twisted.web.error.NoResource
is deprecated since Twisted 9.0. See twisted.web.resource.NoResource.
return error.NoResource("<script>alert('whoops');</script>")
The websocket-server received no connection attempts.
Not sure how to proceed at this point.
Regards,
Saimon
On Dec 14, 10:46 am, Saimon Moore <
saimonmo...@gmail.com> wrote:
> mcarter: I'm continuing my experiments in getting the websocket demo
> setup. Using Orbited.js from the 0.7 branch was an improvement. I also
> realised that I needed to remove the call to the dojo source as the
> packagemanager is allready embedded in js.io.js.
>
> However, I'm now coming up against the following error: GEThttp://jsio.localhost/tcp404 Not Found (55ms)