darwin/simverse

Socker 'btcd:31337' didn't come online in time

nachikettapas opened this issue · 11 comments

I was trying to setup on a fresh vm with Ubuntu 18.10. It is failing with "Socker 'btcd:31337' didn't come online in time" error.

Hmm, current master seems to be healthy: https://github.com/darwin/simverse/actions

What recipe/commands did you use? I could try to reproduce it on my Ubuntu box.

I created a fresh oracle VM with Ubuntu 18.10. Then I installed git, jq, docker and docker-compose.

nachiket@nachikettapas:~$ jq --version
jq-1.6
nachiket@nachikettapas:~$ docker --version
Docker version 19.03.5, build 633a0ea838
nachiket@nachikettapas:~$ docker-compose --version
docker-compose version 1.24.0, build 0aa59064

Then I followed the basic steps (similar to videos https://asciinema.org/a/246214)

> git clone --recursive https://github.com/darwin/simverse.git
> cd simverse
> ./sv create                                 # first time, it will ask to clone repos, answer yes
...
> ./sv enter
...
_workspace/default > ./dc build
...
_workspace/default > ./dc up                  # this gives you a nice log for whole cluster
...

I'm on it. I was able to reproduce it here on both macOS and Ubuntu.

btcd fails on startup with

Unable to create wallet: invalid arguments to bdb.Create -- expected database path and no-freelist-sync option

I worked around it in tests runner but forgot to deal with it in normal case when working with btcd-based simnets.

@nachikettapas Please run ./sv repos update then ./sv enter and inside simverse dc build and you should be good to go with dc up.

@darwin Thanks a lot for solving this quickly. I will try it and let you know. Meanwhile I tried bitcoind and lightningd and it was working. Thanks a lot.

@darwin Thanks a lot. It works.

@nachikettapas dunno what are your going to do, but you should check out https://github.com/jamaljsr/polar as well. They seem to be doing great progress on their visual tool.

@darwin Sure I will check it thanks a lot. I am planning to do a large scale (no of nodes) testing on the lightning network (testnet, regtest, simnet). You solution is excellent. I need to run a custom code on top of it. I am planning to modify the docker files. Do you think it is good approach? Can you suggest anything else?

Yes, simverse was kinda meant to be used by a developer to be built on top.

I used shell scripting for simverse generation because it is more approchable for most people. The recipe itself is a shell script, so you can do any kind of your own processing during simnet generation. You can even generate your recipe code for more complex scenarios. Or you can wrap sv create and run your own code as a post-processing step on generated simnet folder structure. Unix approach is pretty flexible here, you can call your own tools (written in a language of your choice) on simnet folder structure, e.g. modify the docker files with patches.

Anyways I'm open for patches if you make simverse more configurable to cover your cases.

@darwin Can we use ubuntu instead of alpine?

@nachikettapas you can change base images in via env vars:

# here we define base docker images for individual containers, they should be based on alpine

But unfortunately changing it to something else than alpine-based image would require deeper changes in Dockerfiles during initialization e.g. using apt-get instead of apk and stuff like that. But you could give it a try and see how far can you get.