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...
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
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.
It may not be possible with msyql
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.
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..
@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
[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.