Created 11-26-2017 08:25 PM
I am installing Hortonworks ambari server on ubuntu 14.04 for the first using the setps given on hortoworks installation setps:
Facing below error:
root@localhost:~# ambari-server start Using python /usr/bin/python Starting ambari-server ERROR: Exiting with exit code 1. REASON: Unable to detect a system user for Ambari Server. - 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.
root@localhost:~# ambari-server status Using python /usr/bin/python Ambari-server status Ambari Server not running. Stale PID File at: /var/run/ambari-server/ambari-server.pid
Kindly help me to install hortonworks with hadoop. I got stuck presently with hortonworks ambari server setup on ubuntu 14.04
Created 11-26-2017 09:19 PM
I think you missed an intermediary step. I assume you prepared your hosts as required.
step 1
apt-get install ambari-server
Step 2
The current error you are getting is because you didn't execute this step read the office document in the link
# ambari-server setup
By default, Ambari Server runs under root. Accept the default (n) at the Customize user account for ambari-server daemon prompt, to proceed as root. If you want to create a different user to run the Ambari Server, or to assign a previously created user, select y at the Customize user account for ambari-server daemon prompt, then provide a username. see link
Based on the user chosen above
Step 3
# ambari-server start
Then proceed with the Cluster installation
http://ambari-server-FDQN:8080
This should work
Created 11-27-2017 04:22 AM
Thanks for your reply.
Yes I followed all the steps. Please have a look below:
root@localhost:~# hostname -flocalhost
root@localhost:~# ssh root@localhost Welcome to Ubuntu 14.04.5 LTS (GNU/Linux 4.4.0-31-generic x86_64) * Documentation: https://help.ubuntu.com/332 packages can be updated.231 updates are security updates.New release '16.04.3 LTS' available.Run 'do-release-upgrade' to upgrade to it.Last login: Mon Nov 27 09:21:46 2017 from localhost
root@localhost:~# apt-get install ambari-server Reading package lists... DoneBuilding dependency tree Reading state information... Doneambari-server is already the newest version.0 upgraded, 0 newly installed, 0 to remove and 322 not upgraded.
root@localhost:~# ambari-server setup Using python /usr/bin/pythonSetup ambari-serverChecking SELinux...WARNING: Could not run /usr/sbin/sestatus: OK Customize user account for ambari-server daemon [y/n] (n)? n Adjusting ambari-server permissions and ownership...Checking firewall status...Checking JDK...Do you want to change Oracle JDK [y/n] (n)? y[1] Oracle JDK 1.8 + Java Cryptography Extension (JCE) Policy Files 8[2] Oracle JDK 1.7 + Java Cryptography Extension (JCE) Policy Files 7[3] Custom JDK==============================================================================Enter choice (1): 1JDK already exists, using /var/lib/ambari-server/resources/jdk-8u112-linux-x64.tar.gzInstalling JDK to /usr/jdk64/Successfully installed JDK to /usr/jdk64/JCE Policy archive already exists, using /var/lib/ambari-server/resources/jce_policy-8.zipInstalling JCE policy... Completing setup... Configuring database...
Enter advanced database configuration [y/n] (n)? y Configuring database... ============================================================================== Choose one of the following options: [1] - PostgreSQL (Embedded) [2] - Oracle [3] - MySQL / MariaDB [4] - PostgreSQL [5] - Microsoft SQL Server (Tech Preview) [6] - SQL Anywhere [7] - BDB
Enter choice (2): 2 Hostname (localhost): Port (1521): Select Oracle identifier type:1 - Service Name2 - SID(1): Service Name (ambari): Username (ambari): Enter Database Password (bigdata): Configuring ambari database... WARNING: Before starting Ambari Server, you must copy the Oracle JDBC driver JAR file to /usr/share/java and set property "server.jdbc.driver.path=[path/to/custom_jdbc_driver]" in ambari.properties.Press <enter> to continue. ERROR: Before starting Ambari Server, you must copy the Oracle JDBC driver JAR file to /usr/share/java and set property "server.jdbc.driver.path=[path/to/custom_jdbc_driver]" in ambari.properties. ERROR: Exiting with exit code -1. REASON: Before starting Ambari Server, you must copy the Oracle JDBC driver JAR file to /usr/share/java and set property "server.jdbc.driver.path=[path/to/custom_jdbc_driver]" in ambari.properties.
root@localhost:~# ambari-server start Using python /usr/bin/pythonStarting ambari-serverERROR: Exiting with exit code 1. REASON: Unable to detect a system user for Ambari Server.- 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 guess there is some error in database configuration step. Could you pls suggest me the same to resolve the issue.
Created 11-27-2017 04:25 AM
Issue-1). Have you downloaded and copied the Oracle JDBC driver and placed it in proper location before running the "ambari-server setup" ?
# cp ojdbc7.jar /usr/share/java/ # chmod 644 /usr/share/java/ojdbc7.jar
Please refer to the following doc to get more details about how to use Non Default Database (Oracle) with Ambari.
https://docs.hortonworks.com/HDPDocuments/Ambari-2.6.0.0/bk_ambari-administration/content/using_amba...
.
Issue-2). Also we see that your "hostname -f" command output returns "localhost" which is not right. The ambari Server host should have a proper FQDN (hostname) configured prior to running the "ambari-server setup"
Please refer to the following links to know more about setting the FQDN for Ubuntu host: https://gridscale.io/en/community/tutorials/hostname-fqdn-ubuntu/
.
Created 11-27-2017 06:28 AM
I have updated the same as per you suggestion and facing below error:
root@node:/home/chaithu# ambari-server startUsing python /usr/bin/pythonStarting ambari-serverAmbari Server running with administrator privileges.Organizing resource files at /var/lib/ambari-server/resources...Ambari database consistency check started... 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........... ERROR: Exiting with exit code -1. REASON: Ambari Server java process has stopped. Please check the logs for more information. root@node:/home/chaithu# jps 2530 Jps
root@node:/home/chaithu# hostname -f node.chaithu.com
root@node: more /var/log/ambari-server/ambari-server.log
The first error shown is as give below:
27 Nov 2017 10:40:35,231 ERROR [main] DBAccessorImpl:119 - Error while creating database accessor
java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:489)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:553)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:254)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:528)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:247)
at org.apache.ambari.server.orm.DBAccessorImpl.<init>(DBAccessorImpl.java:93)
Created 11-27-2017 06:40 AM
Now we see that the JDBC driver is loaded successfully, But looks like the Oracle DB is not listening to the Listener port. Please restart your Oracle DB instance and verify if the listener process is UP and running (default listener port for oracle is 1521)
java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection
Please check if your Oracle Database is running and listening to the correct listener port. Db admins can easily verify that.
You can also share the output of the following command to get more idea if the DB connection URL is correctly entered or not?
# grep 'jdbc' /etc/ambari-server/conf/ambari.properties
.
Created 11-27-2017 09:45 AM
Please check following before accessing the database from Hadoop server :-
By this error "java.sql.SQLRecoverableException: IO Error:TheNetworkAdapter could not establish the connection" looks like you not able to ping and connect the oracle database .
1) are you able to connect the oracle database on different server.
#ping databasename
2) Connect the database with username and password, for cross checking
#sqlplus user/pass@dbanme :- it should connect fine and list the sample tables.
Created 11-27-2017 01:01 PM
Copying the ojdbc.jar is not enough, you need to pre-create the ambari user and schema in the Oracle database. See offical document On the database server create ambari user and set the password and remember to allocate or create a tablespace other than user.
During the ambari-server setup you will need the credentials created above to successfully load Ambari tables and views in the oracle database.
Its only then that you can start the Ambari successfully.
For the error below make sure the Oracle port is accessible from the Ambari server
27Nov201710:40:35,231 ERROR [main]DBAccessorImpl:119-Errorwhile creating database accessorjava.sql.SQLRecoverableException: IO Error:TheNetworkAdapter could not establish the connection
And remember copy the Ambari-DDL-Oracle-CREATE.sql from the Ambari server path /var/lib/ambari-server/resources/Ambari-DDL-Oracle-CREATE.sql to the Oracle and run the sql as the ambari user -eg if the Ambari-DDL-Oracle-CREATE.sql is in tmp and ambairi user and password is ambari
$ cd /tmp $ sqlplus ambari/ambari sql> @Ambari-DDL-Oracle-CREATE.sql
Thereafter you can run your ambari-server start successfully
Created 05-19-2018 06:42 AM
Now i am able to know about ubuntu change hostname
,Now i am able to ubuntu change hostname