Member since
12-19-2018
8
Posts
2
Kudos Received
1
Solution
My Accepted Solutions
Title | Views | Posted |
---|---|---|
7478 | 12-20-2018 08:10 AM |
03-15-2019
02:27 PM
@Somanath, Based on my code review and testing, the original logging that was provided in this thread is caused by a minor bug in CM 5.12 and higher only when single-user mode is configured or the agent is not running as root. I opened a new internal Cloudera Jira for this issue: OPSAPS-49735. In my case, though, even though I reproduced the errors, this did not prevent the Zookeeper server from starting. I think it would be advised that you still review the logs to make certain of the cause of the server failing to start. On any host showing the "UnboundLocalError: local variable 'mdata' referenced before assignment" error: (1) Back up your os_ops.py file so you can role back if required Assuming you have Python 2.7 like was posted in the error in this thread, you can find the os_ops.py file here: /usr/lib64/cmf/agent/build/env/lib/python2.7/site-packages/cmf-5.16.1-py2.7.egg/cmf/util/os_ops.py prompt> cd /usr/lib64/cmf/agent/build/env/lib/python2.7/site-packages/cmf-5.16.1-py2.7.egg/cmf/util/ prompt> cp ./os_ops.py ./os_ops.py.original (2) Edit os_ops.py to move "mdata = self.get_path_metadata(path)" before the "if" conditional: prompt> vim os_ops.py Locate the following block of code in mkabsdir(): if os.path.isdir(path):
# Log warnings if user/group/mode are different than what's expected
if self.honor_users_and_groups:
mdata = self.get_path_metadata(path) Move this line above "if self.honor_users_and_groups:": mdata = self.get_path_metadata(path) The result should look like this: if os.path.isdir(path):
# Log warnings if user/group/mode are different than what's expected mdata = self.get_path_metadata(path)
if self.honor_users_and_groups:
if user is not None and user != mdata.user:
LOG.warning('Expected user %s for %s but was %s', user, path, mdata.user)
if group is not None and group != mdata.group:
LOG.warning('Expected group %s for %s but was %s', group, path, mdata.group)
if mode is not None and oct(mode) != mdata.mode:
LOG.warning('Expected mode %s for %s but was %s', oct(mode), path, mdata.mode)
return False Save your edits This change will make sure that "mdata" is assigned a value before it is referenced. (3) Restart the agent on the host where you updated os_ops.py: prompt> systemctl restart cloudera-scm-agent or on el6 oses: prompt> service cloudera-scm-agent restart (4) If the agent does not restart and it cites some python problem, you can revert by copying the "os_ops.py.original" file to overwrite the "os_ops.py" file you edited. Restart after that.
... View more
12-20-2018
08:10 AM
2 Kudos
Found the issue, yohooooooooo I already added the cloudera-scm to the wheel, sudo usermod -aG wheel cloudera-scm But the issue was, we have to edit the visudo file and you need to uncomment the following: sudo visudo %wheel ALL=(ALL) NOPASSWD: ALL For now, I have passed the DEPLOYING CLIENT CONFIGURATION step, now getting different errors in running and starting the services, like ZOOKEEPER.... 😞 I will investigate and if I did not find any solution, I ask here.
... View more
12-19-2018
03:59 PM
Hi Ben, But if we cannot find that file, what should we do? Why these files are missing? Thanks, Mo
... View more