[ServiceBus] Can't retrieve message: ECONNRESET error
See original GitHub issueHi there,
I’m trying to use the Service Bus from the NodeJS SDK… but get some errors on retrieving messages posted.
My package.json dependency:
"dependencies": {
"azure": "^0.9.11"
}
NodeJS version: 0.10.29 Here is my simplified code:
var azure = require('azure');
var azureServiceBus = azure.createServiceBusService();
azureServiceBus.sendTopicMessage('default', 'test', function(err) {
if (err) {
console.log(process.pid + " - " + 'sendTopicMessage failed: ' + JSON.stringify(err));
} else {
console.log('Sent!!!');
console.log('Retrieving message');
azureServiceBus.receiveSubscriptionMessage('default', 'my_subscription', function(err, receivedMessage) {
if (err) {
if (err !== 'No messages to receive') {
console.log(process.pid + " - " + 'Error receiving message: ' + JSON.stringify(err));
}
console.log(process.pid + " - " + err);
}
if (receivedMessage) {
console.log(process.pid + " - " + 'Brut: ' + receivedMessage);
}
console.log('Received');
});
}
});
Result:
Sent!!!
Retrieving message
42076 - Error receiving message: {"code":"ECONNRESET","errno":"ECONNRESET","syscall":"read"}
42076 - Error: read ECONNRESET
Received
Subscription and topic exist I know the sendTopicMessage works well because, from the portal, I can see message counter in other subscriptions is incremented From the portal, on the subscription “my_subscription” counter stay empty. Meaning that my subscription grabbed well the message from the service bus… but I don’t have this result in my callback…
I’m guessing a SDK error or something badly interacting with the request object.
Any clue on that please? Does anyone using the service bus can make it work?
Thank you,
Issue Analytics
- State:
- Created 9 years ago
- Comments:15
Top Results From Across the Web
Azure Service Bus Unknown Error code ECONNRESET
We have started facing an exception " ECONNRESET " while reading and pushing message in the SericeBusQueue with the frequency of every 3-4 ......
Read more >Service Bus messaging exceptions - Azure - Microsoft Learn
This article provides a list of Azure Service Bus messaging exceptions and suggested actions to taken when the exception occurs.
Read more >Error: read ECONNRESET Packages failed to restore
I am trying to restore NuGet packages from the Azure Artifacts feed with the task "Nuget restore" which is giving an error -...
Read more >Unable to retrieve messages using AMQP Trigger with Azure ...
Describe the issue/error/question ... I'd provided the required credential and queue as per AMQP trigger but upon listening for 30s it returned ...
Read more >@azure/service-bus - npm
Azure Service Bus SDK for JavaScript. Latest version: 7.7.3, last published: 2 months ago. Start using @azure/service-bus in your project by ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ve been experiencing this as well since 3/14/16.
2016-03-21T14:42:55.253Z: { [Error: tunneling socket could not be established, cause=socket hang up] stack: [Getter/Setter], code: ‘ECONNRESET’, __frame: { name: ‘__1’, line: 49, file: ‘/usr/local/lib/node_modules/azure-cli/lib/commands/login.js’, prev: undefined, calls: 0, active: false, offset: 64, col: 27 }, rawStack: [Getter] } Error: tunneling socket could not be established, cause=socket hang up <<< async stack >>> at __1 (/usr/local/lib/node_modules/azure-cli/lib/commands/login.js:113:28) <<< raw stack >>> at ClientRequest.onError (/usr/local/lib/node_modules/azure-cli/node_modules/request/node_modules/tunnel-agent/index.js:176:17) at ClientRequest.g (events.js:260:16) at emitOne (events.js:77:13) at ClientRequest.emit (events.js:169:7) at TLSSocket.socketErrorListener (_http_client.js:256:9) at emitOne (events.js:77:13) at TLSSocket.emit (events.js:169:7) at emitErrorNT (net.js:1255:8) at nextTickCallbackWith2Args (node.js:437:9) at process._tickCallback (node.js:351:17)
Started seeing this a lot again just recently. Anyone else?