I found the problem by myself.
It was indeed wrong access rights to C:\╗Windows.
I was not able to create files in that directory - after disablig UAC by 
the following 
it works.

Press keys “Windows Key + R”, type regedit
Locate 
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\EnableLUA
Update the EnableLUA value to 0 (turn if off)
Restart Windows.

Am Donnerstag, 16. Februar 2017 15:16:11 UTC+1 schrieb jmohre:
>
> Hi,
>
>  
>
> I get an error when I try to execute a job on a windows slave.
>
> I added the error log below.
>
> I seems that depending on how I start the windows salve – the error occurs 
> or not.
>
>  
>
> I want to start the slave via execution command on the master, like this* 
> ssh -v mcetestuser@20-MCE-UT2 javaw -jar C:/JenkinsSlave/slave.jar*
>
> This worked before on other slave PCs, but I have no idea why not on this 
> one.
>
> The slave is start but when executing a job I get an error that the script 
> file can not be created.
>
> If I start the slave via Web Start by executing the following command on 
> the slave PC 
>
> “java -jar slave.jar <http://10.49.10.43:8080/jnlpJars/slave.jar> -jnlpUrl 
> http://MyPI:Port/computer/20-MCE-UT2/slave-agent.jnlp -secret 
> 499086c90bbea551feeb64913a25946832e84329203be2090e67b4d19a454344” I have no 
> problems.
>
>  
>
> The same and most interesting thing happens if put this command in batch.
>
> If I log in with ssh to slave PC and call that batch file everything works 
> (slave connected and job succeeded), but
>
> if I call this batch script direct with the ssh command, like ssh use@testPC 
> batchFile.bat only the slave is connected but the job 
>
> failed with same error(see below).
>
>  
>
> Hope someone has ideas or tips to solve that issue.
>
>  
>
> Thanks
>
>  
>
> Jörg
>
>  
>
> Error log:
>
>  
>
> Started by user mcetestuser <http://10.49.10.43:8080/user/mcetestuser>
>
> [EnvInject] - Loading node environment variables.
>
> Building remotely on 20-MCE-UT2 <http://10.49.10.43:8080/computer/20-MCE-UT2> 
> in workspace C:\JenkinsSlave\workspace\Test
>
> FATAL: Unable to produce a script file
>
> java.io.IOException 
> <http://stacktrace.jenkins-ci.org/search?query=java.io.IOException>: Failed 
> to create a temp file on C:\JenkinsSlave\workspace\Test
>
>         at hudson.FilePath.createTextTempFile(FilePath.java:1265) 
> <http://stacktrace.jenkins-ci.org/search/?query=hudson.FilePath.createTextTempFile&entity=method>
>
>         at 
> hudson.tasks.CommandInterpreter.createScriptFile(CommandInterpreter.java:128) 
> <http://stacktrace.jenkins-ci.org/search/?query=hudson.tasks.CommandInterpreter.createScriptFile&entity=method>
>
>         at 
> hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:79) 
> <http://stacktrace.jenkins-ci.org/search/?query=hudson.tasks.CommandInterpreter.perform&entity=method>
>
>         at 
> hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:63) 
> <http://stacktrace.jenkins-ci.org/search/?query=hudson.tasks.CommandInterpreter.perform&entity=method>
>
>         at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) 
> <http://stacktrace.jenkins-ci.org/search/?query=hudson.tasks.BuildStepMonitor$1.perform&entity=method>
>
>         at 
> hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:785)
>  
> <http://stacktrace.jenkins-ci.org/search/?query=hudson.model.AbstractBuild$AbstractBuildExecution.perform&entity=method>
>
>         at hudson.model.Build$BuildExecution.build(Build.java:199) 
> <http://stacktrace.jenkins-ci.org/search/?query=hudson.model.Build$BuildExecution.build&entity=method>
>
>         at hudson.model.Build$BuildExecution.doRun(Build.java:160) 
> <http://stacktrace.jenkins-ci.org/search/?query=hudson.model.Build$BuildExecution.doRun&entity=method>
>
>         at 
> hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:566) 
> <http://stacktrace.jenkins-ci.org/search/?query=hudson.model.AbstractBuild$AbstractBuildExecution.run&entity=method>
>
>         at hudson.model.Run.execute(Run.java:1678) 
> <http://stacktrace.jenkins-ci.org/search/?query=hudson.model.Run.execute&entity=method>
>
>         at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) 
> <http://stacktrace.jenkins-ci.org/search/?query=hudson.model.FreeStyleBuild.run&entity=method>
>
>         at 
> hudson.model.ResourceController.execute(ResourceController.java:88) 
> <http://stacktrace.jenkins-ci.org/search/?query=hudson.model.ResourceController.execute&entity=method>
>
>         at hudson.model.Executor.run(Executor.java:231) 
> <http://stacktrace.jenkins-ci.org/search/?query=hudson.model.Executor.run&entity=method>
>
> Caused by: java.io.IOException 
> <http://stacktrace.jenkins-ci.org/search?query=java.io.IOException>: remote 
> file operation failed: C:\JenkinsSlave\workspace\Test at 
> hudson.remoting.Channel@6d6d6d6d:20-MCE-UT2
>
>         at hudson.FilePath.act(FilePath.java:910) 
> <http://stacktrace.jenkins-ci.org/search/?query=hudson.FilePath.act&entity=method>
>
>         at hudson.FilePath.act(FilePath.java:887) 
> <http://stacktrace.jenkins-ci.org/search/?query=hudson.FilePath.act&entity=method>
>
>         at hudson.FilePath.createTextTempFile(FilePath.java:1239) 
> <http://stacktrace.jenkins-ci.org/search/?query=hudson.FilePath.createTextTempFile&entity=method>
>
>         ... 12 more
>
> Caused by: java.io.IOException 
> <http://stacktrace.jenkins-ci.org/search?query=java.io.IOException>: Failed 
> to create a temporary directory in C:\Windows
>
>         at hudson.FilePath$15.invoke(FilePath.java:1251) 
> <http://stacktrace.jenkins-ci.org/search/?query=hudson.FilePath$15.invoke&entity=method>
>
>         at hudson.FilePath$15.invoke(FilePath.java:1239) 
> <http://stacktrace.jenkins-ci.org/search/?query=hudson.FilePath$15.invoke&entity=method>
>
>         at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2461) 
> <http://stacktrace.jenkins-ci.org/search/?query=hudson.FilePath$FileCallableWrapper.call&entity=method>
>
>         at hudson.remoting.UserRequest.perform(UserRequest.java:118) 
> <http://stacktrace.jenkins-ci.org/search/?query=hudson.remoting.UserRequest.perform&entity=method>
>
>         at hudson.remoting.UserRequest.perform(UserRequest.java:48) 
> <http://stacktrace.jenkins-ci.org/search/?query=hudson.remoting.UserRequest.perform&entity=method>
>
>         at hudson.remoting.Request$2.run(Request.java:328) 
> <http://stacktrace.jenkins-ci.org/search/?query=hudson.remoting.Request$2.run&entity=method>
>
>         at 
> hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
>  
> <http://stacktrace.jenkins-ci.org/search/?query=hudson.remoting.InterceptingExecutorService$1.call&entity=method>
>
>         at java.util.concurrent.FutureTask.run(Unknown Source)
>
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
>
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
>
>         at hudson.remoting.Engine$1$1.run(Engine.java:63)
>
>         at java.lang.Thread.run(Unknown Source)
>
> Caused by: java.io.IOException: Zugriff verweigert
>
>         at java.io.WinNTFileSystem.createFileExclusively(Native Method)
>
>         at java.io.File.createTempFile(Unknown Source)
>
>         at hudson.FilePath$15.invoke(FilePath.java:1249)
>
>         ... 11 more
>
> Build step 'Execute Windows batch command' marked build as failure
>
> Finished: FAILURE
>
>  
>

-- 
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-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/d8686ff2-d557-4d3a-8486-eef1be1a85ba%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to