Created 02-15-2018 04:51 PM
Hello!!
I'm trying to setup ambari-server and i'm getting this error :
Do you want to change Oracle JDK [y/n] (n)? n
Completing setup...
INFO: Loading properties from /etc/ambari-server/conf/ambari.properties
INFO: os_type already set in the properties file
Configuring database...
INFO: Loading properties from /etc/ambari-server/conf/ambari.properties
Enter advanced database configuration [y/n] (n)? n
Configuring database...
INFO: Loading properties from /etc/ambari-server/conf/ambari.properties
INFO: Loading properties from /etc/ambari-server/conf/ambari.properties
INFO: Loading properties from /etc/ambari-server/conf/ambari.properties
INFO: Loading properties from /etc/ambari-server/conf/ambari.properties
Traceback (most recent call last):
File "/usr/sbin/ambari-server.py", line 950, in <module>
mainBody()
File "/usr/sbin/ambari-server.py", line 920, in mainBody
main(options, args, parser)
File "/usr/sbin/ambari-server.py", line 872, 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 1144, in setup
_setup_database(options)
File "/usr/lib/python2.6/site-packages/ambari_server/serverSetup.py", line 953, in _setup_database
dbmsAmbari = factory.create(options, properties, "Ambari")
File "/usr/lib/python2.6/site-packages/ambari_server/dbConfiguration.py", line 465, in create
dbmsConfig = desc.create_config(options, properties, dbId)
File "/usr/lib/python2.6/site-packages/ambari_server/dbConfiguration.py", line 79, in create_config
return self.fn_create_config(options, properties, self.storage_key, dbId)
File "/usr/lib/python2.6/site-packages/ambari_server/dbConfiguration_linux.py", line 874, in createPGConfig
return PGConfig(options, properties, storage_type)
File "/usr/lib/python2.6/site-packages/ambari_server/dbConfiguration_linux.py", line 405, in __init__
PGConfig.PG_STATUS_RUNNING = get_postgre_running_status()
File "/usr/lib/python2.6/site-packages/ambari_server/utils.py", line 289, in get_postgre_running_status
return os.path.join(get_ubuntu_pg_version(), "main")
File "/usr/lib/python2.7/posixpath.py", line 70, in join
elif path == '' or path.endswith('/'):
AttributeError: 'list' object has no attribute 'endswith'
Created 02-15-2018 07:06 PM
According to this issue https://github.com/tensorflow/models/issues/122, you get the error message when a file name is interpreted by the shell as two arguments.
So I would now check: Did you configured somewhere a path name containing a space? If you did so, try quoting the name.
Created 02-16-2018 03:37 PM
Thank you @Harald Berghoff ! In fact, I'm trying to install ambari in ubuntu 16.04 ( https://docs.hortonworks.com/HDPDocuments/Ambari-2.6.1.0/bk_ambari-installation/content/set_up_the_a.... So, I downloaded the ambari repository then I installed the Ambari server, and, when I try to set up the ambari server by launching ambari-server setup without options, I get this error.
Created 12-13-2019 07:00 AM
Is this issue fixed, please let me know how did this is fixed.
Created 02-17-2018 05:41 AM
You can try using the command
ambari-server setup -s -j <JAVA_HOME>
I don't see java_home in your setup.
Also there are chances that doing a sudo based setup solves your issue.
sudo ambari-server setup -s -j <JAVA_HOME>
Created 12-13-2019 07:07 AM
this doesn't worked for me, still same issue.
Created 12-13-2019 08:08 AM
Created 12-13-2019 08:51 AM
Enter advanced database configuration [y/n] (n)? n
Configuring database...
INFO: Loading properties from /etc/ambari-server/conf/ambari.properties
INFO: Loading properties from /etc/ambari-server/conf/ambari.properties
INFO: Loading properties from /etc/ambari-server/conf/ambari.properties
INFO: Loading properties from /etc/ambari-server/conf/ambari.properties
Traceback (most recent call last):
File "/usr/sbin/ambari-server.py", line 1078, in <module>
mainBody()
File "/usr/sbin/ambari-server.py", line 1048, in mainBody
main(options, args, parser)
File "/usr/sbin/ambari-server.py", line 998, in main
action_obj.execute()
File "/usr/sbin/ambari-server.py", line 78, in execute
self.fn(*self.args, **self.kwargs)
File "/usr/lib/ambari-server/lib/ambari_server/serverSetup.py", line 1208, in setup
_setup_database(options)
File "/usr/lib/ambari-server/lib/ambari_server/serverSetup.py", line 1014, in _setup_database
dbmsAmbari = factory.create(options, properties, "Ambari")
File "/usr/lib/ambari-server/lib/ambari_server/dbConfiguration.py", line 511, in create
dbmsConfig = desc.create_config(options, properties, dbId)
File "/usr/lib/ambari-server/lib/ambari_server/dbConfiguration.py", line 81, in create_config
return self.fn_create_config(options, properties, self.storage_key, dbId)
File "/usr/lib/ambari-server/lib/ambari_server/dbConfiguration_linux.py", line 899, in createPGConfig
return PGConfig(options, properties, storage_type)
File "/usr/lib/ambari-server/lib/ambari_server/dbConfiguration_linux.py", line 435, in __init__
PGConfig.PG_STATUS_RUNNING = get_postgre_running_status()
File "/usr/lib/ambari-server/lib/ambari_server/utils.py", line 296, in get_postgre_running_status
return os.path.join(get_ubuntu_pg_version(), "main")
File "/usr/lib/python2.7/posixpath.py", line 70, in join
elif path == '' or path.endswith('/'):
AttributeError: 'list' object has no attribute 'endswith'
Running as root user in ubuntu-16.04
Created 12-14-2019 12:06 AM
According to the snippet you shared, you are trying to setup Ambari using the Derby database as your choice was (n)for Advanced configuration but you simply need to run the below command the -s or --silent tells ambari to pick the defaults i.e derby database
# ambari-server setup -s
When Ambari is to connect to a non-default database, you must download and set up database connectors before you set up the Ambari Server and then run ambari-server setup.
Issues:
If you had run the setup successfully before you might hit the below error
Nothing was done. Ambari Setup already performed and cannot re-run setup in silent mode. Use "ambari-server setup" command without -s option to change Ambari setup.
Happy hadooping