svn update work on running client from JNLP but not as Windows service

49 views
Skip to first unread message

Juan Pablo Hernandez Vogt

unread,
Jun 11, 2014, 8:42:59 AM6/11/14
to jenkins...@googlegroups.com
Hello,

I tried to find an answer in the list but I did not find what is wrong. Probably is a stupid thing...

The job only execute a command svn update in my Windows 8.1 machine:

a) If I start the client from JNLP file, the job is executed.

b) If I install it as service, it holds waiting... waiting for password maybe?
D:\AAA\nt>svn update 
Updating '.':

then after 5 minutes I decide to abort the job:
Build was aborted
Aborted by anonymous
Finished: ABORTED

Stopping the service, executing a mandatory svn cleanup from an independent cmd, and launching again from JNLP, works like a charm.


Why the svn update command does not work from service? Where to read to understand how Jenkins works on this mode?


Notes: 
1) My user is defined in a domain server, not in my local machine. For that I configured the service to use my specific user@domain and password.
2) I'm using Pagent.exe, all svn commands (checkout, update, commit, status..) from my cmd.exe work well.
3) The command svn status works perfect from JNLP and from Service.
4) Seems that the connection with Pagent.exe is broken. Printing some environment variables inside the job I find the expected values:
ALLUSERSPROFILE=C:\ProgramData
APPDATA=C:\Users\jpvogt\AppData\Roaming
BASE=D:\Jenkins
SERVICE_ID=jenkinsslave-D__Jenkins
SVN_SSH=C:/putty/plink.exe



Thanks for your time reading this issue.

Best regards,
JP

Eric Pyle

unread,
Jun 11, 2014, 11:01:24 AM6/11/14
to jenkins...@googlegroups.com
By default a Windows service runs as the Local User account, which has no access to network resources. Try configuring the service to run as a particular user who has permission for the SVN repo in question.

Regards,
Eric
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Juan Pablo Hernandez Vogt

unread,
Jun 12, 2014, 3:35:56 AM6/12/14
to jenkins...@googlegroups.com
Le mercredi 11 juin 2014 16:01:24 UTC+1, Eric Pyle a écrit :
By default a Windows service runs as the Local User account, which has no access to network resources. Try configuring the service to run as a particular user who has permission for the SVN repo in question.


Yes Eric, I thought that and I did it, that was I tried to explain in my notes (1) and (4) where I see from environment variables that the job is running as my user.

A ping command, or a dir to a shared network folder are executed correctly in the job, so I think there is access to network resources. 


So that gives me the idea that the problem is svn identification... I checked this:

a) In my terminal, I close Pagent, and executing a svn update now has the same result as Jenkins's job!
D:\AAA\nt>svn update
Updating '.':            <-- waiting indefinitely, cancel Ctrl+C

svn: E210002: Unable to connect to a repository at URL 'svn+ssh://user@repodir'
svn: E210002: To better debug SSH connection problems, remove the -q option from 'ssh' in the [tunnels] section of your Subversion configuration file.
svn: E210002: Network connection closed unexpectedly

b) Starting Pagent.exe and trying again works!


So, what I have here is that my service, launched as my user, does not "see" my Pagent.exe process.


Best regards,
JP

Juan Pablo Hernandez Vogt

unread,
Jun 12, 2014, 4:14:17 AM6/12/14
to jenkins...@googlegroups.com
Is Pageant.exe, not Pagent.exe

To complete this case, adding tasklist command shows me that pageant is running from the job side.

D:\AAA\nt>tasklist

Image Name                     PID Session Name        Session#    Mem Usage
========================= ======== ================ =========== ============
System Idle Process              0 Services                   0          4 K
System                           4 Services                   0         36 K
smss.exe                       360 Services                   0        332 K
csrss.exe                      508 Services                   0      3.504 K
...
pageant.exe                   5264 Console                    1      7.384 K
...

I definitely have no idea why the svn update works like is pageant is missing, SVN_SSH is defined, there is network access, and pageant.exe is visible.

Thanks

Matthew...@diamond.ac.uk

unread,
Jun 13, 2014, 10:46:26 AM6/13/14
to jenkins...@googlegroups.com

If you are issuing any svn command from an environment where there is no user to prompt, I suggest using the global option

svn --non-interactive

That means it will never hang waiting for a prompt. Instead, it will fail, and the output will tell you what happened.

Matthew

 

--

Juan Pablo Hernandez Vogt

unread,
Jun 23, 2014, 9:14:36 AM6/23/14
to jenkins...@googlegroups.com
Sorry for my delayed answer. I tried as you suggested with --non-interactive I got the same hang up :(

As I couldn't know why that happens, I'm using JNLP slave and I login manually into the tester user session when the PC is restarted.

It's not clear to me why the windows service as tester account is not the same as the JNLP in svn stuff.


Thanks for you info Matthew!



--
You received this message because you are subscribed to a topic in the Google Groups "Jenkins Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/m7pm9XOjFho/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-use...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages