Return-Path: X-Original-To: apmail-ambari-dev-archive@www.apache.org Delivered-To: apmail-ambari-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 150D011605 for ; Tue, 16 Sep 2014 22:46:25 +0000 (UTC) Received: (qmail 45251 invoked by uid 500); 16 Sep 2014 22:46:25 -0000 Delivered-To: apmail-ambari-dev-archive@ambari.apache.org Received: (qmail 45215 invoked by uid 500); 16 Sep 2014 22:46:25 -0000 Mailing-List: contact dev-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ambari.apache.org Delivered-To: mailing list dev@ambari.apache.org Received: (qmail 45197 invoked by uid 99); 16 Sep 2014 22:46:24 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Sep 2014 22:46:24 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id BEE1C1DD7A1; Tue, 16 Sep 2014 22:46:22 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============5065800485883897681==" MIME-Version: 1.0 Subject: Re: Review Request 25713: Views : Exception from ambari-server startup, extract views From: "Nate Cole" To: "Nate Cole" , "Sid Wagle" Cc: "Tom Beerbower" , "Ambari" Date: Tue, 16 Sep 2014 22:46:22 -0000 Message-ID: <20140916224622.7800.34214@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org Auto-Submitted: auto-generated Sender: "Nate Cole" X-ReviewGroup: Ambari X-ReviewRequest-URL: https://reviews.apache.org/r/25713/ X-Sender: "Nate Cole" References: <20140916214445.7800.86914@reviews.apache.org> In-Reply-To: <20140916214445.7800.86914@reviews.apache.org> Reply-To: "Nate Cole" X-ReviewRequest-Repository: ambari --===============5065800485883897681== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit ----------------------------------------------------------- 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 > > --===============5065800485883897681==--