Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

local build fails to start geth s #50

Open
drandreaskrueger opened this issue Oct 18, 2018 · 7 comments
Open

local build fails to start geth s #50

drandreaskrueger opened this issue Oct 18, 2018 · 7 comments

Comments

@drandreaskrueger
Copy link

drandreaskrueger commented Oct 18, 2018

reproduce the problem:

git clone  https://github.com/blk-io/crux blk-io_crux
cd blk-io_crux/docker/quorum-crux/
cp docker-compose.yaml docker-compose-local.yaml
nano docker-compose-local.yaml 

then comment and uncomment, as described there, to build locally. Then:

docker-compose -f docker-compose-local.yaml up --build

The geths are not starting:

geth attach http://localhost:22001
Fatal: Failed to start the JavaScript console: api modules: Post http://localhost:22001: read tcp [::1]:41988->[::1]:22001: read: connection reset by peer

there are no geth processes:

ps aux | grep crux
root     16788  0.5  0.0   6260  1716 ?        S    23:31   0:00 /bin/bash ./crux-start.sh
root     16876  0.5  0.0   6260  1768 ?        S    23:31   0:00 /bin/bash ./crux-start.sh
root     16892  0.5  0.0   6260  1704 ?        S    23:31   0:00 /bin/bash ./crux-start.sh
root     17047  0.5  0.0   6260  1720 ?        S    23:31   0:00 /bin/bash ./crux-start.sh
andreas  18810  0.0  0.0  12784   952 pts/0    S+   23:32   0:00 grep crux

ps aux | grep geth
andreas  19192  0.0  0.0  12784  1016 pts/0    S+   23:32   0:00 grep geth

when looking into the container

docker ps
CONTAINER ID        IMAGE                       COMMAND             CREATED             STATUS              PORTS                                                                        NAMES
495ce286609f        blk.io/quorum/quorum-crux   "./start.sh"        6 minutes ago       Up 3 minutes        0.0.0.0:9001->9000/tcp, 0.0.0.0:21001->21000/tcp, 0.0.0.0:22001->22000/tcp   quorum1
8abd4fcd7132        blk.io/quorum/quorum-crux   "./start.sh"        6 minutes ago       Up 3 minutes        0.0.0.0:9004->9000/tcp, 0.0.0.0:21004->21000/tcp, 0.0.0.0:22004->22000/tcp   quorum4
1136b2145523        blk.io/quorum/quorum-crux   "./start.sh"        6 minutes ago       Up 3 minutes        0.0.0.0:9002->9000/tcp, 0.0.0.0:21002->21000/tcp, 0.0.0.0:22002->22000/tcp   quorum2
25c86cc43eb6        blk.io/quorum/quorum-crux   "./start.sh"        6 minutes ago       Up 3 minutes        0.0.0.0:9003->9000/tcp, 0.0.0.0:21003->21000/tcp, 0.0.0.0:22003->22000/tcp   quorum3

docker exec -it 495ce286609f bash

I find this error:

cat qdata/logs/crux.log 
unknown flag: --networkinterface
Usage of crux:
      --alwayssendto string    List of public keys for nodes to send all transactions too
      --berkeleydb             Use Berkeley DB for working with an existing Constellation data store [experimental]
@drandreaskrueger
Copy link
Author

drandreaskrueger commented Oct 18, 2018

hah, this solves it for me

git clone  https://github.com/blk-io/crux blk-io_crux
git checkout f39db2345cf9d82e76d3905468e6e5ea1469b09d
...

so you have introduced that problem recently.

It happened before, that suddenly the local built is broken. I suggest for the future that you also run a test of the local version whenever you've updated your repo, i.e. one quick

docker-compose -f docker-compose-local.yaml up --build

to just quickly test whether that is also still working.

Thanks a lot!

@drandreaskrueger
Copy link
Author

Good meeting you today ;-)

@drandreaskrueger
Copy link
Author

any news about the unknown flag: --networkinterface problem?

@drandreaskrueger
Copy link
Author

NOT solved yet, just tried this:

docker ps

