[mod_python] servlets and sessions tutorial...

Sharky (PTNet) sharky at codezone.ath.cx
Thu Jun 24 17:20:35 EDT 2004


>
>> >>>     I have install mod_python and servlets to begin building some
>> web
>> >>> python aplications.
>> >>>
>> >>>     I try read servlets tutorial but when i go to sessions tutorial
>> >>> (page 13) have some errors and the browser dont stop loading...
>> >>>
>> >>>     You can see tutorial working at
>> >>> http://sharky.homelinux.net/mps_tutorial/
>> >>>     You can see sutorial sessions error at
>> >>> http://sharky.homelinux.net/mps_tutorial/sessions
>
> The session support in servlets is built directly on top of standard
> mod_python sessions.  I've seen sessions hang like this for a number
> of reasons.  Some times it's apache, which you say you've restarted.
>
> I'm wondering if you have a corrupted dbm file.  Look in /tmp for a
> file named mp_sess.dbm.  Remove it and see if that cleans things up
> for you.
>
> Daniel
>

rm /tmp/mp_sess.dbm  (have 0 bytes)
/etc/rc.d/rc.httpd restart

browse to link http://sharky.homelinux.net/mps_tutorial/sessions and works
fine the first time (apparently)...
It generate another /tmp/mp_sess.dbm  with 0 bytes, browser stop loading but
when i look to apache error log i see this:

[Thu Jun 24 16:14:41 2004] [error] [client 195.124.18.133] PythonHandler
mod_python.servlet: Traceback (most recent call last):, referer:
http://sharky.homelinux.net/mps_tutorial/
[Thu Jun 24 16:14:41 2004] [error] [client 195.124.18.133] PythonHandler
mod_python.servlet:   File
"/usr/lib/python2.3/site-packages/mod_python/apache.py", line 299, in
HandlerDispatch\n    result = object(req), referer:
http://sharky.homelinux.net/mps_tutorial/
[Thu Jun 24 16:14:41 2004] [error] [client 195.124.18.133] PythonHandler
mod_python.servlet:   File
"/usr/lib/python2.3/site-packages/mod_python/servlet.py", line 1462, in
handler\n    servlet._finally(), referer:
http://sharky.homelinux.net/mps_tutorial/
[Thu Jun 24 16:14:41 2004] [error] [client 195.124.18.133] PythonHandler
mod_python.servlet:   File
"/usr/lib/python2.3/site-packages/mod_python/servlet.py", line 688, in
_finally\n    self.__cleanup_session(), referer:
http://sharky.homelinux.net/mps_tutorial/
[Thu Jun 24 16:14:41 2004] [error] [client 195.124.18.133] PythonHandler
mod_python.servlet:   File
"/usr/lib/python2.3/site-packages/mod_python/servlet.py", line 386, in
__cleanup_session\n    self.session.save(), referer:
http://sharky.homelinux.net/mps_tutorial/
[Thu Jun 24 16:14:41 2004] [error] [client 195.124.18.133] PythonHandler
mod_python.servlet:   File
"/usr/lib/python2.3/site-packages/mod_python/Session.py", line 204, in
save\n    self.do_save(dict), referer:
http://sharky.homelinux.net/mps_tutorial/
[Thu Jun 24 16:14:41 2004] [error] [client 195.124.18.133] PythonHandler
mod_python.servlet:   File
"/usr/lib/python2.3/site-packages/mod_python/Session.py", line 327, in
do_save\n    dbm = self._get_dbm(), referer:
http://sharky.homelinux.net/mps_tutorial/
[Thu Jun 24 16:14:41 2004] [error] [client 195.124.18.133] PythonHandler
mod_python.servlet:   File
"/usr/lib/python2.3/site-packages/mod_python/Session.py", line 302, in
_get_dbm\n    result = self._dbmtype.open(self._dbmfile, 'c'), referer:
http://sharky.homelinux.net/mps_tutorial/
[Thu Jun 24 16:14:41 2004] [error] [client 195.124.18.133] PythonHandler
mod_python.servlet:   File "/usr/lib/python2.3/anydbm.py", line 83, in
open\n    return mod.open(file, flag, mode), referer:
http://sharky.homelinux.net/mps_tutorial/
[Thu Jun 24 16:14:41 2004] [error] [client 195.124.18.133] PythonHandler
mod_python.servlet:   File "/usr/lib/python2.3/dbhash.py", line 16, in
open\n    return bsddb.hashopen(file, flag, mode), referer:
http://sharky.homelinux.net/mps_tutorial/
[Thu Jun 24 16:14:41 2004] [error] [client 195.124.18.133] PythonHandler
mod_python.servlet:   File "/usr/lib/python2.3/bsddb/__init__.py", line
192, in hashopen\n    d.open(file, db.DB_HASH, flags, mode), referer:
http://sharky.homelinux.net/mps_tutorial/
[Thu Jun 24 16:14:41 2004] [error] [client 195.124.18.133] PythonHandler
mod_python.servlet: DBInvalidArgError: (22, 'Invalid argument'), referer:
http://sharky.homelinux.net/mps_tutorial/






> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python
>



More information about the Mod_python mailing list