简体   繁体   中英

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.

From the console output shows the zookeeper successfully started

After checked the zookeeperPID,its valid after the zookeeper started.But just few seconds later,the process disappeared without any notes.

I have checked my build.xml ,shell script,os env and investigate the ant source code regarding exec task,but still not any clue.

The shell and build.xml can work smoothly by commands on linux but problematic by hudson job trigger.

Any help would be great appreciated!

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

#!/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

The work around is setting the java parameter to disable related class file -Dhudson.util.ProcessTreeKiller.disable=true

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