Closed GoogleCodeExporter closed 9 years ago
Hi,
I'd recommend trying running mod_pywebsocket as a standalone server (i.e., not
using Apache HTTP Server) first if you haven't yet. The instruction is at
http://code.google.com/p/pywebsocket/ Once you run it successfully, move on to
run it with Apache. That way you can concentrate on Apache configuration issue.
Closing this bug because it is not a bug per se.
Original comment by yuzo@chromium.org
on 16 Jun 2011 at 1:24
Check the permissions of the files in /websock_handlers. I was having the same
problem until I changed the permissions for "Others" to "Read-only".
Original comment by daniel.r...@gmail.com
on 17 Jun 2011 at 3:08
We're using umask 027 on our development environment. On releasing the package,
we didn't change permission. If you pass -p option to tar, it expands files
with o-rx. Otherwise, it just creates files based on umask.
Original comment by tyoshino@chromium.org
on 21 Jun 2011 at 7:42
Hi all,
I had success several days ago but didn't reply since the bug was marked
invalid and closed. But, since responses continue to trickle in, here's an
update:
I stand by my earliest assessment. ;-) In particular, I'd suggest using an
example like /usr/local/.../websocket_handler for the example config in
__init__.py as it makes very clear that the path should be relative to the
file system.
As suggested early on in the thread, I went with standalone.py and also
found a bunch of blog postings that pointed the way. I mentioned I was
brand new to the whole Web Socket scene. So, the following is probably
obvious to others but wasn't to me. (I hope it's right.)
Tip #1:
On systems with Python 2.7, following the instructions will install
mod_pywebsocket in /usr/local/lib/python2.7. This leads to crapola
regarding the number of arguments in readline(). No web search
determined what the problem was. But copying the whole kit-n-
kaboodle to /usr/local/lib/python2.6 and starting the standalone
server with python 2.6 was the first key to a solution.
Tip #2:
For testing with standalone.py, change to the directory where
mod_pywebsocket lives, since it seems incapable of importing what's
needed properly otherwise.
Tip #3:
The standalone server not only needs a port, but the document root
MUST point to where the console.html and friends are:
$ cd /usr/local/lib/python2.6/dist-packages/mod_pywebsocket
$ python2.6 standalone.py -p 4000 -d /.../pywebsocket
Tip #4:
Following on the heels of Tip #3, the document root is relative to
the file system. Important to remember when configuring Apache
that it's NOT relative to Apache's document root.
Tip #5:
Not supplied, but searched for is favicon.ico, which results in a 404
File not found message. So, put one in the document root to keep the
standalone server quiet.
Tip #6:
Since we've specified a document root, make sure it doesn't appear
elsewhere. Browse to "http://localhost:4000/console.html" And
console.html figures out that it wants "ws://localhost:4000/echo"
which is correct.
So long, and thanks for all the fish. ;-)
Original comment by dc.loco
on 21 Jun 2011 at 8:48
Original issue reported on code.google.com by
dc.loco
on 15 Jun 2011 at 10:46