I have a configuration set up where I have a Windows Server 2003 VM (VirtualBox 4.2.22, vmdk) running on a Windows 7 host. The slave-agent client runs on the Windows Server 2003 VM with Java 1.7.0_80. On the master, Jenkins 1.625.1 LTS is installed with Java 1.8.0_66. During a build, the Jenkins slave node will go offline:
Slave went offline during the build
ERROR: Connection was broken: java.io.EOFException
at org.jenkinsci.remoting.nio.NioChannelHub$3.run(NioChannelHub.java:613)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:112)
at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
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 java.lang.Thread.run(Unknown Source)
This link is the only link I can find that's related to this issue: [JENKINS-31050] Slave goes offline during the build. Any ideas?
Related
In my Java program I am launching batch script(.bat file).
I am facing following error:
FATAL: command execution failed
java.io.IOException: Cannot run program "cmd" (in directory "C:\..\Project_Name"): CreateProcess error=87, The parameter is incorrect
at java.lang.ProcessBuilder.start(Unknown Source)
at hudson.Proc$LocalProc.<init>(Proc.java:244)
at hudson.Proc$LocalProc.<init>(Proc.java:216)
at hudson.Launcher$LocalLauncher.launch(Launcher.java:815)
at hudson.Launcher$ProcStarter.start(Launcher.java:381)
at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:1148)
at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:1113)
at hudson.remoting.UserRequest.perform(UserRequest.java:120)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:326)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
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:62)
at java.lang.Thread.run(Unknown Source)
at ......remote call to VM1(Native Method)
at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1416)
at hudson.remoting.UserResponse.retrieve(UserRequest.java:220)
at hudson.remoting.Channel.call(Channel.java:781)
at hudson.Launcher$RemoteLauncher.launch(Launcher.java:928)
at hudson.Launcher$ProcStarter.start(Launcher.java:381)
at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:95)
at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:64)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
at hudson.model.Build$BuildExecution.build(Build.java:205)
at hudson.model.Build$BuildExecution.doRun(Build.java:162)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
at hudson.model.Run.execute(Run.java:1738)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:410)
Caused by: java.io.IOException: CreateProcess error=87, The parameter is incorrect
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
at java.lang.ProcessBuilder.start(Unknown Source)
at hudson.Proc$LocalProc.<init>(Proc.java:244)
at hudson.Proc$LocalProc.<init>(Proc.java:216)
at hudson.Launcher$LocalLauncher.launch(Launcher.java:815)
at hudson.Launcher$ProcStarter.start(Launcher.java:381)
at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:1148)
at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:1113)
at hudson.remoting.UserRequest.perform(UserRequest.java:120)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:326)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
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:62)
at java.lang.Thread.run(Unknown Source)
Build step 'Execute Windows batch command' marked build as failure
Finished: FAILURE
I have made Jenkins service as Windows service and tried with providing administrator privileges to the service. I have changed Jenkins Client service properties But I am facing the same error.
Following are the ways I am launching my batch script:
Desktop.getDesktop().open(new File("C:\\file1.bat"));
and
Runtime.getRuntime().exec("cmd /c C:\\file1.bat");
or
Runtime.getRuntime().exec("C:\\file1.bat");
In my case all client machines are windows machies.
Please anyone tell me how to solve this.
Check the log
"C:\..\Project_Name"
This directory is invalid...
So in addition you should avoid the root directory "C:\" wich is protected by windows.
Try to work with the current directory (should be the job workspace).
I am trying to configure a jenkins slave on a windows vm and keep it running as a service. I did the following steps
went to the jenkins master from my slave and downloaded the jnlp slave agent and installed it. Got connected on the jenkins logs in the master. and the small window to show i am connected came up too.
JNLP agent connected from /10.xx8
<===[JENKINS REMOTING CAPACITY]===>Slave.jar version: 2.51
This is a Windows slave
Slave successfully connected and online
After this i installed it as a service with the jenkins user that i use. On closing the small connected window on my slave I get the following error
Failing to obtain https://my netowrk.com/computer/Windows%20Slave/slave-agent.jnlp?encrypt=true
java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.security.ssl.SSLSocketImpl.connect(Unknown Source)
at sun.security.ssl.BaseSSLSocketImpl.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.protocol.https.HttpsClient.<init>(Unknown Source)
at sun.net.www.protocol.https.HttpsClient.New(Unknown Source)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(Unknown Source)
at hudson.remoting.Launcher.parseJnlpArguments(Launcher.java:269)
at hudson.remoting.Launcher.run(Launcher.java:219)
at hudson.remoting.Launcher.main(Launcher.java:192)
Waiting 10 seconds before retry
I then added the proxy settings to my jenkins-slave .xml but still get the same error. My jenkins-slave.xml arguments are as follows
<executable>C:\Program Files\Java\jre7\bin\java.exe</executable>
<arguments>-Xrs -Dhttp.proxyHost=xx.xx.xx -
Dhttp.proxyPort=3128 -jar "%BASE%\slave.jar" -jnlpUrl https://example.org/computer/Windows%20Slave/slave-
agent.jnlp -secret dxxxxxxxxxxxxa2d -noCertificateCheck</arguments>
Can anyone provide some advice as to how to resolve this.
Thanks
in windows, I modify C:\Program Files\Jenkins\jenkins.xml file. add proxy setting as below:
<arguments>**-Dhttp.proxyHost="your proxy address" -Dhttp.proxyPort=yourport -Dhttps.proxyHost="your proxy address" -Dhttps.proxyPort=yourport** -Xrs -Xmx256m -Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle -jar "C:\Program Files\Jenkins\jenkins.war" --httpPort=8080 --webroot="%LocalAppData%\Jenkins\war"</arguments>
then jenkins works.
When I use urlread2() to access an API, I get the following error, which is not reproducible across different PCs with Matlab. What might be the problem causing it?
Error log:
??? Java exception occurred:
javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(Unknown Source)
Caused by: java.io.EOFException: SSL peer shut down incorrectly
at com.sun.net.ssl.internal.ssl.InputRecord.read(Unknown Source)
... 8 more
EDIT 1: #nkjt Added matlab and java versions.
Matlab version: 2011a
Matlab's java version: Java 1.6.0_17-b04 with Sun Microsystems Inc. Java HotSpot(TM) 64-Bit Server VM mixed mode
Jenkins build running on Windows slave throws following error when build starts:
Java.io.IOException: Cannot run program "tf" (in directory "c:\Jenkins\workspace\ProjectName-WindowsPhone"): CreateProcess error=87, The parameter is incorrect
at java.lang.ProcessBuilder.start(Unknown Source)
What I tried:
1. specifying full path to the TF.exe
2. specifying path to the TF.exe in the PATH variable
3. setting PATH=. at the build process init stage
4. settings CLASSPATH=. at the build process init stage
5. setting CLASSPATH=. as environment variable on the slave.
TF.exe is resolved under Jenkins Slave service user in any directory, so it's not a problem of path to the TF.exe
Appreciate any help or thoughts on configuring Jenkins with Windows Slave and TFS.
Full error log is below (yes, it's Java stack trace ;))
$ tf workspaces -format:brief -server:https://cloudtfsname.visualstudio.com/DefaultCollection/ ********
java.io.IOException: Cannot run program "tf" (in directory "c:\Jenkins\workspace\ProjectName-WindowsPhone"): CreateProcess error=87, The parameter is incorrect
at java.lang.ProcessBuilder.start(Unknown Source)
at hudson.Proc$LocalProc.<init>(Proc.java:244)
at hudson.Proc$LocalProc.<init>(Proc.java:216)
at hudson.Launcher$LocalLauncher.launch(Launcher.java:803)
at hudson.Launcher$ProcStarter.start(Launcher.java:381)
at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:1136)
at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:1101)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:328)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
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)
at ......remote call to WindowsSlave(Native Method)
at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1356)
at hudson.remoting.UserResponse.retrieve(UserRequest.java:221)
at hudson.remoting.Channel.call(Channel.java:752)
at hudson.Launcher$RemoteLauncher.launch(Launcher.java:916)
at hudson.Launcher$ProcStarter.start(Launcher.java:381)
at hudson.plugins.tfs.TfTool.execute(TfTool.java:99)
at hudson.plugins.tfs.model.Server.execute(Server.java:120)
at hudson.plugins.tfs.model.Workspaces.getListFromServer(Workspaces.java:38)
at hudson.plugins.tfs.model.Workspaces.populateMapFromServer(Workspaces.java:50)
at hudson.plugins.tfs.model.Workspaces.exists(Workspaces.java:76)
at hudson.plugins.tfs.actions.CheckoutAction.checkout(CheckoutAction.java:36)
at hudson.plugins.tfs.TeamFoundationServerScm.checkout(TeamFoundationServerScm.java:176)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1270)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:609)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:531)
at hudson.model.Run.execute(Run.java:1750)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:89)
at hudson.model.Executor.run(Executor.java:240)
Caused by: java.io.IOException: CreateProcess error=87, The parameter is incorrect
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
at java.lang.ProcessBuilder.start(Unknown Source)
at hudson.Proc$LocalProc.<init>(Proc.java:244)
at hudson.Proc$LocalProc.<init>(Proc.java:216)
at hudson.Launcher$LocalLauncher.launch(Launcher.java:803)
at hudson.Launcher$ProcStarter.start(Launcher.java:381)
at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:1136)
at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:1101)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:328)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
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)
"TF.exe is resolved under Jenkins Slave service user in any directory, so it's not a problem of path to the TF.exe"
You are not fully understanding how jenkins works. In fact the only env variables that are understanded are the global ones and the user one are not considered for clean builds.
There is no any magic in Jenkins You should have tried to set the PATH as a build stage, RESTART slave and then run the task.
another hint for anyone who comes across this:there are some known issues with jenkins plugins causing this.see JENKINS-22183, JENKINS-45128 or JENKINS-33159 for example...
or try Jenkins issue search
Eclipse Java EE IDE for Web Developers.
Version: Kepler Release
glassfish version 3.1.2.2
Unable to start server due following exception:
java.lang.NullPointerException
at oracle.eclipse.tools.glassfish.GlassfishGenericServerBehaviour$StartJob.call(GlassfishGenericServerBehaviour.java:659)
at oracle.eclipse.tools.glassfish.GlassfishGenericServerBehaviour$StartJob.call(GlassfishGenericServerBehaviour.java:1)
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 java.lang.Thread.run(Unknown Source)
glassfish server stant alon work fine but cant start in eclipse
glassfish 4 same as
I had same problem. What i did was adding following -Duser.language=en line after -vmargs parameter.
In windows 7:
Run eclipse using "Run as administrator"