You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by Tom Beerbower <tb...@hortonworks.com> on 2014/09/16 23:44:45 UTC

Review Request 25713: Views : Exception from ambari-server startup, extract views

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

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


Re: Review Request 25713: Views : Exception from ambari-server startup, extract views

Posted by Nate Cole <nc...@hortonworks.com>.
-----------------------------------------------------------
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
> 
>