You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Armin Noll (JIRA)" <qp...@incubator.apache.org> on 2009/10/07 10:40:31 UTC

[jira] Created: (QPID-2131) qpid-stat produces error when using clustering and authentication

qpid-stat produces error when using clustering and authentication
-----------------------------------------------------------------

                 Key: QPID-2131
                 URL: https://issues.apache.org/jira/browse/QPID-2131
             Project: Qpid
          Issue Type: Bug
          Components: python tools
    Affects Versions: M4
         Environment: Red Hat Enterprise MRG 1.1
            Reporter: Armin Noll
            Priority: Minor


When a broker is running as a member of a cluster and it has authentication enabled then running qpid-stat with a valid broker address of form username/password@host:port leads to the following error:
Failed: TypeError - int argument required
 
This is caused by a call to addBroker in method display of the BrokerManager class. As first argument the variable "host" is specified here which does not contain username and password, only hostname and port number.
Therefore authentication fails and the mentioned error message is displayed.
 
For us the following fix works:
We replaced this code
            for host in hostList:
                b = self.qmf.addBroker(host, _connTimeout)
by this
            authString = _host.split("@")
            if len(authString[0]) > 0:
                authString[0] = authString[0] + "@"
            for host in hostList:
                b = self.qmf.addBroker(authString[0] + host, _connTimeout) 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] Updated: (QPID-2131) qpid-stat produces error when using clustering and authentication

Posted by "Armin Noll (JIRA)" <qp...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-2131?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Armin Noll updated QPID-2131:
-----------------------------

       Priority: Major  (was: Minor)
    Description: 
When a broker is running as a member of a cluster and it has authentication enabled then running qpid-stat with a valid broker address of form username/password@host:port leads to the following error:
Failed: TypeError - int argument required
 
This is caused by a call to addBroker in method display of the BrokerManager class. As first argument the variable "host" is specified here which does not contain username and password, only hostname and port number.
Therefore authentication fails and the mentioned error message is displayed.
 
For us the following fix works:
We replaced this code
            for host in hostList:
                b = self.qmf.addBroker(host, _connTimeout)
by this
            authString = _host.split("@")
            if len(authString[0]) > 0:
                authString[0] = authString[0] + "@"
            for host in hostList:
                b = self.qmf.addBroker(authString[0] + host, _connTimeout) 


The error has also been reported as service request no 1959240 at Red Hat's support system.

  was:
When a broker is running as a member of a cluster and it has authentication enabled then running qpid-stat with a valid broker address of form username/password@host:port leads to the following error:
Failed: TypeError - int argument required
 
This is caused by a call to addBroker in method display of the BrokerManager class. As first argument the variable "host" is specified here which does not contain username and password, only hostname and port number.
Therefore authentication fails and the mentioned error message is displayed.
 
For us the following fix works:
We replaced this code
            for host in hostList:
                b = self.qmf.addBroker(host, _connTimeout)
by this
            authString = _host.split("@")
            if len(authString[0]) > 0:
                authString[0] = authString[0] + "@"
            for host in hostList:
                b = self.qmf.addBroker(authString[0] + host, _connTimeout) 


> qpid-stat produces error when using clustering and authentication
> -----------------------------------------------------------------
>
>                 Key: QPID-2131
>                 URL: https://issues.apache.org/jira/browse/QPID-2131
>             Project: Qpid
>          Issue Type: Bug
>          Components: python tools
>    Affects Versions: M4
>         Environment: Red Hat Enterprise MRG 1.1
>            Reporter: Armin Noll
>
> When a broker is running as a member of a cluster and it has authentication enabled then running qpid-stat with a valid broker address of form username/password@host:port leads to the following error:
> Failed: TypeError - int argument required
>  
> This is caused by a call to addBroker in method display of the BrokerManager class. As first argument the variable "host" is specified here which does not contain username and password, only hostname and port number.
> Therefore authentication fails and the mentioned error message is displayed.
>  
> For us the following fix works:
> We replaced this code
>             for host in hostList:
>                 b = self.qmf.addBroker(host, _connTimeout)
> by this
>             authString = _host.split("@")
>             if len(authString[0]) > 0:
>                 authString[0] = authString[0] + "@"
>             for host in hostList:
>                 b = self.qmf.addBroker(authString[0] + host, _connTimeout) 
> The error has also been reported as service request no 1959240 at Red Hat's support system.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] Assigned: (QPID-2131) qpid-stat produces error when using clustering and authentication

Posted by "Nuno Santos (JIRA)" <qp...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-2131?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nuno Santos reassigned QPID-2131:
---------------------------------

    Assignee: Nuno Santos

