question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to connect to azure queues (AmqpMalformedPayloadError)

See original GitHub issue

Hi,

we are using node-amqp10 to receive messages from a queue hosted on Azure Service Bus. This has worked fine for weeks. Since today, our code is failing with the following error:

 AmqpMalformedPayloadError: malformed payload: Unable to decode value of 71 from
 buffer 4210710000000f0000001f0000002f0000003f0000004f0000005f0000006f0000007f00
00008f0000009f000000af000000bf000000cf000000df000000ef000000ff at index 12 of ar
ray

Full logs with debug mode enabled:

amqp10:client connecting to: amqps://ReadWrite:PASSWORDOMMITTED@SERVICEBUSOMMITTED +0ms
  amqp10:transport:tls Connecting to SERVICEBUSOMMITTED:5671 via TLS +25ms
  amqp10:connection Transitioning from DISCONNECTED to START due to connect +2ms

  amqp10:connection Sending Header 414d515003010000 +79ms
  amqp10:connection Transitioning from START to IN_SASL due to connected +0ms
  amqp10:connection Rx: 414d515003010000 +15ms
  amqp10:sasl Server SASL Version: 414d515003010000 vs 414d515003010000 +4ms
  amqp10:connection Rx: 0000003f02010000005340c03201e02f04b3000000074d5353424342
5300000005504c41494e00000009414e4f4e594d4f55530000000845585445524e414c +53ms
  amqp10:sasl Sending ReadWrite:PASSWORDOMMITTED +3m
s
  amqp10:framing sending frame:  +2ms @sasl-init(65) [mechanism='PLAIN' initialR
esponse=<Buffer 00 52 65 61 64 57 72 69 74 65 00 4a 58 6b 61 46 56 53 38 41 5a 7
6 2b 2f 57 55 69 66 38 33 62 47 77 78 6d 56 45 6f 64 4f 39 75 74 6c 7a 7a 48 6c
54 65 ... > hostname=null] : 0000004f02010000005341c04203a305504c41494ea03700526
561645772697465004a586b6146565338415a762b2f575569663833624777786d56456f644f39757
46c7a7a486c5465796a37633d40
  amqp10:connection Rx: 0000001a02010000005344c00d025000a00857656c636f6d6521 +17
ms
  amqp10:connection Sending Header 414d515000010000 +1ms
  amqp10:connection Transitioning from IN_SASL to HDR_SENT due to success +3ms
  amqp10:connection Rx: 414d515000010000 +18ms
  amqp10:connection Server AMQP Version: 414d515000010000 vs 414d515000010000 +1
ms
  amqp10:connection Transitioning from HDR_SENT to HDR_EXCH due to validVersion
