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 Tigerbeetle in Codespaces

See original GitHub issue

Background

We have had successful runs of the Rafiki test suite (which is great) on our Virtualbox VM running Ubuntu 21.04 (to avoid security concerns running Docker with root privileges), but are not able to run the backend portion of the test suite inside of a GitHub Codespaces environment (which we are trying to run for various reasons including portability and security). The rates tests all run just fine 👍🏾.

The main issue seems to be that Tigerbeetle isn’t able to connect to an actively listening replica (at port 3004). It could be that there is something missing from the default Codespaces environment that we need to add to our dev container (see Specifications).

Expected Behavior

Running yarn workspace backend test successfully connects to Tigerbeetle and passes (or fails) tests appropriately.

Actual Behavior

Running yarn workspace backend test fails to connect to Tigerbeetle and does not run the actual test logic.

Terminal output is:

error(message_bus): error connecting to replica 0: error.Unexpected
error(message_bus): error closing connection to tigerbeetle.src.message_bus.union:392:19{ .replica = 0 }: error.Unexpected

Tigerbeetle container output is:

> Executing task: docker logs --tail 1000 -f 43d4f1d1938a1fc684fa77d36fe3eff89966e211ce5cae0b0945f71f0b5962ad <

info(storage): opening "cluster_0000000001_replica_000.tigerbeetle"...
info: cluster=1 replica=0: listening on 0.0.0.0:3004
error(message_bus): accept failed: error.SocketNotListening

Terminal will be reused by tasks, press any key to close it.

I’ve looked into tigerbeetle/src/message_bus.zig to try to make sense of the situation but I am not familiar enough with the architecture to get a sense of what to do next.

Steps to Reproduce the Problem

  1. Connect to a GitHub Codespace.
    • We are using VSCode locally to remotely connect to the codespace, but the same goes for a browser-based VSCode instance.
  2. Add the rafiki repository as a submodule to the Codespace repository.
    • git submodule add https://github.com/interledger/rafiki.git
    • Probably worthwhile to check if the same effects occur if Rafiki is not a submodule but instead the active repo, though on the Virtualbox VM the tests ran fine in the submodule as well.
  3. Run yarn build at the root of the repo.
  4. Build the Docker container for the backend using yarn docker build backend -t rafiki-backend.
  5. Run yarn workspace backend test.

Specifications

GitHub Codespaces Default Linux Container

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
A-Mozeakcommented, Apr 4, 2022

@jorangreef it looks like this is something that GitHub has to address on their end, since the base layer host for Codespaces is not user configurable.

We’ve changed our strategy and are working from our own cloud hosted Linux box, so I’m going to close this issue. Thanks to you and @wilsonianb for the help.

0reactions
A-Mozeakcommented, Mar 11, 2022

@jorangreef Thank you, looking into this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting your connection to GitHub Codespaces
From the Command Palette in Visual Studio Code, click Developer: Reload Window. Browser cannot connect. Sometimes you may not be able to access...
Read more >
GitHub Codespaces with JetBrains IDEs (Public Beta)
After downloading the JetBrains Gateway and installing the GitHub Codespaces plugin, users will be able to connect to their codespaces with ...
Read more >
How to connect Github Codespaces and Mongodb Atlas
Your browser can't play this video. Learn more. Switch camera.
Read more >
Debug HTML file with inline Javascript in GitHub Codespaces
Unable to launch browser: "Timed out waiting for browser connection". Any suggestions what I am doing wrong? I appreciate your replies!
Read more >
Developing with GitHub Codespaces - Visual Studio Code
Limitation: You may not be able to use the web-based editor if you are running your browser with Incognito mode or have ad...
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