> qpid-stat produces error when using clustering and authentication
> -----------------------------------------------------------------
>
>                 Key: QPID-2131
>                 URL: https://issues.apache.org/jira/browse/QPID-2131
>             Project: Qpid
>          Issue Type: Bug
>          Components: python tools
>    Affects Versions: M4
>         Environment: Red Hat Enterprise MRG 1.1
>            Reporter: Armin Noll
>            Assignee: Nuno Santos
>
> When a broker is running as a member of a cluster and it has authentication enabled then running qpid-stat with a valid broker address of form username/password@host:port leads to the following error:
> Failed: TypeError - int argument required
>  
> This is caused by a call to addBroker in method display of the BrokerManager class. As first argument the variable "host" is specified here which does not contain username and password, only hostname and port number.
> Therefore authentication fails and the mentioned error message is displayed.
>  
> For us the following fix works:
> We replaced this code
>             for host in hostList:
>                 b = self.qmf.addBroker(host, _connTimeout)
> by this
>             authString = _host.split("@")
>             if len(authString[0]) > 0:
>                 authString[0] = authString[0] + "@"
>             for host in hostList:
>                 b = self.qmf.addBroker(authString[0] + host, _connTimeout) 
> The error has also been reported as service request no 1959240 at Red Hat's support system.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] Resolved: (QPID-2131) qpid-stat produces error when using clustering and authentication

Posted by "Nuno Santos (JIRA)" <qp...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-2131?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nuno Santos resolved QPID-2131.
-------------------------------

    Resolution: Fixed

Fixed at svn rev 827701.

Btw, there was an issue with the patch/suggestion above (failed in case the auth was not provided), so I ended up coding an alternative solution, the patch was not used.

> qpid-stat produces error when using clustering and authentication
> -----------------------------------------------------------------
>
>                 Key: QPID-2131
>                 URL: https://issues.apache.org/jira/browse/QPID-2131
>             Project: Qpid
>          Issue Type: Bug
>          Components: python tools
>    Affects Versions: M4
>         Environment: Red Hat Enterprise MRG 1.1
>            Reporter: Armin Noll
>            Assignee: Nuno Santos
>
> When a broker is running as a member of a cluster and it has authentication enabled then running qpid-stat with a valid broker address of form username/password@host:port leads to the following error:
> Failed: TypeError - int argument required
>  
> This is caused by a call to addBroker in method display of the BrokerManager class. As first argument the variable "host" is specified here which does not contain username and password, only hostname and port number.
> Therefore authentication fails and the mentioned error message is displayed.
>  
> For us the following fix works:
> We replaced this code
>             for host in hostList:
>                 b = self.qmf.addBroker(host, _connTimeout)
> by this
>             authString = _host.split("@")
>             if len(authString[0]) > 0:
>                 authString[0] = authString[0] + "@"
>             for host in hostList:
>                 b = self.qmf.addBroker(authString[0] + host, _connTimeout) 
> The error has also been reported as service request no 1959240 at Red Hat's support system.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] Commented: (QPID-2131) qpid-stat produces error when using clustering and authentication

Posted by "Nuno Santos (JIRA)" <qp...@incubator.apache.org>.
    [ https://issues.apache.org/jira/browse/QPID-2131?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12765722#action_12765722 ] 

Nuno Santos commented on QPID-2131:
-----------------------------------

Armin,

I appreciate the patch, but could you please submit it as an attachment and make sure to check the "Grant license to ASF" checkbox, so that it can be properly applied to the code?

Thank you,
nuno


> qpid-stat produces error when using clustering and authentication
> -----------------------------------------------------------------
>
>                 Key: QPID-2131
>                 URL: https://issues.apache.org/jira/browse/QPID-2131
>             Project: Qpid
>          Issue Type: Bug
>          Components: python tools
>    Affects Versions: M4
>         Environment: Red Hat Enterprise MRG 1.1
>            Reporter: Armin Noll
>            Assignee: Nuno Santos
>
> When a broker is running as a member of a cluster and it has authentication enabled then running qpid-stat with a valid broker address of form username/password@host:port leads to the following error:
> Failed: TypeError - int argument required
>  
> This is caused by a call to addBroker in method display of the BrokerManager class. As first argument the variable "host" is specified here which does not contain username and password, only hostname and port number.
> Therefore authentication fails and the mentioned error message is displayed.
>  
> For us the following fix works:
> We replaced this code
>             for host in hostList:
>                 b = self.qmf.addBroker(host, _connTimeout)
> by this
>             authString = _host.split("@")
>             if len(authString[0]) > 0:
>                 authString[0] = authString[0] + "@"
>             for host in hostList:
>                 b = self.qmf.addBroker(authString[0] + host, _connTimeout) 
> The error has also been reported as service request no 1959240 at Red Hat's support system.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org