ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nate Cole" <nc...@hortonworks.com>
Subject Re: Review Request 25713: Views : Exception from ambari-server startup, extract views
Date Tue, 16 Sep 2014 22:46:22 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/25713/#review53617
-----------------------------------------------------------

Ship it!


Ship It!

- Nate Cole


On Sept. 16, 2014, 5:44 p.m., Tom Beerbower wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/25713/
> -----------------------------------------------------------
> 
> (Updated Sept. 16, 2014, 5:44 p.m.)
> 
> 
> Review request for Ambari, Nate Cole and Sid Wagle.
> 
> 
> Bugs: AMBARI-7345
>     https://issues.apache.org/jira/browse/AMBARI-7345
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> 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.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java 8f6774e

>   ambari-server/src/main/python/ambari-server.py 319d1d4 
>   ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java eba0c25

>   ambari-server/src/test/java/org/apache/ambari/server/view/configuration/ViewConfigTest.java
0e0ace8 
> 
> Diff: https://reviews.apache.org/r/25713/diff/
> 
> 
> Testing
> -------
> 
> Manual testing.
> 
> New unit test added. All existing unit tests pass.
> 
> Results :
> 
> Tests run: 1990, Failures: 0, Errors: 0, Skipped: 16
> 
> ...
> 
> INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 28:49.041s
> [INFO] Finished at: Tue Sep 16 15:53:40 EDT 2014
> [INFO] Final Memory: 28M/205M
> [INFO] ------------------------------------------------------------------------
> 
> 
> Thanks,
> 
> Tom Beerbower
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message