Created 04-27-2017 09:42 PM
I had a small test cluster that I had installed HDP 2.5 on and then uninstalled everything. Now I downloaded HDP 2.6 and attempted to run ambari-server setup as shown and each time, I get the same error related to the user that ambari should run as. I have tried not changing the default, accepting the default (root), and using another existing user. all of these result in the same error. I have deleted everything related to hadoop on the server that I can find in case that was an issue from the previous 2.5 install.
Here is the error:
[root@pocc1 /]# ambari-server setup -v -gUsing python /usr/bin/pythonSetup ambari-serverINFO: Loading properties from /etc/ambari-server/conf/ambari.propertiesChecking SELinux...INFO: about to run command: /sbin/sestatusINFO: process_pid=13802SELinux status is 'disabled'INFO: Loading properties from /etc/ambari-server/conf/ambari.propertiesCustomize user account for ambari-server daemon [y/n] (n)? nINFO: Loading properties from /etc/ambari-server/conf/ambari.propertiesINFO: Cleaning bootstrap directory (/var/run/ambari-server/bootstrap) contents...ERROR: Unexpected error 'getpwuid(): uid not found: 1001'ERROR: Exiting with exit code 1. REASON: Failed to create user. Exiting.
And here is what I found in /var/log/ambari-server/ambari-server-command.log :
[root@pocc1 /]# more /var/log/ambari-server/ambari-server-command.log INFO 2017-04-27 16:25:58,673 ambari-server.py:777 - loglevel=logging.INFO INFO 2017-04-27 16:25:58,674 serverSetup.py:1090 - Setup ambari-server. ERROR 2017-04-27 16:26:05,832 ambari-server.py:880 - 'Fatal exception: Failed to create user. Exiting., exit code 1' Traceback (most recent call last): File "/usr/sbin/ambari-server.py", line 863, in main action_obj.execute() File "/usr/sbin/ambari-server.py", line 78, in execute self.fn(*self.args, **self.kwargs) File "/usr/lib/python2.6/site-packages/ambari_server/serverSetup.py", line 1117, in setup raise FatalException(retcode, err) FatalException: 'Fatal exception: Failed to create user. Exiting., exit code 1' INFO 2017-04-27 16:26:14,435 ambari-server.py:777 - loglevel=logging.INFO INFO 2017-04-27 16:26:14,436 serverSetup.py:1090 - Setup ambari-server. ERROR 2017-04-27 16:26:15,932 ambari-server.py:880 - 'Fatal exception: Failed to create user. Exiting., exit code 1' Traceback (most recent call last): File "/usr/sbin/ambari-server.py", line 863, in main action_obj.execute() File "/usr/sbin/ambari-server.py", line 78, in execute self.fn(*self.args, **self.kwargs) File "/usr/lib/python2.6/site-packages/ambari_server/serverSetup.py", line 1117, in setup raise FatalException(retcode, err) FatalException: 'Fatal exception: Failed to create user. Exiting., exit code 1' INFO 2017-04-27 16:26:24,324 ambari-server.py:777 - loglevel=logging.INFO INFO 2017-04-27 16:26:24,326 serverSetup.py:1090 - Setup ambari-server. ERROR 2017-04-27 16:26:30,378 ambari-server.py:880 - 'Fatal exception: Failed to create user. Exiting., exit code 1' Traceback (most recent call last): File "/usr/sbin/ambari-server.py", line 863, in main action_obj.execute() File "/usr/sbin/ambari-server.py", line 78, in execute self.fn(*self.args, **self.kwargs) File "/usr/lib/python2.6/site-packages/ambari_server/serverSetup.py", line 1117, in setup raise FatalException(retcode, err) FatalException: 'Fatal exception: Failed to create user. Exiting., exit code 1' INFO 2017-04-27 16:26:36,497 ambari-server.py:777 - loglevel=logging.INFO INFO 2017-04-27 16:26:36,499 serverSetup.py:1090 - Setup ambari-server. ERROR 2017-04-27 16:26:50,455 ambari-server.py:880 - 'Fatal exception: Failed to create user. Exiting., exit code 1' Traceback (most recent call last): File "/usr/sbin/ambari-server.py", line 863, in main action_obj.execute() File "/usr/sbin/ambari-server.py", line 78, in execute self.fn(*self.args, **self.kwargs) File "/usr/lib/python2.6/site-packages/ambari_server/serverSetup.py", line 1117, in setup raise FatalException(retcode, err) FatalException: 'Fatal exception: Failed to create user. Exiting., exit code 1' INFO 2017-04-27 16:29:45,363 ambari-server.py:777 - loglevel=logging.INFO INFO 2017-04-27 16:29:45,365 ambari-server.py:160 - Stopping ambari-server. INFO 2017-04-27 16:29:45,365 ambari-server.py:189 - Ambari Server is not running INFO 2017-04-27 16:36:59,920 ambari-server.py:777 - loglevel=logging.INFO INFO 2017-04-27 16:36:59,922 serverSetup.py:1090 - Setup ambari-server. ERROR 2017-04-27 16:37:01,782 ambari-server.py:880 - 'Fatal exception: Failed to create user. Exiting., exit code 1' Traceback (most recent call last): File "/usr/sbin/ambari-server.py", line 863, in main action_obj.execute() File "/usr/sbin/ambari-server.py", line 78, in execute self.fn(*self.args, **self.kwargs) File "/usr/lib/python2.6/site-packages/ambari_server/serverSetup.py", line 1117, in setup raise FatalException(retcode, err) FatalException: 'Fatal exception: Failed to create user. Exiting., exit code 1' INFO 2017-04-27 16:55:58,505 ambari-server.py:777 - loglevel=logging.INFO INFO 2017-04-27 16:55:58,507 serverSetup.py:1090 - Setup ambari-server. ERROR 2017-04-27 16:56:09,222 ambari-server.py:880 - 'Fatal exception: Failed to create user. Exiting., exit code 1' Traceback (most recent call last): File "/usr/sbin/ambari-server.py", line 863, in main action_obj.execute() File "/usr/sbin/ambari-server.py", line 78, in execute self.fn(*self.args, **self.kwargs) File "/usr/lib/python2.6/site-packages/ambari_server/serverSetup.py", line 1117, in setup raise FatalException(retcode, err) FatalException: 'Fatal exception: Failed to create user. Exiting., exit code 1' INFO 2017-04-27 17:18:02,302 ambari-server.py:777 - loglevel=logging.INFO INFO 2017-04-27 17:18:02,304 serverSetup.py:1090 - Setup ambari-server. ERROR 2017-04-27 17:18:06,580 ambari-server.py:880 - 'Fatal exception: Failed to create user. Exiting., exit code 1' Traceback (most recent call last): File "/usr/sbin/ambari-server.py", line 863, in main action_obj.execute() File "/usr/sbin/ambari-server.py", line 78, in execute self.fn(*self.args, **self.kwargs) File "/usr/lib/python2.6/site-packages/ambari_server/serverSetup.py", line 1117, in setup raise FatalException(retcode, err) FatalException: 'Fatal exception: Failed to create user. Exiting., exit code 1'
Any suggestions would be greatly appreciated! I looked at the offending code and followed the python functions and could not find any obvious reason for the errors...but I don't write in Python, so I could easily have missed something. One other thing I noticed is that the ambari install seems to place some files in /usr/lib/python2.6/site-packages/ambari_server/ directory, but Python version on this OS (CentOS 7) is actually 2.7. There is no corresponding ambari_server directory in /usr/lib/python2.7/site-packages directory, which made me scratch my head a bit since I checked in the docs and saw that Python 2.7 should be fine...
Created 10-20-2017 08:06 AM
Hi, I had similar issue. I found below post useful in my case.