Created 01-25-2016 06:58 PM
Hi All,
I am working on a task to automate the whole installation.. where I am struck with ambari-server installation and setup. My script is issuing a command like..
ambari-server setup -j /usr/lib/jvm/jre-1.7.0-openjdk.x86_64 -s --jdbc-driver /usr/share/java/mysql-connector-java.jar --jdbc-db mysql
The installation is going through successfull, but he server is not starting.. The log is pasted below.
## installing ambari-agent
Verifying Python version compatibility...
Using python /usr/bin/python2.6
Checking for previously running Ambari Agent...
Starting ambari-agent
Verifying ambari-agent process status...
Ambari Agent successfully started
Agent PID at: /var/run/ambari-agent/ambari-agent.pid
Agent out at: /var/log/ambari-agent/ambari-agent.out
Agent log at: /var/log/ambari-agent/ambari-agent.log
## install ambari-server
cp: cannot stat `/var/lib/ambari-server/resources/views/*.jar': No such file or directory
Using python /usr/bin/python2.6
Setup ambari-server
Copying /usr/share/java/mysql-connector-java.jar to /var/lib/ambari-server/resources
JDBC driver was successfully initialized.
Ambari Server 'setup' completed successfully.
nohup: ignoring input and appending output to `nohup.out'
Ambari Server failed to start
## Success! All done.
root@ico-svr hdp_install]# ambari-server start
Using python /usr/bin/python2.6 Starting ambari-server
ERROR: Exiting with exit code -1. REASON: DB Name property not set in config file.
- If this is a new setup, then run the "ambari-server setup" command to create the user - If this is an upgrade of an existing setup, run the "ambari-server upgrade" command. Refer to the Ambari documentation for more information on setup and upgrade.
Can any faced this issue , any help would be appreciated.
Thanks
Siva
Created 01-25-2016 07:03 PM
It may not be possible with msyql
-s (or --silent)Setup runs silently. Accepts all the default prompt values, such as:If you want to run the Ambari Server as non-root, you must run setup in interactive mode. When prompted to customize the ambari-server user account, provide the account information. Refer to Configuring Ambari for Non-Root for more information.
Created 01-25-2016 07:43 PM
Hi Neeraj,
Thanks for the quick reply. My requirement is to force to use MySQL database. The hortonworks documentation says that you can specify the database that you want to..
Thanks
siva
Created 01-25-2016 08:48 PM
@Siva Konda Can you check this file? /etc/ambari-server/conf/ambari.properties
In my case
[root@phdns01 ~]# grep server.jdbc.database /etc/ambari-server/conf/ambari.properties
server.jdbc.database=postgres
server.jdbc.database_name=ambari
[root@phdns01 ~]#
Created on 01-25-2016 09:05 PM - edited 08-19-2019 04:23 AM
See this
I was able to reproduce the issue. As said earlier , -s will work with postgres only as it default db for ambari.
Created 02-04-2016 02:23 AM
@Siva Konda has this been resolved? Can you provide a solution or accept the best answer?
Created 07-27-2016 02:29 PM
[root@ambari yum.repos.d]# ambari-server start Using python /usr/bin/python Starting ambari-server ERROR: Exiting with exit code -1. REASON: DB Name property not set in config file. - If this is a new setup, then run the "ambari-server setup" command to create the user - If this is an upgrade of an existing setup, run the "ambari-server upgrade" command. Refer to the Ambari documentation for more information on setup and upgrade.
I faced same issue, but after running ambari-server upgrade command, I tried to start the ambari server and its started successfully.
[root@ambari yum.repos.d]# ambari-server upgrade Using python /usr/bin/python Upgrading ambari-server Updating properties in ambari.properties ... WARNING: Can not find ambari-env.sh.rpmsave file from previous version, skipping restore of environment settings Fixing database objects owner Ambari Server configured for Embedded Postgres. Confirm you have made a backup of the Ambari Server database [y/n] (y)? y Upgrading database schema Adjusting ambari-server permissions and ownership... Ambari Server 'upgrade' completed successfully.
[root@ambari yum.repos.d]# ambari-server start Using python /usr/bin/python Starting ambari-server Ambari Server running with administrator privileges. Organizing resource files at /var/lib/ambari-server/resources... Server PID at: /var/run/ambari-server/ambari-server.pid Server out at: /var/log/ambari-server/ambari-server.out Server log at: /var/log/ambari-server/ambari-server.log Waiting for server start.................... Ambari Server 'start' completed successfully.
If this is resolved your issue. Lets close this thread so it will help to others.