qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Donner <jdon...@morphodetection.com>
Subject RE: A bug? qpid-stat and qpid-config failing to parse url: admin/morpho@amqps://localhost:5671
Date Thu, 11 Aug 2016 23:52:29 GMT
.. nevermind - it's supposed to be: 

  amqps://admin/morpho@localhost:5671

sorry for the noise

Jeff
________________________________________
From: Jeff Donner [jdonner@morphodetection.com]
Sent: Thursday, August 11, 2016 4:46 PM
To: users@qpid.apache.org
Subject: A bug? qpid-stat and qpid-config failing to parse url: admin/morpho@amqps://localhost:5671

Hi - before I submit a bug I'd like a second opinion. This url:

  admin/morpho@amqps://localhost:5671

.. should be a valid broker url, right?


ssl-cliff$ qpid-config -b admin/morpho@amqps://localhost:5671 --sasl-mechanism=EXTERNAL  --ssl-certificate=ssl_certs/client/tclient-certificate.pem
--ssl-key=ssl_certs/tclient-unencrypted-private.key
Failed: ValueError: admin/morpho@amqps://localhost:5671

ssl-cliff$ qpid-config --broker=admin/morpho@amqps://localhost:5671 --sasl-mechanism=EXTERNAL
 --ssl-certificate=ssl_certs/client/tclient-certificate.pem --ssl-key=ssl_certs/tclient-unencrypted-private.key
Failed: ValueError: admin/morpho@amqps://localhost:5671

ssl-cliff$ qpid-stat --broker=admin/morpho@amqps://localhost:5671 --ssl-certificate=ssl_certs/client/tclient-certificate.pem
--ssl-key=ssl_certs/tclient-unencrypted-private.key -q
Failed: ValueError - admin/morpho@amqps://localhost:5671


Here's the responsible code in util.py - URL.RE is failing to match.


class URL:

  RE = re.compile(r"""
        # [   <scheme>://  ] [    <user>   [   / <password>   ] @]    (
<host4>     | \[    <host6>    \] )  [   :<port>   ]
        ^ (?: ([^:/@]+)://)? (?: ([^:/@]+) (?: / ([^:/@]+)   )? @)? (?: ([^@:/\[]+) | \[ ([a-f0-9:.]+)
\] ) (?: :([0-9]+))?$
""", re.X | re.I)

  AMQPS = "amqps"
  AMQP = "amqp"

  def __init__(self, s=None, **kwargs):
    if s is None:
      self.scheme = kwargs.get('scheme', None)
      self.user = kwargs.get('user', None)
      self.password = kwargs.get('password', None)
      self.host = kwargs.get('host', None)
      self.port = kwargs.get('port', None)
      if self.host is None:
        raise ValueError('Host required for url') ##### Where the ValueError is being thrown
    elif isinstance(s, URL):
      self.scheme = s.scheme
      self.user = s.user
      self.password = s.password
      self.host = s.host
      self.port = s.port
    else:
      match = URL.RE.match(s)
      if match is None:
        raise ValueError(s)
      else:
        self.scheme, self.user, self.password, host4, host6, port = match.groups()

I believe I have the latest released version - qpid-tools-0.32

howto$ rpm -qa | grep qpid
qpid-proton-c-devel-0.12.1-1.fc23.x86_64
python-qpid-proton-0.12.1-1.fc23.x86_64
qpid-cpp-server-0.34-6.fc23.x86_64
qpid-qmf-0.32-1.fc23.x86_64
qpid-proton-c-0.12.1-1.fc23.x86_64
qpid-tools-0.32-9.fc23.noarch
libqpid-dispatch-0.5-2.fc23.x86_64
qpid-dispatch-tools-0.5-2.fc23.x86_64
python-qpid-0.32-13.fc23.noarch
python-qpid-qmf-0.32-1.fc23.x86_64
qpid-cpp-client-0.34-6.fc23.x86_64
qpid-cpp-client-devel-0.34-6.fc23.x86_64
qpid-cpp-client-rdma-0.34-6.fc23.x86_64
qpid-dispatch-router-0.5-2.fc23.x86_64
python-qpid-common-0.32-13.fc23.noarch


Thanks,
Jeff


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Mime
View raw message