简体   繁体   English

zookeeper zkServer.sh无法持续启动

[英]zookeeper zkServer.sh can not start persistently

we use hudson ci to trigger a build.xml which invoke a shell script in linux via Ant exec command. 我们使用hudson ci触发build.xml,后者通过Ant exec命令在linux中调用shell脚本。

From the console output shows the zookeeper successfully started 从控制台输出显示Zookeeper成功启动

After checked the zookeeperPID,its valid after the zookeeper started.But just few seconds later,the process disappeared without any notes. 在检查了ZookeeperPID之后,它在Zookeeper启动后才有效。但是仅几秒钟后,该过程就消失了,没有任何注释。

I have checked my build.xml ,shell script,os env and investigate the ant source code regarding exec task,but still not any clue. 我已经检查了build.xml,shell脚本,os env并调查了有关exec任务的ant源代码,但仍然没有任何线索。

The shell and build.xml can work smoothly by commands on linux but problematic by hudson job trigger. shell和build.xml可以通过Linux上的命令平稳运行,但是由hudson作业触发器引起问题。

Any help would be great appreciated! 任何帮助将不胜感激!

build.xml build.xml

<?xml version="1.0" encoding="UTF-8"?>
<project name="project" default="default">
    <target name="default" description="description">
        <exec executable="/bin/bash">
        <arg value="test.sh"/>          
        </exec>
    </target>
</project>

test.sh test.sh

#!/bin/bash
cd ${target_dir}/zookeeper-3.4.3/bin
sh zkServer.sh start

due to the hudson process handling,the spawning process will be killed which caused this issue. 由于采用了哈德逊程序处理,因此将终止生成程序,从而导致此问题。 RefUrlLink: https://wiki.jenkins-ci.org/display/JENKINS/ProcessTreeKiller RefUrlLink: https ://wiki.jenkins-ci.org/display/JENKINS/ProcessTreeKiller

The work around is setting the java parameter to disable related class file -Dhudson.util.ProcessTreeKiller.disable=true 解决方法是将java参数设置为禁用相关的类文件-Dhudson.util.ProcessTreeKiller.disable = true

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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