Home Forums Ambari Not able to start Ambari-server

This topic contains 8 replies, has 3 voices, and was last updated by  Drew Rapenchuk 7 months, 3 weeks ago.

  • Creator
    Topic
  • #46247

    Ravi Sharma
    Participant

    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….

Viewing 8 replies - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.

  • Author
    Replies
  • #46587

    Drew Rapenchuk
    Participant

    Ravi,

    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

    Collapse
    #46284

    Ravi Sharma
    Participant

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

    server.jdbc.database=ambari
    server.jdbc.user.name=ambari
    server.jdbc.user.passwd=/etc/ambari-server/conf/password.dat

    and password.dat file containes default password “bigdata”

    Collapse
    #46261

    Jeff Sposetti
    Moderator

    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/ambari.properties, what is the server.jdbc.url? Also, maybe just post all the server.jdbc.* properties.

    Thanks.

    Collapse
    #46260

    Ravi Sharma
    Participant

    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…!!!!

    Collapse
    #46256

    Jeff Sposetti
    Moderator

    Thanks.

    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”?

    Collapse
    #46253

    Ravi Sharma
    Participant

    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=http://public-repo-1.hortonworks.com/HDP/centos6/1.x/updates/1.3.2.0, 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
    com.google.inject.ProvisionException: 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
    at org.apache.ambari.server.api.services.AmbariMetaInfo.init(AmbariMetaInfo.java:140)
    at org.apache.ambari.server.api.services.AmbariMetaInfo.class(AmbariMetaInfo.java:67)
    while locating org.apache.ambari.server.api.services.AmbariMetaInfo
    for field at org.apache.ambari.server.controller.AmbariServer.ambariMetaInfo(AmbariServer.java:86)
    at org.apache.ambari.server.controller.AmbariServer.class(AmbariServer.java:86)
    while locating org.apache.ambari.server.controller.AmbariServer

    1 error
    at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:987)
    at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1013)
    at org.apache.ambari.server.controller.AmbariServer.main(AmbariServer.java:449)
    Caused by: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services -

    Collapse
    #46252

    Ravi Sharma
    Participant

    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.security.encryption.CredentialProvider.<init>(CredentialProvider.java:56)
    at org.apache.ambari.server.configuration.Configuration.loadCredentialProvider(Configuration.java:412)
    at org.apache.ambari.server.configuration.Configuration.readPasswordFromStore(Configuration.java:646)
    at org.apache.ambari.server.configuration.Configuration.getDatabasePassword(Configuration.java:598)
    at org.apache.ambari.server.controller.ControllerModule.buildJpaPersistModule(ControllerModule.java:132)
    at org.apache.ambari.server.controller.ControllerModule.configure(ControllerModule.java:75)
    at com.google.inject.AbstractModule.configure(AbstractModule.java:59)
    at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:223)
    at com.google.inject.spi.Elements.getElements(Elements.java:101)
    at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:133)
    at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:103)
    at com.google.inject.Guice.createInjector(Guice.java:95)
    at com.google.inject.Guice.createInjector(Guice.java:72)
    at com.google.inject.Guice.createInjector(Guice.java:62)
    at org.apache.ambari.server.controller.AmbariServer.main(AmbariServer.java:443)
    [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
    >>

    Collapse
    #46248

    Jeff Sposetti
    Moderator

    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?

    Collapse
Viewing 8 replies - 1 through 8 (of 8 total)