hyperledger / cacti

Hyperledger Cacti is a new approach to the blockchain interoperability problem
https://wiki.hyperledger.org/display/cactus
Apache License 2.0
338 stars 278 forks source link

bug(quorum-all-in-one): error "Failed to enumerate USB devices" #2274

Closed takeutak closed 1 year ago

takeutak commented 1 year ago

Describe the bug In the process of the container building of quorum-all-in-one, there are the following error and the container cannot be launched.

[process]
DOCKER_BUILDKIT=1 docker build ./tools/docker/quorum-all-in-one/ -t qaio
docker run --rm qaio

[error]
"Failed to enumerate USB devices"

To Reproduce

When I edited start-quorum.sh and add "--nousb", the error does not happen.

geth \
  --identity node${NODE_ID}-${QUORUM_CONSENSUS:-raft} \
  --datadir ${DDIR} \
  --permissioned \
  --nodiscover \
  --verbosity 2 \
  --networkid ${NETWORK_ID} \
  --rpc \
  --rpccorsdomain "*" \
  --rpcvhosts "*" \
  --rpcaddr 0.0.0.0 \
  --rpcport 8545 \
  --rpcapi admin,db,eth,debug,miner,net,shh,txpool,personal,web3,quorum,${QUORUM_CONSENSUS:-raft} \
  --port 21000 \
  --allow-insecure-unlock \
  --unlock 0 \
  --password /passwords.txt \
  --nousb
  ${QUORUM_GETH_ARGS:-} ${GETH_ARGS_raft}

c.f.: https://github.com/ethereum/go-ethereum/issues/20568

aldousalvarez commented 1 year ago

Hello @petermetz I would like to work on this one, Thank you.

ruzell22 commented 1 year ago

Hello @petermetz , can you assign this to me? Thank you.

petermetz commented 1 year ago

@aldousalvarez Sorry for the slow response! @ruzell22 You got it.

ruzell22 commented 1 year ago

Hi @takeutak , I have conducted multiple tests regarding the ticket including the one in the provided link.

Initial test without changes image

Added --nousb to replicate image

changed --rpc flags to --http as per this log wherein it says it will be removed soon image

The test without --nousb shows multiple occurrence of "Failed to enumerate USB devices" error log while the test with --nousb shows only one occurrence of the error log.

goquorum docs website also stated about adding --nousb will help remove the error image

I also tried adding the libusb and libusb-dev to the dockerfile and build and run the test again image image

"Failed to enumerate USB devices" error still happen even after adding --nousb flag. --privileged is also used when using docker run command.

ruzell22 commented 1 year ago

Hi @takeutak , I would also like to confirm if the one below the logs, the part where it starts with raft, is it the expected output when running the container? Thank you. image

ruzell22 commented 1 year ago

Hello @takeutak and @petermetz , upon further testing, adding --nousb flag to the two geth command in start-quorum.sh removes all the "Failed to enumerate USB devices" error. image

The issue is fixed. However after the merge and update of quorum-all-in-one docker file in #2240 , with the new version of quorum and tessera, the /tessera/tessera-app.jar is now not accessible and is also changed to a .tar file.

I have tried to revert the version of the tessera, version of the quorum, and both at the same time to see which is causing the problem. The quorum-all-in-one is running as expected with the old and latest version of quorum, but it is only running okay with the old tessera, and is having error with new tessera version. The error is mostly regarding the extraction and running of /tessera/tessera-app.jar to its tar file equivalent. image

ruzell22 commented 1 year ago

In relation to #2549 , based on the output on the terminal after building and running, "Failed to enumerate USB devices" error is not showing up anymore even without putting the --nousb flag in geth.

image image

This bug has been fixed together with the #2549 PR, @petermetz , Thank you.

petermetz commented 1 year ago

@ruzell22 Thank you very much! Closing this one!