Kengo Seki created BIGTOP-4433: ---------------------------------- Summary: Enabling ZK and Hadoop services doesn't work Key: BIGTOP-4433 URL: https://issues.apache.org/jira/browse/BIGTOP-4433 Project: Bigtop Issue Type: Bug Reporter: Kengo Seki Assignee: Kengo Seki
Currently, enabling ZK and Hadoop services doesn't seem to work due to the lack of the {{[Install]}} section in their unit file. Steps to reproduce are as follows (examples are run on Rocky 9). Build and install ZK or Hadoop: {code} $ ./gradlew zookeeper-clean zookeeper-pkg repo -Dbuildwithdeps=true $ cat <<EOF > bigtop-deploy/puppet/hieradata/site.yaml bigtop::bigtop_repo_gpg_check: false bigtop::bigtop_repo_uri: [file:///$(pwd)/output] bigtop::hadoop_head_node: "$(facter fqdn)" hadoop::hadoop_storage_dirs: [/data] hadoop_cluster_node::cluster_components: [bigtop-utils, zookeeper] EOF $ sudo cp -r bigtop-deploy/puppet/hiera* /etc/puppet $ sudo puppet apply --hiera_config=/etc/puppet/hiera.yaml --modulepath=$PWD/bigtop-deploy/puppet/modules:/etc/puppet/code/modules $PWD/bigtop-deploy/puppet/manifests {code} Then the service is now activated, {code} $ sudo systemctl status zookeeper-server.service ● zookeeper-server.service - ZooKeeper is a centralized service for maintaining configuration information, naming, providing distributed synchronization, and providing group services. Loaded: loaded (/usr/lib/systemd/system/zookeeper-server.service; static) Active: active (running) since Mon 2025-05-26 11:36:06 UTC; 1min 26s ago Docs: https://zookeeper.apache.org/ Process: 56555 ExecStart=/usr/bin/zookeeper-server start (code=exited, status=0/SUCCESS) Main PID: 56587 (java) Tasks: 34 (limit: 102030) Memory: 86.7M CPU: 654ms CGroup: /system.slice/zookeeper-server.service └─56587 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.452.b09-2.el9.x86_64/bin/java -Dzookeeper.datadir.autocreate=false -Dzookeeper.log.dir=/var/log/zookeeper -Dzookeeper.log.file=zoo> May 26 11:36:05 rocky9.localdomain systemd[1]: Starting ZooKeeper is a centralized service for maintaining configuration information, naming, providing distributed synchronization, and prov> May 26 11:36:05 rocky9.localdomain zookeeper-server[56570]: ZooKeeper JMX enabled by default May 26 11:36:05 rocky9.localdomain zookeeper-server[56570]: Using config: /etc/zookeeper/conf/zoo.cfg May 26 11:36:06 rocky9.localdomain zookeeper-server[56570]: Starting zookeeper ... STARTED May 26 11:36:06 rocky9.localdomain systemd[1]: Started ZooKeeper is a centralized service for maintaining configuration information, naming, providing distributed synchronization, and provi> {code} but enabling it fails as follows. {code} $ sudo systemctl enable zookeeper-server.service The unit files have no installation config (WantedBy=, RequiredBy=, Also=, Alias= settings in the [Install] section, and DefaultInstance= for template units). This means they are not meant to be enabled or disabled using systemctl. Possible reasons for having this kind of units are: • A unit may be statically enabled by being symlinked from another unit's .wants/ or .requires/ directory. • A unit's purpose may be to act as a helper for some other unit which has a requirement dependency on it. • A unit may be started when needed via activation (socket, path, timer, D-Bus, udev, scripted systemctl call, ...). • In case of template units, the unit is meant to be enabled with some instance name specified. {code} As a result, the service doesn't get activated after rebooting OS. {code} $ reboot $ sudo systemctl status zookeeper-server.service ○ zookeeper-server.service - ZooKeeper is a centralized service for maintaining configuration information, naming, providing distributed synchronization, and providing group services. Loaded: loaded (/usr/lib/systemd/system/zookeeper-server.service; static) Active: inactive (dead) Docs: https://zookeeper.apache.org/ {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)