0

タイトルが言ったように、OS X Yosemite で launchd/launchctl を使用して Zookeeper を自動的に起動しようとしています。

これは私の plist ファイル「/Library/LaunchDaemons/com.test.zookeeper.plist」で、root:wheel が所有しています。

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
    <dict>
        <key>Label</key>
        <string>com.test.zookeeper</string>
        <key>RunAtLoad</key>
        <true/>
        <key>ProgramArguments</key>
        <array>
            <string>/opt/zookeeper/bin/zkServer.sh</string>
            <string>start</string>
        </array>
    <key>StandardInPath</key>
    <string>/var/log/zookeeper_stdin.log</string>
    <key>StandardOutPath</key>
    <string>/var/log/zookeeper_stdout.log</string>
    <key>StandardErrorPath</key>
    <string>/var/log/zookeeper_stderr.log</string>
    </dict>
</plist>

「sudo launchctl load com.test.zookeeper.plist」を実行した後、これは「/var/log/system.log」にあるもので、ユーザー名はアスタリスクに置き換えられています。

Apr 17 11:13:22 ***-03 sudo[97284]:  ****.** : TTY=ttys003 ; PWD=/Library/LaunchDaemons ; USER=root ; COMMAND=/bin/launchctl load com.test.zookeeper.plist
Apr 17 11:13:22 ***-03 com.apple.xpc.launchd[1] (com.apple.xpc.launchd.domain.system): Session adoption is only allowed in user domains.
Apr 17 11:13:22 ***-03 nohup[97299]: Could not adopt Background session: 125: Domain does not support specified action

「/var/log/zookeeper_stdout.log」

Starting zookeeper ... STARTED

「/var/log/zookeeper_stderr.log」

JMX enabled by default
Using config: /opt/zookeeper/bin/../conf/zoo.cfg

そのため、ジョブはlaunchdによって実行されたようですが、「ps -ef | grep zoo」を実行してサービスを確認すると、どういうわけか実際のサービスが存在しません。通常、「sudo / opt/zookeeper/bin/zkServer.sh 開始"

誰かが私を助けることができますか?ありがとうございました。

4

1 に答える 1