Skip to content

Geth port isn't freed after stopping a local testnet #5382

@danielrachi1

Description

@danielrachi1

Description

stop_local_testnet.sh and clean.sh fail to properly stop all geth instances. Causing the port to remain busy after restarting the local testnet, which prevents new testnets to run until all geth processes are killed manually.

Version

Branch: unstable
Version: v5.0.0-f93844e

Present Behaviour

  1. Go to scripts/local_testnet/ and run ./start_local_testnet.sh genesis.json
  2. Wait for the script to finish and run tail -f ~/.lighthouse/local-testnet/testnet/geth_1.log
  3. After a small wait, the testnet will start advancing:
    image
  4. Re-start the testnet by running ./start_local_testnet.sh genesis.json again. (stop_local_testnet.sh and clean.sh) are part of this script.
  5. Wait for the script to finish and run tail -f ~/.lighthouse/local-testnet/testnet/geth_1.log
  6. The geth instances will fail to start because their ports will be busy:
    image
  7. Run ./stop_local_testnet.sh && ./clean.sh
  8. Run htop and search for geth. A bunch of geth processes will still be running:
    image
  9. Kill the geth processes manually.
  10. Run ./start_local_testnet.sh genesis.json again. Now the testnet will start with no issues:
    image

Expected Behaviour

In step 4 a new testnet should be started with no issues. Also, ./stop_local_testnet.sh && ./clean.sh should kill all geth processes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions