Created 06-23-2017 02:04 AM
how to auto start zookeeper when machine is restart
i can't auto start use zookeeper when ambari-server is 2.5.1.0
thanks. the DB is postgresql
Created 06-23-2017 07:45 AM
i kill the pid and the zookeeper server can auto start ,
why i stop zookeeper server and restart machine the zookeeper can't auto start ?
Created 06-23-2017 08:01 AM
Please refer to the following piece of code to understand the logic:
def requires_recovery(self, component): """ Recovery is allowed for: INISTALLED --> STARTED INIT --> INSTALLED --> STARTED RE-INSTALLED (if configs do not match) """ if not self.enabled(): return False if not self.configured_for_recovery(component): return False if component not in self.statuses: return False status = self.statuses[component] if self.auto_start_only or self.auto_install_start: if status["current"] == status["desired"]: return False if status["desired"] not in self.allowed_desired_states: return False else: if status["current"] == status["desired"] and status['stale_config'] == False: return False if status["desired"] not in self.allowed_desired_states or status["current"] not in self.allowed_current_states: return False logger.info("%s needs recovery, desired = %s, and current = %s.", component, status["desired"], status["current"]) return True pass
.