hgweb.py erroring on Windows Server 2008

Issue #60 resolved
Chuck Rolek
created an issue

OS: Windows Server 2008 R2 Enterprise 64-bit

Java: java version "1.6.0_27" Java(TM) SE Runtime Environment (build 1.6.0_27-b07) Java HotSpot(TM) Client VM (build 20.2-b06, mixed mode, sharing)

Python: 2.6.6

Mercurial: 1.7.5

When I log into the server and try to launch one of the repository links so I can view the project in hgweb it throws that console error below. Its pretty much the same setup as my local copy that I've been working with, but on windows server. Is there something I'm missing/over-looking that is causing this error?

2011-09-20 08:55:35.848:INFO::Started SelectChannelConnector@ STARTI NG

08:55:49.020 [qtp2279771-16] WARN sonia.scm.web.cgi.DefaultCGIExecutor - proces s ends with exit code 1

08:55:49.020 [Thread-13] WARN sonia.scm.web.cgi.DefaultCGIExecutor - Traceback (most recent call last):

File "C:.............scm\cgi-bin\hgweb.py", line 46, in <module>

application = hgweb(repositoryPath)

File "mercurial\hgweb__init__.pyc", line 27, in hgweb

File "mercurial\hgweb\hgweb_mod.pyc", line 32, in init

File "mercurial\ui.pyc", line 35, in init

File "mercurial\demandimport.pyc", line 75, in getattribute

File "mercurial\demandimport.pyc", line 47, in _load

File "mercurial\util.pyc", line 575, in <module>

File "mercurial\demandimport.pyc", line 85, in _demandimport

File "mercurial\windows.pyc", line 21, in <module>

File "mercurial\demandimport.pyc", line 75, in getattribute

File "mercurial\demandimport.pyc", line 47, in _load

File "mercurial\osutil.pyc", line 12, in <module>

File "mercurial\osutil.pyc", line 10, in __load

ImportError: DLL load failed: The specified module could not be found.



On a side not in src/main/sonia/scm/web/cgi/EnvList.java line 98 you spell Environment wrong. You forgot the V; just a friendly heads up.

Comments (13)

  1. Chuck Rolek reporter

    No problem on that typo, figured i'd mention it while i saw it.

    I guess i forgot to mention that i targeted my Python and Mercurial install to the D drive, and have been trying to get scm-manager to understand that that is where it needs to live. After i did your Config Wizard this is what i looks like:

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <config> <repositoryDirectory>C:\Users\.................\.scm\repositories\hg</repositoryDirectory> <hgBinary>D:\Program Files (x86)\Mercurial\hg.exe</hgBinary> <pythonBinary>D:\Python26\python.exe</pythonBinary> <pythonPath>C:\Users\.................\.scm\lib\hg</pythonPath> <useOptimizedBytecode>false</useOptimizedBytecode> </config>

    The D drive is the drive that i have setup as the high-backup/fault-tolerance, so that's why its important for me to put it there.



  2. Sebastian Sebastian repo owner

    The problem is that i could not get every package of mercurial to work on windows. You could install the package from the wizard which unpacks a archive to C:\Users\.................\.scm\lib\hg and move the content of that directory after the installation.

  3. Chuck Rolek reporter

    I tried that just now, and it seems to want to recreate/keep-pointing at the C:\Users\.................\.scm. Is there a check that is further up in the system causing it to look there first/remake that directory on server start if it doesn't see it?

  4. Sebastian Sebastian repo owner

    The server configures mercurial automatically on startup if is not configured. Have a look at the loadConfig method of https://bitbucket.org/sdorra/scm-manager/src/tip/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/HgRepositoryHandler.java and the https://bitbucket.org/sdorra/scm-manager/src/tip/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/installer/WindowsHgInstaller.java. Could you test to install the package without any changes? Just to see if mercurial works after installation.

  5. Chuck Rolek reporter

    Clearly I don't know all of the stuff going on in the background, but in HgRepositoryHandler.java loadConfig(). Does super.loadConfig(); check to see if you redirected where to go find the config information (IE the D drive)? If not wouldn't you want some kind of check for that? At least in the case I'm presenting it seems to be seeing the initial built config location (from the first time I ran the .bat file) as the one that it should be using instead of where I want it to go to find the config files (the D drive).

    I'm actually going to give a fresh install of Mercurial, Python, and scm-manager on the C drive to see if that changes anything.

    Thanks again for the prompt responses!


  6. Chuck Rolek reporter

    Unfortunately the fresh install to the C drive did not resolve the error. I did the Config Wizard and that didn't help either. In the mean time i'll work on compiling a copy of Mercurial from the source.


  7. Chuck Rolek reporter

    So in my process of reinstalling i figured i'd see if a new version Mercruial would change things. Well it did, i used the version:


    from: http://mercurial.selenic.com/release/windows/

    and it works like a champ now.

    Sorry for having to bug you about this, and this actually being what resolves it. I was using the same install files from my local machine, so I didn't think they'd be affected that much. Guess they were.

    Thanks again for your help,


  8. Log in to comment