psexec from a windows script works but doesn't return

1,176 views
Skip to first unread message

had4

unread,
Jan 11, 2012, 3:42:42 PM1/11/12
to Jenkins Users
I am running a Jenkins build on windows that calls a script from the
workspace which uses psexec.exe to remotely run an installation on
another server. I have the -accepteula option so it doesn't hang
waiting for that. It actually runs the job on the remote server but
when the remote script exits the Jenkins build doesn't get the message
and hangs (until I kill the psexec service process on the remote
server or the psexec process on the Jenkins server. Has anyone tried
this successfully? Below is the output from the end of the jenkins job
where it is running the script.

Is this something I should be using a Jenkins slave for? I suppose I
should look into that.

Thanks.


[workspace] $ cmd /c call D:\tomcat6\temp
\hudson7618064618623105909.bat

d:\opt\hudson\jobs\Deploy XXX to Dev\workspace>installdevportal.bat

d:\opt\hudson\jobs\Deploy XXX to Dev\workspace>set SERVER=10.99.99.56

d:\opt\hudson\jobs\Deploy XXX to Dev\workspace>copy target\portal.war \
\10.217.6.56\D$\temp
1 file(s) copied.

d:\opt\hudson\jobs\Deploy XXX to Dev\workspace>tools\psexec.exe -
accepteula \\10.99.99.56 -u techboss -p PASSWORD -w d:\temp d:\temp
\installportal.bat 10.99.99.56 weblogic

PsExec v1.98 - Execute processes remotely
Copyright (C) 2001-2010 Mark Russinovich
Sysinternals - www.sysinternals.com

---- HANGS HERE UNTIL I KILL PROCESSES, NO OUTPUT RETURNED FROM REMOTE
SCRIPT

Build was aborted
Aborted by hal.deadman
Finished: ABORTED

Eyal

unread,
Jul 19, 2012, 4:25:06 AM7/19/12
to jenkins...@googlegroups.com
I'm having the same problem? Any suggestions?

SA Evans

unread,
Jul 30, 2012, 10:09:10 AM7/30/12
to jenkins...@googlegroups.com
Try putting a -i in the psexec call.  i.e.

psexec -i \\<servername> <cmd_to_run>

Evidently it needs some sort of interactive privileges to run.  When looking on my target server I'm not seeing any specific windows pop up when I run it so I don't know if it actually needs to have a logged in console session on the target machine or not, but I was banging my head against a wall for several hours until I came across this solution that worked for someone else.

SA

Stanley, Jason

unread,
Jul 30, 2012, 10:15:02 AM7/30/12
to jenkins...@googlegroups.com

Hello

 

I am trying to download the jenkins.war file for LTS version 1.466.1.

 

When I click on the “Older but stable (1.466.1)” link found here, http://jenkins-ci.org/changelog-stable , I recieve the following error below.

 

Any ideas why?

 

Forbidden

You don't have permission to access /war-stable/latest/jenkins.war on this server.


Apache/2.2.14 (Ubuntu) Server at mirrors.jenkins-ci.org Port 80

 

Thanks

Jason

Reply all
Reply to author
Forward
0 new messages