Authentication error when load 0.9 spec

Bug #1341065 reported by Tonal
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
txamqp (Ubuntu)
New
Undecided
Unassigned

Bug Description

Authentication error when load 0.9 spec.

Code for reproduce bug (tx_error.py):
# -*- coding: utf-8 -*-
from twisted.internet.defer import inlineCallbacks
from twisted.internet import reactor
from twisted.internet.protocol import ClientCreator
from twisted.python import log

from txamqp.protocol import AMQClient
from txamqp.client import TwistedDelegate

import txamqp.spec

@inlineCallbacks
def gotConnection(conn, username, password):
    print "Connected to broker."
    yield conn.authenticate(username, password)
    print "Authenticated. Ready to receive messages"

    chan0 = yield conn.channel(0)
    yield chan0.connection_close()

    reactor.stop()

if __name__ == "__main__":

    host = 'localhost'
    port = 5672
    vhost = '/'
    username = 'guest'
    password = 'guest'
    SPEC = 'https://www.rabbitmq.com/resources/specs/amqp0-9.stripped.xml'
    #SPEC = 'https://www.rabbitmq.com/resources/specs/amqp0-9-1.xml'

    spec = txamqp.spec.load(SPEC)

    delegate = TwistedDelegate()

    d = ClientCreator(reactor, AMQClient, delegate=delegate, vhost=vhost,
        spec=spec).connectTCP(host, port)

    d.addCallback(gotConnection, username, password)

    def whoops(err):
        if reactor.running:
            log.err(err)
            reactor.stop()

    d.addErrback(whoops)

    reactor.run()

Console output:
$ python tx-error.py
Connected to broker.
Unhandled Error
Traceback (most recent call last):
Failure: txamqp.client.Closed: [Failure instance: Traceback (failure with no frames): <class 'twisted.internet.error.ConnectionLost'>: Connection to the other side was lost in a non-clean fashion.
]

In last trunk all work Ok.

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: python-txamqp 0.6.1-0ubuntu2
ProcVersionSignature: Ubuntu 3.13.0-30.55-generic 3.13.11.2
Uname: Linux 3.13.0-30-generic x86_64
NonfreeKernelModules: fglrx wl
ApportVersion: 2.14.1-0ubuntu3.2
Architecture: amd64
CurrentDesktop: KDE
Date: Sat Jul 12 14:08:59 2014
InstallationDate: Installed on 2011-12-10 (944 days ago)
InstallationMedia: Kubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
PackageArchitecture: all
SourcePackage: txamqp
UpgradeStatus: Upgraded to trusty on 2014-04-23 (80 days ago)

Revision history for this message
Tonal (tonal-promsoft) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.