The Hortonworks Community Connection is now live. A completely rebuilt Q&A forum, Knowledge Base, Code Hub and more, backed by the experts in the industry.

You will be redirected here in 10 seconds. If your are not redirected, click here to visit the new site.

The legacy Hortonworks Forum is now closed. You can view a read-only version of the former site by clicking here. The site will be taken offline on January 31,2016

Ambari Forum

Not able to start Ambari-server

  • #46247
    Ravi Sharma

    Hi all,

    I have Installed HDP2.0 using ambari-server 1.4.1. It was working fine for some days. but now I am not able to start the server. It starts and then kills itself after few mins showing some database connection error in logs. What could be the possible issues?? Plz help ASAP….

  • Author
  • #46248
    Jeff Sposetti

    Did you install Ambari using the default postgres DB? Can you paste the errors you see in /var/log/ambari-server/ambari-server.log and /var/log/ambari-server/ambari-server.out?

    Ravi Sharma

    Hi Jeff,
    Yeahh…I installed Ambari using default postgres DB.
    Here is the output of ambari-server.out
    cat /var/log/ambari-server/ambari-server.out
    org.apache.ambari.server.AmbariException: Master key initialization failed.
    at org.apache.ambari.server.configuration.Configuration.loadCredentialProvider(
    at org.apache.ambari.server.configuration.Configuration.readPasswordFromStore(
    at org.apache.ambari.server.configuration.Configuration.getDatabasePassword(
    at org.apache.ambari.server.controller.ControllerModule.buildJpaPersistModule(
    at org.apache.ambari.server.controller.ControllerModule.configure(
    at org.apache.ambari.server.controller.AmbariServer.main(
    [EL Info]: 2014-01-01 19:34:09.199–ServerSession(69518356)–EclipseLink, version: Eclipse Persistence Services – 2.4.0.v20120608-r11652
    [EL Severe]: ejb: 2014-01-01 19:36:15.252–ServerSession(69518356)–Exception [EclipseLink-4002] (Eclipse Persistence Services – 2.4.0.v20120608-r11652): org.eclipse.persistence.exceptions.DatabaseException
    Internal Exception: org.postgresql.util.PSQLException: Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
    Error Code: 0

    Ravi Sharma

    Here is ambari-server.log
    19:34:07,613 INFO [main] Configuration:336 – Reading password from existing file
    19:34:07,629 INFO [main] Configuration:514 – Hosts Mapping File null
    19:34:07,629 INFO [main] HostsMap:60 – Using hostsmap file null
    19:34:08,135 ERROR [main] MasterKeyServiceImpl:109 – Master key is not provided as a System property or an environment varialble.
    19:34:08,136 INFO [main] Configuration:415 – Credential provider creation failed.
    Master key initialization failed.
    19:34:08,137 DEBUG [main] Configuration:633 – Reading password from file /etc/ambari-server/conf/password.dat
    19:34:08,587 INFO [main] AmbariServer:447 – Getting the controller
    19:34:08,966 DEBUG [main] AmbariMetaInfo:614 – Loading stack information, stackRoot=/var/lib/ambari-server/resources/stacks
    19:34:08,966 DEBUG [main] AmbariMetaInfo:715 – Reading stack version metainfo from file /var/lib/ambari-server/resources/stacks/HDPLocal/1.3.2/metainfo.xml
    19:34:08,973 DEBUG [main] AmbariMetaInfo:633 – Adding new stack to known stacks, stackName=HDPLocal, stackVersion=1.3.2
    19:34:08,973 DEBUG [main] AmbariMetaInfo:646 – Adding repositories to stack, stackName=HDPLocal, stackVersion=1.3.2, repoFolder=/var/lib/ambari-server/resources/stacks/HDPLocal/1.3.2/repos/repoinfo.xml
    19:34:08,977 DEBUG [main] AmbariMetaInfo:803 – Adding repo to stack, repoInfo=[ repoInfo: , osType=centos6, repoId=HDP-1.3.2, baseUrl=, repoName=HDP, mirrorsList=null ]
    19:34:08,978 DEBUG [main] AmbariMetaInfo:808 – Checking for override for base_url
    19:36:15,256 ERROR [main] AmbariServer:457 – Failed to run the Ambari Server Guice provision errors:

    1) Error injecting method, javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services – 2.4.0.v20120608-r11652): org.eclipse.persistence.exceptions.DatabaseException
    Internal Exception: org.postgresql.util.PSQLException: Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
    Error Code: 0
    while locating
    for field at org.apache.ambari.server.controller.AmbariServer.ambariMetaInfo(
    at org.apache.ambari.server.controller.AmbariServer.class(
    while locating org.apache.ambari.server.controller.AmbariServer

    1 error
    at org.apache.ambari.server.controller.AmbariServer.main(
    Caused by: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services –

    Jeff Sposetti


    1) Did you see any errors when you ran “ambari-server start”?
    2) What is the output of “service postgresql status”?
    3) Do you see postgres running “ps -ef | grep postgres”?

    Ravi Sharma

    Thanks for support Jeff,
    1)There is no error while I starts ambari-server, for some it shows ambari-server while I check “sudo service ambari-server status” but nothing is there on browser. after some time status changes to “not running”.

    2)sudo service postgresql status is: “postmaster (pid 7881) is running…”

    3) sudo ps -ef | grep postgres
    postgres 7881 1 0 18:36 ? 00:00:00 /usr/bin/postmaster -p 5432 -D /var/lib/pgsql/data
    postgres 7883 7881 0 18:36 ? 00:00:00 postgres: logger process
    postgres 7885 7881 0 18:36 ? 00:00:00 postgres: writer process
    postgres 7886 7881 0 18:36 ? 00:00:00 postgres: wal writer process
    186946 8796 8653 0 20:41 pts/5 00:00:00 grep postgres

    One more thing , I am able to login to postgres db using credentials of ambari server. i dont know whats causing this error…!!!!

    Jeff Sposetti

    Ok, so it seems postgres is running but ambari server can no longer login + connect (hence, why ambari server start is failing). A few more questions:

    1) Version of ambari? “ambari-server –version” or “yum info ambari-server”
    2) In /etc/ambari-server/conf/, what is the server.jdbc.url? Also, maybe just post all the server.jdbc.* properties.


    Ravi Sharma

    Jeff, following are the properties you asked:
    1) Version :
    2) There is no such property as server.jdbc.url , related to jdbc it only has following properties


    and password.dat file containes default password “bigdata”

    Drew Rapenchuk


    Check to see if iptables is running, this will often break Ambari. If you need iptables running, allow postgres to have sufficient access:
    iptables -A INPUT -p tcp –dport postgres -j ACCEPT
    iptables -A INPUT -p udp –dport 41749 -j ACCEPT
    iptables -P OUTPUT ALLOW

The forum ‘Ambari’ is closed to new topics and replies.

Support from the Experts

A HDP Support Subscription connects you experts with deep experience running Apache Hadoop in production, at-scale on the most demanding workloads.

Enterprise Support »

Become HDP Certified

Real world training designed by the core architects of Hadoop. Scenario-based training courses are available in-classroom or online from anywhere in the world

Training »

Hortonworks Data Platform
The Hortonworks Data Platform is a 100% open source distribution of Apache Hadoop that is truly enterprise grade having been built, tested and hardened with enterprise rigor.
Get started with Sandbox
Hortonworks Sandbox is a self-contained virtual machine with Apache Hadoop pre-configured alongside a set of hands-on, step-by-step Hadoop tutorials.
Modern Data Architecture
Tackle the challenges of big data. Hadoop integrates with existing EDW, RDBMS and MPP systems to deliver lower cost, higher capacity infrastructure.