Bug 828899 - Candlepin fails to configure during Initial configuration
Candlepin fails to configure during Initial configuration
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Installer (Show other bugs)
6.0.0
Unspecified Unspecified
unspecified Severity urgent (vote)
: Unspecified
: --
Assigned To: Katello Bug Bin
Katello QA List
: ZStream
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-05 10:50 EDT by Og Maciel
Modified: 2014-09-18 11:31 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-07-10 03:25:33 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Og Maciel 2012-06-05 10:50:38 EDT
Description of problem:

Candlepin fails to configure during Initial configuration

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
Starting Katello configuration
The top-level log file is [/var/log/katello/katello-configure-20120605-101448/main.log]
Creating Katello database user
############################################################ ... OK
Creating Katello database
############################################################ ... OK
Creating Candlepin database user
############################################################ ... OK
Creating Candlepin database
############################################################ ... OK
Candlepin setup
  Failed, please check [/var/log/katello/katello-configure/cpsetup.log]
[1;35merr: /Stage[main]/Apache2/Exec[reload-apache2]: Failed to call refresh: /etc/init.d/httpd reload returned 7 instead of one of [0] at /usr/share/katello/install/puppet/modules/apache2/manifests/init.pp:14[0m



########## ERROR ############
Error running command: wget -qO- http://localhost:8080/candlepin/admin/init
Status code: 2048
Command output: 
Writing configuration file
Cerficiates already exist, skipping...
Waiting for tomcat to restart...
Waiting for tomcat to restart...
Waiting for tomcat to restart...
Waiting for tomcat to restart...
Traceback (most recent call last):
  File "/usr/share/candlepin/cpsetup", line 221, in <module>
    main(sys.argv[1:])
  File "/usr/share/candlepin/cpsetup", line 216, in main
    run_command("wget -qO- http://localhost:8080/candlepin/admin/init")
  File "/usr/share/candlepin/cpsetup", line 42, in run_command
    raise Exception("Error running command")
Exception: Error running command
  
Actual results:


Expected results:


Additional info:
Comment 2 Jeff Weiss 2012-06-05 10:53:06 EDT
Root cause of this appears to be in catalina.out:


SEVERE: Exception sending context initialized event to listener instance of class org.candlepin.guice.CandlepinContextListener
com.google.inject.CreationException: Guice creation errors:

1) Error in custom provider, java.lang.NullPointerException
  while locating com.google.inject.persist.jpa.JpaPersistService
  while locating javax.persistence.EntityManager
  at org.candlepin.policy.js.JsRulesProvider.<init>(JsRulesProvider.java:73)
  at org.candlepin.guice.CandlepinModule.configure(CandlepinModule.java:176)
  while locating org.candlepin.policy.js.JsRulesProvider
Caused by: java.lang.NullPointerException
        at com.google.inject.persist.jpa.JpaPersistService.begin(JpaPersistService.java:70)
        at com.google.inject.persist.jpa.JpaPersistService.get(JpaPersistService.java:50)
        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:1031)
        at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:974)
        at org.candlepin.model.AbstractHibernateCurator.getEntityManager(AbstractHibernateCurator.java:150)
        at org.candlepin.model.RulesCurator.getUpdatedFromDB(RulesCurator.java:72)
        at org.candlepin.model.RulesCurator.getUpdated(RulesCurator.java:89)
        at org.candlepin.policy.js.JsRulesProvider.compileRules(JsRulesProvider.java:97)
        at org.candlepin.policy.js.JsRulesProvider.<init>(JsRulesProvider.java:78)
        at org.candlepin.policy.js.JsRulesProvider$$FastClassByGuice$$5e90dba6.newInstance(<generated>)
        at com.google.inject.internal.cglib.reflect.$FastConstructor.newInstance(FastConstructor.java:40)
        at com.google.inject.internal.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:60)
        at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:85)
        at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:254)
        at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
        at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1031)
        at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
        at com.google.inject.Scopes$1$1.get(Scopes.java:65)
        at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
        at com.google.inject.internal.InternalInjectorCreator$1.call(InternalInjectorCreator.java:204)
        at com.google.inject.internal.InternalInjectorCreator$1.call(InternalInjectorCreator.java:198)
        at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1024)
        at com.google.inject.internal.InternalInjectorCreator.loadEagerSingletons(InternalInjectorCreator.java:198)
        at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:179)
        at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:109)
        at com.google.inject.Guice.createInjector(Guice.java:95)
        at com.google.inject.Guice.createInjector(Guice.java:72)
        at org.candlepin.guice.CandlepinContextListener.contextInitialized(CandlepinContextListener.java:78)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3972)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4467)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)
        at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1041)
        at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:964)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
        at org.apache.catalina.core.StandardService.start(StandardService.java:516)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:593)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Comment 3 Mike McCune 2012-06-05 10:54:06 EDT
WORKAROUND:

after the failure run:

/usr/share/candlepin/cpdb --drop --create

and re-run:

