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 736547

Summary: Error trying to subscribe system to product
Product: Red Hat Satellite Reporter: Jeff Weiss <jweiss>
Component: InfrastructureAssignee: Ivan Necas <inecas>
Status: CLOSED CURRENTRELEASE QA Contact: Katello QA List <katello-qa-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.0.1CC: dajohnso, gstoecke, inecas
Target Milestone: UnspecifiedKeywords: TestBlocker
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: katello-0.1.82-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
f14 candlepin-0.4.13-1.fc14.noarch
Last Closed: 2012-08-22 17:56:19 UTC Type: ---
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:    
Bug Blocks: 747354    

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