Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simple local commandline job hanging in Windows7 #175

Closed
gschueler opened this issue Jun 23, 2012 · 7 comments
Closed

Simple local commandline job hanging in Windows7 #175

gschueler opened this issue Jun 23, 2012 · 7 comments
Labels

Comments

@gschueler
Copy link
Member

  • Issue Type: Bug
  • Rundeck version: 1.4.2.1
  • JDK Version: 1.6.x
  • Server OS: Windows 7

* Install type: Jar (If War, include your app server name and version)

Issue:

I am trying to execute a simple .cmd file in a Local Windows installation.

contents of C:/local/rundeckscripts/remotecopy.cmd as follows:

echo "Testing script with "
echo "Completed testing"

resource definition:


<?xml version="1.0" encoding="UTF-8"?>

<project>
  <node name="LD1256MYK" description="Rundeck server node" tags="tag1" hostname="LD1256MYK" osArch="x86" osFamily="windows" osName="Windows 7" osVersion="6.1" username="l002600"/>
</project>

Project definition ( I think I am not using the options below since the job script is defined explicitly ? )


#Project Project1 configuration, generated
#Fri Jun 15 16:21:00 EDT 2012
project.ssh-keypath=C\:\\Users\\l002600\\.ssh\\id_rsa
service.NodeExecutor.default.provider=stub
plugin.script-exec.default.command=c\:\\Program Files (x86)\\PuTTY\\putty -session rdeck1
project.name=Project1
plugin.script-copy.default.command=c\:\\Program Files (x86)\\PuTTY\\pscp -load rdeck1 readme.txt l002600@fastdnvl0378.testdomain.net
plugin.script-copy.default.remote-filepath=/home/l002600/scripts
project.resources.file=C\:\\local\\rundeck\\projects\\Project1\\etc\\resources.xml
service.FileCopier.default.provider=stub

Job definition:


- <job>
  <id>4f99aa07-5811-403f-8e26-3228dc981188</id> 
  <loglevel>DEBUG</loglevel> 
- <sequence keepgoing="false" strategy="node-first">
- <command>
  <scriptfile>/local/rundeckscripts/remotecopy.cmd</scriptfile> 
  <scriptargs /> 
  </command>
  </sequence>
  <description>JobDesc11</description> 
  <name>Job1</name> 
- <context>
  <project>Project1</project> 
  </context>
- <dispatch>
  <threadcount>1</threadcount> 
  <keepgoing>false</keepgoing> 
  <excludePrecedence>true</excludePrecedence> 
  <rankOrder>ascending</rankOrder> 
  </dispatch>
  <uuid>4f99aa07-5811-403f-8e26-3228dc981188</uuid> 
- <nodefilters>
- <include>
  <tags>tag1</tags> 
  </include>
  </nodefilters>
  </job>
  </joblist>

Changing the path immidietely throws an error, so the path does not seem to be the issue. I am not getting the command line output and the job runs for ever. Eventually I have to kill it. Are Windows command lines supported. Also does backward forward slash , drive letter etc matter ? I have attached log file. The dispatcherxxxx.tmp output is follows:

echo "Testing script with "
echo "Completed testing"

I am stuck with this for a day, would appreciate any help.

Please also let me know where the job definition is stored.

Thanks,
Sankar


(For Rundeck GUI issues, please include the following:)

  • Windows 7
  • IE 8

Reproduce: Reproducible.

Sample log file output attached

original LH ticket

Original Creator: Sankar Venkitachalam

@gschueler
Copy link
Member Author

(by Sankar Venkitachalam at 2012-06-15T14:16:32-07:00)

I have attached additional information since xml seems to be truncated.
Thanks,
Sankar

@gschueler
Copy link
Member Author

(by Sankar Venkitachalam at 2012-06-18T07:19:45-07:00)

Log output


53:57|CONFIG|l002600||1-script|LD1256MYK||Setting environment variable: RD_NODE_OS_VERSION=6.1^^^
^^^09:53:57|CONFIG|l002600||1-script|LD1256MYK||Setting environment variable: RD_NODE_USERNAME=l002600^^^
^^^09:53:57|CONFIG|l002600||1-script|LD1256MYK||Setting environment variable: RD_NODE_OS_FAMILY=windows^^^
^^^09:53:57|CONFIG|l002600||1-script|LD1256MYK||Setting environment variable: RD_JOB_USERNAME=admin^^^
^^^09:53:57|CONFIG|l002600||1-script|LD1256MYK||Setting environment variable: RD_NODE_OS_NAME=Windows 7^^^
^^^09:53:57|CONFIG|l002600||1-script|LD1256MYK||Executing 'cmd.exe' with arguments:
'/c'
'C:\local\rundeck\var\tmp\dispatch3476593604274014315.tmp'

The ' characters around the executable and arguments are
not part of the command.^^^
^^^09:53:57|CONFIG|l002600||1-script|LD1256MYK||Execute:Java13CommandLauncher: Executing 'cmd.exe' with arguments:
'/c'
'C:\local\rundeck\var\tmp\dispatch3476593604274014315.tmp'

The ' characters around the executable and arguments are
not part of the command.^^^

The output of tmp file is

echo "Testing script with "
echo "Completed testing"

@ghost ghost assigned gschueler Jun 23, 2012
@jasonahill
Copy link

I am also having this problem with Windows 2008 Server, irregardless of the client OS/browser in 1.4.3. The job seems to hang at some random percentage almost every time, but if I refresh the page or view history, the job shows as completed successfully. The script does complete as expected but the output is always truncated. It really seems to occur the most for any script with extended output. For my one-liner's, I can usually get away without hanging.

Is there any limitation on the amount of output lines runDeck can handle? And I was hoping for more of a Tail -f kind of experience. Is this the expectation I should have for output? Whenever I do get 20+ lines of output, I have to expand the window size by clicking on the + button or else I will only see the first few lines of output.

Thanks.

-Jason

@gschueler
Copy link
Member Author

I'm guessing this is an issue with receiving the output from the execution (windows line endings)

@jasonahill
Copy link

Hi Greg,

I have tried tacking on 2>&1 to push everything to stdout but continued to have the problem.

I then proceeded to add an openssh server and configured shared keys then configured jobs for ssh execution.

I have also attempted to use the WMI execution plugin, but all fail to render more than a few lines of output but the script always fully completes. I would be happy to do any testing you can think of to draw a better conclusion?

I'm going to build a fresh install with 1.4.4 first and make sure I can reproduce it. Any thoughts in the mean time, I will be quite happy to play with.

Thanks!

Cox Communications
Jason Hill
404.606.8886
Sent from my iPhone

On Oct 29, 2012, at 1:10 PM, Greg Schueler notifications@github.com wrote:

I'm guessing this is an issue with receiving the output from the execution (windows line endings)


Reply to this email directly or view it on GitHub.

@huksley
Copy link

huksley commented Mar 11, 2013

Upon investigation of similar problem I found out that Rundeck executes something like
cmd /c C:\local\rundeck\var\tmp\dispatch3476593604274014315.tmp

If you try it yourselves, you will be presented with Windows cannot open this file dialog.
I believe If rundeck will rename .tmp file to .bat it will be ok.
Because command like this executed successfully:

cmd /c C:\local\rundeck\var\tmp\dispatch3476593604274014315.bat

@gschueler
Copy link
Member Author

i believe this is an old issue that is no longer relevant

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants