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

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

Open
moyodiallo opened this issue Nov 29, 2021 · 1 comment
Open

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

moyodiallo opened this issue Nov 29, 2021 · 1 comment

Comments

@moyodiallo
Copy link
Contributor

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.

@moyodiallo moyodiallo changed the title Two Tezos jobs use same network port at same time and one of the two fails Two Tezos jobs use same network port at same time Nov 29, 2021
@moyodiallo
Copy link
Contributor Author

to solve this issue, I think we have to add a new variant without network host parameter. Like Script_nohost to handle those kind of script

@moyodiallo moyodiallo assigned talex5 and unassigned talex5 Nov 30, 2021
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