Mac 10.6 server /tomcat/jenkins/vncserver 目录下无法运行

发布于 2025-01-04 06:50:16 字数 1733 浏览 2 评论 0原文

首先让我指出我是 tomcat 和 tomcat 的新手。詹金斯。这是我设置的第一个 CI 服务器。

我正在开发一个 Flex 应用程序,我的目标是让 jenkins 自动构建并在更改推送到 github 后运行 flexUnit 测试。

到目前为止,我已经:

  1. 在运行(10.6.8)的无头mac mini服务器上的tomcat(6.0.33)下安装了Jenkins(1.450) (基本上遵循“Mac OS X Server (10.6) 上的 Servlet 容器安装”@ http://wiki.wocommunity.org/display/WO /Installing+and+Configuring+Jenkins+Build+Server)

  2. 下载了flexSDK,设置了用户身份验证并配置了github挂钩。

此时一切工作正常,一旦更改被推送到 github,jenkins 将构建一个简单的 Flex 应用程序,

现在我正在尝试构建 flexUnit 示例 CI 项目。第一次尝试时,它会卡住等待 Flash Player 调试器(投影仪)的重播。经过一些研究,我发现 Flash 播放器需要在虚拟显示器中运行。所以我安装了 Xvnc Jenkins/Hudson 插件 (https://wiki.jenkins-ci.org/display/JENKINS/Xvnc+Plugin)。

Os X 有一个内置的 vnc 服务器,但它似乎无法与 Xvnc 通信,所以我安装了ightvnc(通过macports)。

然后,我通过在终端中运行以下命令来在作业工作区中设置 VNC 密码 “sudo -u _appserver vncpasswd /Library/Jenkins/jobs/flexUnitSampleCIProject/workspace/.vnc/passwd”

这就是我陷入困境的地方,当我尝试构建 flexUnitSampleCIProject 时,出现以下错误

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

我的直觉是这是一个权限由于 jenkins 在用户 _appserver 下运行所以出现问题

所以我在终端中运行了以下命令
“sudo -u _appserver vncserver :6”,我收到以下错误 “vncserver:/Users/admin/.vnc 的类型或访问模式错误。”

但是我读到 sudo 不会继承用户的主文件夹(在本例中为“_appserver”)并且“su _appserver”不起作用,所以我不确定从这里开始

有没有人有幸在上面运行 flexUnit Mac 服务器/tomcat/jenkins?

任何想法将不胜感激

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

看透却不说透 2025-01-11 06:50:16

你有没有告诉VNC插件在哪里可以找到vncserver?它位于“管理詹金斯”> “配置系统”> Xvnc。

然而,根据闪光灯投影仪的工作原理,您可能会遇到其他问题,因为 OSX 并不真正运行 X11,特别是 OSX 版本的应用程序不运行 X11;

请参阅如何配置jenkins with xvnc on OSX Lion for maven 项目 了解更多详细信息。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文