简体   繁体   中英

Mac 10.6 server / tomcat / jenkins / vncserver can not run in directory

First let me point out I'm a newbie with tomcat & Jenkins. This is the first CI server i have setup.

Im developing a flex app, and my goal is to have jenkins auto-build and run flexUnit tests after changes are pushed to github.

so far I have:

  1. installed Jenkins (1.450) under tomcat (6.0.33) on a headless mac mini server running (10.6.8) (basically following "Servlet Container Installation on Mac OS X Server (10.6)" @ http://wiki.wocommunity.org/display/WO/Installing+and+Configuring+Jenkins+Build+Server )

  2. downloaded flexSDK, setup user authentication and configured github hooks.

at this point everything is working fine, jenkins will build a simple flex app once changes are pushed to github

now I'm attempting to build the flexUnit Sample CI Project. on first attempt it gets stuck waiting for a replay from Flash Player Debugger (projector). After some research I found flash player needs to run in a virtual display. So I installed Xvnc Jenkins/Hudson Plugin (https://wiki.jenkins-ci.org/display/JENKINS/Xvnc+Plugin).

Os X has a built in vnc server however it doesn't seem to communicate with Xvnc, so I installed tightvnc (via macports).

Then I setup the VNC password in my jobs workspace by running the following command in terminal "sudo -u _appserver vncpasswd /Library/Jenkins/jobs/flexUnitSampleCIProject/workspace/.vnc/passwd"

And this is where I'm stuck, when I try to build flexUnitSampleCIProject I get the following error

FATAL: Cannot run program "vncserver" (in directory "/Library/Jenkins/jobs/flexUnitSampleCIProject/workspace"): error=2, No such file or directory
java.io.IOException: Cannot run program "vncserver" (in directory "/Library/Jenkins/jobs/flexUnitSampleCIProject/workspace"): error=2, No such file or directory

My gut feeling is this is a permissions issue since jenkins is running under the user _appserver

So I ran ran the following command in terminal
"sudo -u _appserver vncserver :6" and i get the following error "vncserver: Wrong type or access mode of /Users/admin/.vnc."

However I read sudo doesn't inherit the home folder of the user (in this case "_appserver") and "su _appserver" dosen't work so I'm not sure where to go from here

Has anyone had any luck running flexUnit on mac server/tomcat/jenkins?

any ideas would be greatly appreciated

Have you told the VNC plugin where to find vncserver? It's under "Manage Jenkins" > "Configure System" > Xvnc.

However, depending on how the flash projector works, you may hit other issues because OSX doesn't really run X11, and in particular OSX versions of apps don't run X11;

See How to configure jenkins with xvnc on OSX Lion for maven project for more details on that.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM