2490: After installation in Windows Server 2003, reviewboard can not run!!!

bruc****@gmai***** (Google Code) (Is this you? Claim this profile.)
Feb. 17, 2012
What version are you running?
1.6.3

What's the URL of the page containing the problem?
I don't know, maybe index

What steps will reproduce the problem?
1.Install the rb site
2.Access localhost/site
3.Display error page

What is the expected output? What do you see instead?
Mainpage, maybe login. I can only see default error page

What operating system are you using? What browser?
Windows Server 2003, Chrome

Please provide any additional information below.
I use wsgi as CGI in apache, and I find the error log as:

mod_wsgi (pid=2248): Exception occurred processing WSGI script 'E:/ReviewBoard/code/htdocs/reviewboard.wsgi'.
[Fri Feb 17 09:29:00 2012] [error] [client 192.168.1.2] Traceback (most recent call last):
[Fri Feb 17 09:29:00 2012] [error] [client 192.168.1.2]   File "C:\\Python27\\lib\\site-packages\\django-1.3.1-py2.7.egg\\django\\core\\handlers\\wsgi.py", line 250, in __call__
[Fri Feb 17 09:29:00 2012] [error] [client 192.168.1.2]     self.load_middleware()
[Fri Feb 17 09:29:00 2012] [error] [client 192.168.1.2]   File "C:\\Python27\\lib\\site-packages\\django-1.3.1-py2.7.egg\\django\\core\\handlers\\base.py", line 47, in load_middleware
[Fri Feb 17 09:29:00 2012] [error] [client 192.168.1.2]     raise exceptions.ImproperlyConfigured('Error importing middleware %s: "%s"' % (mw_module, e))
[Fri Feb 17 09:29:00 2012] [error] [client 192.168.1.2] ImproperlyConfigured: Error importing middleware reviewboard.admin.middleware: "DLL load failed: \xd5\xd2\xb2\xbb\xb5\xbd\xd6\xb8\xb6\xa8\xb5\xc4\xc4\xa3\xbf\xe9\xa1\xa3"

I tried to find solution in Google. someone said the problem is PyCrypto. But when I want to rebuild it by using MinGW, some error display such as chome error.
So I am not sure PyCrypto is the key point. 

So any body meet this situation and find solution ?

Thanks.

A painful python user in Windows -_-!!!
david
#1 david
We're not able to support installation of pycrypto, especially on Windows. You'll have to contact the pycrypto developers for help with this.
  • +ThirdParty
#2 bruc****@gmai***** (Google Code) (Is this you? Claim this profile.)
So you sure that the problem is based on PyCrypto????

 raise exceptions.ImproperlyConfigured('Error importing middleware %s: "%s"' % (mw_module, e))
[Fri Feb 17 09:29:00 2012] [error] [client 192.168.1.2] ImproperlyConfigured: Error importing middleware reviewboard.admin.middleware: "DLL load failed:
#3 bruc****@gmai***** (Google Code) (Is this you? Claim this profile.)
It displays that Error importing middleware reviewboard.admin.middleware
seems can not import reviewboard.admin.middleware
#4 wojciech********@gmai***** (Google Code) (Is this you? Claim this profile.)
I've been trying to setup Review Board on a Windows Vista box and had the same problem. Indeed, rebuilding PyCrypto with MinGW solves the problem. 

As to the build problem, you probably meant a missing chown.exe tool error. It seems that you don't have MSYS installed (it's an optional part of MinGW that isn't installed by default). I guess the problem would disappear if you re-installed MinGW and chosen all the components but I simply downloaded the missing packages from the command line by (I'm not sure but think these were the only two):

mingw-get install msys-base
mingw-get install msys-sed

One more problem I ran into was that "-mno-cygwin" compiler switch is pushed into GCC by distutils (setup.py install script) while it's not supported any longer by GCC 4, which is distributed as a part of MinGW. I read that you might customise the compiler switches used by the python extension build process using a sort of a script but it turned out I have GCC 3 (that supports -mno-cygwin) as a part of ActivePerl so I modified the Path environment variable to have a path to Perl before a path to MinGW to force GCC 3 to be used. There might be a better way to fix the problem but it did the job.

Hope that helps.
chipx86
#5 chipx86
We *strongly* encourage you to install in Linux, possibly in a virtual machine. Windows support is minimal and we actively encourage you to move away from it. We may even have to face the reality of dropping support in the future, as many of the libraries we depend on are not tested on Windows.
#6 bruc****@gmai***** (Google Code) (Is this you? Claim this profile.)
Traceback (most recent call last):
  File "setup.py", line 452, in <module>
    core.setup(**kw)
  File "C:\Python27\lib\distutils\core.py", line 152, in setup
    dist.run_commands()
  File "C:\Python27\lib\distutils\dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
    cmd_obj.run()
  File "C:\Python27\lib\distutils\command\build.py", line 127, in run
    self.run_command(cmd_name)
  File "C:\Python27\lib\distutils\cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
    cmd_obj.run()
  File "setup.py", line 247, in run
    self.run_command(cmd_name)
  File "C:\Python27\lib\distutils\cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
    cmd_obj.run()
  File "setup.py", line 269, in run
    raise RuntimeError("chmod error")
RuntimeError: chmod error

wojciech...@gmail.com, I install the MSYS but still show error above.
#7 bruc****@gmai***** (Google Code) (Is this you? Claim this profile.)
YES!!!I miss the below path added to PATH
C:\MinGW\msys\1.0\bin,  chmod and sh command both OK.

