Created on 08-02-2018 02:52 PM - edited 09-16-2022 06:32 AM
Can anyone resolve the issue asap.
stderr:
Traceback (most recent call last): File "/var/lib/ambari-agent/cache/stack-hooks/before-ANY/scripts/hook.py", line 35, in BeforeAnyHook().execute() File "/usr/lib/ambari-agent/lib/resource_management/libraries/script/script.py", line 353, in execute method(env) File "/var/lib/ambari-agent/cache/stack-hooks/before-ANY/scripts/hook.py", line 29, in hook setup_users() File "/var/lib/ambari-agent/cache/stack-hooks/before-ANY/scripts/shared_initialization.py", line 51, in setup_users fetch_nonlocal_groups = params.fetch_nonlocal_groups, File "/usr/lib/ambari-agent/lib/resource_management/core/base.py", line 166, in __init__ self.env.run() File "/usr/lib/ambari-agent/lib/resource_management/core/environment.py", line 160, in run self.run_action(resource, action) File "/usr/lib/ambari-agent/lib/resource_management/core/environment.py", line 124, in run_action provider_action() File "/usr/lib/ambari-agent/lib/resource_management/core/providers/accounts.py", line 90, in action_create shell.checked_call(command, sudo=True) File "/usr/lib/ambari-agent/lib/resource_management/core/shell.py", line 72, in inner result = function(command, **kwargs) File "/usr/lib/ambari-agent/lib/resource_management/core/shell.py", line 102, in checked_call tries=tries, try_sleep=try_sleep, timeout_kill_strategy=timeout_kill_strategy, returns=returns) File "/usr/lib/ambari-agent/lib/resource_management/core/shell.py", line 150, in _call_wrapper result = _call(command, **kwargs_copy) File "/usr/lib/ambari-agent/lib/resource_management/core/shell.py", line 314, in _call raise ExecutionFailed(err_msg, code, out, err) resource_management.core.exceptions.ExecutionFailed: Execution of 'useradd -m -G hadoop -g hadoop yarn-ats' returned 1. useradd: existing lock file /etc/passwd.lock without a PID useradd: cannot lock /etc/passwd; try again later. Error: Error: Unable to run the custom hook script ['/usr/bin/python', '/var/lib/ambari-agent/cache/stack-hooks/before-ANY/scripts/hook.py', 'ANY', '/var/lib/ambari-agent/data/command-409.json', '/var/lib/ambari-agent/cache/stack-hooks/before-ANY', '/var/lib/ambari-agent/data/structured-out-409.json', 'INFO', '/var/lib/ambari-agent/tmp', 'PROTOCOL_TLSv1_2', ''] stdout: 2018-08-02 10:46:52,940 - Stack Feature Version Info: Cluster Stack=3.0, Command Stack=None, Command Version=None -> 3.0 2018-08-02 10:46:52,949 - Using hadoop conf dir: /usr/hdp/3.0.0.0-1634/hadoop/conf 2018-08-02 10:46:52,950 - Group['hdfs'] {} 2018-08-02 10:46:52,951 - Group['hadoop'] {} 2018-08-02 10:46:52,951 - Group['users'] {} 2018-08-02 10:46:52,952 - User['yarn-ats'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['hadoop'], 'uid': None} 2018-08-02 10:46:52,952 - Adding user User['yarn-ats'] Error: Error: Unable to run the custom hook script ['/usr/bin/python', '/var/lib/ambari-agent/cache/stack-hooks/before-ANY/scripts/hook.py', 'ANY', '/var/lib/ambari-agent/data/command-409.json', '/var/lib/ambari-agent/cache/stack-hooks/before-ANY', '/var/lib/ambari-agent/data/structured-out-409.json', 'INFO', '/var/lib/ambari-agent/tmp', 'PROTOCOL_TLSv1_2', ''] 2018-08-02 10:46:52,991 - The repository with version 3.0.0.0-1634 for this command has been marked as resolved. It will be used to report the version of the component which was installed Command failed after 1 tries
Created 08-02-2018 03:12 PM
Relevant piece I think, from your output, is that it's failing on adding the yarn-ats user because there is a lock on the passwd file;
Execution of 'useradd -m -G hadoop -g hadoop yarn-ats' returned 1. useradd: existing lock file /etc/passwd.lock without a PID useradd: cannot lock /etc/passwd; try again later.
You need to find out what currently has a lock on your passwd file. Ex sudo lsof /etc/passwd...
Created on 08-02-2018 03:22 PM - edited 08-17-2019 09:14 PM
Please check below out[put