[web2py] Re: webfaction: Internal Server Error after upgrade to 1.96.2
can you check the new trunk? If ok, I will post 1.96.4 On Jun 4, 5:45 pm, Pepe Araya pepea...@gmail.com wrote: Massimo, bad news :( it not work this is the log: [Sat Jun 04 17:41:31 2011] [error] [client 127.0.0.1] File /home/pepearaya/webapps/crewcatalyst/web2py/gluon/html.py, line 29, in module [Sat Jun 04 17:41:31 2011] [error] [client 127.0.0.1] from utils import web2py_uuid, hmac_hash [Sat Jun 04 17:41:31 2011] [error] [client 127.0.0.1] File /home/pepearaya/webapps/crewcatalyst/web2py/gluon/utils.py, line 98, in module [Sat Jun 04 17:41:31 2011] [error] [client 127.0.0.1] ctokens = initialize_urandom() [Sat Jun 04 17:41:31 2011] [error] [client 127.0.0.1] File /home/pepearaya/webapps/crewcatalyst/web2py/gluon/utils.py, line 90, in initialize_urandom [Sat Jun 04 17:41:31 2011] [error] [client 127.0.0.1] open('/dev/urandom','wb').write(''.join(chr(t) for t in ctokens)) [Sat Jun 04 17:41:31 2011] [error] [client 127.0.0.1] IOError: [Errno 13] Permission denied: '/dev/urandom'
[web2py] Re: webfaction: Internal Server Error after upgrade to 1.96.2
Massimo, I did a fresh install with the new trunk and this is the traceback: Traceback (most recent call last): File web2py.py, line 16, in module import gluon.widget File /home/pepearaya/webapps/crewcatalyst2/web2py/gluon/__init__.py, line 15, in module from globals import current File /home/pepearaya/webapps/crewcatalyst2/web2py/gluon/globals.py, line 21, in module from html import xmlescape, TABLE, TR, PRE File /home/pepearaya/webapps/crewcatalyst2/web2py/gluon/html.py, line 29, in module from utils import web2py_uuid, hmac_hash File /home/pepearaya/webapps/crewcatalyst2/web2py/gluon/utils.py, line 103, in module ctokens = initialize_urandom() File /home/pepearaya/webapps/crewcatalyst2/web2py/gluon/utils.py, line 93, in initialize_urandom except IOerror: NameError: global name 'IOerror' is not defined
[web2py] Re: webfaction: Internal Server Error after upgrade to 1.96.2
Quoting Jonathan Lundell: It should be* IOError* (capital E) --- with that change it works.
[web2py] Re: webfaction: Internal Server Error after upgrade to 1.96.2
Reply 2: open('/dev/urandom','r').write(''.join(chr(t) for t in ctokens)) In this line, you are attempting to open /dev/urandom for reading, and then are attempting to write to it. Instead, you need to read the data from /dev/urandom, and then open a new file for writing to write your output. Hope that helps! __ what can i do?
[web2py] Re: webfaction: Internal Server Error after upgrade to 1.96.2
I am releasing 1.96.3 in a minute to fix this. Massimo On Jun 4, 3:09 am, Pepe Araya pepea...@gmail.com wrote: Reply 2: open('/dev/urandom','r').write(''.join(chr(t) for t in ctokens)) In this line, you are attempting to open /dev/urandom for reading, and then are attempting to write to it. Instead, you need to read the data from /dev/urandom, and then open a new file for writing to write your output. Hope that helps! __ what can i do?
[web2py] Re: webfaction: Internal Server Error after upgrade to 1.96.2
On my Ubuntu 10.04 system /dev/urandom has mode 666 which means read and write for everyone. If it is not writeable on Webfaction for others then it is either a policy for a different Linux distribution or a policy of Webfaction. The idea behind writing to /dev/urandom is to seed the random number generator so the output read from the generator is less likely to be guessed which increases security.
[web2py] Re: webfaction: Internal Server Error after upgrade to 1.96.2
To add some more, on Ubuntu and according to man urandom all major Linux distributions since 2000 the file /etc/init.d/urandom saves the random number pool into a seed file and restores it on startup by writing it back to /dev/urandom.
[web2py] Re: webfaction: Internal Server Error after upgrade to 1.96.2
Thanks Massimo! I'll give a try
[web2py] Re: webfaction: Internal Server Error after upgrade to 1.96.2
Massimo, bad news :( it not work this is the log: [Sat Jun 04 17:41:31 2011] [error] [client 127.0.0.1] File /home/pepearaya/webapps/crewcatalyst/web2py/gluon/html.py, line 29, in module [Sat Jun 04 17:41:31 2011] [error] [client 127.0.0.1] from utils import web2py_uuid, hmac_hash [Sat Jun 04 17:41:31 2011] [error] [client 127.0.0.1] File /home/pepearaya/webapps/crewcatalyst/web2py/gluon/utils.py, line 98, in module [Sat Jun 04 17:41:31 2011] [error] [client 127.0.0.1] ctokens = initialize_urandom() [Sat Jun 04 17:41:31 2011] [error] [client 127.0.0.1] File /home/pepearaya/webapps/crewcatalyst/web2py/gluon/utils.py, line 90, in initialize_urandom [Sat Jun 04 17:41:31 2011] [error] [client 127.0.0.1] open('/dev/urandom','wb').write(''.join(chr(t) for t in ctokens)) [Sat Jun 04 17:41:31 2011] [error] [client 127.0.0.1] IOError: [Errno 13] Permission denied: '/dev/urandom'