And I meet the same problem as he said.  -mno-cygwin

I install the ActivePerl, and add the per\bin at the header of PATH variable, but stilll this error.

ERROR INFO:

warning: GMP or MPIR library not found; Not building Crypto.PublicKey._fastmath.

building 'Crypto.Random.OSRNG.winrandom' extension
C:\MinGW\bin\gcc.exe -mno-cygwin -mdll -Wall -std=c99 -O3 -fomit-frame-pointer -
Isrc/ -IC:\Python27\include -IC:\Python27\PC -c src/winrand.c -o build\temp.win3
2-2.7\Release\src\winrand.o
cc1.exe: error: unrecognized command line option '-mno-cygwin'
error: command 'gcc' failed with exit status 1
#8 wojciech********@gmai***** (Google Code) (Is this you? Claim this profile.)
As the error message suggests ("C:\MinGW\bin\gcc.exe") you're still somehow using MinGW version of GCC. The only thing I might suggest is double-checking that there're no typos in you Path. Also, make sure you really have GCC in your perl\bin. It might be that GCC gets there with one of the additional packages (I use Perl from time to time so I probably have a few of them) rather than the base installation.

I must stress that what I did was a clumsy (but quick for me) workaround rather than a real solution. If you really want to follow in my footsteps you might try running the perl package manager ('ppm' command that starts a small gui app) and look for mingw package (a barebones one: gcc+dmake and not much more) as it seems that Perl relies on the "legacy" GCC 3. I'm not sure but it *might* work. Google says 'ppm install MinGW' from the command line should do the job but I would run ppm gui app to make sure that there aren't more than one version of this package.

An alternative (and maybe better) solution could be to fix distutils Python module that unnecessarily adds this compiler switch. If you do a full text search for 'mno-cygwin' in the Python install directory you might even find a script that adds it but I haven't tried patching it.

Another option, MinGW itself has some legacy packages available but using them is slightly more involved because you need to be carefull not to mix and match the new and old ones e.g. http://mingw-users.1079350.n2.nabble.com/How-do-I-install-mingw-gcc-3-4-5-td5604746.html.
#9 bruc****@gmai***** (Google Code) (Is this you? Claim this profile.)
Thanks!!  I successfully build PyCrypto and re-install it.

BUT, the problem has still not resolved.


mod_wsgi (pid=3584): Exception occurred processing WSGI script 'E:/ReviewBoard/code/htdocs/reviewboard.wsgi'.
[Wed Feb 22 09:36:12 2012] [error] [client 127.0.0.1] Traceback (most recent call last):
[Wed Feb 22 09:36:12 2012] [error] [client 127.0.0.1]   File "C:\\Python27\\lib\\site-packages\\django-1.3.1-py2.7.egg\\django\\core\\handlers\\wsgi.py", line 250, in __call__
[Wed Feb 22 09:36:12 2012] [error] [client 127.0.0.1]     self.load_middleware()
[Wed Feb 22 09:36:12 2012] [error] [client 127.0.0.1]   File "C:\\Python27\\lib\\site-packages\\django-1.3.1-py2.7.egg\\django\\core\\handlers\\base.py", line 47, in load_middleware
[Wed Feb 22 09:36:12 2012] [error] [client 127.0.0.1]     raise exceptions.ImproperlyConfigured('Error importing middleware %s: "%s"' % (mw_module, e))
[Wed Feb 22 09:36:12 2012] [error] [client 127.0.0.1] ImproperlyConfigured: Error importing middleware reviewboard.admin.middleware: "DLL load failed: \xd5\xd2\xb2\xbb\xb5\xbd\xd6\xb8\xb6\xa8\xb5\xc4\xc4\xa3\xbf\xe9\xa1\xa3"
#10 bruc****@gmai***** (Google Code) (Is this you? Claim this profile.)
OMG! I made it running!!

PyCrypto 2.5 seems has some problem, I got the version 2.2 and rebuild it under Mingw and ActivePerl. And reviewboard is running!

#11 wojciech********@gmai***** (Google Code) (Is this you? Claim this profile.)
Congratulations. I though you've given up.

In the meantime, I've finished evaluating Review Board (I really like it) and I've decided to try and introduce it to the team I work with in my organization. I didn't want to risk (now or in the future) all these compatibility problems with dependent components and installed it on our Linux intranet server. As chip...@gmail.com said, it's so much simpler... I didn't have any problems, depite having moderate at most knowledge of unix-like systems.
#12 bruc****@gmai***** (Google Code) (Is this you? Claim this profile.)
wojciech...@gmail.com

Thanks for your help to make me install it on windows successfully!

Is it possible to share your evaluation resources and result to me? We only have a small team (<10 people), and I want to make the whole development process more automated and agile.
 my email:brucenan@gmail.com
We also can have more communication about RB.
#14 bruc****@gmai***** (Google Code) (Is this you? Claim this profile.)
 cpsud...@gmail.com

Did you install the ActivePerl? Install it, and make sure in PATH file, activeperl path is in front of the Mingw to make activeperl run firstly.
#15 bruc****@gmai***** (Google Code) (Is this you? Claim this profile.)
Or, I give you my re-build package. 
http://files.cnblogs.com/brucenan/pycrypto-2.2.win32-py2.7.rar

it bases on python 2.7. I am not sure is it suitable for u.
#17 cpsu****@gmai***** (Google Code) (Is this you? Claim this profile.)
Thanks a lot bruce...@gmail.com . I was able get Review Board running with your installer. :)