+0ms
  amqp10:framing sending frame:  +3ms @open(16) [containerId='conn1467110470297'
hostname='SERVICEBUSOMMITTED' maxFrameSize=429496729
5 channelMax=65535 idleTimeout=120000 outgoingLocales='en-US' incomingLocales='e
n-US' offeredCapabilities=null desiredCapabilities=null properties={}] : 0000007
002000000005310c0630aa111636f6e6e31343637313130343730323937a12d70726f6a656374687
5626572742d6465762d616c65782e736572766963656275732e77696e646f77732e6e657470fffff
fff60ffff700001d4c0a305656e2d5553a305656e2d55534040c10100
  amqp10:connection Transitioning from HDR_EXCH to OPEN_SENT due to sendOpen +15
ms
  amqp10:connection Rx: 0000004702000000005310c03a0aa124633939336636613836623831
34383561386330636532333864393835333962645f473633407000010000601387700003a9804040
404040 +24ms
  amqp10:connection Transitioning from OPEN_SENT to OPENED due to openReceived +
1ms
  amqp10:connection Connected with params { maxFrameSize=65536, channelMax=4999,
idleTimeout=120000 } +1ms
  amqp10:connection Setting heartbeat check timeout to 15000 +0ms
  amqp10:client connected +1ms
  amqp10:session Transitioning from UNMAPPED to BEGIN_SENT due to sendBegin +1ms

  amqp10:framing sending frame:  +1ms @begin(17) [remoteChannel=null nextOutgoin
gId=1 incomingWindow=100 outgoingWindow=100 handleMax=4294967295 offeredCapabili
ties=null desiredCapabilities=null properties={}] : 0000001f02000001005311c01208
4052015264526470ffffffff4040c10100
  amqp10:connection Rx: 0000002102000000005311c0140860000152017000001388526452ff
4040c10100 +17ms
  amqp10:session processing frame:  +1ms @begin(17) [remoteChannel=1 nextOutgoin
gId=1 incomingWindow=5000 outgoingWindow=100 handleMax=255 offeredCapabilities=n
ull desiredCapabilities=null properties={}]
  amqp10:session Transitioning from BEGIN_SENT to MAPPED due to beginReceived +5
ms
  amqp10:session On BEGIN_RCVD, setting params to (1,5000,100,255) +1ms
  amqp10:client mapped +0ms
  amqp10:link undefined:0: Transitioning from DETACHED to ATTACHING due to sendA
ttach +4ms
  amqp10:link attach CH=1, Handle=0 +1ms
  amqp10:framing sending frame:  +0ms @attach(18) [name='orderqueue_fe1c188f-0d2
0-47fc-967e-0377e6c9fdc1' handle=0 role=true sndSettleMode=2 rcvSettleMode=0 sou
rce=@source(40) [address='orderqueue' durable=0 expiryPolicy='session-end' timeo
ut=0 dynamic=false dynamicNodeProperties={} distributionMode=null filter={} defa
ultOutcome=null outcomes=null capabilities=null] target=@target(41) [address='lo
calhost' durable=0 expiryPolicy='session-end' timeout=0 dynamic=false dynamicNod
eProperties={} capabilities=null] unsettled={} incompleteUnsettled=false initial
DeliveryCount=1 maxMessageSize=10000 offeredCapabilities=null desiredCapabilitie
s=null properties={}] : 000000aa02000001005312c09d0ea12f6f7264657271756575655f66
653163313838662d306432302d343766632d393637652d3033373765366339666463314341500250
00005328c0270ba10a6f72646572717565756543a30b73657373696f6e2d656e644342c1010040c1
0100404040005329c02007a1096c6f63616c686f737443a30b73657373696f6e2d656e644342c101
0040c101004252018000000000000027104040c10100
  amqp10:connection Rx: 0000018602000000005312d0000001760000000ea12f6f7264657271
756575655f66653163313838662d306432302d343766632d393637652d3033373765366339666463
31434250025000005328c0270ba10a6f72646572717565756543a30b73657373696f6e2d656e6443
42c1010040c10100404040005329c02007a1096c6f63616c686f737443a30b73657373696f6e2d65
6e644342c10100404040438000000000000037104040c1da08a319636f6d2e6d6963726f736f6674
3a747261636b696e672d6964a1246339393366366138366238313438356138633063653233386439
3835333962645f473633a31b656e61626c652d6d6573736167652d706172746974696f6e696e6741
a3176c6f676963616c2d706172746974696f6e2d636f756e74610100a3186c6f676963616c2d7061
72746974696f6e2d72616e676573e04210710000000f0000001f0000002f0000003f0000004f0000
005f0000006f0000007f0000008f0000009f000000af000000bf000000cf000000df000000ef0000
00ff +19ms

Simplification of our amqp10 code and settings:

var AMQPClient = require('amqp10').Client,
    Policy = require('amqp10').Policy;

var client = new AMQPClient(Policy.ServiceBusQueue, {
    receiverLink: {attach: {receiverSettleMode: 1}}
});

var init = function () {
    return client.connect('queueURIommitted')
        .then(function () {
            return client.createReceiver('queuenameommitted')
                .then(function (receiver) {
                    receiver.on('errorReceived', function (rx_err) {
                        console.error('===> RX ERROR: ', rx_err);
                    });
                    receiver.on('message', function (message) {
                        console.info('received: ', message.body);
                        //doing something with the message
                    });
                    console.info("Queue with name ommitted initialized");
                }, (err)=>{
                    console.error(err);
                    throw err;
                })
        })
};

We’re in touch with Azure just in case it is something on their end, any hints as to how we can circumvent this issue are appreciated

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:25

github_iconTop GitHub Comments

1reaction
mbroadstcommented, Jun 29, 2016

@ragnarol I can! It’s hard to remember to look through closed tickets as well (they look like they’re not a problem anymore) 😄

0reactions
Alex-Wauterscommented, Aug 10, 2016

Hi @jtaubensee, thanks for the invitation, I’ll send our details over linkedIn

Read more comments on GitHub >

github_iconTop Results From Across the Web

Azure Queues failing to connect - Power Platform Community
Solved: I am trying to use the Azure Queues - Put a message on a queue action, ive done this several times in...
Read more >
Azure Functions fails to receive Azure Queue messages [.net ...
Host: Failed to validate Microsoft Azure WebJobs SDK <ServiceBusInstanceName>_RootManageSharedAccessKey_SERVICEBUS connection string. The ...
Read more >
Azure Queue Storage Tutorial - YouTube
Azure Queue Storage is simple yet powerful service for storing large number of ... Your browser can't play this video. ... Want to...
Read more >
Azure.Storage.Queues 12.12.0 - NuGet
This version of library does not encode message by default. V11 and prior versions as well as Azure Functions use base64-encoded messages by...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found