我们slave
在应用程序中使用Erlang和模块,该应用程序在不同的机器上生成从属节点,这些机器向另一台机器上的主节点报告并由其协调.从属节点在他们的机器上打开端口并运行一些外部程序(本质上,erlang从属节点(我们称之为工作者)只是围绕外部程序的奇特包装).
但是,我们遇到了一些意想不到的问题,我们还没有找到好的解决方案.
代码分发.目前我们的Makefile将已编译的erlang代码(ebin
文件夹)rsyn为运行工作节点的机器,我们通过-pa
工作节点启动时的参数加载它.确实应该有一些通过Erlang在运行时自动分发代码的方法,但我们不知道该怎么做.
日志记录.从模块文档说"从站生成的所有TTY输出都将被发送回主节点".但是,当我们lager
在slave(worker)节点上运行(basho logger)时,它的输出不会被重定向到主节点的tty(只有主节点的日志输出).目前,我们在主节点上运行一个进程,该进程记录(通过lager)从从节点获取的消息.因此,为了在从属节点上记录某些内容,我们将消息发送到主节点.
我们正在启动这样的工作节点:
slave:start(IP, NodeName, NodeArgs)
Run Code Online (Sandbox Code Playgroud)
这里NodeArgs
是
-setcookie thecookie -pa /home/dau/mapro/deps/nicedecimal/ebin/ /home/dau/mapro/deps/meck/ebin/ /home/dau/mapro/deps/lager/ebin/ /home/dau/mapro/deps/jsx/ebin/ /home/dau/mapro/apps/worker/ebin/ /home/dau/mapro/ebin/ -s worker_app
Run Code Online (Sandbox Code Playgroud)
其中所有给定路径都是运行工作节点的计算机上的绝对路径.
我们想使用jenkins在Windows 2012 R2 x64上构建一些特定的软件.但是当我尝试运行它时,主节点失败了这个错误:
Connecting to 192.168.1.27
Checking if Java exists
C:\Program Files\Java\jdk1.6.0_30\bin\java.exe -version returned 1.6.0.
Installing the Jenkins slave service
ERROR: Message not found for errorCode: 0xC00000AC
org.jinterop.dcom.common.JIException: Message not found for errorCode: 0xC00000AC
at org.jinterop.winreg.smb.JIWinRegStub.winreg_OpenHKLM(JIWinRegStub.java:102)
at hudson.util.jna.DotNet.isInstalled(DotNet.java:77)
at hudson.os.windows.ManagedWindowsServiceLauncher.launch(ManagedWindowsServiceLauncher.java:292)
at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:222)
at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:701)
Caused by: jcifs.smb.SmbException: All pipe instances are busy.
at jcifs.smb.SmbTransport.checkStatus(SmbTransport.java:563)
at jcifs.smb.SmbTransport.send(SmbTransport.java:664)
at jcifs.smb.SmbSession.send(SmbSession.java:238)
at jcifs.smb.SmbTree.send(SmbTree.java:119)
at jcifs.smb.SmbFile.send(SmbFile.java:775)
at jcifs.smb.SmbFile.open0(SmbFile.java:989)
at jcifs.smb.SmbFile.open(SmbFile.java:1006)
at jcifs.smb.SmbFileOutputStream.<init>(SmbFileOutputStream.java:142)
at …
Run Code Online (Sandbox Code Playgroud) 我尝试在 stm32f4 上实现 i2c 从接收器中断服务例程。这是我的智能代码。
void I2C2_EV_IRQHandler()
{
switch (I2C_GetLastEvent(I2C2))
{
//The address sent by the master matches the own address of the peripheral
case I2C_EVENT_SLAVE_RECEIVER_ADDRESS_MATCHED:
//The slave stretches SCL low until ADDR is
//cleared and DR filled with the data to be sent
I2C_ClearFlag(I2C2,I2C_FLAG_ADDR);
break;
//The application is expecting a data byte to be received
case I2C_EVENT_SLAVE_BYTE_RECEIVED:
I2C_ReceiveData(I2C2);
break;
//The application is expecting the end of the communication
//Make sure that both ADDR and STOPF flags are cleared
//if …
Run Code Online (Sandbox Code Playgroud) 通过我自己的插件,我需要知道Jenkins slave的工作区中是否存在文件.但是文件无法找到,而它确实存在于slave(D:\workspace\JOB_NAME\test.txt
)上.
public class MyBuilder extends Builder implements Serializable {
private static final long serialVersionUID = 1L;
public boolean perform(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener)
throws InterruptedException, IOException {
FilePath fp = new FilePath(build.getWorkspace(), "test.txt");
String result = fp.act(new FileCallable<String>() {
private static final long serialVersionUID = 1L;
@Override
public String invoke(File file, VirtualChannel channel) throws IOException, InterruptedException {
if (file.getAbsoluteFile().exists()){
return file.getName() + " exists.";
} else {
return file.getName() + " doesn't exist.";
}
} …
Run Code Online (Sandbox Code Playgroud) 我有2个jenkins服务器,因为我的2个版本具有一些不兼容的系统要求。
我为其中一台服务器设置了一个新节点,并从另一台服务器迁移了作业,并将其设置为在该节点上运行。
节点可以很好地运行作业,甚至可以归档工件(它们与作业链接),但是作业会抛出异常,并被标记为失败。
**以下是作业的输出**
Completed build, now archiving <-- I print this out at the end of my last build step
FATAL: Remote call on ops-1-jenkins-android-10-186.fam.io failed
java.io.IOException: Remote call on ops-1-jenkins-android-10-186.fam.io failed
at hudson.remoting.Channel.call(Channel.java:748)
at hudson.Launcher$RemoteLauncher.kill(Launcher.java:940)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:556)
at hudson.model.Run.execute(Run.java:1745)
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.lang.NoClassDefFoundError: Could not initialize class hudson.slaves.SlaveComputer
at hudson.util.ProcessTree.getKillers(ProcessTree.java:151)
at hudson.util.ProcessTree$OSProcess.killByKiller(ProcessTree.java:212)
at hudson.util.ProcessTree$UnixProcess.kill(ProcessTree.java:557)
at hudson.util.ProcessTree$UnixProcess.killRecursively(ProcessTree.java:564)
at hudson.util.ProcessTree$Unix.killAll(ProcessTree.java:488)
at hudson.Launcher$RemoteLauncher$KillTask.call(Launcher.java:952)
at hudson.Launcher$RemoteLauncher$KillTask.call(Launcher.java:943)
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$Sync.innerRun(FutureTask.java:334)
at …
Run Code Online (Sandbox Code Playgroud) 我正在尝试在Jenkins主服务器(Linux Debian)和从服务器(Windows 7)之间建立连接。但是,连接迅速中止并显示以下消息: Ping响应时间太长或超时。
我找不到解决此问题的方法。有人可以帮我吗?
我正在尝试从 Windows 从站上的 Jenkins 作业运行一些基本的批处理命令,但 Jenkins 似乎无法安装 jdk。
因为它说CreateProcess error=740, The requested operation requires elevation
我尝试运行以管理员身份登录的从站,并在 Windows 中完全禁用 UAC,但没有成功。
有什么线索可以让这个工作吗?我正在运行 Windows 8。
编辑:我尝试将C:\Jenkins\tools\hudson.model.JDK\Java_SE_Development_Kit_8u60\jdk
所有用户设置为始终以管理员身份运行。这没有帮助。当我尝试在 cmd.exe 中本地运行 jdk 时,它确实运行没有错误。
这是完整的堆栈跟踪:
Installing C:\Jenkins\tools\hudson.model.JDK\Java_SE_Development_Kit_8u60\jdk.exe
[Java_SE_Development_Kit_8u60] $ C:\Jenkins\tools\hudson.model.JDK\Java_SE_Development_Kit_8u60\jdk.exe /s ADDLOCAL="ToolsFeature" REBOOT=ReallySuppress INSTALLDIR=C:\Jenkins\tools\hudson.model.JDK\Java_SE_Development_Kit_8u60 /L C:\Jenkins\tools\hudson.model.JDK\install4140010637459422013log
Unknown error (0x2e4)
FATAL: command execution failed
java.io.IOException: Cannot run program "C:\Jenkins\tools\hudson.model.JDK\Java_SE_Development_Kit_8u60\jdk.exe" (in directory "C:\Jenkins\tools\hudson.model.JDK\Java_SE_Development_Kit_8u60"): CreateProcess error=740, The requested operation requires elevation
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:816)
at hudson.Launcher$ProcStarter.start(Launcher.java:382)
at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:1149)
at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:1114)
at …
Run Code Online (Sandbox Code Playgroud) 首先,如果我浪费你的时间,我道歉,因为它看起来像一个简单的步骤,即使经过一些研究,我也无法弄清楚.
好的,这是我想要实现的,我已经使用TestStack.White编写了一些UI测试,我想在Jenkins Slave上以不同的用户执行此操作,因为应用程序根据分配给它们的角色的行为不同在Active Directory中.
所以在google上做了一些查找后,我发现以下链接与我想要实现的内容相关.
看起来我必须在Jenkins slave上安装TightVNC并且应该从Jenkins Master连接到slave并在slave上执行测试.
这让我想到了第一个问题,我如何从詹金斯的工作中完全实现这一目标?
关于以不同用户身份登录,我明白我可以使用"autologon.exe"来实现这一点.所以只是想知道如何在Jenkins Master的Windows Slave上做到这一点.我的公司不允许SSH到Windows实例(从机),我无法从Jenkins Master远程执行SSH.
我知道我可能没有正确地看待这个,所以任何帮助都会非常感激.
提前感谢您的时间和建议.
由于标题已经声明 JNLP 连接已弃用 Jenkins 还提供了一条消息和一个超链接
https://en.wikipedia.org/wiki/Java_Web_Start#Deprecation
那么现在将 Windows Slave 附加到 Jenkins 的推荐方式是什么,https: //jenkins.io上似乎没有真正好的指南来涵盖该主题。
我已经为 MySQL 服务器设置了复制。我可以使用复制用户/密码从从机连接到主服务器。我已经运行了从属 SQL 线程,但是从属I/O线程没有运行,并且在使用“显示从属状态”检查时从属 I/O 状态变为空。可能是什么问题呢?
我该如何解决这个问题?重新启动从站没有帮助。
这是我的坏处:我没有给予 '复制奴隶' 特权*.*
,而是只给予my_db.*
.
slave ×10
jenkins ×7
windows ×5
java ×2
embedded ×1
erlang ×1
erlang-otp ×1
i2c ×1
linux ×1
mysql ×1
replication ×1
stm32 ×1
uac ×1
ui-testing ×1