firefly-cli icon indicating copy to clipboard operation
firefly-cli copied to clipboard

bug: Etherbase missing at startup on windows

Open aceppaluni opened this issue 10 months ago • 7 comments

What happened?

When attempting to start and test firefly on windows a few errors appear. The first error was "Error: dial tcp 127.0.0.1:5100: connectex: No connection could be made because the target machine actively refused it." After doing a bit of digging the error seems to come about when attempting to start the Firefly stack. After the stack is started a new error is present. This error is "Fatal: Failed to start mining: etherbase missing: etherbase must be explicitly specified".

Image

What did you expect to happen?

The expected result is to determine if the removal of reset corrects the namespace issue as mentioned in #1615 and #1650

How can we reproduce it (as minimally and precisely as possible)?

Open a terminal and docker desktop. Start the application and view logs as shown in docker desktop.

Anything else we need to know?

No response

OS version

# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here

# On Windows:
C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture
# paste output here

aceppaluni avatar Mar 18 '25 16:03 aceppaluni

I think this issue should be raised against the FireFly-CLI as it's about setting up Geth correctly see related issue from geth https://github.com/ethereum/go-ethereum/issues/26860

EnriqueL8 avatar Mar 19 '25 09:03 EnriqueL8

I wonder if you have any other logs where the account setup failed

EnriqueL8 avatar Mar 19 '25 09:03 EnriqueL8

Image

aceppaluni avatar Mar 19 '25 14:03 aceppaluni

Update: Revisited starter project to assist with errors. Was returned TCP errors to start. Used docker to debug error messages. First error message was “failed to start mining : Etherbase missing”. Ultimately, had to setup Ether base address and add this to docker compose file. Next error was related to data exchange and volume. Needed to adjust volume inside docker-compose to point to correct file location for the config file. Met same issue again with EVMCONNECT. Had to ensure path was pointing to proper location. Then ran into issue with SQlite3 DB. Needed to adjust sqlite3 filepath to “url: /tmp/sqlite.db?_busy_timeout=5000&mode=rwc&cache=shared". Then ran into namespace issue. Error was "[2025-03-24T22:11:23.280Z] INFO <-- GET /api/v1/status [404] (0.04ms): FF10436: Unknown namespace 'default'”. By extending them to include default, using “predefined”, and adding in a dynamic boolean firefly can create the namespaces. From here had UI issue errors. Windows does not add "/UI". Ended up needing to add this to end of URL.

When attempting to test ran into errors. Next set of errors resulted from missing directories. Error was "2025-04-11 12:17:27 time="2025-04-11T16:17:27Z" level=warning msg="CDI setup error /etc/cdi: failed to monitor for changes: no such file or directory", 2025-04-11 12:17:27 time="2025-04-11T16:17:27Z" level=warning msg="CDI setup error /var/run/cdi: failed to monitor for changes: no such file or directory", 2025-04-11 12:17:27 time="2025-04-11T16:17:27Z" level=warning msg="CDI setup error /etc/buildkit/cdi: failed to monitor for changes: no such file or directory." Using command CREATE_STACK=false make e2e NODE_NAME=firefly-node1 removed directory issues and allows for tests to run.

Now: When running testing, tests are coming back with failures. Error is "=== RUN TestEthereumMultipartyE2ESuite === RUN TestEthereumMultipartyE2ESuite/TestE2EBroadcast Error Trace: C:/Users/acepp/firefly/test/e2e/e2e.go:103 C:/Users/acepp/firefly/test/e2e/multiparty/common.go:82 C:/Users/acepp/firefly/test/e2e/multiparty/onchain_offchain.go:46 C:/Users/acepp/go/pkg/mod/github.com/stretchr/[email protected]/suite/suite.go:190 Error: Received unexpected error: open C:\Users\acepp.firefly\stacks\firefly_e2e\runtime\stackState.json: The system cannot find the path specified. Test: TestEthereumMultipartyE2ESuite/TestE2EBroadcastsuite.go:87: test panicked: runtime error: invalid memory address or nil pointer dereference goroutine 13 [running]: runtime/debug.Stack()

aceppaluni avatar Apr 28 '25 16:04 aceppaluni

Want to understand all the challenges here:

  • data exchange and volume. Needed to adjust volume inside docker-compose to point to correct file location for the config file. Met same issue again with EVMCONNECT. Had to ensure path was pointing to proper location Is the path defined in the docker compose not valid for Windows?
  • TestE2EBroadcastsuite.go - I think you need to pass in STACK_DIR if you don't create the stack as part of the run see it's failing https://github.com/hyperledger/firefly/blob/36b417918a26c7f4b10672786949781210a4ff96/test/e2e/multiparty/common.go#L81 as it cannot find C:\Users\acepp.firefly\stacks\firefly_e2e\runtime\stackState.json

EnriqueL8 avatar Apr 30 '25 09:04 EnriqueL8

Hi @EnriqueL8 That is correct. Windows users will need to adjust the file path so that docker-compose can pick them up. For stackState.json, the name of the file does not match what is listed in the error.

aceppaluni avatar Apr 30 '25 15:04 aceppaluni

There might be a good contribution here to FireFly CLI to make sure it's creating the correct paths, it should use the golang standard library for path creation which should handle this

EnriqueL8 avatar May 01 '25 09:05 EnriqueL8