Running remote command using "PSEXEC" in Windows hangs the job

1,065 views
Skip to first unread message

Alex Lee

unread,
Aug 29, 2011, 12:24:41 PM8/29/11
to Jenkins Users
Hi,

I am trying to run a command on a remote (Windows) server using
"PSEXEC". But the job hangs when it runs the "Steps to run after mvn
build" using the Maven 2 extra build steps plug-in.

:
:
D:\Program Files (x86)\Jenkins\workspace\My Project Dev Build>d:
\pstools\psexec \\remoteserver -u domain\ci_user -p "xxxxxxxx" -w d:
\cms\tomcat "d:\cms\tomcat\shutdown.bat >>console.log 2>&1"

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

Then hangs forever.
Any idea of suggestions to resolve this issue?

Thanks a lot!

Alex

Mark Waite

unread,
Aug 29, 2011, 12:40:44 PM8/29/11
to jenkins...@googlegroups.com
Sometimes the psexec script demands an acknowledgement of license agreement on first execution.  Maybe that is hitting you here as well?
 
Mark Waite

Alex Lee

unread,
Aug 29, 2011, 2:29:11 PM8/29/11
to Jenkins Users
Hi Mark,

It past that. I can run the same command (without the ">>console.log
2>&1" which is suggested by a similar post in the past) in the Windows
command line without problem.

Alex

On Aug 29, 9:40 am, Mark Waite <markwa...@yahoo.com> wrote:
> Sometimes the psexec script demands an acknowledgement of license agreement on first execution.  Maybe that is hitting you here as well?
>  
> Mark Waite
>

Alex Lee

unread,
Aug 29, 2011, 3:49:50 PM8/29/11
to Jenkins Users
Actually you might be right. I added "-accepteula" in the psexec
command line (from a suggestion in StackOverflow) and now it no longer
hangs but giving error message:"Access is denied" (something to work
with Windows Admin).

Thanks!

Alex
Reply all
Reply to author
Forward
0 new messages