Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1754465

Summary: [Satellite 6.6.0 Snap21] Null exception(mozilla.jss.crypto.AlreadyInitializedException)gets after restarting candlepin service.
Product: Red Hat Satellite Reporter: Devendra Singh <desingh>
Component: CandlepinAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: jcallaha
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.6.0CC: nmoumoul, pcreech
Target Milestone: 6.7.0Keywords: Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: candlepin-2.8.1-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1754488 (view as bug list) Environment:
Last Closed: 2020-04-14 13:25:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1754488    
Bug Blocks:    

Description Devendra Singh 2019-09-23 10:53:07 UTC
Description of problem:

Null exception(mozilla.jss.crypto.AlreadyInitializedException)gets after restarting candlepin service.

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

How reproducible:
always

Steps to Reproduce:
1. Restart Katello-service
2. During Candelpin service restart gets Null exception of org.mozilla.jss.crypto.AlreadyInitializedException


Actual results:
Null exception gets after restarting candlepin service

2019-09-23 06:00:00,027 [thread=QuartzScheduler_Worker-4] [job=ActiveEntitlementJob-a4bb88d0-4bb0-46de-b97a-b8023b10383d, org=, csid=] INFO  org.candlepin.pinsetter.tasks.KingpinJob - Starting job: org.candlepin.pinsetter.tasks.ActiveEntitlementJob
2019-09-23 06:00:00,030 [thread=QuartzScheduler_Worker-4] [job=ActiveEntitlementJob-a4bb88d0-4bb0-46de-b97a-b8023b10383d, org=, csid=] INFO  org.candlepin.pinsetter.tasks.KingpinJob - Job completed: time=3
2019-09-23 06:00:00,060 [thread=QuartzScheduler_Worker-5] [job=ExpiredPoolsJob-62c52be1-c383-4d66-b225-99ef1bb36f4d, org=Default_Organization, csid=] INFO  org.candlepin.pinsetter.tasks.KingpinJob - Starting job: org.candlepin.pinsetter.tasks.ExpiredPoolsJob
2019-09-23 06:00:00,073 [thread=QuartzScheduler_Worker-2] [job=SweepBarJob-cce0ab53-3e65-4280-b335-3e7864d443d3, org=, csid=] INFO  org.candlepin.pinsetter.tasks.KingpinJob - Starting job: org.candlepin.pinsetter.tasks.SweepBarJob
2019-09-23 06:00:00,075 [thread=QuartzScheduler_Worker-2] [job=SweepBarJob-cce0ab53-3e65-4280-b335-3e7864d443d3, org=, csid=] INFO  org.candlepin.pinsetter.tasks.KingpinJob - Job completed: time=2
2019-09-23 06:00:00,086 [thread=QuartzScheduler_Worker-5] [job=ExpiredPoolsJob-62c52be1-c383-4d66-b225-99ef1bb36f4d, org=Default_Organization, csid=] INFO  org.candlepin.pinsetter.tasks.KingpinJob - Job completed: time=26
2019-09-23 06:00:54,872 [thread=localhost-startStop-1] [=, org=, csid=] INFO  org.candlepin.guice.CandlepinContextListener - Candlepin initializing context.
2019-09-23 06:00:54,964 [thread=localhost-startStop-1] [=, org=, csid=] WARN  org.candlepin.pki.impl.JSSProviderLoader - CryptoManager was already initialized.
org.mozilla.jss.crypto.AlreadyInitializedException: null
	at org.mozilla.jss.CryptoManager.initialize(CryptoManager.java:949)
	at org.candlepin.pki.impl.JSSProviderLoader.addProvider(JSSProviderLoader.java:106)
	at org.candlepin.guice.CandlepinContextListener.contextInitialized(CandlepinContextListener.java:119)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5127)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5643)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:899)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1260)
	at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:2002)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)


Expected results:
Null exception should not get after restarting the Candlepin services.

Additional info:
Impact of this issue is still unknown.

Comment 3 Nikos Moumoulidis 2019-09-23 12:31:25 UTC
This exception is just noise and has no impact (which is why it is a WARN), and has already been fixed (no longer trying to initialize the CryptoManager twice) in current candlepin master (2.8/2.9) as part of https://github.com/candlepin/candlepin/pull/2400

Comment 5 jcallaha 2019-11-22 22:08:40 UTC
Verified in Satellite 6.7 Snap 2

Service restart does not show the exception.

-bash-4.2# systemctl restart tomcat
-bash-4.2# 
-bash-4.2# systemctl status tomcat
● tomcat.service - Apache Tomcat Web Application Container
   Loaded: loaded (/usr/lib/systemd/system/tomcat.service; enabled; vendor preset: disabled)
   Active: active (running) since Fri 2019-11-22 17:06:44 EST; 8s ago
 Main PID: 20879 (java)
    Tasks: 42
   CGroup: /system.slice/tomcat.service
           └─20879 /usr/lib/jvm/jre/bin/java -Xms1024m -Xmx4096m -classpath /usr/share/tomcat/bin/bootstrap.jar:/usr/share/tomcat/bin/tomcat-juli.jar:/usr/share/java/commons-daemon.jar -D...

Nov 22 17:06:51 <mysathost> server[20879]: Nov 22, 2019 5:06:51 PM com.google.inject.internal.ProxyFactory <init>
Nov 22 17:06:51 <mysathost> server[20879]: WARNING: Method [public void org.candlepin.model.ContentCurator.delete(org.candlepin.model.Persisted)] is synt...
Nov 22 17:06:51 <mysathost> server[20879]: Nov 22, 2019 5:06:51 PM com.google.inject.internal.ProxyFactory <init>
Nov 22 17:06:51 <mysathost> server[20879]: WARNING: Method [public void org.candlepin.model.CdnCurator.delete(org.candlepin.model.Persisted)] is syntheti...
Nov 22 17:06:51 <mysathost> server[20879]: Nov 22, 2019 5:06:51 PM com.google.inject.internal.ProxyFactory <init>
Nov 22 17:06:51 <mysathost> server[20879]: WARNING: Method [public void org.candlepin.model.RulesCurator.delete(org.candlepin.model.Persisted)] is synthe...
Nov 22 17:06:51 <mysathost> server[20879]: Nov 22, 2019 5:06:51 PM com.google.inject.internal.ProxyFactory <init>
Nov 22 17:06:51 <mysathost> server[20879]: WARNING: Method [public org.candlepin.model.Persisted org.candlepin.model.RulesCurator.create(org.candlepin.mo...
Nov 22 17:06:51 <mysathost> server[20879]: Nov 22, 2019 5:06:51 PM com.google.inject.internal.ProxyFactory <init>
Nov 22 17:06:51 <mysathost> server[20879]: WARNING: Method [public void org.candlepin.model.EntitlementCertificateCurator.delete(org.candlepin.model.Pers...
Hint: Some lines were ellipsized, use -l to show in full.

Comment 8 errata-xmlrpc 2020-04-14 13:25:37 UTC
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.

https://access.redhat.com/errata/RHSA-2020:1454