Project

General

Profile

Actions

Bug #24641

open

subscription-manager register fails

Added by Martin Angermeier about 6 years ago. Updated about 6 years ago.

Status:
Needs design
Priority:
Normal
Assignee:
Category:
Subscriptions
Target version:
-
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

Hi everybody,

we use Foreman 1.17 with Katello 3.6.0.

As you can see in the screenshot, we got RHEL 7.4 as installed product and RHEL 7.3 as os. If we try to unregister and re-register with subscription-manager unregister && subscription-manager remove --all && subscription-manager clean and subscription-manager register --org="ORG" --activationkey="KEY", we got the following error:

"Required lock is already taken by other running tasks.
Please inspect their state, fix their errors and resume them.

Required lock: update
Conflicts with tasks:
- https://FOREMAN_HOST/foreman_tasks/tasks/236fcfd3-2642-4201-bf82-83172ab52757"

Inspecting the task it has the state "stopped" and result "warning" including the following message:

Runtime Error com.fasterxml.jackson.databind.JsonMappingException: (was java.lang.NullPointerException) (through reference chain: org.candlepin.model.Consumer["installedProducts"]->java.util.HashSet[1]) at org.candlepin.model.ConsumerInstalledProduct.equals:200

Maybe there is a connection between the os version and the product?

Regards,
Martin Angermeier


Files

host_os_vs_product.PNG View host_os_vs_product.PNG 12 KB Martin Angermeier, 08/17/2018 07:29 AM
Capture.PNG View Capture.PNG 18.6 KB Martin Angermeier, 08/22/2018 08:29 AM
Actions #1

Updated by Martin Angermeier about 6 years ago

EDIT: Added missing screenshot

Actions #2

Updated by Martin Angermeier about 6 years ago

  • Subject changed from subscription-manager register fails when os version differs from installed product to subscription-manager register fails

Update: This issue affects new hosts too

It seems that subscription-manager refresh creates the "Update Host" Task in Foreman, this task fails with the above error message but the refresh doesn't recognize that the task has stopped.

Actions #3

Updated by Martin Angermeier about 6 years ago

It's getting weird because the error changed for a different host.

Screenshot attached.

Actions #4

Updated by Andrew Kofink about 6 years ago

  • Status changed from New to Need more information

Could you please reproduce this error and generate/upload a foreman-debug?

Actions #5

Updated by Martin Angermeier about 6 years ago

Foreman-debug is in progress with option -u

Investigating further we recognized that this problem occurs only on RHEL machines, CentOS is working.

Actions #6

Updated by Martin Angermeier about 6 years ago

Edit: rsync failed with "Network is unreachable". As the log is rather large (77MB compressed) and I don't know if it is a good idea to upload this log here,is there an other option?

Actions #7

Updated by Martin Angermeier about 6 years ago

Thats the error log from candlepin, as I mentioned before this happens only to RHEL servers, not CentOS:

2018-08-28 08:35:56,573 [thread=http-bio-8443-exec-4] [req=7d12fd84-9a2c-4249-8585-789e3d6b16b4, org=, csid=3c90e344] ERROR org.candlepin.common.exceptions.mappers.CandlepinExceptionMapper - Runtime Error com.fasterxml.jackson.databind.JsonMappingException: (was java.lang.NullPointerException) (through reference chain: org.candlepin.model.Consumer["installedProducts"]->java.util.HashSet[1]) at org.candlepin.model.ConsumerInstalledProduct.equals:200
org.jboss.resteasy.spi.ReaderException: com.fasterxml.jackson.databind.JsonMappingException: (was java.lang.NullPointerException) (through reference chain: org.candlepin.model.Consumer["installedProducts"]->java.util.HashSet[1])
at org.jboss.resteasy.core.MessageBodyParameterInjector.inject(MessageBodyParameterInjector.java:183) ~[resteasy-jaxrs-3.0.10.Final.jar:na]
at org.jboss.resteasy.core.MethodInjectorImpl.injectArguments(MethodInjectorImpl.java:89) ~[resteasy-jaxrs-3.0.10.Final.jar:na]
at org.candlepin.resteasy.filter.VerifyAuthorizationFilter.getArguments(VerifyAuthorizationFilter.java:123) ~[VerifyAuthorizationFilter.class:na]
at org.candlepin.resteasy.filter.VerifyAuthorizationFilter.runFilter(VerifyAuthorizationFilter.java:93) ~[VerifyAuthorizationFilter.class:na]
at org.candlepin.resteasy.filter.AbstractAuthorizationFilter.filter(AbstractAuthorizationFilter.java:56) ~[AbstractAuthorizationFilter.class:na]
at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:264) ~[resteasy-jaxrs-3.0.10.Final.jar:na]
at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:250) ~[resteasy-jaxrs-3.0.10.Final.jar:na]
at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:237) ~[resteasy-jaxrs-3.0.10.Final.jar:na]
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356) [resteasy-jaxrs-3.0.10.Final.jar:na]
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:179) [resteasy-jaxrs-3.0.10.Final.jar:na]
at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:220) [resteasy-jaxrs-3.0.10.Final.jar:na]
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56) [resteasy-jaxrs-3.0.10.Final.jar:na]
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51) [resteasy-jaxrs-3.0.10.Final.jar:na]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731) [tomcat-servlet-3.0-api.jar:na]
at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:263) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:178) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:62) [guice-servlet-3.0.jar:na]
at org.candlepin.servlet.filter.EventFilter.doFilter(EventFilter.java:61) [EventFilter.class:na]
at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) [guice-servlet-3.0.jar:na]
at org.candlepin.servlet.filter.ContentTypeHackFilter.doFilter(ContentTypeHackFilter.java:58) [ContentTypeHackFilter.class:na]
at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) [guice-servlet-3.0.jar:na]
at org.candlepin.common.filter.LoggingFilter.doFilter(LoggingFilter.java:112) [candlepin-common-2.0.3.jar:na]
at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) [guice-servlet-3.0.jar:na]
at org.candlepin.servlet.filter.CandlepinPersistFilter.doFilter(CandlepinPersistFilter.java:48) [CandlepinPersistFilter.class:na]
at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) [guice-servlet-3.0.jar:na]
at org.candlepin.servlet.filter.CandlepinScopeFilter.doFilter(CandlepinScopeFilter.java:68) [CandlepinScopeFilter.class:na]
at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113) [guice-servlet-3.0.jar:na]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [catalina.jar:7.0.76]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [catalina.jar:7.0.76]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:218) [catalina.jar:7.0.76]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110) [catalina.jar:7.0.76]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:506) [catalina.jar:7.0.76]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169) [catalina.jar:7.0.76]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) [catalina.jar:7.0.76]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) [catalina.jar:7.0.76]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445) [catalina.jar:7.0.76]
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1087) [tomcat-coyote.jar:7.0.76]
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637) [tomcat-coyote.jar:7.0.76]
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316) [tomcat-coyote.jar:7.0.76]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_171]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_171]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-coyote.jar:7.0.76]
at java.lang.Thread.run(Thread.java:748) [na:1.8.0_171]
Caused by: com.fasterxml.jackson.databind.JsonMappingException: (was java.lang.NullPointerException) (through reference chain: org.candlepin.model.Consumer["installedProducts"]->java.util.HashSet[1])
at com.fasterxml.jackson.databind.JsonMappingException.wrapWithPath(JsonMappingException.java:210) ~[jackson-databind-2.4.5.jar:2.4.5]
at com.fasterxml.jackson.databind.JsonMappingException.wrapWithPath(JsonMappingException.java:189) ~[jackson-databind-2.4.5.jar:2.4.5]
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:249) ~[jackson-databind-2.4.5.jar:2.4.5]
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:206) ~[jackson-databind-2.4.5.jar:2.4.5]
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:25) ~[jackson-databind-2.4.5.jar:2.4.5]
at com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:538) ~[jackson-databind-2.4.5.jar:2.4.5]
at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:99) ~[jackson-databind-2.4.5.jar:2.4.5]
at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:238) ~[jackson-databind-2.4.5.jar:2.4.5]
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:118) ~[jackson-databind-2.4.5.jar:2.4.5]
at com.fasterxml.jackson.databind.ObjectReader._bind(ObjectReader.java:1232) ~[jackson-databind-2.4.5.jar:2.4.5]
at com.fasterxml.jackson.databind.ObjectReader.readValue(ObjectReader.java:676) ~[jackson-databind-2.4.5.jar:2.4.5]
at com.fasterxml.jackson.jaxrs.base.ProviderBase.readFrom(ProviderBase.java:808) ~[jackson-jaxrs-base-2.4.5.jar:2.4.5]
at org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.readFrom(AbstractReaderInterceptorContext.java:59) ~[resteasy-jaxrs-3.0.10.Final.jar:na]
at org.jboss.resteasy.core.interception.ServerReaderInterceptorContext.readFrom(ServerReaderInterceptorContext.java:62) ~[resteasy-jaxrs-3.0.10.Final.jar:na]
at org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.proceed(AbstractReaderInterceptorContext.java:51) ~[resteasy-jaxrs-3.0.10.Final.jar:na]
at org.jboss.resteasy.plugins.interceptors.encoding.GZIPDecodingInterceptor.aroundReadFrom(GZIPDecodingInterceptor.java:59) ~[resteasy-jaxrs-3.0.10.Final.jar:na]
at org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.proceed(AbstractReaderInterceptorContext.java:53) ~[resteasy-jaxrs-3.0.10.Final.jar:na]
at org.jboss.resteasy.core.MessageBodyParameterInjector.inject(MessageBodyParameterInjector.java:150) ~[resteasy-jaxrs-3.0.10.Final.jar:na]
... 50 common frames omitted
Caused by: java.lang.NullPointerException: null
at org.candlepin.model.ConsumerInstalledProduct.equals(ConsumerInstalledProduct.java:200) ~[ConsumerInstalledProduct.class:na]
at java.util.HashMap.putVal(HashMap.java:635) ~[na:1.8.0_171]
at java.util.HashMap.put(HashMap.java:612) ~[na:1.8.0_171]
at java.util.HashSet.add(HashSet.java:220) ~[na:1.8.0_171]
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:239) ~[jackson-databind-2.4.5.jar:2.4.5]
... 65 common frames omitted
2018-08-28 08:35:56,573 [thread=http-bio-8443-exec-4] [req=7d12fd84-9a2c-4249-8585-789e3d6b16b4, org=, csid=3c90e344] WARN org.candlepin.audit.EventSinkImpl - Rolling back hornetq transaction.

Actions #8

Updated by John Mitsch about 6 years ago

  • Category set to Subscriptions
  • Status changed from Need more information to Needs design
  • Assignee set to Andrew Kofink
  • Team Backlog Brad added
Actions #9

Updated by Jonathon Turel about 6 years ago

  • Triaged changed from No to Yes
Actions

Also available in: Atom PDF