CONTAINER ID        IMAGE                       COMMAND             CREATED             STATUS              PORTS                                                                        NAMES
74e9f08724e3        blk.io/quorum/quorum-crux   "./start.sh"        2 minutes ago       Up 36 seconds       0.0.0.0:9004->9000/tcp, 0.0.0.0:21004->21000/tcp, 0.0.0.0:22004->22000/tcp   quorum4
2f1eb4a79473        blk.io/quorum/quorum-crux   "./start.sh"        2 minutes ago       Up 36 seconds       0.0.0.0:9002->9000/tcp, 0.0.0.0:21002->21000/tcp, 0.0.0.0:22002->22000/tcp   quorum2
cc9f28fb2407        blk.io/quorum/quorum-crux   "./start.sh"        2 minutes ago       Up 36 seconds       0.0.0.0:9001->9000/tcp, 0.0.0.0:21001->21000/tcp, 0.0.0.0:22001->22000/tcp   quorum1
a3970694101e        blk.io/quorum/quorum-crux   "./start.sh"        2 minutes ago       Up 35 seconds       0.0.0.0:9003->9000/tcp, 0.0.0.0:21003->21000/tcp, 0.0.0.0:22003->22000/tcp   quorum3
docker exec -it 74e9f08724e3 bash

bash-4.4# cat qdata/logs/crux.log 
unknown flag: --networkinterface
Usage of crux:
      --alwayssendto string    List of public keys for nodes to send all transactions too
      --berkeleydb             Use Berkeley DB for working with an existing Constellation data store [experimental]
      --generate-keys string   Generate a new keypair
      --grpc                   Use gRPC server (default true)
      --grpcport int           The local port to listen on for JSON extensions of gRPC (default -1)
      --othernodes string      "Boot nodes" to connect to to discover the network
      --port int               The local port to listen on (default -1)
      --privatekeys string     Private keys hosted by this node
      --publickeys string      Public keys hosted by this node
      --socket string          IPC socket to create for access to the Private API (default "crux.ipc")
      --storage string         Database storage file name (default "crux.db")
      --tls                    Use TLS to secure HTTP communications
      --tlsservercert string   The server certificate to be used
      --tlsserverkey string    The server private key
      --url string             The URL to advertise to other nodes (reachable by them) (default "")
      --verbosity int          Verbosity level of logs (default 1)
      --workdir string         The folder to put stuff in (default: .) (default ".")

the version I had been using is this one:

git log | head -n 5
commit 92bcd86d8f8549ba29769452367b9880ea403008
Merge: f6f7b3a d289936
Author: Puneetha Karamsetty <puneetha17@gmail.com>
Date:   Thu Jan 10 22:16:36 2019 +0000

@drandreaskrueger
Copy link
Author

drandreaskrueger commented Jan 18, 2019

And the only things I did before was patching with larger txpool, 1 seconds blockperiod, and higher gaslimit:

mv blk-io_crux blk-io_crux_f39db23
git clone  https://github.com/blk-io/crux blk-io_crux
cd blk-io_crux

cd docker/quorum-crux/
cp docker-compose.yaml docker-compose-local.yaml
nano docker-compose-local.yaml

(*) actually about this ^ I have a small feature request, see below.

Then I patch with my wanted parameters:

jq '.gasLimit = "0x1312D00"' istanbul-genesis.json > tmp && mv tmp istanbul-genesis.json
less istanbul-genesis.json 
sed -i 's/PRIVATE_CONFIG/ARGS=$ARGS"--txpool.globalslots 20000 --txpool.globalqueue 20000 --istanbul.blockperiod 1 "\nPRIVATE_CONFIG/g' istanbul-start.sh

docker-compose -f docker-compose-local.yaml up --build

but then the quorum nodes do not come up!

Broken, very probably because there is a bug which shows as
unknown flag: --networkinterface in qdata/logs/crux.log

Some version mismatch? You probably did not notice because you use the dockerhub build, and do not build locally, right?

@drandreaskrueger
Copy link
Author

Feature request:

Could you please include a file docker-compose-local.yaml

Editing away the # is easy for a human in an editor, but non-trivial in an automated way - that step (*) above is still human editing.

A file docker-compose-local.yaml which builds the docker locally would help for two things:

Me because I can fully automate the patching for my wanted parameters - and
you @Puneetha17 because you then more easily notice bugs like the above when you do your automated testing after upgrades.

Thanks a lot!

@Puneetha17
Copy link
Contributor

It should be fixed now. We had made a change to add --networkinterface parameter in config. But did not checkout the latest release of Crux during docker build.

Also just merged the #29, so we now have a docker-compose-local.yaml to build it locally.

Sorry for a much delayed response.
And thanks for pointing out the issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants