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.

EADDRINUSE with botium-connector-botframework when using botium grid

See original GitHub issue

Describe the bug When using this connector (https://github.com/codeforequity-at/botium-connector-botframework) and botium grid together getting the following error: Error: listen EADDRINUSE: address already in use :::45100

To Reproduce

  1. Run ngrok with command: ngrok http 45100
  2. Put the following config into botium.json
{
  "botium": {
    "Capabilities": {
      "PROJECTNAME": "Test",
      "CONTAINERMODE": "botframework",
      "BOTFRAMEWORK_ENDPOINTURL": "https://xxxx/api/messages",
      "BOTFRAMEWORK_SERVICEURL": "https://xxxx.ngrok.io",
      "BOTFRAMEWORK_APP_ID": "xxxx",
      "BOTFRAMEWORK_APP_SECRET": "xxxx",
      "SIMPLEREST_INBOUND_PORT": 45100,
      "SIMPLEREST_INBOUND_ENDPOINT": "/",
      "SIMPLEREST_TIMEOUT": 60000,
      "SIMULATE_WRITING_SPEED": 250,
      "WAITFORBOTTIMEOUT": 30000,
      "SCRIPTING_MATCHING_MODE": "regexp"
    }
  }
}
  1. Run botium grid with: botium-cli agent
  2. Make a post to URL localhost:46100/api/build with body
{
	"Capabilities": {
	}
}
  1. Repeat step 4

Expected behavior There should be no errors and botium-connector-botframework should be able to listen for all conversations bot messages on the same server and port which is initiated only once.

Screenshots and Log files

node:events:368
      throw er; // Unhandled 'error' event
      ^

Error: listen EADDRINUSE: address already in use :::45100
    at Server.setupListenHandle [as _listen2] (node:net:1334:16)
    at listenInCluster (node:net:1382:12)
    at Server.listen (node:net:1469:7)
    at Function.listen (C:\Users\UserName\AppData\Roaming\npm\node_modules\botium-connector-botframework\node_modules\express\lib\application.js:618:24)
    at C:\Users\UserName\AppData\Roaming\npm\node_modules\botium-connector-botframework\node_modules\botium-core\src\grid\inbound\proxy.js:61:23
    at new Promise (<anonymous>)
    at startProxy (C:\Users\UserName\AppData\Roaming\npm\node_modules\botium-connector-botframework\node_modules\botium-core\src\grid\inbound\proxy.js:48:10)
    at SimpleRestContainer._buildInbound (C:\Users\UserName\AppData\Roaming\npm\node_modules\botium-connector-botframework\node_modules\botium-core\src\containers\plugins\SimpleRestContainer.js:628:26)
    at SimpleRestContainer.Build (C:\Users\UserName\AppData\Roaming\npm\node_modules\botium-connector-botframework\node_modules\botium-core\src\containers\plugins\SimpleRestContainer.js:77:17)
    at BotiumConnectorBotFramework.Build (C:\Users\UserName\AppData\Roaming\npm\node_modules\botium-connector-botframework\dist\botium-connector-botframework-cjs.js:371:34)
Emitted 'error' event on Server instance at:
    at emitErrorNT (node:net:1361:8)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  code: 'EADDRINUSE',
  errno: -4091,
  syscall: 'listen',
  address: '::',
  port: 45100
}

Botium Flavour:

  • Botium CLI

Botium Version Using 1.1.0

Additional context Not using direct line API connector as it is a premium channel and each API request generates additional cost. So that is not an option.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
arnbaksyscommented, Dec 2, 2021

Thank you for good and quick replies!

1reaction
codeforequity-atcommented, Dec 2, 2021

ah, now I know what you mean. when using “build”, then the endpoint is actually created and listening on this port. you cannot do this two times in parallel.

Read more comments on GitHub >

github_iconTop Results From Across the Web

User Manual - Botium documentation - Read the Docs
When using Botium in continuous build / testing / deployment environment, it is generally advised to not include passwords or other secrets in...
Read more >
How to fix Error: listen EADDRINUSE while using NodeJS?
EADDRINUSE means that the port number which listen() tries to bind the server to is already in use. So, in your case, there...
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