katello-configure
Comment 4 James Laska 2012-06-05 13:10:19 EDT
(In reply to comment #0)
> Additional info:

Just adding some extra flavor to comment#0 ... 

This bug was found while testing content expected to land in 1.0.1.  This failure is not present on 1.0.0.
Comment 8 James Laska 2012-06-11 12:59:18 EDT
VERIFIED while testing CloudForms SE integration for 1.0.1 (katello-configure.noarch 0:0.1.110-1.el6_3).

https://beaker.engineering.redhat.com/jobs/246228

> ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
> :: [   LOG    ] :: Configure CFSE
> ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
> 
> Starting Katello configuration
> The top-level log file is [/var/log/katello/katello-configure-20120611-123129/main.log]
> Creating Katello database user
> ############################################################ ... OK
> Creating Katello database
> ############################################################ ... OK
> Creating Candlepin database user
> ############################################################ ... OK
> Candlepin setup
> ############################################################ ... OK
> Populating Katello database schema
> ############################################################ ... OK
> Initializing Katello data
> ############################################################ ... OK
> :: [   PASS   ] :: Configuring CF SE ("katello-configure")


Holding off on moving to VERIFIED until the errata tool has moved this issue to ON_QA.
Comment 11 James Laska 2012-06-12 12:08:20 EDT
Marking as VERIFIED based on comments #8 (tested) and #9 (in advisory)
Comment 15 James Laska 2012-06-19 15:41:49 EDT
back to VERIFIED

Fix confirmed using katello-configure-0.1.110-1.el6_3
The current 1.0.1 puddle contains katello-configure-0.1.110-1.el6_3

We're good to go on this issue.
Comment 17 errata-xmlrpc 2012-07-10 03:25:33 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2012-1062.html
Comment 18 ray 2012-07-25 16:27:42 EDT
Hi Guys, 

This is still happening . Tried it on RHEL6, fc15& 16 and still getting the same error. 

Can someone please help ...


[root@patch ~]# katello-configure
Starting Katello configuration
The top-level log file is [/var/log/katello/katello-configure-20120725-161810/main.log]
Creating Katello database user
############################################################ ... OK
Creating Katello database
############################################################ ... OK
Creating Candlepin database user
############################################################ ... OK
Candlepin setup
############################################################ ... OK
Populating Katello database schema
############################################################ ... OK
Initializing Katello data
###########################################################
  Failed, please check [/var/log/katello/katello-configure/db_seed.log]
Comment 19 ray 2012-07-25 16:54:07 EDT
THIS DOESN'T WORK
Comment 20 Garik Khachikyan 2012-07-26 04:51:47 EDT
Hello,

Could you please run /usr/share/katello/script/katello-debug --notar and post the 
package version please (like: `cat /tmp/katello-debug-20120726045051/packages`) ?
Comment 21 ray 2012-07-26 05:20:14 EDT
Interesting, I just re-installed it and it looks like its working. 


[root@katello ~]# cat /tmp/katello-debug-20120726101557/packages 
katello-common-0.2.45-1.fc16.noarch
katello-glue-foreman-0.2.45-1.fc16.noarch
katello-cli-common-0.2.43-1.fc16.noarch
katello-configure-0.2.30-1.fc16.noarch
pulp-1.1.11-1.fc16.noarch
katello-qpid-client-key-pair-1.0-1.noarch
qpid-cpp-server-0.12-4.fc16.2.x86_64
python-oauth2-1.5.170-2.pulp.fc16.noarch
python-isodate-0.4.4-4.pulp.fc16.noarch
katello-repos-0.2.6-1.fc16.noarch
m2crypto-0.21.1.pulp-7.fc16.x86_64
katello-glue-pulp-0.2.45-1.fc16.noarch
katello-glue-candlepin-0.2.45-1.fc16.noarch
katello-0.2.45-1.fc16.noarch
pulp-common-1.1.11-1.fc16.noarch
candlepin-tomcat6-0.7.2-1.fc16.noarch
katello-cli-0.2.43-1.fc16.noarch
katello-certs-tools-1.1.6-1.fc16.noarch
katello-all-0.2.45-1.fc16.noarch
katello-qpid-broker-key-pair-1.0-1.noarch
qpid-cpp-client-0.12-4.fc16.2.x86_64
qpid-cpp-client-ssl-0.12-4.fc16.2.x86_64
python-qpid-0.12-1.fc16.noarch
katello-selinux-0.2.6-1.fc16.noarch
mod_wsgi-3.3-3.pulp.fc16.x86_64
candlepin-0.7.2-1.fc16.noarch
pulp-selinux-server-1.1.11-1.fc16.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
qpid-cpp-server-ssl-0.12-4.fc16.2.x86_64


Had to run katello-configure multiple times though...


Thanks so much for looking into this.


Best
Comment 22 Garik Khachikyan 2012-07-26 05:34:43 EDT
You're welcome. 

Good to hear you have the issue resolved.

Our guys were doing some changes on katello-configure - might be you hit some intermediate error there.

Fedorahosted rpms (https://fedorahosted.org/katello/wiki/Install) should be more stable than the nightly (or git) builds.

But the issues with katello-configure should get resolved now. I have a job running on nightly rpms built from github: looking also fine.

Best,
Garik

Note You need to log in before you can comment on or make changes to this bug.