Bug 557168 - rhq-register: Entering a non-numeric string for --port parameter results in traceback.
Summary: rhq-register: Entering a non-numeric string for --port parameter results in t...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: Content
Version: unspecified
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
: ---
Assignee: Pradeep Kilambi
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: RHQ_CONT_REPO
TreeView+ depends on / blocked
 
Reported: 2010-01-20 16:08 UTC by Corey Welton
Modified: 2010-08-12 16:53 UTC (History)
0 users

Fixed In Version: 2.4
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-08-12 16:53:59 UTC
Embargoed:


Attachments (Terms of Use)

Description Corey Welton 2010-01-20 16:08:46 UTC
Description of problem:
If user enters a non-numeric string, i.e., "abcde", for the '--port' parameter, a traceback is thrown

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


How reproducible:
Everytime

Steps to Reproduce:
1.  rhq-register --server http://server.example.com --port abcde -m -v --username "rhqadmin" -p"rhqadmin"
2.  View results.

  
Actual results:
Traceback (most recent call last):
  File "/usr/sbin/rhq-register", line 73, in ?
    sys.exit(abs(main() or 0))
  File "/usr/sbin/rhq-register", line 64, in main
    return RhqCli.main()
  File "/usr/share/rhq/registration/RhqCli.py", line 97, in main
    cfg['sudsCacheExpire'])
  File "/usr/share/rhq/registration/rhqServer.py", line 34, in __init__
    self.client = Client(serverURL)
  File "/usr/lib/python2.4/site-packages/suds/client.py", line 109, in __init__
    self.wsdl = Definitions(url, options)
  File "/usr/lib/python2.4/site-packages/suds/wsdl.py", line 172, in __init__
    root = p.parse(url=url).root()
  File "/usr/lib/python2.4/site-packages/suds/sax/parser.py", line 133, in parse
    fp = self.transport.open(Request(url))
  File "/usr/lib/python2.4/site-packages/suds/transport/https.py", line 69, in open
    return  HttpTransport.open(self, request)
  File "/usr/lib/python2.4/site-packages/suds/transport/http.py", line 69, in open
    fp = self.u2open(u2request)
  File "/usr/lib/python2.4/site-packages/suds/transport/http.py", line 131, in u2open
    return self.urlopener.open(u2request)
  File "/usr/lib64/python2.4/urllib2.py", line 358, in open
    response = self._open(req, data)
  File "/usr/lib64/python2.4/urllib2.py", line 376, in _open
    '_open', req)
  File "/usr/lib64/python2.4/urllib2.py", line 337, in _call_chain
    result = func(*args)
  File "/usr/lib64/python2.4/urllib2.py", line 1032, in http_open
    return self.do_open(httplib.HTTPConnection, req)
  File "/usr/lib64/python2.4/urllib2.py", line 990, in do_open
    h = http_class(host) # will parse host:port
  File "/usr/lib64/python2.4/httplib.py", line 592, in __init__
    self._set_hostport(host, port)
  File "/usr/lib64/python2.4/httplib.py", line 604, in _set_hostport
    raise InvalidURL("nonnumeric port: '%s'" % host[i+1:])
httplib.InvalidURL: nonnumeric port: 'abcde'


Expected results:

Something a little more user friendly; try catching the exception.

Additional info:

Comment 2 Corey Welton 2010-02-15 17:30:59 UTC
QA Verified.

Comment 3 Corey Welton 2010-08-12 16:53:59 UTC
Mass-closure of verified bugs against JON.


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