under Git bash on window XP.
[:CHESSMASTER] /l/workspace/jose-git <62> git push –force origin chessengine
Password for '
http://chiiwen@localhost':
Total 0 (delta 0), reused 0 (delta 0)
remote: bash.exe: warning: could not find /tmp, please create!
remote:
remote: SubGit ERROR REPORT (SubGit version 1.0.0-EAP ('Miai') build #1096):
remote:
remote: You see this message because SubGit (
http://subgit.com) is installed in
your repository
remote: and an error that needs to be dealt with has occured in SubGit translati
on engine.
remote:
remote:
remote: TEMPORARY ERROR:
remote:
remote: CURRENT STATE: Both Git and Subversion repository are open for pushes or
commits.
remote: Your commit was not committed, but you may retry it.
remote:
remote: TO RECOVER:
remote: A) Address the problem if possible and then retry commit
remote: OR
remote: B) Run on the server
remote: $ subgit uninstall L:\Repositories2\jose
remote:
remote: IMPORTANT: As soon as SubGit is uninstalled, both Git and Subversi
on repositories
remote: will become open, but no synchronization will take plac
e.
remote:
remote: TO REPORT:
remote: Report an issue at
http://issues.tmatesoft.com/remote: You may find logs on the server at 'L:\Repositories2\jose\subgit\l
ogs'
remote:
remote: THANK YOU!
-------------------on subgit log directory i have
[1329514105.062][pre-receive-hook][10] Initialized memory cache logger.
[1329514105.140][pre-receive-hook][10] SubGit version 1.0.0-EAP ('Miai') build #1096
[1329514105.140][pre-receive-hook][10] Command name: pre-receive.
[1329514105.140][pre-receive-hook][10] Command argument: l:/Repositories2/jose/.git.
[1329514105.140][pre-receive-hook][10] Initialized console logger.
[1329514105.140][pre-receive-hook][10] SubGit version 1.0.0-EAP ('Miai') build #1096
[1329514106.453][pre-receive-hook][10] Initialized file logger, logs directory is: 'L:\Repositories2\jose\subgit\logs'.
[1329514106.453][pre-receive-hook][10] SubGit version 1.0.0-EAP ('Miai') build #1096
[1329514106.500][pre-receive-hook][10] Obtaining file lock on 'L:\Repositories2\jose\subgit\daemon.pid.lock'.
[1329514106.515][pre-receive-hook][10] Obtained file lock on 'L:\Repositories2\jose\subgit\daemon.pid.lock'
[1329514106.515][pre-receive-hook][10] error parsing address daemon info (null, null, null)
java.io.IOException: error parsing address daemon info (null, null, null)
…java.io.IOException: error parsing address daemon info (null, null, null)
at org.tmatesoft.translator.process.m.a(SourceFile:34)
at org.tmatesoft.translator.process.t.c(SourceFile:110)
at org.tmatesoft.translator.j.f.h(SourceFile:282)
at org.tmatesoft.translator.j.f.a(SourceFile:331)
at org.tmatesoft.translator.j.f.a(SourceFile:264)
at org.tmatesoft.translator.j.f.i(SourceFile:113)
at org.tmatesoft.translator.j.f.b(SourceFile:76)
at org.tmatesoft.translator.SubGitHook.d(SourceFile:81)
at org.tmatesoft.translator.SubGitHook.a(SourceFile:52)
at org.tmatesoft.translator.SubGitHook.a(SourceFile:20)
at org.tmatesoft.translator.process.f.c(SourceFile:106)
at org.tmatesoft.translator.process.f.b(SourceFile:78)
at org.tmatesoft.translator.SubGitHook.main(SourceFile:25)
[1329514106.531][pre-receive-hook][10] Pid file 'L:\Repositories2\jose\subgit\daemon.pid' deleted.
[1329514106.546][pre-receive-hook][10] Launching daemon, classpath: l:/Repositories2/jose/subgit/lib/subgit-1.0.0-EAP_1096_fat.jar
java options: [-noverify, -client]
working directory: L:\Repositories2\jose
arguments: –svn L:\Repositories2\jose –limit 1329514111531
[1329514106.578][pre-receive-hook][10] About to release lock: org.tmatesoft.translator.process.a@17182c1
[1329514106.578][pre-receive-hook][10] Trying to release file lock on 'L:\Repositories2\jose\subgit\daemon.pid.lock'.
[1329514106.578][pre-receive-hook][10] Released file lock on 'L:\Repositories2\jose\subgit\daemon.pid.lock'
[1329514106.593][pre-receive-hook][10]
java.lang.NoClassDefFoundError
…java.lang.NoClassDefFoundError
at com.sun.jna.Structure.<clinit>(Structure.java:134)
at org.tmatesoft.translator.process.win32.a.a(SourceFile:53)
at org.tmatesoft.translator.j.f.b(SourceFile:317)
at org.tmatesoft.translator.j.f.a(SourceFile:339)
at org.tmatesoft.translator.j.f.a(SourceFile:264)
at org.tmatesoft.translator.j.f.i(SourceFile:113)
at org.tmatesoft.translator.j.f.b(SourceFile:76)
at org.tmatesoft.translator.SubGitHook.d(SourceFile:81)
at org.tmatesoft.translator.SubGitHook.a(SourceFile:52)
at org.tmatesoft.translator.SubGitHook.a(SourceFile:20)
at org.tmatesoft.translator.process.f.c(SourceFile:106)
at org.tmatesoft.translator.process.f.b(SourceFile:78)
at org.tmatesoft.translator.SubGitHook.main(SourceFile:25)
[1329514106.640][pre-receive-hook][10] Failed to execute pre-receive hook command
org.tmatesoft.translator.i.d:
at org.tmatesoft.translator.i.d.b(SourceFile:47)
… at org.tmatesoft.translator.i.d.b(SourceFile:47)
at org.tmatesoft.translator.i.d.a(SourceFile:40)
at org.tmatesoft.translator.j.f.b(SourceFile:97)
at org.tmatesoft.translator.SubGitHook.d(SourceFile:81)
at org.tmatesoft.translator.SubGitHook.a(SourceFile:52)
at org.tmatesoft.translator.SubGitHook.a(SourceFile:20)
at org.tmatesoft.translator.process.f.c(SourceFile:106)
at org.tmatesoft.translator.process.f.b(SourceFile:78)
at org.tmatesoft.translator.SubGitHook.main(SourceFile:25)
Caused by: java.lang.NoClassDefFoundError
at com.sun.jna.Structure.<clinit>(Structure.java:134)
at org.tmatesoft.translator.process.win32.a.a(SourceFile:53)
at org.tmatesoft.translator.j.f.b(SourceFile:317)
at org.tmatesoft.translator.j.f.a(SourceFile:339)
at org.tmatesoft.translator.j.f.a(SourceFile:264)
at org.tmatesoft.translator.j.f.i(SourceFile:113)
at org.tmatesoft.translator.j.f.b(SourceFile:76)
... 6 more
It might happen because of the obfuscation process, however we did not encounter this issue during the tests that we performed on Windows XP as well. I will soon prepare an updated build for you with the JNA-related classes non-obfuscated and it would be great if you'll be able to give this build a try.
Thanks!
The first repo I ran subgit under git bash. This new repo created with subgit under windows command.
L:\workspace\jose-git2>git push
Password for 'http://chiiwen@localhost':
Counting objects: 5, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 289 bytes, done.
Total 3 (delta 2), reused 0 (delta 0)
remote: java.lang.NoClassDefFoundError: org/tmatesoft/translator/SubGitHook
remote: Exception in thread "main" To http://chiiwen@localhost/git/jose
! [remote rejected] chessengine -> chessengine (pre-receive hook declined)
error: failed to push some refs to 'http://chiiwen@localhost/git/jose'
What git distribution do you use? We have automated tests suit with msys-git — http://code.google.com/p/msysgit/ If you use cygwin version of git, certain problems may arise. E.g. switching between standard Windows and Git Bash environments could cause the failure:
1. First time you pushed this way:
Unix path in your working directory means you were using bash environment. Push succeeded to execute pre-receive hook script. Then the script launched Java process with the following classpath:
It seems this jar file was somehow broken. Since it is generated during install phase we need to look into 'install' log stored in $SVN_REPOS/subgit/logs/ directory. It may be obfuscation issue or the classpath parsing issue. We need to look into $GIT_REPOS/hooks/pre-receive(.cmd) file in order to find what could be wrong with the classpath. Could you please send us this file, too?
2. Next time you were using Windows command prompt:
At this time pre-receive hook script started but it failed to launch Java process since SubGitHook class was missing in the classpath.
So, here we need:
Thank you in advance.
I made mistakes when I tested, I should use different repos. I use the same repo for the second test, so I lost the information for the first one. I will try later to create on a different repo
For the second one (Windows command prompt) first. It is strange that subgit directory does not have lib directory (even though I get installation successful last time). I issued the subgit install again. lib directory created.
Here is new result:
L:\workspace\jose-git2>git push
Password for 'http://chiiwen@localhost':
Counting objects: 5, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 289 bytes, done.
Total 3 (delta 2), reused 0 (delta 0)
remote:
remote: SubGit ERROR REPORT (SubGit version 1.0.0-EAP ('Miai') build #1096):
remote:
remote: You see this message because SubGit (http://subgit.com) is installed in your repository
remote: and an error that needs to be dealt with has occured in SubGit translation engine.
remote:
remote:
remote: TEMPORARY ERROR:
remote:
remote: CURRENT STATE: Both Git and Subversion repository are open for pushes or commits.
remote: Your commit was not committed, but you may retry it.
remote:
remote: TO RECOVER:
remote: A) Address the problem if possible and then retry commit
remote: OR
remote: B) Run on the server
remote: $ subgit uninstall L:\Repositories2\jose
remote:
remote: IMPORTANT: As soon as SubGit is uninstalled, both Git and Subversion repositories
remote: will become open, but no synchronization will take place.
remote:
remote: TO REPORT:
remote: Report an issue at http://issues.tmatesoft.com/
remote: You may find logs on the server at 'L:\Repositories2\jose\subgit\logs'
remote:
remote: THANK YOU!
To http://chiiwen@localhost/git/jose
! [remote rejected] chessengine -> chessengine (pre-receive hook declined)
error: failed to push some refs to 'http://chiiwen@localhost/git/jose'
Thanks!
Regarding the failure:
1. I noticed you run different versions of JRE:
and
It's better to use 1.5 (or 1.6) version, i.e. set global variable to "C:\Program Files\Java\jdk1.5.0_14\jre"
2. Seems like JNA library we use for Windows specific stuff causes the problem. I've prepared a new build with better debug log and the latest version of JNA library available today.
Please download this build at http://subgit.com/interim/ and give it a try. In case of failure send us all the same logs.
Thanks.
Try to make the experiment pure — do everything from scratch, i.e. install subgit into stand-alone not translated Subversion repository. You may use 'subgit uninstall –purge $SVN_REPOS' command, it removes all the generated files but keeps Subversion and Git repositories. Move translated Git repository somewhere or change git.<id>.repository path in a new subgit.conf file.
Could you please also provide as much information on your setup as possible:
Thanks!
Regarding FileNotFoundException: that happens when no daemon launched at the moment. Daemon process exits after daemon.idleTimeout seconds, 5 seconds by default. So, that's expected for the first push.
Could you please run the same code under JRE 1.6? I put a link here for your convenience — http://java.com/en/download/manual.jsp#win
Thank you!
1. Put this class into some temporary directory.
2. Compile it with JNA library in classpath:
javac -classpath $SUBGIT_HOME/lib/jna-3.4.0 JnaTest.java
javac -classpath $SUBGIT_HOME/lib/jna-3.2.7 JnaTest.java
javac -classpath $SVN_REPOS/subgit/lib/subgit-1.0.0-EAP_..._fat.jar
3. Run compiled class:
java -classpath .:$SUBGIT_HOME/lib/jna-3.4.0 JnaTest
java -classpath .:$SUBGIT_HOME/lib/jna-3.2.7 JnaTest
java -classpath .:$SVN_REPOS/subgit/lib/subgit-1.0.0-EAP_..._fat.jar JnaTest
It's important to test different jar files, in different combinations with Windows command prompt and git shell environment.
Thank you in advance.
I also put JnaTest.java in my eclipse and run, it also failed. There is not much to debug. :-(
I also test JnaTest.java on my other laptop that does not McAfee, still failed. I will try JNA examples later.
Here is the log
[1329772662.312][pre-receive-hook][10] Initialized memory cache logger.
[1329772662.343][pre-receive-hook][10] SubGit version 1.0.0-EAP ('Miai') build #1110
[1329772662.343][pre-receive-hook][10] Command name: pre-receive.
[1329772662.343][pre-receive-hook][10] Command argument: l:/Repositories2/jchess/.git.
[1329772662.343][pre-receive-hook][10] Initialized console logger.
[1329772662.343][pre-receive-hook][10] SubGit version 1.0.0-EAP ('Miai') build #1110
[1329772669.015][pre-receive-hook][10] Initialized file logger, logs directory is: 'L:\Repositories2\jchess\subgit\logs'.
[1329772669.015][pre-receive-hook][10] SubGit version 1.0.0-EAP ('Miai') build #1110
[1329772669.078][pre-receive-hook][10] Obtaining file lock on 'L:\Repositories2\jchess\subgit\daemon.pid.lock'.
[1329772669.093][pre-receive-hook][10] Obtained file lock on 'L:\Repositories2\jchess\subgit\daemon.pid.lock'
[1329772669.109][pre-receive-hook][10] L:\Repositories2\jchess\subgit\daemon.pid (???????????)
[1329772669.125][pre-receive-hook][10] Launching daemon, classpath: l:/Repositories2/jchess/subgit/lib/subgit-1.0.0-EAP_1110_fat.jar
java options: [-noverify, -client]
working directory: L:\Repositories2\jchess
arguments: –svn L:\Repositories2\jchess –limit 1329772674125
[1329772669.125][pre-receive-hook][10] About to release lock: org.tmatesoft.translator.process.TsFileLock@1cfb549
[1329772669.140][pre-receive-hook][10] Trying to release file lock on 'L:\Repositories2\jchess\subgit\daemon.pid.lock'.
[1329772669.140][pre-receive-hook][10] Released file lock on 'L:\Repositories2\jchess\subgit\daemon.pid.lock'
[1329772669.140][pre-receive-hook][10] Could not initialize class com.sun.jna.Native
Do you get the same error message when running the test?
I think here's what happens in your case: JNA tries to generate DLL file in the temporary directory and fails since this directory belongs to other user. At least I found something similar on the internet.
I will try to copy-paste the code from JNA loading routines to get more descriptive error message. Then we run the same code inside our hook in order to reproduce under the same conditions.
Now we have more interesting cases.
C:\>java -classpath .;e:\subgit\lib\jna-3.4.0.jar JnaTest
Test failed
L:\>java -classpath .;e:\subgit\lib\jna-3.4.0.jar JnaTest
Exception in thread "main" java.lang.NoClassDefFoundError: IKernel32
This happened because I copied JnaTest.class from c:/ to L:/
if I javac the same source on L: and java ....
I get the same result
Test failed.
--
on eclipse, it only show "Test failed"
I have seen some programs only work on C: drive. You might need D: if you want to test on your windows
Install it as usually and try to push. Debug data will be in pre-receive hook log file.
------------Result
[1329799603.890][pre-receive-hook][10] Initialized memory cache logger.
[1329799603.906][pre-receive-hook][10] SubGit version 1.0.0-EAP ('Miai') build #1111
[1329799603.906][pre-receive-hook][10] Command name: pre-receive.
[1329799603.906][pre-receive-hook][10] Command argument: l:/Repositories2/jchess/.git.
[1329799603.906][pre-receive-hook][10] Initialized console logger.
[1329799603.906][pre-receive-hook][10] SubGit version 1.0.0-EAP ('Miai') build #1111
[1329799611.125][pre-receive-hook][10] Initialized file logger, logs directory is: 'L:\Repositories2\jchess\subgit\logs'.
[1329799611.125][pre-receive-hook][10] SubGit version 1.0.0-EAP ('Miai') build #1111
[1329799611.140][pre-receive-hook][10] no jnidispatch in java.library.path
[1329799611.140][pre-receive-hook][10] Resource url: jar:file:/L:/Repositories2/jchess/subgit/lib/subgit-1.0.0-EAP_1111_fat.jar!/com/sun/jna/win32-x86/jnidispatch.dll
[1329799611.156][pre-receive-hook][10] ?????
[1329799611.187][pre-receive-hook][10] Obtaining file lock on 'L:\Repositories2\jchess\subgit\daemon.pid.lock'.
[1329799611.187][pre-receive-hook][10] Obtained file lock on 'L:\Repositories2\jchess\subgit\daemon.pid.lock'
[1329799611.187][pre-receive-hook][10] L:\Repositories2\jchess\subgit\daemon.pid (???????????)
[1329799611.203][pre-receive-hook][10] Launching daemon, classpath: l:/Repositories2/jchess/subgit/lib/subgit-1.0.0-EAP_1111_fat.jar
java options: [-noverify, -client]
working directory: L:\Repositories2\jchess
arguments: –svn L:\Repositories2\jchess –limit 1329799616203
[1329799611.234][pre-receive-hook][10] About to release lock: org.tmatesoft.translator.process.TsFileLock@f9f9d8
[1329799611.234][pre-receive-hook][10] Trying to release file lock on 'L:\Repositories2\jchess\subgit\daemon.pid.lock'.
[1329799611.234][pre-receive-hook][10] Released file lock on 'L:\Repositories2\jchess\subgit\daemon.pid.lock'
[1329799611.234][pre-receive-hook][10] Could not initialize class com.sun.jna.Native
I've googled a bit and found a couple of solutions:
0. http://comments.gmane.org/gmane.comp.java.sonar.general/10462
Don't start your service with the Local System but associate the specified
user with which you have installed Sonar.
I don't know if this is the only solution, you should probably be able to
fix the problem by changing the rights to your sonar installation directory
but the above solution worked for us.
1. https://mxforum.mendix.com/questions/1541/
2. https://issues.jenkins-ci.org/browse/JENKINS-8425
Have you checked that there is a temp directory and the Jenkins slave is able to write to it?
3. http://docs.oracle.com/javase/6/docs/api/java/io/File.html#createTempFile(java.lang.String, java.lang.String, java.io.File)
I put here a piece of javadoc for File.createTempFile:
We can try to use another temporary directory for hooks (though it's stated that it may not work). To do that please add the following lines into subgit.conf file, create corresponding directory and reinstall subgit:
[hooks]
javaOptions = -Djava.io.tmpdir=C:/tmp
From our side I'll put a special check to make sure that java.io.tmpdir is writable directory to get meaningful error message in case of similar problems.
I add your suggested hooks to subgit.conf.
I checked VisualSVN server log, and found out following information. This error is interesting because I can git clone and git push successfully without subgit.
user chiiwen: authentication failure for "/git/jchess/info/refs": Password Mismatch
[client 127.0.0.1]
I do not know whether it is related to I use http instead https. I have to modified Authentication to Other settings.
I reinstalled subgit. Here is the log.
-------------------------- install log
[1329848771.031][client-install][10] Initialized memory cache logger.
[1329848771.046][client-install][10] SubGit version 1.0.0-EAP ('Miai') build #1111
[1329848771.046][client-install][10] Command name: install.
[1329848771.046][client-install][10] Command argument: L:\Repositories2\jchess.
[1329848771.062][client-install][10] Initialized console logger.
[1329848771.062][client-install][10] SubGit version 1.0.0-EAP ('Miai') build #1111
[1329848771.218][client-install][10] Initialized file logger, logs directory is: 'null'.
[1329848771.218][client-install][10] SubGit version 1.0.0-EAP ('Miai') build #1111
[1329848772.718][client-install][10] L:\Repositories2\jchess\subgit\daemon.pid (The system cannot find the file specified)
[1329848772.734][client-install][10] Trying to obtain file lock on 'L:\Repositories2\jchess\subgit\daemon.pid.lock'.
[1329848772.734][client-install][10] Obtained by #tryToObtain file lock on 'L:\Repositories2\jchess\subgit\daemon.pid.lock'
[1329848778.921][client-install][10] Translating Subversion revisions to Git commits...
[1329848778.937][client-install][10] Subversion revisions: 2.
[1329848779.703][client-install][10] Translating 'L:\Repositories2\jchess'.
[1329848779.703][client-install][10] Sync started.
[1329848779.703][client-install][10] Sync started for git location 'default'
[1329848780.156][client-install][10] Checking remote 'file:///L:/Repositories2/jchess'.
[1329848780.515][client-install][10] Revisions are 2/2 (last fetched/last).
[1329848780.531][client-install][10] Everything is up-to-date.
[1329848780.531][client-install][10] Sync complete for git location default.
[1329848780.531][client-install][10] Sync complete.
[1329848780.781][client-install][10] SubGit hooks installed.
[1329848780.796][client-install][10] Trying to release file lock on 'L:\Repositories2\jchess\subgit\daemon.pid.lock'.
[1329848780.796][client-install][10] Released file lock on 'L:\Repositories2\jchess\subgit\daemon.pid.lock'
Now I got 2 logs after git push
--------------------------------daemon.0
[1329848868.546][daemon][10] Initialized memory cache logger.
[1329848868.562][daemon][10] SubGit version 1.0.0-EAP ('Miai') build #1111
[1329848868.562][daemon][10] Command name: null.
[1329848868.562][daemon][10] Command argument: –svn.
[1329848868.562][daemon][10] Command argument: L:\Repositories2\jchess.
[1329848868.562][daemon][10] Command argument: –limit.
[1329848868.562][daemon][10] Command argument: 1329848873000.
[1329848868.812][daemon][10] Initialized console logger.
[1329848868.812][daemon][10] SubGit version 1.0.0-EAP ('Miai') build #1111
[1329848868.843][daemon][10] Initialized file logger, logs directory is: 'L:\Repositories2\jchess\subgit\logs'.
[1329848868.843][daemon][10] SubGit version 1.0.0-EAP ('Miai') build #1111
[1329848868.843][daemon][10] System properties:
java.runtime.name : Java(TM) SE Runtime Environment
sun.boot.library.path : c:\Progra~1\Java\jdk1.6.0_31\jre\bin
java.vm.version : 20.6-b01
java.vm.vendor : Sun Microsystems Inc.
java.vendor.url : http://java.sun.com/
path.separator : ;
java.vm.name : Java HotSpot(TM) Client VM
file.encoding.pkg : sun.io
sun.java.launcher : SUN_STANDARD
user.country : US
sun.os.patch.level : Service Pack 3
java.vm.specification.name : Java Virtual Machine Specification
user.dir : L:\Repositories2\jchess
java.runtime.version : 1.6.0_31-b05
java.awt.graphicsenv : sun.awt.Win32GraphicsEnvironment
java.endorsed.dirs : c:\Progra~1\Java\jdk1.6.0_31\jre\lib\endorsed
os.arch : x86
java.io.tmpdir : C:\WINDOWS\
line.separator :
java.vm.specification.vendor : Sun Microsystems Inc.
user.variant :
os.name : Windows XP
sun.jnu.encoding : Cp1252
java.library.path : c:\Progra~1\Java\jdk1.6.0_31\jre\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;E:\Program Files\Git\libexec\git-core;E:\Program Files\Git\libexec\git-core;E:\Program Files\Git\libexec\git-core;E:\Program Files\Git\libexec\git-core;E:\Program Files\Git\libexec\git-core;E:\Program Files\Git\libexec\git-core;c:\Progra~1\Java\jdk1.6.0_31\bin;c:\Perl\site\bin;c:\Perl\bin;c:\Program Files\CMake 2.4\bin;c:\Program Files\PHP\;c:\Perl\bin\;c:\WINDOWS\system32;c:\WINDOWS;c:\WINDOWS\System32\Wbem;c:\SFU\common\;e:\PROGRA~1\MySQL\MYSQLS~1.0\bin;c:\SFU\Perl\bin\;c:\Program Files\GnuWin32\bin;c:\Program Files\Hummingbird\Connectivity\11.00\Accessories\;.;c:\Program Files\Microsoft SQL Server\80\Tools\BINN;d:\Program Files\VisualSVN Server\bin;d:\Program Files\Perforce;d:\Program Files\Graphviz 2.21\bin;d:\Program Files\svk;c:\WINDOWS\system32\WindowsPowerShell\v1.0;d:\Program Files\Microsoft SQL Server\100\Tools\Binn\;d:\Program Files\Microsoft SQL Server\100\DTS\Binn\;d:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;c:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\;c:\OptimizeIt\OptimizeIt31\lib;d:\Program Files\Executive Software\Diskeeper\;c:\Program Files\Common Files\DivX Shared\;c:\Program Files\Smart Projects\IsoBuster;c:\Program Files\TortoiseGit\bin;E:\Program Files\Git\cmd;E:\Program Files\Git\bin;d:\Program Files\TortoiseSVN\bin;i:\apache-maven-3.0.4\bin;.
java.specification.name : Java Platform API Specification
java.class.version : 50.0
sun.management.compiler : HotSpot Client Compiler
os.version : 5.1
user.home : C:\Documents and Settings\NetworkService
user.timezone :
java.awt.printerjob : sun.awt.windows.WPrinterJob
file.encoding : Cp1252
java.specification.version : 1.6
java.class.path : l:/Repositories2/jchess/subgit/lib/subgit-1.0.0-EAP_1111_fat.jar;
user.name : NETWORK SERVICE
java.vm.specification.version : 1.0
sun.java.command : org.tmatesoft.translator.SubGitDaemon –svn L:\Repositories2\jchess –limit 1329848873000
java.home : c:\Progra~1\Java\jdk1.6.0_31\jre
sun.arch.data.model : 32
user.language : en
java.specification.vendor : Sun Microsystems Inc.
awt.toolkit : sun.awt.windows.WToolkit
java.vm.info : mixed mode, sharing
java.version : 1.6.0_31
java.ext.dirs : c:\Progra~1\Java\jdk1.6.0_31\jre\lib\ext;C:\WINDOWS\Sun\Java\lib\ext
sun.boot.class.path : c:\Progra~1\Java\jdk1.6.0_31\jre\lib\resources.jar;c:\Progra~1\Java\jdk1.6.0_31\jre\lib\rt.jar;c:\Progra~1\Java\jdk1.6.0_31\jre\lib\sunrsasign.jar;c:\Progra~1\Java\jdk1.6.0_31\jre\lib\jsse.jar;c:\Progra~1\Java\jdk1.6.0_31\jre\lib\jce.jar;c:\Progra~1\Java\jdk1.6.0_31\jre\lib\charsets.jar;c:\Progra~1\Java\jdk1.6.0_31\jre\lib\modules\jdk.boot.jar;c:\Progra~1\Java\jdk1.6.0_31\jre\classes
java.vendor : Sun Microsystems Inc.
file.separator : \
java.vendor.url.bug : http://java.sun.com/cgi-bin/bugreport.cgi
sun.io.unicode.encoding : UnicodeLittle
sun.cpu.endian : little
sun.desktop : windows
sun.cpu.isalist : pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86
[1329848868.843][daemon][10] Launching daemon.
[1329848868.906][daemon][10] Server socket instance created.
[1329848869.671][daemon][10] List of network interfaces obtained.
[1329848869.671][daemon][10] Network interface: name:lo (MS TCP Loopback interface)
[1329848869.671][daemon][10] Processing address: /127.0.0.1
[1329848869.671][daemon][10] Processing address: /0:0:0:0:0:0:0:1
[1329848869.671][daemon][10] Processing address: /fe80:0:0:0:0:0:0:1%1
[1329848869.671][daemon][10] Network interface: name:eth0 (3Com 3C918 Integrated Fast Ethernet Controller (3C905B-TX Compatible) - McAfee NDIS Intermediate Filter Miniport)
[1329848869.671][daemon][10] Processing address: /192.168.0.18
[1329848869.671][daemon][10] Processing address: /fe80:0:0:0:2c0:4fff:fea0:b712%4
[1329848869.671][daemon][10] Network interface: name:tun0 (Teredo Tunneling Pseudo-Interface)
[1329848869.671][daemon][10] Processing address: /2001:0:4137:9e76:8000:f503:b4ff:4c7e
[1329848869.671][daemon][10] Processing address: /fe80:0:0:0:0:ffff:ffff:fffd%5
[1329848869.671][daemon][10] Network interface: name:tun1 (6to4 Pseudo-Interface)
[1329848869.671][daemon][10] Network interface: name:tun2 (Automatic Tunneling Pseudo-Interface)
[1329848869.671][daemon][10] Processing address: /fe80:0:0:0:0:5efe:c0a8:12%2
[1329848869.687][daemon][10] Local loopback address found: /127.0.0.1.
[1329848869.687][daemon][10] Trying to use a free port for address '127.0.0.1'.
[1329848869.703][daemon][10] Daemon socket opened for port: 4084.
[1329848869.781][daemon][10] Daemon process pid obtained: 5624.
[1329848869.812][daemon][10] Daemon (pid=5624; port=4084; address=127:0:0:1) at (L:\Repositories2\jchess\subgit).
[1329848875.046][daemon][11] 'pid=5624; port=4084; address=127:0:0:1' was written into temporary file 'L:\Repositories2\jchess\subgit\subgit.6427358808843237460.pid'
[1329848875.203][daemon][11] Cannot write pid file to 'L:\Repositories2\jchess\subgit\daemon.pid', exiting.
[1329848860.046][pre-receive-hook][10] Initialized memory cache logger.
[1329848860.062][pre-receive-hook][10] SubGit version 1.0.0-EAP ('Miai') build #1111
[1329848860.062][pre-receive-hook][10] Command name: pre-receive.
[1329848860.062][pre-receive-hook][10] Command argument: l:/Repositories2/jchess/.git.
[1329848860.078][pre-receive-hook][10] Initialized console logger.
[1329848860.078][pre-receive-hook][10] SubGit version 1.0.0-EAP ('Miai') build #1111
[1329848867.031][pre-receive-hook][10] Initialized file logger, logs directory is: 'L:\Repositories2\jchess\subgit\logs'.
[1329848867.031][pre-receive-hook][10] SubGit version 1.0.0-EAP ('Miai') build #1111
[1329848867.046][pre-receive-hook][10] no jnidispatch in java.library.path
[1329848867.515][pre-receive-hook][10] Resource url: jar:file:/L:/Repositories2/jchess/subgit/lib/subgit-1.0.0-EAP_1111_fat.jar!/com/sun/jna/win32-x86/jnidispatch.dll
[1329848867.859][pre-receive-hook][10] Native library path: C:\tmp\jna7111216171838878764.dll
[1329848867.984][pre-receive-hook][10] Obtaining file lock on 'L:\Repositories2\jchess\subgit\daemon.pid.lock'.
[1329848868.000][pre-receive-hook][10] Obtained file lock on 'L:\Repositories2\jchess\subgit\daemon.pid.lock'
[1329848868.000][pre-receive-hook][10] L:\Repositories2\jchess\subgit\daemon.pid (???????????)
[1329848868.000][pre-receive-hook][10] Launching daemon, classpath: l:/Repositories2/jchess/subgit/lib/subgit-1.0.0-EAP_1111_fat.jar
java options: [-noverify, -client]
working directory: L:\Repositories2\jchess
arguments: –svn L:\Repositories2\jchess –limit 1329848873000
[1329848874.500][pre-receive-hook][10] About to release lock: org.tmatesoft.translator.process.TsFileLock@1d2068d
[1329848874.500][pre-receive-hook][10] Trying to release file lock on 'L:\Repositories2\jchess\subgit\daemon.pid.lock'.
[1329848874.500][pre-receive-hook][10] Released file lock on 'L:\Repositories2\jchess\subgit\daemon.pid.lock'
[1329848874.500][pre-receive-hook][10] Timeout while waiting for pid file 'L:\Repositories2\jchess\subgit\daemon.pid'.
1. Email replies.
Sorry, we have to upgrade our tracker installation in order to make e-mail replies work. We decided to postpone a bit with the upgrade, hope it doesn't make things too inconvenient for you.
2. Authentication problems
I checked VisualSVN server log, and found out following information. This error is interesting because I can git clone and git push successfully without subgit.
user chiiwen: authentication failure for "/git/jchess/info/refs": Password Mismatch
[client 127.0.0.1]
I do not know whether it is related to I use http instead https. I have to modified Authentication to Other settings.
I reinstalled subgit. Here is the log.
That's weird. Apache checks credentials and access control list before it runs SubGit hooks. So, you should notice the same problem before you install subgit. Maybe subgit accidentally removed some caches from repository, so you have to enter them once again.
I've created a separate issue for this particular problem. You may subscribe to it at http://issues.tmatesoft.com/issue/SGT-425.
After all it seems authentications passed because SubGit hooks actually got executed.
3. JNA problems.
Now I got 2 logs after git push
Great! We have resolved JNA-related problem. Now it's clear why we had problems with temporary directory:
I think this directory has very strict permissions in Windows XP.
4. Daemon launch takes too much time.
So, you got timeout waiting for pid file error. That means SubGit daemon takes to long to launch. I've checked the timestamps in the debug data you've provided and here's what strange:
[1329848869.703][daemon][10] Daemon socket opened for port: 4084.
[1329848869.781][daemon][10] Daemon process pid obtained: 5624.
[1329848869.812][daemon][10] Daemon (pid=5624; port=4084; address=127:0:0:1) at (L:\Repositories2\jchess\subgit).
[1329848875.046][daemon][11] 'pid=5624; port=4084; address=127:0:0:1' was written into temporary file 'L:\Repositories2\jchess\subgit\subgit.6427358808843237460.pid'
It took 5 seconds just to write into file. In that case SubGit hook doesn't wait until the daemon is launched and exits with error. But from the other side this problem must be temporary, i.e. sometimes push must succeed.
If that doesn't hold for you, please run the following command and check whether daemon actually launches:
java -classpath L:\Repositories2\jchess\subgit\lib\subgit-1.0.0-EAP_1111_fat.jar org.tmatesoft.translator.SubGitDaemon –svn L:\Repositories2\jchess –limit 2329848873000
After it launches you can push commits at least once.
L:\workspace\jchess-git>java -classpath L:\Repositories2\jchess\subgit\lib\subgi
t-1.0.0-EAP_1111_fat.jar org.tmatesoft.translator.SubGitDaemon -svn L:\Repositor
ies2\jchess -limit 2329848873000
error: Failed to parse command line ûsvn L:\Repositories2\jchess ûlimit 23298488
73000
error: Missing option: –svn
I did setup [hooks]
-----------subgit.config
[hooks]
javaOptions = -Djava.io.tmpdir=C:/tmp
[core]
shared = false
logs = subgit/logs
errorReport = subgit/error
authorsFile = conf/authors.txt
[git "default"]
translationRoot = /
repository = .git
pathEncoding = MS950
trunk = trunk:refs/heads/master
branches = branches/*:refs/heads/*
shelves = shelves/*:refs/shelves/*
tags = tags/*:refs/tags/*
[daemon]
pidFile = subgit/daemon.pid
idleTimeout = 0
classpath = subgit/lib
Regarding missing -svn option, it is due to comments formatting in our tracker. The right command would be:
java -classpath L:\Repositories2\jchess\subgit\lib\subgit-1.0.0-EAP_1111_fat.jar org.tmatesoft.translator.SubGitDaemon --svn L:\Repositories2\jchess --limit 2329848873000
This time only pre-receive-hook.0
[1329854734.421][pre-receive-hook][10] Initialized memory cache logger.
[1329854734.453][pre-receive-hook][10] SubGit version 1.0.0-EAP ('Miai') build #1111
[1329854734.453][pre-receive-hook][10] Command name: pre-receive.
[1329854734.453][pre-receive-hook][10] Command argument: l:/Repositories2/jchess/.git.
[1329854734.453][pre-receive-hook][10] Initialized console logger.
[1329854734.453][pre-receive-hook][10] SubGit version 1.0.0-EAP ('Miai') build #1111
[1329854740.625][pre-receive-hook][10] Initialized file logger, logs directory is: 'L:\Repositories2\jchess\subgit\logs'.
[1329854740.625][pre-receive-hook][10] SubGit version 1.0.0-EAP ('Miai') build #1111
[1329854740.640][pre-receive-hook][10] no jnidispatch in java.library.path
[1329854740.640][pre-receive-hook][10] Resource url: jar:file:/L:/Repositories2/jchess/subgit/lib/subgit-1.0.0-EAP_1111_fat.jar!/com/sun/jna/win32-x86/jnidispatch.dll
[1329854740.640][pre-receive-hook][10] ?????
[1329854740.687][pre-receive-hook][10] Obtaining file lock on 'L:\Repositories2\jchess\subgit\daemon.pid.lock'.
[1329854740.687][pre-receive-hook][10] Obtained file lock on 'L:\Repositories2\jchess\subgit\daemon.pid.lock'
[1329854740.687][pre-receive-hook][10] L:\Repositories2\jchess\subgit\daemon.pid (???????????)
[1329854740.703][pre-receive-hook][10] Launching daemon, classpath: l:/Repositories2/jchess/subgit/lib/subgit-1.0.0-EAP_1111_fat.jar
java options: [-noverify, -client]
working directory: L:\Repositories2\jchess
arguments: –svn L:\Repositories2\jchess –limit 1329854745703
[1329854740.765][pre-receive-hook][10] About to release lock: org.tmatesoft.translator.process.TsFileLock@16cd7d5
[1329854740.765][pre-receive-hook][10] Trying to release file lock on 'L:\Repositories2\jchess\subgit\daemon.pid.lock'.
[1329854740.765][pre-receive-hook][10] Released file lock on 'L:\Repositories2\jchess\subgit\daemon.pid.lock'
[1329854740.765][pre-receive-hook][10] Could not initialize class com.sun.jna.Native
The problem with c:\tmp is that '\' char is an escape char in our config file format (which is the same as git config format).
When you use c:\tmp, JVM fails to find this directory, so it fallbacks to default java.io.tmpdir and thus we get the same behavior when we cannot create temporary file.
L:\workspace\jchess-git>java -classpath L:\Repositories2\jchess\subgit\lib\subgit-1.0.0-EAP_1111_fat.jar org.tmatesoft.translator.SubGitDaemon –svn L:\Reposito
ries2\jchess –limit 2329848873000
error: Failed to parse command line û-svn L:\Repositories2\jchess –limit 232984
8873000
error: Missing option: –svn
Explanation for further references:
When SubGit hook launched by Apache server, it runs on behalf of the user with limited permissions. SubGit fails to create a temporary file by calling java.io.File#createTempFile.
[hooks]
javaOptions = -Djava.io.tmpdir=C:/tmp/
[daemon]
javaHooks = -Djava.io.tmpdir=C:/tmp/
C:/tmp/ directory must be writable for corresponding user.