Bug 736547 - Error trying to subscribe system to product
Summary: Error trying to subscribe system to product
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Infrastructure
Version: 6.0.1
Hardware: Unspecified
OS: Unspecified
unspecified
medium vote
Target Milestone: Unspecified
Assignee: Ivan Necas
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks: katello-blockers
TreeView+ depends on / blocked
 
Reported: 2011-09-08 01:50 UTC by Jeff Weiss
Modified: 2014-11-09 22:51 UTC (History)
3 users (show)

Fixed In Version: katello-0.1.82-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
f14 candlepin-0.4.13-1.fc14.noarch
Last Closed: 2012-08-22 17:56:19 UTC


Attachments (Terms of Use)

Description Jeff Weiss 2011-09-08 01:50:56 UTC
Description of problem:


Version-Release number of selected component (if applicable):
katello-0.1.76-1.git.48.ee25bad.fc14.noarch

How reproducible:


Steps to Reproduce:
1. Register a system (or add it with the API)
2. Add a provider with a product
3. Subscribe the system to the product
  
Actual results:
Error notification: Candlepin::Consumer: 400 Bad Request {"displayMessage":"Bad Request"} (POST /candlepin/consumers/99929bdc-33cf-47ab-9af4-78cbd7108806/entitlements?pool=8a90f86f3245a290013245a6a875002b&quantity=)

Expected results:
Success

Additional info:
From katello log: 
Started POST "/systems/2/update_subscriptions" for 10.11.11.252 at Wed Sep 07 21:46:08 -0400 2011
  Processing by SystemsController#update_subscriptions as JS
  Parameters: {"commit"=>"Subscribe", "system"=>{"8a90f86f3245a290013245a6a875002b"=>"false"}, "authenticity_token"=>"FURSqe4UvlyShw5B2aApxA1QQQJcQRBGFbuP3DxCQj8=", "utf8"=>"✓", "id"=>"2", "spinner"=>{"8a90f86f3245a290013245a6d3de0037"=>"", "8a90f86f3245a290013245a6cffa0034"=>"", "8a90f86f3245a290013245a67495001e"=>"", "8a90f86f3245a290013245a6ac35002e"=>"", "8a90f86f3245a290013245a6a875002b"=>"", "8a90f86f3245a290013245a684300025"=>"", "8a90f86f3245a290013245a6ccfe0031"=>"", "8a90f86f3245a290013245a6862a0028"=>""}}
Subscribing to pool '8a90f86f3245a290013245a6a875002b' for : newsystem-1315428510634
Rendered text template (0.0ms)
Completed 200 OK in 57ms (Views: 1.6ms | ActiveRecord: 1.7ms)




From cp log: 
Sep 07 21:46:08 [http-8443-2] DEBUG org.fedoraproject.candlepin.servlet.filter.logging.LoggingFilter -
Request: POST  https://localhost:8443/candlepin/consumers/99929bdc-33cf-47ab-9af4-78cbd7108806/entitlements?pool=8a90f86f3245a290013245a6a875002b&quantity=
====Headers====
  accept: */*; q=0.5, application/xml
  content-type: application/json
  accept-encoding: gzip, deflate
  cp-user: admin
  authorization: OAuth oauth_body_hash="2jmj7l5rSw0yVb%2FvlWAYkK%2FYBwk%3D", oauth_consumer_key="katello", oauth_nonce="CnnV7boARzGnTiNLTSStnYPm5xYxh7NspkCt0elLnw", oauth_signature="snJ5JgLBq3i4hOevGJnhCY7Lc7c%3D", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1315446368", oauth_version="1.0"
  content-length: 0
  host: localhost:8443
====Headers====

Sep 07 21:46:08 [http-8443-2] ERROR org.fedoraproject.candlepin.exceptions.CandlepinExceptionMapper - Runtime exception:
org.jboss.resteasy.spi.BadRequestException: Unable to extract parameter from http request: javax.ws.rs.QueryParam("quantity") value is '' for public javax.ws.rs.core.Response org.fedoraproject.candlepin.resource.ConsumerResource.bind(java.lang.String,java.lang.String,java.lang.String[],java.lang.Integer,java.lang.String,java.lang.String,boolean)
        at org.jboss.resteasy.core.StringParameterInjector.extractValue(StringParameterInjector.java:259)
        at org.jboss.resteasy.core.StringParameterInjector.extractValues(StringParameterInjector.java:210)
        at org.jboss.resteasy.core.QueryParamInjector.inject(QueryParamInjector.java:49)
        at org.jboss.resteasy.core.MethodInjectorImpl.injectArguments(MethodInjectorImpl.java:114)
        at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:137)
        at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:248)
        at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:216)
        at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:205)
        at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:489)
        at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:466)
        at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:120)
        at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:200)
        at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:48)
        at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:43)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:216)
        at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:141)
        at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:93)
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:63)
        at org.fedoraproject.candlepin.servlet.filter.VersionFilter.doFilter(VersionFilter.java:47)
        at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:129)
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:59)
        at org.fedoraproject.candlepin.servlet.filter.logging.LoggingFilter.doFilter(LoggingFilter.java:55)
        at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:129)
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:59)
        at com.wideplay.warp.persist.PersistenceFilter$3.run(PersistenceFilter.java:141)
        at com.wideplay.warp.persist.internal.Lifecycles.failEarlyAndLeaveNoOneBehind(Lifecycles.java:29)
        at com.wideplay.warp.persist.PersistenceFilter.doFilter(PersistenceFilter.java:155)
        at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:129)
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:59)
        at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:122)
        at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:110)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Thread.java:636)
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
        at org.jboss.resteasy.core.StringParameterInjector.extractValue(StringParameterInjector.java:247)
        ... 43 more
Caused by: java.lang.NumberFormatException: For input string: ""
        at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
        at java.lang.Integer.parseInt(Integer.java:493)
        at java.lang.Integer.<init>(Integer.java:636)
        ... 48 more

Comment 1 Ivan Necas 2011-09-19 09:16:51 UTC
This was probably a problem with UI and was already fixed. When testing against version katello-0.1.82-1, I was not able to reproduce the error.

Comment 2 Jeff Weiss 2011-09-26 20:16:32 UTC
Verified, katello-0.1.84-1.git.26.51fa1e1.fc14.noarch

Comment 5 Mike McCune 2013-08-16 18:15:05 UTC
getting rid of 6.0.0 version since that doesn't exist


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