Reputation: 5635
I want to set up Jenkins local server on Mac mini for Android CI. I configured whole thing, but I have some issues with vncserver, when I try to run build via Jenkins it gives me an error :
Started by user asd
Building in workspace /Users/Shared/Jenkins/Home/jobs/mavenTest/workspace
Checkout:workspace / /Users/Shared/Jenkins/Home/jobs/mavenTest/workspace - hudson.remoting.LocalChannel@66dc67ca
Using strategy: Default
Last Built Revision: Revision bf4b03c150753e7f8de2fbb4b465f7512fd3bd3c (origin/HEAD, origin/master)
Fetching changes from 1 remote Git repository
Fetching upstream changes from origin
Seen branch in repository origin/HEAD
Seen branch in repository origin/master
Seen 2 remote branches
Commencing build of Revision bf4b03c150753e7f8de2fbb4b465f7512fd3bd3c (origin/HEAD, origin/master)
Checking out Revision bf4b03c150753e7f8de2fbb4b465f7512fd3bd3c (origin/HEAD, origin/master)
Warning : There are multiple branch changesets here
Starting xvnc
[workspace] $ vncserver :66 -localhost -nolisten tcp
ERROR: Failed to parse POMs
java.io.IOException: Cannot run program "vncserver" (in directory "/Users/Shared/Jenkins/Home/jobs/mavenTest/workspace"): error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1041)
at hudson.Proc$LocalProc.<init>(Proc.java:244)
at hudson.Proc$LocalProc.<init>(Proc.java:216)
at hudson.Launcher$LocalLauncher.launch(Launcher.java:773)
at hudson.Launcher$ProcStarter.start(Launcher.java:353)
at hudson.plugins.xvnc.Xvnc.doSetUp(Xvnc.java:90)
at hudson.plugins.xvnc.Xvnc.setUp(Xvnc.java:74)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:630)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:586)
at hudson.model.Run.execute(Run.java:1603)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:506)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:247)
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:135)
at java.lang.ProcessImpl.start(ProcessImpl.java:130)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1022)
... 12 more
Finished: FAILURE
I installed vnc server from here https://www.realvnc.com/download/vnc/ but it did nothing, cause I still have this error. What to do ?
Upvotes: 0
Views: 1163
Reputation: 3817
Why it fails
You have installed the Xvnc plugin, and it indeed requires a vncserver.
Jenkins tries to run the vncserver
command by default, and thus expects it in the PATH. The VNC server you installed:
so it won't work.
Check you requirements!
Do you need to run a vncserver at all ? Usually this is required for headless displays, but your mac mini probably runs with a screen attached, so you probably can just disable the Xvnc plugin on that server...
Getting a vncserver to run anyway
If you really need the plugin, then either configure the commandline
option to start the vncserver you installed or find a vnc server that will satisfy the above 2 requirements (command name and in PATH).
Note: the product you installed contains both a VNC client and a server. The server requires a license and an activation. And the server usually runs as a daemon, so doesn't need to have a plugin to start it...
Upvotes: 2