Skip to content

Two Tezos jobs use same network port at same time #10

Open
@moyodiallo

Description

@moyodiallo

Hi
This issue is about when Tezos test runs at same time on 4.12.0 and 4.12.0+domains, when the network port is used by one run and the other can't because of the same port.

┌──────────────────────────────────────────────────────────────────────────────┐
│ [FAIL]        p2p-connection-pool          0   simple.                       │
└──────────────────────────────────────────────────────────────────────────────┘
idtrCxjv3sZz:55011: PID: 90231
idtkRJrL9kyd:55012: PID: 90232
idrMpPQSJvjj:55013: PID: 90233
idqdTzCbGwVN:55014: PID: 90234
idsfoLeD3FnX:55015: PID: 90235
idqhVnG4DM3Q:55016: PID: 90236
idrLqLUQrdPJ:55017: PID: 90237
ids7Em5CA9eM:55018: PID: 90238
idtHthjZZWXj:55019: PID: 90239
idqn6hcKfRGe:55020: PID: 90240
idtkRJrL9kyd:55012: Detached process ended with error.Error:
idtkRJrL9kyd:55012:                                     An error occured while initializing P2P server on this address: 127.0.0.1:55012.
idtkRJrL9kyd:55012:                                       Reason: Address already in use.
idtkRJrL9kyd:55012:                                       Another tezos node is probably running on this address.
idtkRJrL9kyd:55012:                                       Please choose another P2P port using --net-addr.
idtkRJrL9kyd:55012: 
idtkRJrL9kyd:55012: 
idqdTzCbGwVN:55014: Detached process ended with error.Error:
idqdTzCbGwVN:55014:                                     An error occured while initializing P2P server on this address: 127.0.0.1:55014.
idqdTzCbGwVN:55014:                                       Reason: Address already in use.
idqdTzCbGwVN:55014:                                       Another tezos node is probably running on this address.
idqdTzCbGwVN:55014:                                       Please choose another P2P port using --net-addr.
idqdTzCbGwVN:55014: 
idqdTzCbGwVN:55014: 
Nov 24 15:23:02.696 - process: Early error! Canceling remaining process.
Nov 24 15:23:02.696 - process: The processes 0(idtrCxjv3sZz:55011:) 2(idrMpPQSJvjj:55013:)
Nov 24 15:23:02.696 - process:               3(idqdTzCbGwVN:55014:) 4(idsfoLeD3FnX:55015:)
Nov 24 15:23:02.696 - process:               5(idqhVnG4DM3Q:55016:) 6(idrLqLUQrdPJ:55017:)
Nov 24 15:23:02.696 - process:               7(ids7Em5CA9eM:55018:) 8(idtHthjZZWXj:55019:)
Nov 24 15:23:02.696 - process:               9(idqn6hcKfRGe:55020:) 
Nov 24 15:23:02.696 - process:      have been canceled.
Nov 24 15:23:02.696 - process: The process 1(idtkRJrL9kyd:55012:) 
Nov 24 15:23:02.696 - process:     failed with error:
Nov 24 15:23:02.696 - process:     Error:
Nov 24 15:23:02.696 - process:       An error occured while initializing P2P server on this address: 127.0.0.1:55012.
Nov 24 15:23:02.696 - process:         Reason: Address already in use.
Nov 24 15:23:02.696 - process:         Another tezos node is probably running on this address.
Nov 24 15:23:02.696 - process:         Please choose another P2P port using --net-addr.
Nov 24 15:23:02.696 - process: 
Nov 24 15:23:02.696 - process: 
Nov 24 15:23:02.696 - process: 
[failure] Error:
  The processes 0(idtrCxjv3sZz:55011:) 2(idrMpPQSJvjj:55013:)
                3(idqdTzCbGwVN:55014:) 4(idsfoLeD3FnX:55015:)
                5(idqhVnG4DM3Q:55016:) 6(idrLqLUQrdPJ:55017:)
                7(ids7Em5CA9eM:55018:) 8(idtHthjZZWXj:55019:)
                9(idqn6hcKfRGe:55020:) 
       have been canceled.
  The process 1(idtkRJrL9kyd:55012:) 
      failed with error:
      Error:
        An error occured while initializing P2P server on this address: 127.0.0.1:55012.
          Reason: Address already in use.
          Another tezos node is probably running on this address.
          Please choose another P2P port using --net-addr.



I discussed with @talex5, he noticed to me it's caused by the parameter network host of a run (oBuilder). With this generated script we can see the parameter:

(run (cache (opam-archives (target /home/opam/.opam/download-cache)))
                   (network host)
                   (shell "opam exec -- bash -c 'source $HOME/.poetry/env; source $HOME/.cargo/env; make build-deps && eval $(opam env); PATH=\"$HOME/.local/bin:$PATH\"; make -C tests_python install-dependencies && make && make test'"))

The configuration is in this file

| "tezos" -> `Script ["sudo apt-get install -y rsync git m4 build-essential patch unzip wget pkg-config libgmp-dev libev-dev libhidapi-dev libffi-dev opam jq zlib1g-dev bc autoconf software-properties-common"; "gpg --keyserver keyserver.ubuntu.com --recv-keys BA6932366A755776"; "gpg --export BA6932366A755776 | sudo apt-key add -"; "sudo add-apt-repository 'deb http://ppa.launchpad.net/deadsnakes/ppa/ubuntu bionic main'"; "sudo apt-get update"; "sudo apt-get install -y python3.9 python3.9-dev python3.9-distutils python3-pip virtualenv python3.9-venv"; "wget https://sh.rustup.rs/rustup-init.sh"; "chmod +x rustup-init.sh"; "./rustup-init.sh --profile minimal --default-toolchain 1.52.1 -y"; "opam install dune"; "curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py | python3.9 -"; "python3.9 -m pip install --upgrade setuptools"; "bash -c 'source $HOME/.poetry/env; source $HOME/.cargo/env; make build-deps && eval $(opam env); PATH=\"$HOME/.local/bin:$PATH\"; make -C tests_python install-dependencies && make && make test'"]

There's no alternative to avoid the parameter network host for solving this issue when configuring(config.ml) because Script variant is generated with.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions