Tom Beerbower created AMBARI-7345:
-------------------------------------

             Summary: Views : Exception from ambari-server startup, extract 
views
                 Key: AMBARI-7345
                 URL: https://issues.apache.org/jira/browse/AMBARI-7345
             Project: Ambari
          Issue Type: Bug
            Reporter: Tom Beerbower
            Assignee: Tom Beerbower
             Fix For: 1.7.0


During the system view extraction phase of ambari-server setup, the following 
exception is logged.

The method being used to do the extraction is also setting up the view 
registry.  During setup, only the extraction is required.  Refactor the read 
archive method so that extraction can be done separately.

STR:
* yum install ambari-server
* Run "ambari-server setup -s".  This seems to finish successfully:
{noformat}
...
Initializing database: [  OK  ]

About to start PostgreSQL
Configuring local database...
Connecting to local database...done.
Configuring PostgreSQL...
Restarting PostgreSQL
Extracting system views...
Ambari Server 'setup' completed successfully.
{noformat}

However, there's an ERROR in /var/log/ambari-server/ambari-server.log.

{noformat}
19:43:10,686  INFO [main] Configuration:385 - Generation of file with password
19:43:10,714  INFO [main] Configuration:609 - Hosts Mapping File null
19:43:10,714  INFO [main] HostsMap:60 - Using hostsmap file null
19:43:14,154 ERROR [main] ViewRegistry:1181 - Caught exception reading view 
archives.
com.google.inject.ProvisionException: Guice provision errors:

1) Error in custom provider, java.lang.NullPointerException
  while locating com.google.inject.persist.jpa.AmbariJpaPersistService
  while locating javax.persistence.EntityManager

1 error
        at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:987)
        at org.apache.ambari.server.orm.dao.ViewDAO.findAll(ViewDAO.java:77)
        at 
org.apache.ambari.server.view.ViewRegistry.removeUndeployedViews(ViewRegistry.java:967)
        at 
org.apache.ambari.server.view.ViewRegistry.readViewArchives(ViewRegistry.java:1175)
        at 
org.apache.ambari.server.view.ViewRegistry.main(ViewRegistry.java:230)
Caused by: java.lang.NullPointerException
        at 
com.google.inject.persist.jpa.JpaPersistService.begin(JpaPersistService.java:70)
        at 
com.google.inject.persist.jpa.AmbariJpaPersistService.begin(AmbariJpaPersistService.java:29)
        at 
com.google.inject.persist.jpa.JpaPersistService.get(JpaPersistService.java:50)
        at 
com.google.inject.persist.jpa.AmbariJpaPersistService.get(AmbariJpaPersistService.java:29)
        at 
com.google.inject.persist.jpa.JpaPersistService.get(JpaPersistService.java:34)
        at 
com.google.inject.internal.BoundProviderFactory.get(BoundProviderFactory.java:55)
        at 
com.google.inject.internal.InjectorImpl$4$1.call(InjectorImpl.java:978)
        at 
com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1024)
        at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:974)
        ... 4 more
{noformat}

You can start the server, but you would get 500 on various /views endpoints, 
making view management not possible.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to