美文网首页DevOps攻城狮
Jenkins Windows Agent 设置

Jenkins Windows Agent 设置

作者: DevOps攻城狮 | 来源:发表于2019-11-18 22:15 被阅读0次

    准备 Java 运行环境

    下载 Java

    配置 Java Windows 环境变量

    JAVA_HOME=C:\Program Files\Java\jdk1.8.0_201
    CLASSPATH=.;%JAVA_HOME%\lib;%JAVA_HOME%\jre\lib
    

    创建 Node

    Jenkins 首页->Manage Node->New Node

    Windows agent 设置如下

    Items Settings
    Name window-build-machine
    Description used for windows build
    of executors 1
    Remote root directory C:\agent
    Labels windows, build
    Usage Use this node as much as possible
    Launch method Let Jenkins control this Windows slave as a Windows service
    Administrator user name .\Administrator
    Password mypassword
    Host 192.168.1.111
    Run service as Use Administrator account given above
    Availability Keep this agent online as much as paossible

    保存然后连接

    [2019-05-11 01:32:50] [windows-slaves] Connecting to 192.168.1.111
    Checking if Java exists
    java -version returned 1.8.0.
    [2019-05-11 01:32:50] [windows-slaves] Copying jenkins-slave.xml
    [2019-05-11 01:32:50] [windows-slaves] Copying slave.jar
    [2019-05-11 01:32:50] [windows-slaves] Starting the service
    [2019-05-11 01:32:50] [windows-slaves] Waiting for the service to become ready
    [2019-05-11 01:32:55] [windows-slaves] Connecting to port 52,347
    <===[JENKINS REMOTING CAPACITY]===>Remoting version: 3.29
    This is a Windows agent
    Agent successfully connected and online
    

    问题解决

    问题 如何解决
    ERROR: Message not found for errorCode: 0xC00000AC need to install JDK, and config JAVA environment variable
    how to fix add windows node as Windows service error JENKINS-16418
    org.jinterop.dcom.common.JIException: Message not found for errorCode: 0x00000005 HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Wow6432Node\CLSID {72C24DD5-D70A-438B-8A42-98424B88AFB8}, HKEY_CLASSES_ROOT\CLSID{76A64158-CB41-11D1-8B02-00600806D9B6} Launch 'regedit' (as Administrator), Find (Ctrl+F) the following registry key: "{72C24DD5-D70A-438B-8A42-98424B88AFB8}" in HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Wow6432Node\CLSID, Right click and select 'Permissions', Change owner to administrators group (Advanced...). Change permissions for administrators group. Grant Full Control, Change owner back to TrustedInstaller (user is "NT Service\TrustedInstaller" on local machine), Repeat the steps above for HKEY_CLASSES_ROOT\CLSID {76A64158-CB41-11D1-8B02-00600806D9B6}, Restart Remote Registry Service (Administrative Tools / Services)
    ERROR: Unexpected error in launching an agent. This is probably a bug in Jenkins Login remote machine and open Services, find jenkinsslave-C__agent, Set startup type: Automatic, Log On: select This account, type correct account and password, start jenkinsslave-C__agent
    Caused by: org.jinterop.dcom.common.JIRuntimeException: Message not found for errorCode: 0x800703FA Slave under domain account, If your slave is running under a domain account and you get an error code 0x800703FA, change a group policy: open the group policy editor (gpedit.msc) go to Computer Configuration->Administrative Templates->System-> UserProfiles, "Do not forcefully unload the user registry at user logoff" Change the setting from "Not Configured" to "Enabled", which disables the new User Profile Service feature ('DisableForceUnload' is the value added to the registry)

    相关文章

      网友评论

        本文标题:Jenkins Windows Agent 设置

        本文链接:https://www.haomeiwen.com/subject/duriictx.html