09:04:57 Triggered by Gerrit: https://git.opendaylight.org/gerrit/c/transportpce/+/113714 09:04:57 Running as SYSTEM 09:04:57 [EnvInject] - Loading node environment variables. 09:04:57 Building remotely on prd-ubuntu2004-docker-4c-16g-28093 (ubuntu2004-docker-4c-16g) in workspace /w/workspace/transportpce-tox-verify-transportpce-master 09:04:58 [ssh-agent] Looking for ssh-agent implementation... 09:04:58 [ssh-agent] Exec ssh-agent (binary ssh-agent on a remote machine) 09:04:58 $ ssh-agent 09:04:58 SSH_AUTH_SOCK=/tmp/ssh-5Bbu3FW6kBce/agent.14111 09:04:58 SSH_AGENT_PID=14113 09:04:58 [ssh-agent] Started. 09:04:58 Running ssh-add (command line suppressed) 09:04:58 Identity added: /w/workspace/transportpce-tox-verify-transportpce-master@tmp/private_key_49449362528088112.key (/w/workspace/transportpce-tox-verify-transportpce-master@tmp/private_key_49449362528088112.key) 09:04:58 [ssh-agent] Using credentials jenkins (jenkins-ssh) 09:04:58 The recommended git tool is: NONE 09:05:01 using credential jenkins-ssh 09:05:01 Wiping out workspace first. 09:05:01 Cloning the remote Git repository 09:05:01 Cloning repository git://devvexx.opendaylight.org/mirror/transportpce 09:05:01 > git init /w/workspace/transportpce-tox-verify-transportpce-master # timeout=10 09:05:01 Fetching upstream changes from git://devvexx.opendaylight.org/mirror/transportpce 09:05:01 > git --version # timeout=10 09:05:01 > git --version # 'git version 2.25.1' 09:05:01 using GIT_SSH to set credentials jenkins-ssh 09:05:01 Verifying host key using known hosts file 09:05:02 You're using 'Known hosts file' strategy to verify ssh host keys, but your known_hosts file does not exist, please go to 'Manage Jenkins' -> 'Security' -> 'Git Host Key Verification Configuration' and configure host key verification. 09:05:02 > git fetch --tags --force --progress -- git://devvexx.opendaylight.org/mirror/transportpce +refs/heads/*:refs/remotes/origin/* # timeout=10 09:05:09 > git config remote.origin.url git://devvexx.opendaylight.org/mirror/transportpce # timeout=10 09:05:09 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10 09:05:09 > git config remote.origin.url git://devvexx.opendaylight.org/mirror/transportpce # timeout=10 09:05:09 Fetching upstream changes from git://devvexx.opendaylight.org/mirror/transportpce 09:05:09 using GIT_SSH to set credentials jenkins-ssh 09:05:09 Verifying host key using known hosts file 09:05:09 You're using 'Known hosts file' strategy to verify ssh host keys, but your known_hosts file does not exist, please go to 'Manage Jenkins' -> 'Security' -> 'Git Host Key Verification Configuration' and configure host key verification. 09:05:09 > git fetch --tags --force --progress -- git://devvexx.opendaylight.org/mirror/transportpce refs/changes/14/113714/1 # timeout=10 09:05:10 > git rev-parse 5ef6392cfdae6978f4b0fc3b2ce524f84512fa34^{commit} # timeout=10 09:05:10 JENKINS-19022: warning: possible memory leak due to Git plugin usage; see: https://plugins.jenkins.io/git/#remove-git-plugin-buildsbybranch-builddata-script 09:05:10 Checking out Revision 5ef6392cfdae6978f4b0fc3b2ce524f84512fa34 (refs/changes/14/113714/1) 09:05:10 > git config core.sparsecheckout # timeout=10 09:05:10 > git checkout -f 5ef6392cfdae6978f4b0fc3b2ce524f84512fa34 # timeout=10 09:05:13 Commit message: "networkutils RPCs adjusted for topo extension" 09:05:13 > git rev-parse FETCH_HEAD^{commit} # timeout=10 09:05:13 > git rev-list --no-walk b98e56d16f3935af5b1f0dc784d9fa9928d1b357 # timeout=10 09:05:13 > git remote # timeout=10 09:05:13 > git submodule init # timeout=10 09:05:13 > git submodule sync # timeout=10 09:05:14 > git config --get remote.origin.url # timeout=10 09:05:14 > git submodule init # timeout=10 09:05:14 > git config -f .gitmodules --get-regexp ^submodule\.(.+)\.url # timeout=10 09:05:14 ERROR: No submodules found. 09:05:14 provisioning config files... 09:05:14 copy managed file [npmrc] to file:/home/jenkins/.npmrc 09:05:14 copy managed file [pipconf] to file:/home/jenkins/.config/pip/pip.conf 09:05:14 [transportpce-tox-verify-transportpce-master] $ /bin/bash /tmp/jenkins5305378695857509878.sh 09:05:14 ---> python-tools-install.sh 09:05:14 Setup pyenv: 09:05:14 * system (set by /opt/pyenv/version) 09:05:14 * 3.8.13 (set by /opt/pyenv/version) 09:05:14 * 3.9.13 (set by /opt/pyenv/version) 09:05:14 * 3.10.13 (set by /opt/pyenv/version) 09:05:14 * 3.11.7 (set by /opt/pyenv/version) 09:05:19 lf-activate-venv(): INFO: Creating python3 venv at /tmp/venv-O20p 09:05:19 lf-activate-venv(): INFO: Save venv in file: /tmp/.os_lf_venv 09:05:23 lf-activate-venv(): INFO: Installing: lftools 09:05:56 lf-activate-venv(): INFO: Adding /tmp/venv-O20p/bin to PATH 09:05:56 Generating Requirements File 09:06:23 Python 3.11.7 09:06:23 pip 24.2 from /tmp/venv-O20p/lib/python3.11/site-packages/pip (python 3.11) 09:06:23 appdirs==1.4.4 09:06:23 argcomplete==3.5.0 09:06:23 aspy.yaml==1.3.0 09:06:23 attrs==24.2.0 09:06:23 autopage==0.5.2 09:06:23 beautifulsoup4==4.12.3 09:06:23 boto3==1.35.27 09:06:23 botocore==1.35.27 09:06:23 bs4==0.0.2 09:06:23 cachetools==5.5.0 09:06:23 certifi==2024.8.30 09:06:23 cffi==1.17.1 09:06:23 cfgv==3.4.0 09:06:23 chardet==5.2.0 09:06:23 charset-normalizer==3.3.2 09:06:23 click==8.1.7 09:06:23 cliff==4.7.0 09:06:23 cmd2==2.4.3 09:06:23 cryptography==3.3.2 09:06:23 debtcollector==3.0.0 09:06:23 decorator==5.1.1 09:06:23 defusedxml==0.7.1 09:06:23 Deprecated==1.2.14 09:06:23 distlib==0.3.8 09:06:23 dnspython==2.6.1 09:06:23 docker==4.2.2 09:06:23 dogpile.cache==1.3.3 09:06:23 durationpy==0.7 09:06:23 email_validator==2.2.0 09:06:23 filelock==3.16.1 09:06:23 future==1.0.0 09:06:23 gitdb==4.0.11 09:06:23 GitPython==3.1.43 09:06:23 google-auth==2.35.0 09:06:23 httplib2==0.22.0 09:06:23 identify==2.6.1 09:06:23 idna==3.10 09:06:23 importlib-resources==1.5.0 09:06:23 iso8601==2.1.0 09:06:23 Jinja2==3.1.4 09:06:23 jmespath==1.0.1 09:06:23 jsonpatch==1.33 09:06:23 jsonpointer==3.0.0 09:06:23 jsonschema==4.23.0 09:06:23 jsonschema-specifications==2023.12.1 09:06:23 keystoneauth1==5.8.0 09:06:23 kubernetes==31.0.0 09:06:23 lftools==0.37.10 09:06:23 lxml==5.3.0 09:06:23 MarkupSafe==2.1.5 09:06:23 msgpack==1.1.0 09:06:23 multi_key_dict==2.0.3 09:06:23 munch==4.0.0 09:06:23 netaddr==1.3.0 09:06:23 netifaces==0.11.0 09:06:23 niet==1.4.2 09:06:23 nodeenv==1.9.1 09:06:23 oauth2client==4.1.3 09:06:23 oauthlib==3.2.2 09:06:23 openstacksdk==4.0.0 09:06:23 os-client-config==2.1.0 09:06:23 os-service-types==1.7.0 09:06:23 osc-lib==3.1.0 09:06:23 oslo.config==9.6.0 09:06:23 oslo.context==5.6.0 09:06:23 oslo.i18n==6.4.0 09:06:23 oslo.log==6.1.2 09:06:23 oslo.serialization==5.5.0 09:06:23 oslo.utils==7.3.0 09:06:23 packaging==24.1 09:06:23 pbr==6.1.0 09:06:23 platformdirs==4.3.6 09:06:23 prettytable==3.11.0 09:06:23 pyasn1==0.6.1 09:06:23 pyasn1_modules==0.4.1 09:06:23 pycparser==2.22 09:06:23 pygerrit2==2.0.15 09:06:23 PyGithub==2.4.0 09:06:23 PyJWT==2.9.0 09:06:23 PyNaCl==1.5.0 09:06:23 pyparsing==2.4.7 09:06:23 pyperclip==1.9.0 09:06:23 pyrsistent==0.20.0 09:06:23 python-cinderclient==9.6.0 09:06:23 python-dateutil==2.9.0.post0 09:06:23 python-heatclient==4.0.0 09:06:23 python-jenkins==1.8.2 09:06:23 python-keystoneclient==5.5.0 09:06:23 python-magnumclient==4.7.0 09:06:23 python-openstackclient==7.1.2 09:06:23 python-swiftclient==4.6.0 09:06:23 PyYAML==6.0.2 09:06:23 referencing==0.35.1 09:06:23 requests==2.32.3 09:06:23 requests-oauthlib==2.0.0 09:06:23 requestsexceptions==1.4.0 09:06:23 rfc3986==2.0.0 09:06:23 rpds-py==0.20.0 09:06:23 rsa==4.9 09:06:23 ruamel.yaml==0.18.6 09:06:23 ruamel.yaml.clib==0.2.8 09:06:23 s3transfer==0.10.2 09:06:23 simplejson==3.19.3 09:06:23 six==1.16.0 09:06:23 smmap==5.0.1 09:06:23 soupsieve==2.6 09:06:23 stevedore==5.3.0 09:06:23 tabulate==0.9.0 09:06:23 toml==0.10.2 09:06:23 tomlkit==0.13.2 09:06:23 tqdm==4.66.5 09:06:23 typing_extensions==4.12.2 09:06:23 tzdata==2024.2 09:06:23 urllib3==1.26.20 09:06:23 virtualenv==20.26.5 09:06:23 wcwidth==0.2.13 09:06:23 websocket-client==1.8.0 09:06:23 wrapt==1.16.0 09:06:23 xdg==6.0.0 09:06:23 xmltodict==0.13.0 09:06:23 yq==3.4.3 09:06:23 [EnvInject] - Injecting environment variables from a build step. 09:06:23 [EnvInject] - Injecting as environment variables the properties content 09:06:23 PYTHON=python3 09:06:23 09:06:23 [EnvInject] - Variables injected successfully. 09:06:23 [transportpce-tox-verify-transportpce-master] $ /bin/bash -l /tmp/jenkins17824741019111518800.sh 09:06:23 ---> tox-install.sh 09:06:23 + source /home/jenkins/lf-env.sh 09:06:23 + lf-activate-venv --venv-file /tmp/.toxenv tox virtualenv urllib3~=1.26.15 09:06:23 ++ mktemp -d /tmp/venv-XXXX 09:06:23 + lf_venv=/tmp/venv-IqBp 09:06:23 + local venv_file=/tmp/.os_lf_venv 09:06:23 + local python=python3 09:06:23 + local options 09:06:23 + local set_path=true 09:06:23 + local install_args= 09:06:23 ++ getopt -o np:v: -l no-path,system-site-packages,python:,venv-file: -n lf-activate-venv -- --venv-file /tmp/.toxenv tox virtualenv urllib3~=1.26.15 09:06:23 + options=' --venv-file '\''/tmp/.toxenv'\'' -- '\''tox'\'' '\''virtualenv'\'' '\''urllib3~=1.26.15'\''' 09:06:23 + eval set -- ' --venv-file '\''/tmp/.toxenv'\'' -- '\''tox'\'' '\''virtualenv'\'' '\''urllib3~=1.26.15'\''' 09:06:23 ++ set -- --venv-file /tmp/.toxenv -- tox virtualenv urllib3~=1.26.15 09:06:23 + true 09:06:23 + case $1 in 09:06:23 + venv_file=/tmp/.toxenv 09:06:23 + shift 2 09:06:23 + true 09:06:23 + case $1 in 09:06:23 + shift 09:06:23 + break 09:06:23 + case $python in 09:06:23 + local pkg_list= 09:06:23 + [[ -d /opt/pyenv ]] 09:06:23 + echo 'Setup pyenv:' 09:06:23 Setup pyenv: 09:06:23 + export PYENV_ROOT=/opt/pyenv 09:06:23 + PYENV_ROOT=/opt/pyenv 09:06:23 + export PATH=/opt/pyenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/puppetlabs/bin 09:06:23 + PATH=/opt/pyenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/puppetlabs/bin 09:06:23 + pyenv versions 09:06:23 system 09:06:23 3.8.13 09:06:23 3.9.13 09:06:23 3.10.13 09:06:23 * 3.11.7 (set by /w/workspace/transportpce-tox-verify-transportpce-master/.python-version) 09:06:23 + command -v pyenv 09:06:23 ++ pyenv init - --no-rehash 09:06:23 + eval 'PATH="$(bash --norc -ec '\''IFS=:; paths=($PATH); 09:06:23 for i in ${!paths[@]}; do 09:06:23 if [[ ${paths[i]} == "'\'''\''/opt/pyenv/shims'\'''\''" ]]; then unset '\''\'\'''\''paths[i]'\''\'\'''\''; 09:06:23 fi; done; 09:06:23 echo "${paths[*]}"'\'')" 09:06:23 export PATH="/opt/pyenv/shims:${PATH}" 09:06:23 export PYENV_SHELL=bash 09:06:23 source '\''/opt/pyenv/libexec/../completions/pyenv.bash'\'' 09:06:23 pyenv() { 09:06:23 local command 09:06:23 command="${1:-}" 09:06:23 if [ "$#" -gt 0 ]; then 09:06:23 shift 09:06:23 fi 09:06:23 09:06:23 case "$command" in 09:06:23 rehash|shell) 09:06:23 eval "$(pyenv "sh-$command" "$@")" 09:06:23 ;; 09:06:23 *) 09:06:23 command pyenv "$command" "$@" 09:06:23 ;; 09:06:23 esac 09:06:23 }' 09:06:23 +++ bash --norc -ec 'IFS=:; paths=($PATH); 09:06:23 for i in ${!paths[@]}; do 09:06:23 if [[ ${paths[i]} == "/opt/pyenv/shims" ]]; then unset '\''paths[i]'\''; 09:06:23 fi; done; 09:06:23 echo "${paths[*]}"' 09:06:23 ++ PATH=/opt/pyenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/puppetlabs/bin 09:06:23 ++ export PATH=/opt/pyenv/shims:/opt/pyenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/puppetlabs/bin 09:06:23 ++ PATH=/opt/pyenv/shims:/opt/pyenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/puppetlabs/bin 09:06:23 ++ export PYENV_SHELL=bash 09:06:23 ++ PYENV_SHELL=bash 09:06:23 ++ source /opt/pyenv/libexec/../completions/pyenv.bash 09:06:23 +++ complete -F _pyenv pyenv 09:06:23 ++ lf-pyver python3 09:06:23 ++ local py_version_xy=python3 09:06:23 ++ local py_version_xyz= 09:06:23 ++ pyenv versions 09:06:23 ++ local command 09:06:23 ++ command=versions 09:06:23 ++ '[' 1 -gt 0 ']' 09:06:23 ++ shift 09:06:23 ++ case "$command" in 09:06:23 ++ command pyenv versions 09:06:23 ++ pyenv versions 09:06:23 ++ sed 's/^[ *]* //' 09:06:23 ++ grep -E '^[0-9.]*[0-9]$' 09:06:23 ++ awk '{ print $1 }' 09:06:23 ++ [[ ! -s /tmp/.pyenv_versions ]] 09:06:23 +++ grep '^3' /tmp/.pyenv_versions 09:06:23 +++ sort -V 09:06:23 +++ tail -n 1 09:06:23 ++ py_version_xyz=3.11.7 09:06:23 ++ [[ -z 3.11.7 ]] 09:06:23 ++ echo 3.11.7 09:06:23 ++ return 0 09:06:23 + pyenv local 3.11.7 09:06:23 + local command 09:06:23 + command=local 09:06:23 + '[' 2 -gt 0 ']' 09:06:23 + shift 09:06:23 + case "$command" in 09:06:23 + command pyenv local 3.11.7 09:06:23 + pyenv local 3.11.7 09:06:23 + for arg in "$@" 09:06:23 + case $arg in 09:06:23 + pkg_list+='tox ' 09:06:23 + for arg in "$@" 09:06:23 + case $arg in 09:06:23 + pkg_list+='virtualenv ' 09:06:23 + for arg in "$@" 09:06:23 + case $arg in 09:06:23 + pkg_list+='urllib3~=1.26.15 ' 09:06:23 + [[ -f /tmp/.toxenv ]] 09:06:23 + [[ ! -f /tmp/.toxenv ]] 09:06:23 + [[ -n '' ]] 09:06:23 + python3 -m venv /tmp/venv-IqBp 09:06:31 + echo 'lf-activate-venv(): INFO: Creating python3 venv at /tmp/venv-IqBp' 09:06:31 lf-activate-venv(): INFO: Creating python3 venv at /tmp/venv-IqBp 09:06:31 + echo /tmp/venv-IqBp 09:06:31 + echo 'lf-activate-venv(): INFO: Save venv in file: /tmp/.toxenv' 09:06:31 lf-activate-venv(): INFO: Save venv in file: /tmp/.toxenv 09:06:31 + /tmp/venv-IqBp/bin/python3 -m pip install --upgrade --quiet pip virtualenv 09:06:36 + [[ -z tox virtualenv urllib3~=1.26.15 ]] 09:06:36 + echo 'lf-activate-venv(): INFO: Installing: tox virtualenv urllib3~=1.26.15 ' 09:06:36 lf-activate-venv(): INFO: Installing: tox virtualenv urllib3~=1.26.15 09:06:36 + /tmp/venv-IqBp/bin/python3 -m pip install --upgrade --quiet --upgrade-strategy eager tox virtualenv urllib3~=1.26.15 09:06:38 + type python3 09:06:38 + true 09:06:38 + echo 'lf-activate-venv(): INFO: Adding /tmp/venv-IqBp/bin to PATH' 09:06:38 lf-activate-venv(): INFO: Adding /tmp/venv-IqBp/bin to PATH 09:06:38 + PATH=/tmp/venv-IqBp/bin:/opt/pyenv/shims:/opt/pyenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/puppetlabs/bin 09:06:38 + return 0 09:06:38 + python3 --version 09:06:38 Python 3.11.7 09:06:38 + python3 -m pip --version 09:06:39 pip 24.2 from /tmp/venv-IqBp/lib/python3.11/site-packages/pip (python 3.11) 09:06:39 + python3 -m pip freeze 09:06:39 cachetools==5.5.0 09:06:39 chardet==5.2.0 09:06:39 colorama==0.4.6 09:06:39 distlib==0.3.8 09:06:39 filelock==3.16.1 09:06:39 packaging==24.1 09:06:39 platformdirs==4.3.6 09:06:39 pluggy==1.5.0 09:06:39 pyproject-api==1.8.0 09:06:39 tox==4.20.0 09:06:39 urllib3==1.26.20 09:06:39 virtualenv==20.26.5 09:06:39 [transportpce-tox-verify-transportpce-master] $ /bin/sh -xe /tmp/jenkins9119463691908815114.sh 09:06:39 [EnvInject] - Injecting environment variables from a build step. 09:06:39 [EnvInject] - Injecting as environment variables the properties content 09:06:39 PARALLEL=True 09:06:39 09:06:39 [EnvInject] - Variables injected successfully. 09:06:39 [transportpce-tox-verify-transportpce-master] $ /bin/bash -l /tmp/jenkins17556470904657009315.sh 09:06:39 ---> tox-run.sh 09:06:39 + PATH=/home/jenkins/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/puppetlabs/bin 09:06:39 + ARCHIVE_TOX_DIR=/w/workspace/transportpce-tox-verify-transportpce-master/archives/tox 09:06:39 + ARCHIVE_DOC_DIR=/w/workspace/transportpce-tox-verify-transportpce-master/archives/docs 09:06:39 + mkdir -p /w/workspace/transportpce-tox-verify-transportpce-master/archives/tox 09:06:39 + cd /w/workspace/transportpce-tox-verify-transportpce-master/. 09:06:39 + source /home/jenkins/lf-env.sh 09:06:39 + lf-activate-venv --venv-file /tmp/.toxenv tox virtualenv urllib3~=1.26.15 09:06:39 ++ mktemp -d /tmp/venv-XXXX 09:06:39 + lf_venv=/tmp/venv-GAwk 09:06:39 + local venv_file=/tmp/.os_lf_venv 09:06:39 + local python=python3 09:06:39 + local options 09:06:39 + local set_path=true 09:06:39 + local install_args= 09:06:39 ++ getopt -o np:v: -l no-path,system-site-packages,python:,venv-file: -n lf-activate-venv -- --venv-file /tmp/.toxenv tox virtualenv urllib3~=1.26.15 09:06:39 + options=' --venv-file '\''/tmp/.toxenv'\'' -- '\''tox'\'' '\''virtualenv'\'' '\''urllib3~=1.26.15'\''' 09:06:39 + eval set -- ' --venv-file '\''/tmp/.toxenv'\'' -- '\''tox'\'' '\''virtualenv'\'' '\''urllib3~=1.26.15'\''' 09:06:39 ++ set -- --venv-file /tmp/.toxenv -- tox virtualenv urllib3~=1.26.15 09:06:39 + true 09:06:39 + case $1 in 09:06:39 + venv_file=/tmp/.toxenv 09:06:39 + shift 2 09:06:39 + true 09:06:39 + case $1 in 09:06:39 + shift 09:06:39 + break 09:06:39 + case $python in 09:06:39 + local pkg_list= 09:06:39 + [[ -d /opt/pyenv ]] 09:06:39 + echo 'Setup pyenv:' 09:06:39 Setup pyenv: 09:06:39 + export PYENV_ROOT=/opt/pyenv 09:06:39 + PYENV_ROOT=/opt/pyenv 09:06:39 + export PATH=/opt/pyenv/bin:/home/jenkins/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/puppetlabs/bin 09:06:39 + PATH=/opt/pyenv/bin:/home/jenkins/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/puppetlabs/bin 09:06:39 + pyenv versions 09:06:39 system 09:06:39 3.8.13 09:06:39 3.9.13 09:06:39 3.10.13 09:06:39 * 3.11.7 (set by /w/workspace/transportpce-tox-verify-transportpce-master/.python-version) 09:06:39 + command -v pyenv 09:06:39 ++ pyenv init - --no-rehash 09:06:39 + eval 'PATH="$(bash --norc -ec '\''IFS=:; paths=($PATH); 09:06:39 for i in ${!paths[@]}; do 09:06:39 if [[ ${paths[i]} == "'\'''\''/opt/pyenv/shims'\'''\''" ]]; then unset '\''\'\'''\''paths[i]'\''\'\'''\''; 09:06:39 fi; done; 09:06:39 echo "${paths[*]}"'\'')" 09:06:39 export PATH="/opt/pyenv/shims:${PATH}" 09:06:39 export PYENV_SHELL=bash 09:06:39 source '\''/opt/pyenv/libexec/../completions/pyenv.bash'\'' 09:06:39 pyenv() { 09:06:39 local command 09:06:39 command="${1:-}" 09:06:39 if [ "$#" -gt 0 ]; then 09:06:39 shift 09:06:39 fi 09:06:39 09:06:39 case "$command" in 09:06:39 rehash|shell) 09:06:39 eval "$(pyenv "sh-$command" "$@")" 09:06:39 ;; 09:06:39 *) 09:06:39 command pyenv "$command" "$@" 09:06:39 ;; 09:06:39 esac 09:06:39 }' 09:06:39 +++ bash --norc -ec 'IFS=:; paths=($PATH); 09:06:39 for i in ${!paths[@]}; do 09:06:39 if [[ ${paths[i]} == "/opt/pyenv/shims" ]]; then unset '\''paths[i]'\''; 09:06:39 fi; done; 09:06:39 echo "${paths[*]}"' 09:06:39 ++ PATH=/opt/pyenv/bin:/home/jenkins/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/puppetlabs/bin 09:06:39 ++ export PATH=/opt/pyenv/shims:/opt/pyenv/bin:/home/jenkins/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/puppetlabs/bin 09:06:39 ++ PATH=/opt/pyenv/shims:/opt/pyenv/bin:/home/jenkins/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/puppetlabs/bin 09:06:39 ++ export PYENV_SHELL=bash 09:06:39 ++ PYENV_SHELL=bash 09:06:39 ++ source /opt/pyenv/libexec/../completions/pyenv.bash 09:06:39 +++ complete -F _pyenv pyenv 09:06:39 ++ lf-pyver python3 09:06:39 ++ local py_version_xy=python3 09:06:39 ++ local py_version_xyz= 09:06:39 ++ pyenv versions 09:06:39 ++ local command 09:06:39 ++ command=versions 09:06:39 ++ '[' 1 -gt 0 ']' 09:06:39 ++ shift 09:06:39 ++ case "$command" in 09:06:39 ++ command pyenv versions 09:06:39 ++ pyenv versions 09:06:39 ++ sed 's/^[ *]* //' 09:06:39 ++ grep -E '^[0-9.]*[0-9]$' 09:06:39 ++ awk '{ print $1 }' 09:06:39 ++ [[ ! -s /tmp/.pyenv_versions ]] 09:06:39 +++ grep '^3' /tmp/.pyenv_versions 09:06:39 +++ tail -n 1 09:06:39 +++ sort -V 09:06:39 ++ py_version_xyz=3.11.7 09:06:39 ++ [[ -z 3.11.7 ]] 09:06:39 ++ echo 3.11.7 09:06:39 ++ return 0 09:06:39 + pyenv local 3.11.7 09:06:39 + local command 09:06:39 + command=local 09:06:39 + '[' 2 -gt 0 ']' 09:06:39 + shift 09:06:39 + case "$command" in 09:06:39 + command pyenv local 3.11.7 09:06:39 + pyenv local 3.11.7 09:06:39 + for arg in "$@" 09:06:39 + case $arg in 09:06:39 + pkg_list+='tox ' 09:06:39 + for arg in "$@" 09:06:39 + case $arg in 09:06:39 + pkg_list+='virtualenv ' 09:06:39 + for arg in "$@" 09:06:39 + case $arg in 09:06:39 + pkg_list+='urllib3~=1.26.15 ' 09:06:39 + [[ -f /tmp/.toxenv ]] 09:06:39 ++ cat /tmp/.toxenv 09:06:39 + lf_venv=/tmp/venv-IqBp 09:06:39 + echo 'lf-activate-venv(): INFO: Reuse venv:/tmp/venv-IqBp from' file:/tmp/.toxenv 09:06:39 lf-activate-venv(): INFO: Reuse venv:/tmp/venv-IqBp from file:/tmp/.toxenv 09:06:39 + /tmp/venv-IqBp/bin/python3 -m pip install --upgrade --quiet pip virtualenv 09:06:40 + [[ -z tox virtualenv urllib3~=1.26.15 ]] 09:06:40 + echo 'lf-activate-venv(): INFO: Installing: tox virtualenv urllib3~=1.26.15 ' 09:06:40 lf-activate-venv(): INFO: Installing: tox virtualenv urllib3~=1.26.15 09:06:40 + /tmp/venv-IqBp/bin/python3 -m pip install --upgrade --quiet --upgrade-strategy eager tox virtualenv urllib3~=1.26.15 09:06:48 + type python3 09:06:48 + true 09:06:48 + echo 'lf-activate-venv(): INFO: Adding /tmp/venv-IqBp/bin to PATH' 09:06:48 lf-activate-venv(): INFO: Adding /tmp/venv-IqBp/bin to PATH 09:06:48 + PATH=/tmp/venv-IqBp/bin:/opt/pyenv/shims:/opt/pyenv/bin:/home/jenkins/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/puppetlabs/bin 09:06:48 + return 0 09:06:48 + [[ -d /opt/pyenv ]] 09:06:48 + echo '---> Setting up pyenv' 09:06:48 ---> Setting up pyenv 09:06:48 + export PYENV_ROOT=/opt/pyenv 09:06:48 + PYENV_ROOT=/opt/pyenv 09:06:48 + export PATH=/opt/pyenv/bin:/tmp/venv-IqBp/bin:/opt/pyenv/shims:/opt/pyenv/bin:/home/jenkins/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/puppetlabs/bin 09:06:48 + PATH=/opt/pyenv/bin:/tmp/venv-IqBp/bin:/opt/pyenv/shims:/opt/pyenv/bin:/home/jenkins/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/puppetlabs/bin 09:06:48 ++ pwd 09:06:48 + PYTHONPATH=/w/workspace/transportpce-tox-verify-transportpce-master 09:06:48 + export PYTHONPATH 09:06:48 + export TOX_TESTENV_PASSENV=PYTHONPATH 09:06:48 + TOX_TESTENV_PASSENV=PYTHONPATH 09:06:48 + tox --version 09:06:49 4.20.0 from /tmp/venv-IqBp/lib/python3.11/site-packages/tox/__init__.py 09:06:49 + PARALLEL=True 09:06:49 + TOX_OPTIONS_LIST= 09:06:49 + [[ -n '' ]] 09:06:49 + case ${PARALLEL,,} in 09:06:49 + TOX_OPTIONS_LIST=' --parallel auto --parallel-live' 09:06:49 + tox --parallel auto --parallel-live 09:06:49 + tee -a /w/workspace/transportpce-tox-verify-transportpce-master/archives/tox/tox.log 09:06:50 docs: install_deps> python -I -m pip install -r docs/requirements.txt 09:06:51 checkbashisms: freeze> python -m pip freeze --all 09:06:51 docs-linkcheck: install_deps> python -I -m pip install -r docs/requirements.txt 09:06:51 buildcontroller: install_deps> python -I -m pip install 'setuptools>=7.0' -r /w/workspace/transportpce-tox-verify-transportpce-master/tests/requirements.txt -r /w/workspace/transportpce-tox-verify-transportpce-master/tests/test-requirements.txt 09:06:51 checkbashisms: pip==24.2,setuptools==75.1.0,wheel==0.44.0 09:06:51 checkbashisms: commands[0] /w/workspace/transportpce-tox-verify-transportpce-master/tests> ./fixCIcentOS8reposMirrors.sh 09:06:51 checkbashisms: commands[1] /w/workspace/transportpce-tox-verify-transportpce-master/tests> sh -c 'command checkbashisms>/dev/null || sudo yum install -y devscripts-checkbashisms || sudo yum install -y devscripts-minimal || sudo yum install -y devscripts || sudo yum install -y https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/31/Everything/x86_64/os/Packages/d/devscripts-checkbashisms-2.19.6-2.fc31.x86_64.rpm || (echo "checkbashisms command not found - please install it (e.g. sudo apt-get install devscripts | yum install devscripts-minimal )" >&2 && exit 1)' 09:06:51 checkbashisms: commands[2] /w/workspace/transportpce-tox-verify-transportpce-master/tests> find . -not -path '*/\.*' -name '*.sh' -exec checkbashisms -f '{}' + 09:06:52 script ./reflectwarn.sh does not appear to have a #! interpreter line; 09:06:52 you may get strange results 09:06:52 checkbashisms: OK ✔ in 3.24 seconds 09:06:52 pre-commit: install_deps> python -I -m pip install pre-commit 09:06:56 pre-commit: freeze> python -m pip freeze --all 09:06:56 pre-commit: cfgv==3.4.0,distlib==0.3.8,filelock==3.16.1,identify==2.6.1,nodeenv==1.9.1,pip==24.2,platformdirs==4.3.6,pre-commit==3.8.0,PyYAML==6.0.2,setuptools==75.1.0,virtualenv==20.26.5,wheel==0.44.0 09:06:56 pre-commit: commands[0] /w/workspace/transportpce-tox-verify-transportpce-master/tests> ./fixCIcentOS8reposMirrors.sh 09:06:56 pre-commit: commands[1] /w/workspace/transportpce-tox-verify-transportpce-master/tests> sh -c 'which cpan || sudo yum install -y perl-CPAN || (echo "cpan command not found - please install it (e.g. sudo apt-get install perl-modules | yum install perl-CPAN )" >&2 && exit 1)' 09:06:56 /usr/bin/cpan 09:06:56 pre-commit: commands[2] /w/workspace/transportpce-tox-verify-transportpce-master/tests> pre-commit run --all-files --show-diff-on-failure 09:06:56 [INFO] Initializing environment for https://github.com/pre-commit/pre-commit-hooks. 09:06:57 [INFO] Initializing environment for https://github.com/jorisroovers/gitlint. 09:06:57 [INFO] Initializing environment for https://github.com/jorisroovers/gitlint:./gitlint-core[trusted-deps]. 09:06:58 [INFO] Initializing environment for https://github.com/Lucas-C/pre-commit-hooks. 09:06:58 [INFO] Initializing environment for https://github.com/pre-commit/mirrors-autopep8. 09:06:58 [INFO] Initializing environment for https://github.com/perltidy/perltidy. 09:06:58 buildcontroller: freeze> python -m pip freeze --all 09:06:59 buildcontroller: bcrypt==4.2.0,certifi==2024.8.30,cffi==1.17.1,charset-normalizer==3.3.2,cryptography==43.0.1,dict2xml==1.7.6,idna==3.10,iniconfig==2.0.0,lxml==5.3.0,netconf-client==3.1.1,packaging==24.1,paramiko==3.5.0,pip==24.2,pluggy==1.5.0,psutil==6.0.0,pycparser==2.22,PyNaCl==1.5.0,pytest==8.3.3,requests==2.32.3,setuptools==75.1.0,urllib3==2.2.3,wheel==0.44.0 09:06:59 buildcontroller: commands[0] /w/workspace/transportpce-tox-verify-transportpce-master/tests> ./build_controller.sh 09:06:59 + update-java-alternatives -l 09:06:59 java-1.11.0-openjdk-amd64 1111 /usr/lib/jvm/java-1.11.0-openjdk-amd64 09:06:59 java-1.12.0-openjdk-amd64 1211 /usr/lib/jvm/java-1.12.0-openjdk-amd64 09:06:59 java-1.17.0-openjdk-amd64 1711 /usr/lib/jvm/java-1.17.0-openjdk-amd64 09:06:59 java-1.21.0-openjdk-amd64 2111 /usr/lib/jvm/java-1.21.0-openjdk-amd64 09:06:59 java-1.8.0-openjdk-amd64 1081 /usr/lib/jvm/java-1.8.0-openjdk-amd64 09:06:59 + sudo update-java-alternatives -s java-1.21.0-openjdk-amd64 09:06:59 [INFO] Installing environment for https://github.com/pre-commit/pre-commit-hooks. 09:06:59 [INFO] Once installed this environment will be reused. 09:06:59 [INFO] This may take a few minutes... 09:07:00 + sed -n ;s/.* version "\(.*\)\.\(.*\)\..*".*$/\1/p; 09:07:00 + java -version 09:07:00 + JAVA_VER=21 09:07:00 + echo 21 09:07:00 21 09:07:00 + javac -version 09:07:00 + sed -n ;s/javac \(.*\)\.\(.*\)\..*.*$/\1/p; 09:07:01 + JAVAC_VER=21 09:07:01 + echo 21 09:07:01 21 09:07:01 ok, java is 21 or newer 09:07:01 + [ 21 -ge 21 ] 09:07:01 + [ 21 -ge 21 ] 09:07:01 + echo ok, java is 21 or newer 09:07:01 + wget -nv https://dlcdn.apache.org/maven/maven-3/3.9.8/binaries/apache-maven-3.9.8-bin.tar.gz -P /tmp 09:07:01 2024-09-26 09:07:01 URL:https://dlcdn.apache.org/maven/maven-3/3.9.8/binaries/apache-maven-3.9.8-bin.tar.gz [9083702/9083702] -> "/tmp/apache-maven-3.9.8-bin.tar.gz" [1] 09:07:01 + sudo mkdir -p /opt 09:07:01 + sudo tar xf /tmp/apache-maven-3.9.8-bin.tar.gz -C /opt 09:07:01 + sudo ln -s /opt/apache-maven-3.9.8 /opt/maven 09:07:01 + sudo ln -s /opt/maven/bin/mvn /usr/bin/mvn 09:07:01 + mvn --version 09:07:02 Apache Maven 3.9.8 (36645f6c9b5079805ea5009217e36f2cffd34256) 09:07:02 Maven home: /opt/maven 09:07:02 Java version: 21.0.4, vendor: Ubuntu, runtime: /usr/lib/jvm/java-21-openjdk-amd64 09:07:02 Default locale: en, platform encoding: UTF-8 09:07:02 OS name: "linux", version: "5.4.0-190-generic", arch: "amd64", family: "unix" 09:07:02 NOTE: Picked up JDK_JAVA_OPTIONS: 09:07:02 --add-opens=java.base/java.io=ALL-UNNAMED 09:07:02 --add-opens=java.base/java.lang=ALL-UNNAMED 09:07:02 --add-opens=java.base/java.lang.invoke=ALL-UNNAMED 09:07:02 --add-opens=java.base/java.lang.reflect=ALL-UNNAMED 09:07:02 --add-opens=java.base/java.net=ALL-UNNAMED 09:07:02 --add-opens=java.base/java.nio=ALL-UNNAMED 09:07:02 --add-opens=java.base/java.nio.charset=ALL-UNNAMED 09:07:02 --add-opens=java.base/java.nio.file=ALL-UNNAMED 09:07:02 --add-opens=java.base/java.util=ALL-UNNAMED 09:07:02 --add-opens=java.base/java.util.jar=ALL-UNNAMED 09:07:02 --add-opens=java.base/java.util.stream=ALL-UNNAMED 09:07:02 --add-opens=java.base/java.util.zip=ALL-UNNAMED 09:07:02 --add-opens java.base/sun.nio.ch=ALL-UNNAMED 09:07:02 --add-opens java.base/sun.nio.fs=ALL-UNNAMED 09:07:02 -Xlog:disable 09:07:03 [INFO] Installing environment for https://github.com/Lucas-C/pre-commit-hooks. 09:07:03 [INFO] Once installed this environment will be reused. 09:07:03 [INFO] This may take a few minutes... 09:07:08 [INFO] Installing environment for https://github.com/pre-commit/mirrors-autopep8. 09:07:08 [INFO] Once installed this environment will be reused. 09:07:08 [INFO] This may take a few minutes... 09:07:12 [INFO] Installing environment for https://github.com/perltidy/perltidy. 09:07:12 [INFO] Once installed this environment will be reused. 09:07:12 [INFO] This may take a few minutes... 09:07:19 docs: freeze> python -m pip freeze --all 09:07:19 docs: alabaster==0.7.16,attrs==24.2.0,babel==2.16.0,blockdiag==3.0.0,certifi==2024.8.30,charset-normalizer==3.3.2,contourpy==1.3.0,cycler==0.12.1,docutils==0.20.1,fonttools==4.54.1,funcparserlib==2.0.0a0,future==1.0.0,idna==3.10,imagesize==1.4.1,Jinja2==3.1.4,jsonschema==3.2.0,kiwisolver==1.4.7,lfdocs-conf==0.9.0,MarkupSafe==2.1.5,matplotlib==3.9.2,numpy==2.1.1,nwdiag==3.0.0,packaging==24.1,pillow==10.4.0,pip==24.2,Pygments==2.18.0,pyparsing==3.1.4,pyrsistent==0.20.0,python-dateutil==2.9.0.post0,PyYAML==6.0.2,requests==2.32.3,requests-file==1.5.1,seqdiag==3.0.0,setuptools==75.1.0,six==1.16.0,snowballstemmer==2.2.0,Sphinx==7.4.7,sphinx-bootstrap-theme==0.8.1,sphinx-data-viewer==0.1.5,sphinx-rtd-theme==2.0.0,sphinx-tabs==3.4.5,sphinxcontrib-applehelp==2.0.0,sphinxcontrib-blockdiag==3.0.0,sphinxcontrib-devhelp==2.0.0,sphinxcontrib-htmlhelp==2.1.0,sphinxcontrib-jquery==4.1,sphinxcontrib-jsmath==1.0.1,sphinxcontrib-needs==0.7.9,sphinxcontrib-nwdiag==2.0.0,sphinxcontrib-plantuml==0.30,sphinxcontrib-qthelp==2.0.0,sphinxcontrib-seqdiag==3.0.0,sphinxcontrib-serializinghtml==2.0.0,sphinxcontrib-swaggerdoc==0.1.7,urllib3==2.2.3,webcolors==24.8.0,wheel==0.44.0 09:07:19 docs: commands[0] /w/workspace/transportpce-tox-verify-transportpce-master/tests> sphinx-build -q -W --keep-going -b html -n -d /w/workspace/transportpce-tox-verify-transportpce-master/.tox/docs/tmp/doctrees ../docs/ /w/workspace/transportpce-tox-verify-transportpce-master/docs/_build/html 09:07:19 docs-linkcheck: freeze> python -m pip freeze --all 09:07:20 docs-linkcheck: alabaster==0.7.16,attrs==24.2.0,babel==2.16.0,blockdiag==3.0.0,certifi==2024.8.30,charset-normalizer==3.3.2,contourpy==1.3.0,cycler==0.12.1,docutils==0.20.1,fonttools==4.54.1,funcparserlib==2.0.0a0,future==1.0.0,idna==3.10,imagesize==1.4.1,Jinja2==3.1.4,jsonschema==3.2.0,kiwisolver==1.4.7,lfdocs-conf==0.9.0,MarkupSafe==2.1.5,matplotlib==3.9.2,numpy==2.1.1,nwdiag==3.0.0,packaging==24.1,pillow==10.4.0,pip==24.2,Pygments==2.18.0,pyparsing==3.1.4,pyrsistent==0.20.0,python-dateutil==2.9.0.post0,PyYAML==6.0.2,requests==2.32.3,requests-file==1.5.1,seqdiag==3.0.0,setuptools==75.1.0,six==1.16.0,snowballstemmer==2.2.0,Sphinx==7.4.7,sphinx-bootstrap-theme==0.8.1,sphinx-data-viewer==0.1.5,sphinx-rtd-theme==2.0.0,sphinx-tabs==3.4.5,sphinxcontrib-applehelp==2.0.0,sphinxcontrib-blockdiag==3.0.0,sphinxcontrib-devhelp==2.0.0,sphinxcontrib-htmlhelp==2.1.0,sphinxcontrib-jquery==4.1,sphinxcontrib-jsmath==1.0.1,sphinxcontrib-needs==0.7.9,sphinxcontrib-nwdiag==2.0.0,sphinxcontrib-plantuml==0.30,sphinxcontrib-qthelp==2.0.0,sphinxcontrib-seqdiag==3.0.0,sphinxcontrib-serializinghtml==2.0.0,sphinxcontrib-swaggerdoc==0.1.7,urllib3==2.2.3,webcolors==24.8.0,wheel==0.44.0 09:07:20 docs-linkcheck: commands[0] /w/workspace/transportpce-tox-verify-transportpce-master/tests> sphinx-build -q -b linkcheck -d /w/workspace/transportpce-tox-verify-transportpce-master/.tox/docs-linkcheck/tmp/doctrees ../docs/ /w/workspace/transportpce-tox-verify-transportpce-master/docs/_build/linkcheck 09:07:20 /w/workspace/transportpce-tox-verify-transportpce-master/.tox/docs-linkcheck/lib/python3.11/site-packages/sphinx/builders/linkcheck.py:86: RemovedInSphinx80Warning: The default value for 'linkcheck_report_timeouts_as_broken' will change to False in Sphinx 8, meaning that request timeouts will be reported with a new 'timeout' status, instead of as 'broken'. This is intended to provide more detail as to the failure mode. See https://github.com/sphinx-doc/sphinx/issues/11868 for details. 09:07:20 warnings.warn(deprecation_msg, RemovedInSphinx80Warning, stacklevel=1) 09:07:22 docs: OK ✔ in 32.83 seconds 09:07:22 pylint: install_deps> python -I -m pip install 'pylint>=2.6.0' 09:07:24 trim trailing whitespace.................................................Passed 09:07:24 Tabs remover.............................................................Passed 09:07:24 autopep8.................................................................docs-linkcheck: OK ✔ in 34.18 seconds 09:07:27 pylint: freeze> python -m pip freeze --all 09:07:28 pylint: astroid==3.3.4,dill==0.3.8,isort==5.13.2,mccabe==0.7.0,pip==24.2,platformdirs==4.3.6,pylint==3.3.1,setuptools==75.1.0,tomlkit==0.13.2,wheel==0.44.0 09:07:28 pylint: commands[0] /w/workspace/transportpce-tox-verify-transportpce-master/tests> find transportpce_tests/ -name '*.py' -exec pylint --fail-under=10 --max-line-length=120 --disable=missing-docstring,import-error --disable=fixme --disable=duplicate-code '--module-rgx=([a-z0-9_]+$)|([0-9.]{1,30}$)' '--method-rgx=(([a-z_][a-zA-Z0-9_]{2,})|(_[a-z0-9_]*)|(__[a-zA-Z][a-zA-Z0-9_]+__))$' '--variable-rgx=[a-zA-Z_][a-zA-Z0-9_]{1,30}$' '{}' + 09:07:29 Passed 09:07:29 perltidy.................................................................Passed 09:07:29 pre-commit: commands[3] /w/workspace/transportpce-tox-verify-transportpce-master/tests> pre-commit run gitlint-ci --hook-stage manual 09:07:30 [INFO] Installing environment for https://github.com/jorisroovers/gitlint. 09:07:30 [INFO] Once installed this environment will be reused. 09:07:30 [INFO] This may take a few minutes... 09:07:37 gitlint..................................................................Passed 09:07:47 09:07:47 ------------------------------------ 09:07:47 Your code has been rated at 10.00/10 09:07:47 09:08:41 pre-commit: OK ✔ in 44.88 seconds 09:08:41 pylint: OK ✔ in 27.12 seconds 09:08:41 buildcontroller: OK ✔ in 1 minute 50.75 seconds 09:08:41 testsPCE: install_deps> python -I -m pip install gnpy4tpce==2.4.7 'setuptools>=7.0' -r /w/workspace/transportpce-tox-verify-transportpce-master/tests/requirements.txt -r /w/workspace/transportpce-tox-verify-transportpce-master/tests/test-requirements.txt 09:08:41 build_karaf_tests121: install_deps> python -I -m pip install 'setuptools>=7.0' -r /w/workspace/transportpce-tox-verify-transportpce-master/tests/requirements.txt -r /w/workspace/transportpce-tox-verify-transportpce-master/tests/test-requirements.txt 09:08:41 sims: install_deps> python -I -m pip install 'setuptools>=7.0' -r /w/workspace/transportpce-tox-verify-transportpce-master/tests/requirements.txt -r /w/workspace/transportpce-tox-verify-transportpce-master/tests/test-requirements.txt 09:08:41 build_karaf_tests221: install_deps> python -I -m pip install 'setuptools>=7.0' -r /w/workspace/transportpce-tox-verify-transportpce-master/tests/requirements.txt -r /w/workspace/transportpce-tox-verify-transportpce-master/tests/test-requirements.txt 09:09:19 build_karaf_tests221: freeze> python -m pip freeze --all 09:09:19 build_karaf_tests121: freeze> python -m pip freeze --all 09:09:19 build_karaf_tests221: bcrypt==4.2.0,certifi==2024.8.30,cffi==1.17.1,charset-normalizer==3.3.2,cryptography==43.0.1,dict2xml==1.7.6,idna==3.10,iniconfig==2.0.0,lxml==5.3.0,netconf-client==3.1.1,packaging==24.1,paramiko==3.5.0,pip==24.2,pluggy==1.5.0,psutil==6.0.0,pycparser==2.22,PyNaCl==1.5.0,pytest==8.3.3,requests==2.32.3,setuptools==75.1.0,urllib3==2.2.3,wheel==0.44.0 09:09:19 build_karaf_tests221: commands[0] /w/workspace/transportpce-tox-verify-transportpce-master/tests> ./build_karaf_for_tests.sh 09:09:19 NOTE: Picked up JDK_JAVA_OPTIONS: 09:09:19 --add-opens=java.base/java.io=ALL-UNNAMED 09:09:19 --add-opens=java.base/java.lang=ALL-UNNAMED 09:09:19 --add-opens=java.base/java.lang.invoke=ALL-UNNAMED 09:09:19 --add-opens=java.base/java.lang.reflect=ALL-UNNAMED 09:09:19 --add-opens=java.base/java.net=ALL-UNNAMED 09:09:19 --add-opens=java.base/java.nio=ALL-UNNAMED 09:09:19 --add-opens=java.base/java.nio.charset=ALL-UNNAMED 09:09:19 --add-opens=java.base/java.nio.file=ALL-UNNAMED 09:09:19 --add-opens=java.base/java.util=ALL-UNNAMED 09:09:19 --add-opens=java.base/java.util.jar=ALL-UNNAMED 09:09:19 --add-opens=java.base/java.util.stream=ALL-UNNAMED 09:09:19 --add-opens=java.base/java.util.zip=ALL-UNNAMED 09:09:19 --add-opens java.base/sun.nio.ch=ALL-UNNAMED 09:09:19 --add-opens java.base/sun.nio.fs=ALL-UNNAMED 09:09:19 -Xlog:disable 09:09:20 build_karaf_tests121: bcrypt==4.2.0,certifi==2024.8.30,cffi==1.17.1,charset-normalizer==3.3.2,cryptography==43.0.1,dict2xml==1.7.6,idna==3.10,iniconfig==2.0.0,lxml==5.3.0,netconf-client==3.1.1,packaging==24.1,paramiko==3.5.0,pip==24.2,pluggy==1.5.0,psutil==6.0.0,pycparser==2.22,PyNaCl==1.5.0,pytest==8.3.3,requests==2.32.3,setuptools==75.1.0,urllib3==2.2.3,wheel==0.44.0 09:09:20 build_karaf_tests121: commands[0] /w/workspace/transportpce-tox-verify-transportpce-master/tests> ./build_karaf_for_tests.sh 09:09:20 sims: freeze> python -m pip freeze --all 09:09:20 NOTE: Picked up JDK_JAVA_OPTIONS: 09:09:20 --add-opens=java.base/java.io=ALL-UNNAMED 09:09:20 --add-opens=java.base/java.lang=ALL-UNNAMED 09:09:20 --add-opens=java.base/java.lang.invoke=ALL-UNNAMED 09:09:20 --add-opens=java.base/java.lang.reflect=ALL-UNNAMED 09:09:20 --add-opens=java.base/java.net=ALL-UNNAMED 09:09:20 --add-opens=java.base/java.nio=ALL-UNNAMED 09:09:20 --add-opens=java.base/java.nio.charset=ALL-UNNAMED 09:09:20 --add-opens=java.base/java.nio.file=ALL-UNNAMED 09:09:20 --add-opens=java.base/java.util=ALL-UNNAMED 09:09:20 --add-opens=java.base/java.util.jar=ALL-UNNAMED 09:09:20 --add-opens=java.base/java.util.stream=ALL-UNNAMED 09:09:20 --add-opens=java.base/java.util.zip=ALL-UNNAMED 09:09:20 --add-opens java.base/sun.nio.ch=ALL-UNNAMED 09:09:20 --add-opens java.base/sun.nio.fs=ALL-UNNAMED 09:09:20 -Xlog:disable 09:09:20 sims: bcrypt==4.2.0,certifi==2024.8.30,cffi==1.17.1,charset-normalizer==3.3.2,cryptography==43.0.1,dict2xml==1.7.6,idna==3.10,iniconfig==2.0.0,lxml==5.3.0,netconf-client==3.1.1,packaging==24.1,paramiko==3.5.0,pip==24.2,pluggy==1.5.0,psutil==6.0.0,pycparser==2.22,PyNaCl==1.5.0,pytest==8.3.3,requests==2.32.3,setuptools==75.1.0,urllib3==2.2.3,wheel==0.44.0 09:09:20 sims: commands[0] /w/workspace/transportpce-tox-verify-transportpce-master/tests> ./install_lightynode.sh 09:09:20 Using lighynode version 20.1.0.2 09:09:20 Installing lightynode device to ./lightynode/lightynode-openroadm-device directory 09:09:25 sims: OK ✔ in 45.14 seconds 09:09:25 build_karaf_tests71: install_deps> python -I -m pip install 'setuptools>=7.0' -r /w/workspace/transportpce-tox-verify-transportpce-master/tests/requirements.txt -r /w/workspace/transportpce-tox-verify-transportpce-master/tests/test-requirements.txt 09:10:48 build_karaf_tests221: OK ✔ in 2 minutes 7.52 seconds 09:10:48 build_karaf_tests_hybrid: install_deps> python -I -m pip install 'setuptools>=7.0' -r /w/workspace/transportpce-tox-verify-transportpce-master/tests/requirements.txt -r /w/workspace/transportpce-tox-verify-transportpce-master/tests/test-requirements.txt 09:10:50 build_karaf_tests121: OK ✔ in 2 minutes 10.58 seconds 09:10:50 tests_tapi: install_deps> python -I -m pip install 'setuptools>=7.0' -r /w/workspace/transportpce-tox-verify-transportpce-master/tests/requirements.txt -r /w/workspace/transportpce-tox-verify-transportpce-master/tests/test-requirements.txt 09:10:53 build_karaf_tests71: freeze> python -m pip freeze --all 09:10:53 build_karaf_tests71: bcrypt==4.2.0,certifi==2024.8.30,cffi==1.17.1,charset-normalizer==3.3.2,cryptography==43.0.1,dict2xml==1.7.6,idna==3.10,iniconfig==2.0.0,lxml==5.3.0,netconf-client==3.1.1,packaging==24.1,paramiko==3.5.0,pip==24.2,pluggy==1.5.0,psutil==6.0.0,pycparser==2.22,PyNaCl==1.5.0,pytest==8.3.3,requests==2.32.3,setuptools==75.1.0,urllib3==2.2.3,wheel==0.44.0 09:10:53 build_karaf_tests71: commands[0] /w/workspace/transportpce-tox-verify-transportpce-master/tests> ./build_karaf_for_tests.sh 09:10:53 NOTE: Picked up JDK_JAVA_OPTIONS: 09:10:53 --add-opens=java.base/java.io=ALL-UNNAMED 09:10:53 --add-opens=java.base/java.lang=ALL-UNNAMED 09:10:53 --add-opens=java.base/java.lang.invoke=ALL-UNNAMED 09:10:53 --add-opens=java.base/java.lang.reflect=ALL-UNNAMED 09:10:53 --add-opens=java.base/java.net=ALL-UNNAMED 09:10:53 --add-opens=java.base/java.nio=ALL-UNNAMED 09:10:53 --add-opens=java.base/java.nio.charset=ALL-UNNAMED 09:10:53 --add-opens=java.base/java.nio.file=ALL-UNNAMED 09:10:53 --add-opens=java.base/java.util=ALL-UNNAMED 09:10:53 --add-opens=java.base/java.util.jar=ALL-UNNAMED 09:10:53 --add-opens=java.base/java.util.stream=ALL-UNNAMED 09:10:53 --add-opens=java.base/java.util.zip=ALL-UNNAMED 09:10:53 --add-opens java.base/sun.nio.ch=ALL-UNNAMED 09:10:53 --add-opens java.base/sun.nio.fs=ALL-UNNAMED 09:10:53 -Xlog:disable 09:11:01 build_karaf_tests_hybrid: freeze> python -m pip freeze --all 09:11:01 build_karaf_tests_hybrid: bcrypt==4.2.0,certifi==2024.8.30,cffi==1.17.1,charset-normalizer==3.3.2,cryptography==43.0.1,dict2xml==1.7.6,idna==3.10,iniconfig==2.0.0,lxml==5.3.0,netconf-client==3.1.1,packaging==24.1,paramiko==3.5.0,pip==24.2,pluggy==1.5.0,psutil==6.0.0,pycparser==2.22,PyNaCl==1.5.0,pytest==8.3.3,requests==2.32.3,setuptools==75.1.0,urllib3==2.2.3,wheel==0.44.0 09:11:01 build_karaf_tests_hybrid: commands[0] /w/workspace/transportpce-tox-verify-transportpce-master/tests> ./build_karaf_for_tests.sh 09:11:01 tests_tapi: freeze> python -m pip freeze --all 09:11:02 NOTE: Picked up JDK_JAVA_OPTIONS: 09:11:02 --add-opens=java.base/java.io=ALL-UNNAMED 09:11:02 --add-opens=java.base/java.lang=ALL-UNNAMED 09:11:02 --add-opens=java.base/java.lang.invoke=ALL-UNNAMED 09:11:02 --add-opens=java.base/java.lang.reflect=ALL-UNNAMED 09:11:02 --add-opens=java.base/java.net=ALL-UNNAMED 09:11:02 --add-opens=java.base/java.nio=ALL-UNNAMED 09:11:02 --add-opens=java.base/java.nio.charset=ALL-UNNAMED 09:11:02 --add-opens=java.base/java.nio.file=ALL-UNNAMED 09:11:02 --add-opens=java.base/java.util=ALL-UNNAMED 09:11:02 --add-opens=java.base/java.util.jar=ALL-UNNAMED 09:11:02 --add-opens=java.base/java.util.stream=ALL-UNNAMED 09:11:02 --add-opens=java.base/java.util.zip=ALL-UNNAMED 09:11:02 --add-opens java.base/sun.nio.ch=ALL-UNNAMED 09:11:02 --add-opens java.base/sun.nio.fs=ALL-UNNAMED 09:11:02 -Xlog:disable 09:11:02 tests_tapi: bcrypt==4.2.0,certifi==2024.8.30,cffi==1.17.1,charset-normalizer==3.3.2,cryptography==43.0.1,dict2xml==1.7.6,idna==3.10,iniconfig==2.0.0,lxml==5.3.0,netconf-client==3.1.1,packaging==24.1,paramiko==3.5.0,pip==24.2,pluggy==1.5.0,psutil==6.0.0,pycparser==2.22,PyNaCl==1.5.0,pytest==8.3.3,requests==2.32.3,setuptools==75.1.0,urllib3==2.2.3,wheel==0.44.0 09:11:02 tests_tapi: commands[0] /w/workspace/transportpce-tox-verify-transportpce-master/tests> ./launch_tests.sh tapi 09:11:02 using environment variables from ./karaf221.env 09:11:02 pytest -q transportpce_tests/tapi/test01_abstracted_topology.py 09:12:23 build_karaf_tests71: OK ✔ in 2 minutes 23.7 seconds 09:12:23 build_karaf_tests_hybrid: OK ✔ in 1 minute 15.72 seconds 09:12:23 testsPCE: freeze> python -m pip freeze --all 09:12:23 testsPCE: bcrypt==4.2.0,certifi==2024.8.30,cffi==1.17.1,charset-normalizer==3.3.2,click==8.1.7,contourpy==1.3.0,cryptography==3.3.2,cycler==0.12.1,dict2xml==1.7.6,Flask==2.1.3,Flask-Injector==0.14.0,fonttools==4.54.1,gnpy4tpce==2.4.7,idna==3.10,iniconfig==2.0.0,injector==0.22.0,itsdangerous==2.2.0,Jinja2==3.1.4,kiwisolver==1.4.7,lxml==5.3.0,MarkupSafe==2.1.5,matplotlib==3.9.2,netconf-client==3.1.1,networkx==2.8.8,numpy==1.26.4,packaging==24.1,pandas==1.5.3,paramiko==3.5.0,pbr==5.11.1,pillow==10.4.0,pip==24.2,pluggy==1.5.0,psutil==6.0.0,pycparser==2.22,PyNaCl==1.5.0,pyparsing==3.1.4,pytest==8.3.3,python-dateutil==2.9.0.post0,pytz==2024.2,requests==2.32.3,scipy==1.14.1,setuptools==50.3.2,six==1.16.0,urllib3==2.2.3,Werkzeug==2.0.3,wheel==0.44.0,xlrd==1.2.0 09:12:23 testsPCE: commands[0] /w/workspace/transportpce-tox-verify-transportpce-master/tests> ./launch_tests.sh pce 09:12:23 pytest -q transportpce_tests/pce/test01_pce.py 09:13:14 .................................................. [100%] 09:14:17 20 passed in 113.77s (0:01:53) 09:14:17 pytest -q transportpce_tests/pce/test02_pce_400G.py 09:14:23 ................ [100%] 09:14:58 9 passed in 40.36s 09:14:58 pytest -q transportpce_tests/pce/test03_gnpy.py 09:15:08 ................... [100%] 09:15:39 8 passed in 40.55s 09:15:39 pytest -q transportpce_tests/pce/test04_pce_bug_fix.py 09:16:19 ... [100%] 09:16:23 3 passed in 44.62s 09:16:24 testsPCE: OK ✔ in 7 minutes 43.76 seconds 09:16:24 tests121: install_deps> python -I -m pip install 'setuptools>=7.0' -r /w/workspace/transportpce-tox-verify-transportpce-master/tests/requirements.txt -r /w/workspace/transportpce-tox-verify-transportpce-master/tests/test-requirements.txt 09:16:29 tests121: freeze> python -m pip freeze --all 09:16:30 tests121: bcrypt==4.2.0,certifi==2024.8.30,cffi==1.17.1,charset-normalizer==3.3.2,cryptography==43.0.1,dict2xml==1.7.6,idna==3.10,iniconfig==2.0.0,lxml==5.3.0,netconf-client==3.1.1,packaging==24.1,paramiko==3.5.0,pip==24.2,pluggy==1.5.0,psutil==6.0.0,pycparser==2.22,PyNaCl==1.5.0,pytest==8.3.3,requests==2.32.3,setuptools==75.1.0,urllib3==2.2.3,wheel==0.44.0 09:16:30 tests121: commands[0] /w/workspace/transportpce-tox-verify-transportpce-master/tests> ./launch_tests.sh 1.2.1 09:16:30 using environment variables from ./karaf121.env 09:16:30 pytest -q transportpce_tests/1.2.1/test01_portmapping.py 09:18:28 ........ [100%] 09:21:33 50 passed in 630.05s (0:10:30) 09:21:33 pytest -q transportpce_tests/tapi/test02_full_topology.py 09:22:38 .............FFF.FF.FFF................ [100%] 09:26:06 30 passed in 273.15s (0:04:33) 09:26:06 pytest -q transportpce_tests/tapi/test03_tapi_device_change_notifications.py 09:26:29 FFFFFF [100%] 09:26:37 =================================== FAILURES =================================== 09:26:37 _________ TransportPCEPortMappingTesting.test_08_xpdr_device_connected _________ 09:26:37 09:26:37 self = 09:26:37 09:26:37 def test_08_xpdr_device_connected(self): 09:26:37 response = test_utils.check_device_connection("XPDRA01") 09:26:37 > self.assertEqual(response['status_code'], requests.codes.ok) 09:26:37 E AssertionError: 409 != 200 09:26:37 09:26:37 transportpce_tests/1.2.1/test01_portmapping.py:104: AssertionError 09:26:37 ----------------------------- Captured stdout call ----------------------------- 09:26:37 execution of test_08_xpdr_device_connected 09:26:37 _________ TransportPCEPortMappingTesting.test_09_xpdr_portmapping_info _________ 09:26:37 09:26:37 self = 09:26:37 09:26:37 def test_09_xpdr_portmapping_info(self): 09:26:37 response = test_utils.get_portmapping_node_attr("XPDRA01", "node-info", None) 09:26:37 > self.assertEqual(response['status_code'], requests.codes.ok) 09:26:37 E AssertionError: 409 != 200 09:26:37 09:26:37 transportpce_tests/1.2.1/test01_portmapping.py:110: AssertionError 09:26:37 ----------------------------- Captured stdout call ----------------------------- 09:26:37 execution of test_09_xpdr_portmapping_info 09:26:37 _______ TransportPCEPortMappingTesting.test_10_xpdr_portmapping_NETWORK1 _______ 09:26:37 09:26:37 self = 09:26:37 09:26:37 def test_10_xpdr_portmapping_NETWORK1(self): 09:26:37 response = test_utils.get_portmapping_node_attr("XPDRA01", "mapping", "XPDR1-NETWORK1") 09:26:37 > self.assertEqual(response['status_code'], requests.codes.ok) 09:26:37 E AssertionError: 409 != 200 09:26:37 09:26:37 transportpce_tests/1.2.1/test01_portmapping.py:123: AssertionError 09:26:37 ----------------------------- Captured stdout call ----------------------------- 09:26:37 execution of test_10_xpdr_portmapping_NETWORK1 09:26:37 _______ TransportPCEPortMappingTesting.test_11_xpdr_portmapping_NETWORK2 _______ 09:26:37 09:26:37 self = 09:26:37 09:26:37 def test_11_xpdr_portmapping_NETWORK2(self): 09:26:37 response = test_utils.get_portmapping_node_attr("XPDRA01", "mapping", "XPDR1-NETWORK2") 09:26:37 > self.assertEqual(response['status_code'], requests.codes.ok) 09:26:37 E AssertionError: 409 != 200 09:26:37 09:26:37 transportpce_tests/1.2.1/test01_portmapping.py:134: AssertionError 09:26:37 ----------------------------- Captured stdout call ----------------------------- 09:26:37 execution of test_11_xpdr_portmapping_NETWORK2 09:26:37 _______ TransportPCEPortMappingTesting.test_12_xpdr_portmapping_CLIENT1 ________ 09:26:37 09:26:37 self = 09:26:37 09:26:37 def test_12_xpdr_portmapping_CLIENT1(self): 09:26:37 response = test_utils.get_portmapping_node_attr("XPDRA01", "mapping", "XPDR1-CLIENT1") 09:26:37 > self.assertEqual(response['status_code'], requests.codes.ok) 09:26:37 E AssertionError: 409 != 200 09:26:37 09:26:37 transportpce_tests/1.2.1/test01_portmapping.py:145: AssertionError 09:26:37 ----------------------------- Captured stdout call ----------------------------- 09:26:37 execution of test_12_xpdr_portmapping_CLIENT1 09:26:37 _______ TransportPCEPortMappingTesting.test_13_xpdr_portmapping_CLIENT2 ________ 09:26:37 09:26:37 self = 09:26:37 09:26:37 def test_13_xpdr_portmapping_CLIENT2(self): 09:26:37 response = test_utils.get_portmapping_node_attr("XPDRA01", "mapping", "XPDR1-CLIENT2") 09:26:37 > self.assertEqual(response['status_code'], requests.codes.ok) 09:26:37 E AssertionError: 409 != 200 09:26:37 09:26:37 transportpce_tests/1.2.1/test01_portmapping.py:157: AssertionError 09:26:37 ----------------------------- Captured stdout call ----------------------------- 09:26:37 execution of test_13_xpdr_portmapping_CLIENT2 09:26:37 _______ TransportPCEPortMappingTesting.test_14_xpdr_portmapping_CLIENT3 ________ 09:26:37 09:26:37 self = 09:26:37 09:26:37 def test_14_xpdr_portmapping_CLIENT3(self): 09:26:37 response = test_utils.get_portmapping_node_attr("XPDRA01", "mapping", "XPDR1-CLIENT3") 09:26:37 > self.assertEqual(response['status_code'], requests.codes.ok) 09:26:37 E AssertionError: 409 != 200 09:26:37 09:26:37 transportpce_tests/1.2.1/test01_portmapping.py:169: AssertionError 09:26:37 ----------------------------- Captured stdout call ----------------------------- 09:26:37 execution of test_14_xpdr_portmapping_CLIENT3 09:26:37 _______ TransportPCEPortMappingTesting.test_15_xpdr_portmapping_CLIENT4 ________ 09:26:37 09:26:37 self = 09:26:37 09:26:37 def test_15_xpdr_portmapping_CLIENT4(self): 09:26:37 response = test_utils.get_portmapping_node_attr("XPDRA01", "mapping", "XPDR1-CLIENT4") 09:26:37 > self.assertEqual(response['status_code'], requests.codes.ok) 09:26:37 E AssertionError: 409 != 200 09:26:37 09:26:37 transportpce_tests/1.2.1/test01_portmapping.py:181: AssertionError 09:26:37 ----------------------------- Captured stdout call ----------------------------- 09:26:37 execution of test_15_xpdr_portmapping_CLIENT4 09:26:37 _______ TransportPCEPortMappingTesting.test_16_xpdr_device_disconnection _______ 09:26:37 09:26:37 self = 09:26:37 09:26:37 def test_16_xpdr_device_disconnection(self): 09:26:37 response = test_utils.unmount_device("XPDRA01") 09:26:37 > self.assertIn(response.status_code, (requests.codes.ok, requests.codes.no_content)) 09:26:37 E AssertionError: 409 not found in (200, 204) 09:26:37 09:26:37 transportpce_tests/1.2.1/test01_portmapping.py:192: AssertionError 09:26:37 ----------------------------- Captured stdout call ----------------------------- 09:26:37 execution of test_16_xpdr_device_disconnection 09:26:37 Searching for pattern 'onDeviceDisConnected:\ XPDRA01' in karaf.log... Pattern not found after 180 seconds! Node XPDRA01 still not deleted from tpce topology... 09:26:37 _______ TransportPCEPortMappingTesting.test_17_xpdr_device_disconnected ________ 09:26:37 09:26:37 self = 09:26:37 09:26:37 def _new_conn(self) -> socket.socket: 09:26:37 """Establish a socket connection and set nodelay settings on it. 09:26:37 09:26:37 :return: New socket connection. 09:26:37 """ 09:26:37 try: 09:26:37 > sock = connection.create_connection( 09:26:37 (self._dns_host, self.port), 09:26:37 self.timeout, 09:26:37 source_address=self.source_address, 09:26:37 socket_options=self.socket_options, 09:26:37 ) 09:26:37 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:199: 09:26:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/connection.py:85: in create_connection 09:26:37 raise err 09:26:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:26:37 09:26:37 address = ('localhost', 8182), timeout = 10, source_address = None 09:26:37 socket_options = [(6, 1, 1)] 09:26:37 09:26:37 def create_connection( 09:26:37 address: tuple[str, int], 09:26:37 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 09:26:37 source_address: tuple[str, int] | None = None, 09:26:37 socket_options: _TYPE_SOCKET_OPTIONS | None = None, 09:26:37 ) -> socket.socket: 09:26:37 """Connect to *address* and return the socket object. 09:26:37 09:26:37 Convenience function. Connect to *address* (a 2-tuple ``(host, 09:26:37 port)``) and return the socket object. Passing the optional 09:26:37 *timeout* parameter will set the timeout on the socket instance 09:26:37 before attempting to connect. If no *timeout* is supplied, the 09:26:37 global default timeout setting returned by :func:`socket.getdefaulttimeout` 09:26:37 is used. If *source_address* is set it must be a tuple of (host, port) 09:26:37 for the socket to bind as a source address before making the connection. 09:26:37 An host of '' or port 0 tells the OS to use the default. 09:26:37 """ 09:26:37 09:26:37 host, port = address 09:26:37 if host.startswith("["): 09:26:37 host = host.strip("[]") 09:26:37 err = None 09:26:37 09:26:37 # Using the value from allowed_gai_family() in the context of getaddrinfo lets 09:26:37 # us select whether to work with IPv4 DNS records, IPv6 records, or both. 09:26:37 # The original create_connection function always returns all records. 09:26:37 family = allowed_gai_family() 09:26:37 09:26:37 try: 09:26:37 host.encode("idna") 09:26:37 except UnicodeError: 09:26:37 raise LocationParseError(f"'{host}', label empty or too long") from None 09:26:37 09:26:37 for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 09:26:37 af, socktype, proto, canonname, sa = res 09:26:37 sock = None 09:26:37 try: 09:26:37 sock = socket.socket(af, socktype, proto) 09:26:37 09:26:37 # If provided, set socket level options before connecting. 09:26:37 _set_socket_options(sock, socket_options) 09:26:37 09:26:37 if timeout is not _DEFAULT_TIMEOUT: 09:26:37 sock.settimeout(timeout) 09:26:37 if source_address: 09:26:37 sock.bind(source_address) 09:26:37 > sock.connect(sa) 09:26:37 E ConnectionRefusedError: [Errno 111] Connection refused 09:26:37 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/connection.py:73: ConnectionRefusedError 09:26:37 09:26:37 The above exception was the direct cause of the following exception: 09:26:37 09:26:37 self = 09:26:37 method = 'GET' 09:26:37 url = '/rests/data/network-topology:network-topology/topology=topology-netconf/node=XPDRA01?content=nonconfig' 09:26:37 body = None 09:26:37 headers = {'User-Agent': 'python-requests/2.32.3', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'Connection': 'keep-alive', 'Content-Type': 'application/json', 'Authorization': 'Basic YWRtaW46YWRtaW4='} 09:26:37 retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 09:26:37 redirect = False, assert_same_host = False 09:26:37 timeout = Timeout(connect=10, read=10, total=None), pool_timeout = None 09:26:37 release_conn = False, chunked = False, body_pos = None, preload_content = False 09:26:37 decode_content = False, response_kw = {} 09:26:37 parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/rests/data/network-topology:network-topology/topology=topology-netconf/node=XPDRA01', query='content=nonconfig', fragment=None) 09:26:37 destination_scheme = None, conn = None, release_this_conn = True 09:26:37 http_tunnel_required = False, err = None, clean_exit = False 09:26:37 09:26:37 def urlopen( # type: ignore[override] 09:26:37 self, 09:26:37 method: str, 09:26:37 url: str, 09:26:37 body: _TYPE_BODY | None = None, 09:26:37 headers: typing.Mapping[str, str] | None = None, 09:26:37 retries: Retry | bool | int | None = None, 09:26:37 redirect: bool = True, 09:26:37 assert_same_host: bool = True, 09:26:37 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 09:26:37 pool_timeout: int | None = None, 09:26:37 release_conn: bool | None = None, 09:26:37 chunked: bool = False, 09:26:37 body_pos: _TYPE_BODY_POSITION | None = None, 09:26:37 preload_content: bool = True, 09:26:37 decode_content: bool = True, 09:26:37 **response_kw: typing.Any, 09:26:37 ) -> BaseHTTPResponse: 09:26:37 """ 09:26:37 Get a connection from the pool and perform an HTTP request. This is the 09:26:37 lowest level call for making a request, so you'll need to specify all 09:26:37 the raw details. 09:26:37 09:26:37 .. note:: 09:26:37 09:26:37 More commonly, it's appropriate to use a convenience method 09:26:37 such as :meth:`request`. 09:26:37 09:26:37 .. note:: 09:26:37 09:26:37 `release_conn` will only behave as expected if 09:26:37 `preload_content=False` because we want to make 09:26:37 `preload_content=False` the default behaviour someday soon without 09:26:37 breaking backwards compatibility. 09:26:37 09:26:37 :param method: 09:26:37 HTTP request method (such as GET, POST, PUT, etc.) 09:26:37 09:26:37 :param url: 09:26:37 The URL to perform the request on. 09:26:37 09:26:37 :param body: 09:26:37 Data to send in the request body, either :class:`str`, :class:`bytes`, 09:26:37 an iterable of :class:`str`/:class:`bytes`, or a file-like object. 09:26:37 09:26:37 :param headers: 09:26:37 Dictionary of custom headers to send, such as User-Agent, 09:26:37 If-None-Match, etc. If None, pool headers are used. If provided, 09:26:37 these headers completely replace any pool-specific headers. 09:26:37 09:26:37 :param retries: 09:26:37 Configure the number of retries to allow before raising a 09:26:37 :class:`~urllib3.exceptions.MaxRetryError` exception. 09:26:37 09:26:37 If ``None`` (default) will retry 3 times, see ``Retry.DEFAULT``. Pass a 09:26:37 :class:`~urllib3.util.retry.Retry` object for fine-grained control 09:26:37 over different types of retries. 09:26:37 Pass an integer number to retry connection errors that many times, 09:26:37 but no other types of errors. Pass zero to never retry. 09:26:37 09:26:37 If ``False``, then retries are disabled and any exception is raised 09:26:37 immediately. Also, instead of raising a MaxRetryError on redirects, 09:26:37 the redirect response will be returned. 09:26:37 09:26:37 :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 09:26:37 09:26:37 :param redirect: 09:26:37 If True, automatically handle redirects (status codes 301, 302, 09:26:37 303, 307, 308). Each redirect counts as a retry. Disabling retries 09:26:37 will disable redirect, too. 09:26:37 09:26:37 :param assert_same_host: 09:26:37 If ``True``, will make sure that the host of the pool requests is 09:26:37 consistent else will raise HostChangedError. When ``False``, you can 09:26:37 use the pool on an HTTP proxy and request foreign hosts. 09:26:37 09:26:37 :param timeout: 09:26:37 If specified, overrides the default timeout for this one 09:26:37 request. It may be a float (in seconds) or an instance of 09:26:37 :class:`urllib3.util.Timeout`. 09:26:37 09:26:37 :param pool_timeout: 09:26:37 If set and the pool is set to block=True, then this method will 09:26:37 block for ``pool_timeout`` seconds and raise EmptyPoolError if no 09:26:37 connection is available within the time period. 09:26:37 09:26:37 :param bool preload_content: 09:26:37 If True, the response's body will be preloaded into memory. 09:26:37 09:26:37 :param bool decode_content: 09:26:37 If True, will attempt to decode the body based on the 09:26:37 'content-encoding' header. 09:26:37 09:26:37 :param release_conn: 09:26:37 If False, then the urlopen call will not release the connection 09:26:37 back into the pool once a response is received (but will release if 09:26:37 you read the entire contents of the response such as when 09:26:37 `preload_content=True`). This is useful if you're not preloading 09:26:37 the response's content immediately. You will need to call 09:26:37 ``r.release_conn()`` on the response ``r`` to return the connection 09:26:37 back into the pool. If None, it takes the value of ``preload_content`` 09:26:37 which defaults to ``True``. 09:26:37 09:26:37 :param bool chunked: 09:26:37 If True, urllib3 will send the body using chunked transfer 09:26:37 encoding. Otherwise, urllib3 will send the body using the standard 09:26:37 content-length form. Defaults to False. 09:26:37 09:26:37 :param int body_pos: 09:26:37 Position to seek to in file-like body in the event of a retry or 09:26:37 redirect. Typically this won't need to be set because urllib3 will 09:26:37 auto-populate the value when needed. 09:26:37 """ 09:26:37 parsed_url = parse_url(url) 09:26:37 destination_scheme = parsed_url.scheme 09:26:37 09:26:37 if headers is None: 09:26:37 headers = self.headers 09:26:37 09:26:37 if not isinstance(retries, Retry): 09:26:37 retries = Retry.from_int(retries, redirect=redirect, default=self.retries) 09:26:37 09:26:37 if release_conn is None: 09:26:37 release_conn = preload_content 09:26:37 09:26:37 # Check host 09:26:37 if assert_same_host and not self.is_same_host(url): 09:26:37 raise HostChangedError(self, url, retries) 09:26:37 09:26:37 # Ensure that the URL we're connecting to is properly encoded 09:26:37 if url.startswith("/"): 09:26:37 url = to_str(_encode_target(url)) 09:26:37 else: 09:26:37 url = to_str(parsed_url.url) 09:26:37 09:26:37 conn = None 09:26:37 09:26:37 # Track whether `conn` needs to be released before 09:26:37 # returning/raising/recursing. Update this variable if necessary, and 09:26:37 # leave `release_conn` constant throughout the function. That way, if 09:26:37 # the function recurses, the original value of `release_conn` will be 09:26:37 # passed down into the recursive call, and its value will be respected. 09:26:37 # 09:26:37 # See issue #651 [1] for details. 09:26:37 # 09:26:37 # [1] 09:26:37 release_this_conn = release_conn 09:26:37 09:26:37 http_tunnel_required = connection_requires_http_tunnel( 09:26:37 self.proxy, self.proxy_config, destination_scheme 09:26:37 ) 09:26:37 09:26:37 # Merge the proxy headers. Only done when not using HTTP CONNECT. We 09:26:37 # have to copy the headers dict so we can safely change it without those 09:26:37 # changes being reflected in anyone else's copy. 09:26:37 if not http_tunnel_required: 09:26:37 headers = headers.copy() # type: ignore[attr-defined] 09:26:37 headers.update(self.proxy_headers) # type: ignore[union-attr] 09:26:37 09:26:37 # Must keep the exception bound to a separate variable or else Python 3 09:26:37 # complains about UnboundLocalError. 09:26:37 err = None 09:26:37 09:26:37 # Keep track of whether we cleanly exited the except block. This 09:26:37 # ensures we do proper cleanup in finally. 09:26:37 clean_exit = False 09:26:37 09:26:37 # Rewind body position, if needed. Record current position 09:26:37 # for future rewinds in the event of a redirect/retry. 09:26:37 body_pos = set_file_position(body, body_pos) 09:26:37 09:26:37 try: 09:26:37 # Request a connection from the queue. 09:26:37 timeout_obj = self._get_timeout(timeout) 09:26:37 conn = self._get_conn(timeout=pool_timeout) 09:26:37 09:26:37 conn.timeout = timeout_obj.connect_timeout # type: ignore[assignment] 09:26:37 09:26:37 # Is this a closed/new connection that requires CONNECT tunnelling? 09:26:37 if self.proxy is not None and http_tunnel_required and conn.is_closed: 09:26:37 try: 09:26:37 self._prepare_proxy(conn) 09:26:37 except (BaseSSLError, OSError, SocketTimeout) as e: 09:26:37 self._raise_timeout( 09:26:37 err=e, url=self.proxy.url, timeout_value=conn.timeout 09:26:37 ) 09:26:37 raise 09:26:37 09:26:37 # If we're going to release the connection in ``finally:``, then 09:26:37 # the response doesn't need to know about the connection. Otherwise 09:26:37 # it will also try to release it and we'll have a double-release 09:26:37 # mess. 09:26:37 response_conn = conn if not release_conn else None 09:26:37 09:26:37 # Make the request on the HTTPConnection object 09:26:37 > response = self._make_request( 09:26:37 conn, 09:26:37 method, 09:26:37 url, 09:26:37 timeout=timeout_obj, 09:26:37 body=body, 09:26:37 headers=headers, 09:26:37 chunked=chunked, 09:26:37 retries=retries, 09:26:37 response_conn=response_conn, 09:26:37 preload_content=preload_content, 09:26:37 decode_content=decode_content, 09:26:37 **response_kw, 09:26:37 ) 09:26:37 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:789: 09:26:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:495: in _make_request 09:26:37 conn.request( 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:441: in request 09:26:37 self.endheaders() 09:26:37 /opt/pyenv/versions/3.11.7/lib/python3.11/http/client.py:1289: in endheaders 09:26:37 self._send_output(message_body, encode_chunked=encode_chunked) 09:26:37 /opt/pyenv/versions/3.11.7/lib/python3.11/http/client.py:1048: in _send_output 09:26:37 self.send(msg) 09:26:37 /opt/pyenv/versions/3.11.7/lib/python3.11/http/client.py:986: in send 09:26:37 self.connect() 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:279: in connect 09:26:37 self.sock = self._new_conn() 09:26:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:26:37 09:26:37 self = 09:26:37 09:26:37 def _new_conn(self) -> socket.socket: 09:26:37 """Establish a socket connection and set nodelay settings on it. 09:26:37 09:26:37 :return: New socket connection. 09:26:37 """ 09:26:37 try: 09:26:37 sock = connection.create_connection( 09:26:37 (self._dns_host, self.port), 09:26:37 self.timeout, 09:26:37 source_address=self.source_address, 09:26:37 socket_options=self.socket_options, 09:26:37 ) 09:26:37 except socket.gaierror as e: 09:26:37 raise NameResolutionError(self.host, self, e) from e 09:26:37 except SocketTimeout as e: 09:26:37 raise ConnectTimeoutError( 09:26:37 self, 09:26:37 f"Connection to {self.host} timed out. (connect timeout={self.timeout})", 09:26:37 ) from e 09:26:37 09:26:37 except OSError as e: 09:26:37 > raise NewConnectionError( 09:26:37 self, f"Failed to establish a new connection: {e}" 09:26:37 ) from e 09:26:37 E urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [Errno 111] Connection refused 09:26:37 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:214: NewConnectionError 09:26:37 09:26:37 The above exception was the direct cause of the following exception: 09:26:37 09:26:37 self = 09:26:37 request = , stream = False 09:26:37 timeout = Timeout(connect=10, read=10, total=None), verify = True, cert = None 09:26:37 proxies = OrderedDict() 09:26:37 09:26:37 def send( 09:26:37 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 09:26:37 ): 09:26:37 """Sends PreparedRequest object. Returns Response object. 09:26:37 09:26:37 :param request: The :class:`PreparedRequest ` being sent. 09:26:37 :param stream: (optional) Whether to stream the request content. 09:26:37 :param timeout: (optional) How long to wait for the server to send 09:26:37 data before giving up, as a float, or a :ref:`(connect timeout, 09:26:37 read timeout) ` tuple. 09:26:37 :type timeout: float or tuple or urllib3 Timeout object 09:26:37 :param verify: (optional) Either a boolean, in which case it controls whether 09:26:37 we verify the server's TLS certificate, or a string, in which case it 09:26:37 must be a path to a CA bundle to use 09:26:37 :param cert: (optional) Any user-provided SSL certificate to be trusted. 09:26:37 :param proxies: (optional) The proxies dictionary to apply to the request. 09:26:37 :rtype: requests.Response 09:26:37 """ 09:26:37 09:26:37 try: 09:26:37 conn = self.get_connection_with_tls_context( 09:26:37 request, verify, proxies=proxies, cert=cert 09:26:37 ) 09:26:37 except LocationValueError as e: 09:26:37 raise InvalidURL(e, request=request) 09:26:37 09:26:37 self.cert_verify(conn, request.url, verify, cert) 09:26:37 url = self.request_url(request, proxies) 09:26:37 self.add_headers( 09:26:37 request, 09:26:37 stream=stream, 09:26:37 timeout=timeout, 09:26:37 verify=verify, 09:26:37 cert=cert, 09:26:37 proxies=proxies, 09:26:37 ) 09:26:37 09:26:37 chunked = not (request.body is None or "Content-Length" in request.headers) 09:26:37 09:26:37 if isinstance(timeout, tuple): 09:26:37 try: 09:26:37 connect, read = timeout 09:26:37 timeout = TimeoutSauce(connect=connect, read=read) 09:26:37 except ValueError: 09:26:37 raise ValueError( 09:26:37 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 09:26:37 f"or a single float to set both timeouts to the same value." 09:26:37 ) 09:26:37 elif isinstance(timeout, TimeoutSauce): 09:26:37 pass 09:26:37 else: 09:26:37 timeout = TimeoutSauce(connect=timeout, read=timeout) 09:26:37 09:26:37 try: 09:26:37 > resp = conn.urlopen( 09:26:37 method=request.method, 09:26:37 url=url, 09:26:37 body=request.body, 09:26:37 headers=request.headers, 09:26:37 redirect=False, 09:26:37 assert_same_host=False, 09:26:37 preload_content=False, 09:26:37 decode_content=False, 09:26:37 retries=self.max_retries, 09:26:37 timeout=timeout, 09:26:37 chunked=chunked, 09:26:37 ) 09:26:37 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/requests/adapters.py:667: 09:26:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:843: in urlopen 09:26:37 retries = retries.increment( 09:26:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:26:37 09:26:37 self = Retry(total=0, connect=None, read=False, redirect=None, status=None) 09:26:37 method = 'GET' 09:26:37 url = '/rests/data/network-topology:network-topology/topology=topology-netconf/node=XPDRA01?content=nonconfig' 09:26:37 response = None 09:26:37 error = NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused') 09:26:37 _pool = 09:26:37 _stacktrace = 09:26:37 09:26:37 def increment( 09:26:37 self, 09:26:37 method: str | None = None, 09:26:37 url: str | None = None, 09:26:37 response: BaseHTTPResponse | None = None, 09:26:37 error: Exception | None = None, 09:26:37 _pool: ConnectionPool | None = None, 09:26:37 _stacktrace: TracebackType | None = None, 09:26:37 ) -> Self: 09:26:37 """Return a new Retry object with incremented retry counters. 09:26:37 09:26:37 :param response: A response object, or None, if the server did not 09:26:37 return a response. 09:26:37 :type response: :class:`~urllib3.response.BaseHTTPResponse` 09:26:37 :param Exception error: An error encountered during the request, or 09:26:37 None if the response was received successfully. 09:26:37 09:26:37 :return: A new ``Retry`` object. 09:26:37 """ 09:26:37 if self.total is False and error: 09:26:37 # Disabled, indicate to re-raise the error. 09:26:37 raise reraise(type(error), error, _stacktrace) 09:26:37 09:26:37 total = self.total 09:26:37 if total is not None: 09:26:37 total -= 1 09:26:37 09:26:37 connect = self.connect 09:26:37 read = self.read 09:26:37 redirect = self.redirect 09:26:37 status_count = self.status 09:26:37 other = self.other 09:26:37 cause = "unknown" 09:26:37 status = None 09:26:37 redirect_location = None 09:26:37 09:26:37 if error and self._is_connection_error(error): 09:26:37 # Connect retry? 09:26:37 if connect is False: 09:26:37 raise reraise(type(error), error, _stacktrace) 09:26:37 elif connect is not None: 09:26:37 connect -= 1 09:26:37 09:26:37 elif error and self._is_read_error(error): 09:26:37 # Read retry? 09:26:37 if read is False or method is None or not self._is_method_retryable(method): 09:26:37 raise reraise(type(error), error, _stacktrace) 09:26:37 elif read is not None: 09:26:37 read -= 1 09:26:37 09:26:37 elif error: 09:26:37 # Other retry? 09:26:37 if other is not None: 09:26:37 other -= 1 09:26:37 09:26:37 elif response and response.get_redirect_location(): 09:26:37 # Redirect retry? 09:26:37 if redirect is not None: 09:26:37 redirect -= 1 09:26:37 cause = "too many redirects" 09:26:37 response_redirect_location = response.get_redirect_location() 09:26:37 if response_redirect_location: 09:26:37 redirect_location = response_redirect_location 09:26:37 status = response.status 09:26:37 09:26:37 else: 09:26:37 # Incrementing because of a server error like a 500 in 09:26:37 # status_forcelist and the given method is in the allowed_methods 09:26:37 cause = ResponseError.GENERIC_ERROR 09:26:37 if response and response.status: 09:26:37 if status_count is not None: 09:26:37 status_count -= 1 09:26:37 cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) 09:26:37 status = response.status 09:26:37 09:26:37 history = self.history + ( 09:26:37 RequestHistory(method, url, error, status, redirect_location), 09:26:37 ) 09:26:37 09:26:37 new_retry = self.new( 09:26:37 total=total, 09:26:37 connect=connect, 09:26:37 read=read, 09:26:37 redirect=redirect, 09:26:37 status=status_count, 09:26:37 other=other, 09:26:37 history=history, 09:26:37 ) 09:26:37 09:26:37 if new_retry.is_exhausted(): 09:26:37 reason = error or ResponseError(cause) 09:26:37 > raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] 09:26:37 E urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8182): Max retries exceeded with url: /rests/data/network-topology:network-topology/topology=topology-netconf/node=XPDRA01?content=nonconfig (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 09:26:37 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/retry.py:519: MaxRetryError 09:26:37 09:26:37 During handling of the above exception, another exception occurred: 09:26:37 09:26:37 self = 09:26:37 09:26:37 def test_17_xpdr_device_disconnected(self): 09:26:37 > response = test_utils.check_device_connection("XPDRA01") 09:26:37 09:26:37 transportpce_tests/1.2.1/test01_portmapping.py:195: 09:26:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:26:37 transportpce_tests/common/test_utils.py:369: in check_device_connection 09:26:37 response = get_request(url[RESTCONF_VERSION].format('{}', node)) 09:26:37 transportpce_tests/common/test_utils.py:116: in get_request 09:26:37 return requests.request( 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/requests/api.py:59: in request 09:26:37 return session.request(method=method, url=url, **kwargs) 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/requests/sessions.py:589: in request 09:26:37 resp = self.send(prep, **send_kwargs) 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/requests/sessions.py:703: in send 09:26:37 r = adapter.send(request, **kwargs) 09:26:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:26:37 09:26:37 self = 09:26:37 request = , stream = False 09:26:37 timeout = Timeout(connect=10, read=10, total=None), verify = True, cert = None 09:26:37 proxies = OrderedDict() 09:26:37 09:26:37 def send( 09:26:37 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 09:26:37 ): 09:26:37 """Sends PreparedRequest object. Returns Response object. 09:26:37 09:26:37 :param request: The :class:`PreparedRequest ` being sent. 09:26:37 :param stream: (optional) Whether to stream the request content. 09:26:37 :param timeout: (optional) How long to wait for the server to send 09:26:37 data before giving up, as a float, or a :ref:`(connect timeout, 09:26:37 read timeout) ` tuple. 09:26:37 :type timeout: float or tuple or urllib3 Timeout object 09:26:37 :param verify: (optional) Either a boolean, in which case it controls whether 09:26:37 we verify the server's TLS certificate, or a string, in which case it 09:26:37 must be a path to a CA bundle to use 09:26:37 :param cert: (optional) Any user-provided SSL certificate to be trusted. 09:26:37 :param proxies: (optional) The proxies dictionary to apply to the request. 09:26:37 :rtype: requests.Response 09:26:37 """ 09:26:37 09:26:37 try: 09:26:37 conn = self.get_connection_with_tls_context( 09:26:37 request, verify, proxies=proxies, cert=cert 09:26:37 ) 09:26:37 except LocationValueError as e: 09:26:37 raise InvalidURL(e, request=request) 09:26:37 09:26:37 self.cert_verify(conn, request.url, verify, cert) 09:26:37 url = self.request_url(request, proxies) 09:26:37 self.add_headers( 09:26:37 request, 09:26:37 stream=stream, 09:26:37 timeout=timeout, 09:26:37 verify=verify, 09:26:37 cert=cert, 09:26:37 proxies=proxies, 09:26:37 ) 09:26:37 09:26:37 chunked = not (request.body is None or "Content-Length" in request.headers) 09:26:37 09:26:37 if isinstance(timeout, tuple): 09:26:37 try: 09:26:37 connect, read = timeout 09:26:37 timeout = TimeoutSauce(connect=connect, read=read) 09:26:37 except ValueError: 09:26:37 raise ValueError( 09:26:37 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 09:26:37 f"or a single float to set both timeouts to the same value." 09:26:37 ) 09:26:37 elif isinstance(timeout, TimeoutSauce): 09:26:37 pass 09:26:37 else: 09:26:37 timeout = TimeoutSauce(connect=timeout, read=timeout) 09:26:37 09:26:37 try: 09:26:37 resp = conn.urlopen( 09:26:37 method=request.method, 09:26:37 url=url, 09:26:37 body=request.body, 09:26:37 headers=request.headers, 09:26:37 redirect=False, 09:26:37 assert_same_host=False, 09:26:37 preload_content=False, 09:26:37 decode_content=False, 09:26:37 retries=self.max_retries, 09:26:37 timeout=timeout, 09:26:37 chunked=chunked, 09:26:37 ) 09:26:37 09:26:37 except (ProtocolError, OSError) as err: 09:26:37 raise ConnectionError(err, request=request) 09:26:37 09:26:37 except MaxRetryError as e: 09:26:37 if isinstance(e.reason, ConnectTimeoutError): 09:26:37 # TODO: Remove this in 3.0.0: see #2811 09:26:37 if not isinstance(e.reason, NewConnectionError): 09:26:37 raise ConnectTimeout(e, request=request) 09:26:37 09:26:37 if isinstance(e.reason, ResponseError): 09:26:37 raise RetryError(e, request=request) 09:26:37 09:26:37 if isinstance(e.reason, _ProxyError): 09:26:37 raise ProxyError(e, request=request) 09:26:37 09:26:37 if isinstance(e.reason, _SSLError): 09:26:37 # This branch is for urllib3 v1.22 and later. 09:26:37 raise SSLError(e, request=request) 09:26:37 09:26:37 > raise ConnectionError(e, request=request) 09:26:37 E requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8182): Max retries exceeded with url: /rests/data/network-topology:network-topology/topology=topology-netconf/node=XPDRA01?content=nonconfig (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 09:26:37 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/requests/adapters.py:700: ConnectionError 09:26:37 ----------------------------- Captured stdout call ----------------------------- 09:26:37 execution of test_17_xpdr_device_disconnected 09:26:37 _______ TransportPCEPortMappingTesting.test_18_xpdr_device_not_connected _______ 09:26:37 09:26:37 self = 09:26:37 09:26:37 def _new_conn(self) -> socket.socket: 09:26:37 """Establish a socket connection and set nodelay settings on it. 09:26:37 09:26:37 :return: New socket connection. 09:26:37 """ 09:26:37 try: 09:26:37 > sock = connection.create_connection( 09:26:37 (self._dns_host, self.port), 09:26:37 self.timeout, 09:26:37 source_address=self.source_address, 09:26:37 socket_options=self.socket_options, 09:26:37 ) 09:26:37 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:199: 09:26:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/connection.py:85: in create_connection 09:26:37 raise err 09:26:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:26:37 09:26:37 address = ('localhost', 8182), timeout = 10, source_address = None 09:26:37 socket_options = [(6, 1, 1)] 09:26:37 09:26:37 def create_connection( 09:26:37 address: tuple[str, int], 09:26:37 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 09:26:37 source_address: tuple[str, int] | None = None, 09:26:37 socket_options: _TYPE_SOCKET_OPTIONS | None = None, 09:26:37 ) -> socket.socket: 09:26:37 """Connect to *address* and return the socket object. 09:26:37 09:26:37 Convenience function. Connect to *address* (a 2-tuple ``(host, 09:26:37 port)``) and return the socket object. Passing the optional 09:26:37 *timeout* parameter will set the timeout on the socket instance 09:26:37 before attempting to connect. If no *timeout* is supplied, the 09:26:37 global default timeout setting returned by :func:`socket.getdefaulttimeout` 09:26:37 is used. If *source_address* is set it must be a tuple of (host, port) 09:26:37 for the socket to bind as a source address before making the connection. 09:26:37 An host of '' or port 0 tells the OS to use the default. 09:26:37 """ 09:26:37 09:26:37 host, port = address 09:26:37 if host.startswith("["): 09:26:37 host = host.strip("[]") 09:26:37 err = None 09:26:37 09:26:37 # Using the value from allowed_gai_family() in the context of getaddrinfo lets 09:26:37 # us select whether to work with IPv4 DNS records, IPv6 records, or both. 09:26:37 # The original create_connection function always returns all records. 09:26:37 family = allowed_gai_family() 09:26:37 09:26:37 try: 09:26:37 host.encode("idna") 09:26:37 except UnicodeError: 09:26:37 raise LocationParseError(f"'{host}', label empty or too long") from None 09:26:37 09:26:37 for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 09:26:37 af, socktype, proto, canonname, sa = res 09:26:37 sock = None 09:26:37 try: 09:26:37 sock = socket.socket(af, socktype, proto) 09:26:37 09:26:37 # If provided, set socket level options before connecting. 09:26:37 _set_socket_options(sock, socket_options) 09:26:37 09:26:37 if timeout is not _DEFAULT_TIMEOUT: 09:26:37 sock.settimeout(timeout) 09:26:37 if source_address: 09:26:37 sock.bind(source_address) 09:26:37 > sock.connect(sa) 09:26:37 E ConnectionRefusedError: [Errno 111] Connection refused 09:26:37 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/connection.py:73: ConnectionRefusedError 09:26:37 09:26:37 The above exception was the direct cause of the following exception: 09:26:37 09:26:37 self = 09:26:37 method = 'GET' 09:26:37 url = '/rests/data/transportpce-portmapping:network/nodes=XPDRA01/node-info' 09:26:37 body = None 09:26:37 headers = {'User-Agent': 'python-requests/2.32.3', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'Connection': 'keep-alive', 'Content-Type': 'application/json', 'Authorization': 'Basic YWRtaW46YWRtaW4='} 09:26:37 retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 09:26:37 redirect = False, assert_same_host = False 09:26:37 timeout = Timeout(connect=10, read=10, total=None), pool_timeout = None 09:26:37 release_conn = False, chunked = False, body_pos = None, preload_content = False 09:26:37 decode_content = False, response_kw = {} 09:26:37 parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/rests/data/transportpce-portmapping:network/nodes=XPDRA01/node-info', query=None, fragment=None) 09:26:37 destination_scheme = None, conn = None, release_this_conn = True 09:26:37 http_tunnel_required = False, err = None, clean_exit = False 09:26:37 09:26:37 def urlopen( # type: ignore[override] 09:26:37 self, 09:26:37 method: str, 09:26:37 url: str, 09:26:37 body: _TYPE_BODY | None = None, 09:26:37 headers: typing.Mapping[str, str] | None = None, 09:26:37 retries: Retry | bool | int | None = None, 09:26:37 redirect: bool = True, 09:26:37 assert_same_host: bool = True, 09:26:37 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 09:26:37 pool_timeout: int | None = None, 09:26:37 release_conn: bool | None = None, 09:26:37 chunked: bool = False, 09:26:37 body_pos: _TYPE_BODY_POSITION | None = None, 09:26:37 preload_content: bool = True, 09:26:37 decode_content: bool = True, 09:26:37 **response_kw: typing.Any, 09:26:37 ) -> BaseHTTPResponse: 09:26:37 """ 09:26:37 Get a connection from the pool and perform an HTTP request. This is the 09:26:37 lowest level call for making a request, so you'll need to specify all 09:26:37 the raw details. 09:26:37 09:26:37 .. note:: 09:26:37 09:26:37 More commonly, it's appropriate to use a convenience method 09:26:37 such as :meth:`request`. 09:26:37 09:26:37 .. note:: 09:26:37 09:26:37 `release_conn` will only behave as expected if 09:26:37 `preload_content=False` because we want to make 09:26:37 `preload_content=False` the default behaviour someday soon without 09:26:37 breaking backwards compatibility. 09:26:37 09:26:37 :param method: 09:26:37 HTTP request method (such as GET, POST, PUT, etc.) 09:26:37 09:26:37 :param url: 09:26:37 The URL to perform the request on. 09:26:37 09:26:37 :param body: 09:26:37 Data to send in the request body, either :class:`str`, :class:`bytes`, 09:26:37 an iterable of :class:`str`/:class:`bytes`, or a file-like object. 09:26:37 09:26:37 :param headers: 09:26:37 Dictionary of custom headers to send, such as User-Agent, 09:26:37 If-None-Match, etc. If None, pool headers are used. If provided, 09:26:37 these headers completely replace any pool-specific headers. 09:26:37 09:26:37 :param retries: 09:26:37 Configure the number of retries to allow before raising a 09:26:37 :class:`~urllib3.exceptions.MaxRetryError` exception. 09:26:37 09:26:37 If ``None`` (default) will retry 3 times, see ``Retry.DEFAULT``. Pass a 09:26:37 :class:`~urllib3.util.retry.Retry` object for fine-grained control 09:26:37 over different types of retries. 09:26:37 Pass an integer number to retry connection errors that many times, 09:26:37 but no other types of errors. Pass zero to never retry. 09:26:37 09:26:37 If ``False``, then retries are disabled and any exception is raised 09:26:37 immediately. Also, instead of raising a MaxRetryError on redirects, 09:26:37 the redirect response will be returned. 09:26:37 09:26:37 :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 09:26:37 09:26:37 :param redirect: 09:26:37 If True, automatically handle redirects (status codes 301, 302, 09:26:37 303, 307, 308). Each redirect counts as a retry. Disabling retries 09:26:37 will disable redirect, too. 09:26:37 09:26:37 :param assert_same_host: 09:26:37 If ``True``, will make sure that the host of the pool requests is 09:26:37 consistent else will raise HostChangedError. When ``False``, you can 09:26:37 use the pool on an HTTP proxy and request foreign hosts. 09:26:37 09:26:37 :param timeout: 09:26:37 If specified, overrides the default timeout for this one 09:26:37 request. It may be a float (in seconds) or an instance of 09:26:37 :class:`urllib3.util.Timeout`. 09:26:37 09:26:37 :param pool_timeout: 09:26:37 If set and the pool is set to block=True, then this method will 09:26:37 block for ``pool_timeout`` seconds and raise EmptyPoolError if no 09:26:37 connection is available within the time period. 09:26:37 09:26:37 :param bool preload_content: 09:26:37 If True, the response's body will be preloaded into memory. 09:26:37 09:26:37 :param bool decode_content: 09:26:37 If True, will attempt to decode the body based on the 09:26:37 'content-encoding' header. 09:26:37 09:26:37 :param release_conn: 09:26:37 If False, then the urlopen call will not release the connection 09:26:37 back into the pool once a response is received (but will release if 09:26:37 you read the entire contents of the response such as when 09:26:37 `preload_content=True`). This is useful if you're not preloading 09:26:37 the response's content immediately. You will need to call 09:26:37 ``r.release_conn()`` on the response ``r`` to return the connection 09:26:37 back into the pool. If None, it takes the value of ``preload_content`` 09:26:37 which defaults to ``True``. 09:26:37 09:26:37 :param bool chunked: 09:26:37 If True, urllib3 will send the body using chunked transfer 09:26:37 encoding. Otherwise, urllib3 will send the body using the standard 09:26:37 content-length form. Defaults to False. 09:26:37 09:26:37 :param int body_pos: 09:26:37 Position to seek to in file-like body in the event of a retry or 09:26:37 redirect. Typically this won't need to be set because urllib3 will 09:26:37 auto-populate the value when needed. 09:26:37 """ 09:26:37 parsed_url = parse_url(url) 09:26:37 destination_scheme = parsed_url.scheme 09:26:37 09:26:37 if headers is None: 09:26:37 headers = self.headers 09:26:37 09:26:37 if not isinstance(retries, Retry): 09:26:37 retries = Retry.from_int(retries, redirect=redirect, default=self.retries) 09:26:37 09:26:37 if release_conn is None: 09:26:37 release_conn = preload_content 09:26:37 09:26:37 # Check host 09:26:37 if assert_same_host and not self.is_same_host(url): 09:26:37 raise HostChangedError(self, url, retries) 09:26:37 09:26:37 # Ensure that the URL we're connecting to is properly encoded 09:26:37 if url.startswith("/"): 09:26:37 url = to_str(_encode_target(url)) 09:26:37 else: 09:26:37 url = to_str(parsed_url.url) 09:26:37 09:26:37 conn = None 09:26:37 09:26:37 # Track whether `conn` needs to be released before 09:26:37 # returning/raising/recursing. Update this variable if necessary, and 09:26:37 # leave `release_conn` constant throughout the function. That way, if 09:26:37 # the function recurses, the original value of `release_conn` will be 09:26:37 # passed down into the recursive call, and its value will be respected. 09:26:37 # 09:26:37 # See issue #651 [1] for details. 09:26:37 # 09:26:37 # [1] 09:26:37 release_this_conn = release_conn 09:26:37 09:26:37 http_tunnel_required = connection_requires_http_tunnel( 09:26:37 self.proxy, self.proxy_config, destination_scheme 09:26:37 ) 09:26:37 09:26:37 # Merge the proxy headers. Only done when not using HTTP CONNECT. We 09:26:37 # have to copy the headers dict so we can safely change it without those 09:26:37 # changes being reflected in anyone else's copy. 09:26:37 if not http_tunnel_required: 09:26:37 headers = headers.copy() # type: ignore[attr-defined] 09:26:37 headers.update(self.proxy_headers) # type: ignore[union-attr] 09:26:37 09:26:37 # Must keep the exception bound to a separate variable or else Python 3 09:26:37 # complains about UnboundLocalError. 09:26:37 err = None 09:26:37 09:26:37 # Keep track of whether we cleanly exited the except block. This 09:26:37 # ensures we do proper cleanup in finally. 09:26:37 clean_exit = False 09:26:37 09:26:37 # Rewind body position, if needed. Record current position 09:26:37 # for future rewinds in the event of a redirect/retry. 09:26:37 body_pos = set_file_position(body, body_pos) 09:26:37 09:26:37 try: 09:26:37 # Request a connection from the queue. 09:26:37 timeout_obj = self._get_timeout(timeout) 09:26:37 conn = self._get_conn(timeout=pool_timeout) 09:26:37 09:26:37 conn.timeout = timeout_obj.connect_timeout # type: ignore[assignment] 09:26:37 09:26:37 # Is this a closed/new connection that requires CONNECT tunnelling? 09:26:37 if self.proxy is not None and http_tunnel_required and conn.is_closed: 09:26:37 try: 09:26:37 self._prepare_proxy(conn) 09:26:37 except (BaseSSLError, OSError, SocketTimeout) as e: 09:26:37 self._raise_timeout( 09:26:37 err=e, url=self.proxy.url, timeout_value=conn.timeout 09:26:37 ) 09:26:37 raise 09:26:37 09:26:37 # If we're going to release the connection in ``finally:``, then 09:26:37 # the response doesn't need to know about the connection. Otherwise 09:26:37 # it will also try to release it and we'll have a double-release 09:26:37 # mess. 09:26:37 response_conn = conn if not release_conn else None 09:26:37 09:26:37 # Make the request on the HTTPConnection object 09:26:37 > response = self._make_request( 09:26:37 conn, 09:26:37 method, 09:26:37 url, 09:26:37 timeout=timeout_obj, 09:26:37 body=body, 09:26:37 headers=headers, 09:26:37 chunked=chunked, 09:26:37 retries=retries, 09:26:37 response_conn=response_conn, 09:26:37 preload_content=preload_content, 09:26:37 decode_content=decode_content, 09:26:37 **response_kw, 09:26:37 ) 09:26:37 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:789: 09:26:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:495: in _make_request 09:26:37 conn.request( 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:441: in request 09:26:37 self.endheaders() 09:26:37 /opt/pyenv/versions/3.11.7/lib/python3.11/http/client.py:1289: in endheaders 09:26:37 self._send_output(message_body, encode_chunked=encode_chunked) 09:26:37 /opt/pyenv/versions/3.11.7/lib/python3.11/http/client.py:1048: in _send_output 09:26:37 self.send(msg) 09:26:37 /opt/pyenv/versions/3.11.7/lib/python3.11/http/client.py:986: in send 09:26:37 self.connect() 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:279: in connect 09:26:37 self.sock = self._new_conn() 09:26:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:26:37 09:26:37 self = 09:26:37 09:26:37 def _new_conn(self) -> socket.socket: 09:26:37 """Establish a socket connection and set nodelay settings on it. 09:26:37 09:26:37 :return: New socket connection. 09:26:37 """ 09:26:37 try: 09:26:37 sock = connection.create_connection( 09:26:37 (self._dns_host, self.port), 09:26:37 self.timeout, 09:26:37 source_address=self.source_address, 09:26:37 socket_options=self.socket_options, 09:26:37 ) 09:26:37 except socket.gaierror as e: 09:26:37 raise NameResolutionError(self.host, self, e) from e 09:26:37 except SocketTimeout as e: 09:26:37 raise ConnectTimeoutError( 09:26:37 self, 09:26:37 f"Connection to {self.host} timed out. (connect timeout={self.timeout})", 09:26:37 ) from e 09:26:37 09:26:37 except OSError as e: 09:26:37 > raise NewConnectionError( 09:26:37 self, f"Failed to establish a new connection: {e}" 09:26:37 ) from e 09:26:37 E urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [Errno 111] Connection refused 09:26:37 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:214: NewConnectionError 09:26:37 09:26:37 The above exception was the direct cause of the following exception: 09:26:37 09:26:37 self = 09:26:37 request = , stream = False 09:26:37 timeout = Timeout(connect=10, read=10, total=None), verify = True, cert = None 09:26:37 proxies = OrderedDict() 09:26:37 09:26:37 def send( 09:26:37 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 09:26:37 ): 09:26:37 """Sends PreparedRequest object. Returns Response object. 09:26:37 09:26:37 :param request: The :class:`PreparedRequest ` being sent. 09:26:37 :param stream: (optional) Whether to stream the request content. 09:26:37 :param timeout: (optional) How long to wait for the server to send 09:26:37 data before giving up, as a float, or a :ref:`(connect timeout, 09:26:37 read timeout) ` tuple. 09:26:37 :type timeout: float or tuple or urllib3 Timeout object 09:26:37 :param verify: (optional) Either a boolean, in which case it controls whether 09:26:37 we verify the server's TLS certificate, or a string, in which case it 09:26:37 must be a path to a CA bundle to use 09:26:37 :param cert: (optional) Any user-provided SSL certificate to be trusted. 09:26:37 :param proxies: (optional) The proxies dictionary to apply to the request. 09:26:37 :rtype: requests.Response 09:26:37 """ 09:26:37 09:26:37 try: 09:26:37 conn = self.get_connection_with_tls_context( 09:26:37 request, verify, proxies=proxies, cert=cert 09:26:37 ) 09:26:37 except LocationValueError as e: 09:26:37 raise InvalidURL(e, request=request) 09:26:37 09:26:37 self.cert_verify(conn, request.url, verify, cert) 09:26:37 url = self.request_url(request, proxies) 09:26:37 self.add_headers( 09:26:37 request, 09:26:37 stream=stream, 09:26:37 timeout=timeout, 09:26:37 verify=verify, 09:26:37 cert=cert, 09:26:37 proxies=proxies, 09:26:37 ) 09:26:37 09:26:37 chunked = not (request.body is None or "Content-Length" in request.headers) 09:26:37 09:26:37 if isinstance(timeout, tuple): 09:26:37 try: 09:26:37 connect, read = timeout 09:26:37 timeout = TimeoutSauce(connect=connect, read=read) 09:26:37 except ValueError: 09:26:37 raise ValueError( 09:26:37 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 09:26:37 f"or a single float to set both timeouts to the same value." 09:26:37 ) 09:26:37 elif isinstance(timeout, TimeoutSauce): 09:26:37 pass 09:26:37 else: 09:26:37 timeout = TimeoutSauce(connect=timeout, read=timeout) 09:26:37 09:26:37 try: 09:26:37 > resp = conn.urlopen( 09:26:37 method=request.method, 09:26:37 url=url, 09:26:37 body=request.body, 09:26:37 headers=request.headers, 09:26:37 redirect=False, 09:26:37 assert_same_host=False, 09:26:37 preload_content=False, 09:26:37 decode_content=False, 09:26:37 retries=self.max_retries, 09:26:37 timeout=timeout, 09:26:37 chunked=chunked, 09:26:37 ) 09:26:37 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/requests/adapters.py:667: 09:26:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:843: in urlopen 09:26:37 retries = retries.increment( 09:26:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:26:37 09:26:37 self = Retry(total=0, connect=None, read=False, redirect=None, status=None) 09:26:37 method = 'GET' 09:26:37 url = '/rests/data/transportpce-portmapping:network/nodes=XPDRA01/node-info' 09:26:37 response = None 09:26:37 error = NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused') 09:26:37 _pool = 09:26:37 _stacktrace = 09:26:37 09:26:37 def increment( 09:26:37 self, 09:26:37 method: str | None = None, 09:26:37 url: str | None = None, 09:26:37 response: BaseHTTPResponse | None = None, 09:26:37 error: Exception | None = None, 09:26:37 _pool: ConnectionPool | None = None, 09:26:37 _stacktrace: TracebackType | None = None, 09:26:37 ) -> Self: 09:26:37 """Return a new Retry object with incremented retry counters. 09:26:37 09:26:37 :param response: A response object, or None, if the server did not 09:26:37 return a response. 09:26:37 :type response: :class:`~urllib3.response.BaseHTTPResponse` 09:26:37 :param Exception error: An error encountered during the request, or 09:26:37 None if the response was received successfully. 09:26:37 09:26:37 :return: A new ``Retry`` object. 09:26:37 """ 09:26:37 if self.total is False and error: 09:26:37 # Disabled, indicate to re-raise the error. 09:26:37 raise reraise(type(error), error, _stacktrace) 09:26:37 09:26:37 total = self.total 09:26:37 if total is not None: 09:26:37 total -= 1 09:26:37 09:26:37 connect = self.connect 09:26:37 read = self.read 09:26:37 redirect = self.redirect 09:26:37 status_count = self.status 09:26:37 other = self.other 09:26:37 cause = "unknown" 09:26:37 status = None 09:26:37 redirect_location = None 09:26:37 09:26:37 if error and self._is_connection_error(error): 09:26:37 # Connect retry? 09:26:37 if connect is False: 09:26:37 raise reraise(type(error), error, _stacktrace) 09:26:37 elif connect is not None: 09:26:37 connect -= 1 09:26:37 09:26:37 elif error and self._is_read_error(error): 09:26:37 # Read retry? 09:26:37 if read is False or method is None or not self._is_method_retryable(method): 09:26:37 raise reraise(type(error), error, _stacktrace) 09:26:37 elif read is not None: 09:26:37 read -= 1 09:26:37 09:26:37 elif error: 09:26:37 # Other retry? 09:26:37 if other is not None: 09:26:37 other -= 1 09:26:37 09:26:37 elif response and response.get_redirect_location(): 09:26:37 # Redirect retry? 09:26:37 if redirect is not None: 09:26:37 redirect -= 1 09:26:37 cause = "too many redirects" 09:26:37 response_redirect_location = response.get_redirect_location() 09:26:37 if response_redirect_location: 09:26:37 redirect_location = response_redirect_location 09:26:37 status = response.status 09:26:37 09:26:37 else: 09:26:37 # Incrementing because of a server error like a 500 in 09:26:37 # status_forcelist and the given method is in the allowed_methods 09:26:37 cause = ResponseError.GENERIC_ERROR 09:26:37 if response and response.status: 09:26:37 if status_count is not None: 09:26:37 status_count -= 1 09:26:37 cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) 09:26:37 status = response.status 09:26:37 09:26:37 history = self.history + ( 09:26:37 RequestHistory(method, url, error, status, redirect_location), 09:26:37 ) 09:26:37 09:26:37 new_retry = self.new( 09:26:37 total=total, 09:26:37 connect=connect, 09:26:37 read=read, 09:26:37 redirect=redirect, 09:26:37 status=status_count, 09:26:37 other=other, 09:26:37 history=history, 09:26:37 ) 09:26:37 09:26:37 if new_retry.is_exhausted(): 09:26:37 reason = error or ResponseError(cause) 09:26:37 > raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] 09:26:37 E urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8182): Max retries exceeded with url: /rests/data/transportpce-portmapping:network/nodes=XPDRA01/node-info (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 09:26:37 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/retry.py:519: MaxRetryError 09:26:37 09:26:37 During handling of the above exception, another exception occurred: 09:26:37 09:26:37 self = 09:26:37 09:26:37 def test_18_xpdr_device_not_connected(self): 09:26:37 > response = test_utils.get_portmapping_node_attr("XPDRA01", "node-info", None) 09:26:37 09:26:37 transportpce_tests/1.2.1/test01_portmapping.py:203: 09:26:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:26:37 transportpce_tests/common/test_utils.py:470: in get_portmapping_node_attr 09:26:37 response = get_request(target_url) 09:26:37 transportpce_tests/common/test_utils.py:116: in get_request 09:26:37 return requests.request( 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/requests/api.py:59: in request 09:26:37 return session.request(method=method, url=url, **kwargs) 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/requests/sessions.py:589: in request 09:26:37 resp = self.send(prep, **send_kwargs) 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/requests/sessions.py:703: in send 09:26:37 r = adapter.send(request, **kwargs) 09:26:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:26:37 09:26:37 self = 09:26:37 request = , stream = False 09:26:37 timeout = Timeout(connect=10, read=10, total=None), verify = True, cert = None 09:26:37 proxies = OrderedDict() 09:26:37 09:26:37 def send( 09:26:37 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 09:26:37 ): 09:26:37 """Sends PreparedRequest object. Returns Response object. 09:26:37 09:26:37 :param request: The :class:`PreparedRequest ` being sent. 09:26:37 :param stream: (optional) Whether to stream the request content. 09:26:37 :param timeout: (optional) How long to wait for the server to send 09:26:37 data before giving up, as a float, or a :ref:`(connect timeout, 09:26:37 read timeout) ` tuple. 09:26:37 :type timeout: float or tuple or urllib3 Timeout object 09:26:37 :param verify: (optional) Either a boolean, in which case it controls whether 09:26:37 we verify the server's TLS certificate, or a string, in which case it 09:26:37 must be a path to a CA bundle to use 09:26:37 :param cert: (optional) Any user-provided SSL certificate to be trusted. 09:26:37 :param proxies: (optional) The proxies dictionary to apply to the request. 09:26:37 :rtype: requests.Response 09:26:37 """ 09:26:37 09:26:37 try: 09:26:37 conn = self.get_connection_with_tls_context( 09:26:37 request, verify, proxies=proxies, cert=cert 09:26:37 ) 09:26:37 except LocationValueError as e: 09:26:37 raise InvalidURL(e, request=request) 09:26:37 09:26:37 self.cert_verify(conn, request.url, verify, cert) 09:26:37 url = self.request_url(request, proxies) 09:26:37 self.add_headers( 09:26:37 request, 09:26:37 stream=stream, 09:26:37 timeout=timeout, 09:26:37 verify=verify, 09:26:37 cert=cert, 09:26:37 proxies=proxies, 09:26:37 ) 09:26:37 09:26:37 chunked = not (request.body is None or "Content-Length" in request.headers) 09:26:37 09:26:37 if isinstance(timeout, tuple): 09:26:37 try: 09:26:37 connect, read = timeout 09:26:37 timeout = TimeoutSauce(connect=connect, read=read) 09:26:37 except ValueError: 09:26:37 raise ValueError( 09:26:37 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 09:26:37 f"or a single float to set both timeouts to the same value." 09:26:37 ) 09:26:37 elif isinstance(timeout, TimeoutSauce): 09:26:37 pass 09:26:37 else: 09:26:37 timeout = TimeoutSauce(connect=timeout, read=timeout) 09:26:37 09:26:37 try: 09:26:37 resp = conn.urlopen( 09:26:37 method=request.method, 09:26:37 url=url, 09:26:37 body=request.body, 09:26:37 headers=request.headers, 09:26:37 redirect=False, 09:26:37 assert_same_host=False, 09:26:37 preload_content=False, 09:26:37 decode_content=False, 09:26:37 retries=self.max_retries, 09:26:37 timeout=timeout, 09:26:37 chunked=chunked, 09:26:37 ) 09:26:37 09:26:37 except (ProtocolError, OSError) as err: 09:26:37 raise ConnectionError(err, request=request) 09:26:37 09:26:37 except MaxRetryError as e: 09:26:37 if isinstance(e.reason, ConnectTimeoutError): 09:26:37 # TODO: Remove this in 3.0.0: see #2811 09:26:37 if not isinstance(e.reason, NewConnectionError): 09:26:37 raise ConnectTimeout(e, request=request) 09:26:37 09:26:37 if isinstance(e.reason, ResponseError): 09:26:37 raise RetryError(e, request=request) 09:26:37 09:26:37 if isinstance(e.reason, _ProxyError): 09:26:37 raise ProxyError(e, request=request) 09:26:37 09:26:37 if isinstance(e.reason, _SSLError): 09:26:37 # This branch is for urllib3 v1.22 and later. 09:26:37 raise SSLError(e, request=request) 09:26:37 09:26:37 > raise ConnectionError(e, request=request) 09:26:37 E requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8182): Max retries exceeded with url: /rests/data/transportpce-portmapping:network/nodes=XPDRA01/node-info (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 09:26:37 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/requests/adapters.py:700: ConnectionError 09:26:37 ----------------------------- Captured stdout call ----------------------------- 09:26:37 execution of test_18_xpdr_device_not_connected 09:26:37 _______ TransportPCEPortMappingTesting.test_19_rdm_device_disconnection ________ 09:26:37 09:26:37 self = 09:26:37 09:26:37 def _new_conn(self) -> socket.socket: 09:26:37 """Establish a socket connection and set nodelay settings on it. 09:26:37 09:26:37 :return: New socket connection. 09:26:37 """ 09:26:37 try: 09:26:37 > sock = connection.create_connection( 09:26:37 (self._dns_host, self.port), 09:26:37 self.timeout, 09:26:37 source_address=self.source_address, 09:26:37 socket_options=self.socket_options, 09:26:37 ) 09:26:37 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:199: 09:26:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/connection.py:85: in create_connection 09:26:37 raise err 09:26:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:26:37 09:26:37 address = ('localhost', 8182), timeout = 10, source_address = None 09:26:37 socket_options = [(6, 1, 1)] 09:26:37 09:26:37 def create_connection( 09:26:37 address: tuple[str, int], 09:26:37 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 09:26:37 source_address: tuple[str, int] | None = None, 09:26:37 socket_options: _TYPE_SOCKET_OPTIONS | None = None, 09:26:37 ) -> socket.socket: 09:26:37 """Connect to *address* and return the socket object. 09:26:37 09:26:37 Convenience function. Connect to *address* (a 2-tuple ``(host, 09:26:37 port)``) and return the socket object. Passing the optional 09:26:37 *timeout* parameter will set the timeout on the socket instance 09:26:37 before attempting to connect. If no *timeout* is supplied, the 09:26:37 global default timeout setting returned by :func:`socket.getdefaulttimeout` 09:26:37 is used. If *source_address* is set it must be a tuple of (host, port) 09:26:37 for the socket to bind as a source address before making the connection. 09:26:37 An host of '' or port 0 tells the OS to use the default. 09:26:37 """ 09:26:37 09:26:37 host, port = address 09:26:37 if host.startswith("["): 09:26:37 host = host.strip("[]") 09:26:37 err = None 09:26:37 09:26:37 # Using the value from allowed_gai_family() in the context of getaddrinfo lets 09:26:37 # us select whether to work with IPv4 DNS records, IPv6 records, or both. 09:26:37 # The original create_connection function always returns all records. 09:26:37 family = allowed_gai_family() 09:26:37 09:26:37 try: 09:26:37 host.encode("idna") 09:26:37 except UnicodeError: 09:26:37 raise LocationParseError(f"'{host}', label empty or too long") from None 09:26:37 09:26:37 for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 09:26:37 af, socktype, proto, canonname, sa = res 09:26:37 sock = None 09:26:37 try: 09:26:37 sock = socket.socket(af, socktype, proto) 09:26:37 09:26:37 # If provided, set socket level options before connecting. 09:26:37 _set_socket_options(sock, socket_options) 09:26:37 09:26:37 if timeout is not _DEFAULT_TIMEOUT: 09:26:37 sock.settimeout(timeout) 09:26:37 if source_address: 09:26:37 sock.bind(source_address) 09:26:37 > sock.connect(sa) 09:26:37 E ConnectionRefusedError: [Errno 111] Connection refused 09:26:37 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/connection.py:73: ConnectionRefusedError 09:26:37 09:26:37 The above exception was the direct cause of the following exception: 09:26:37 09:26:37 self = 09:26:37 method = 'DELETE' 09:26:37 url = '/rests/data/network-topology:network-topology/topology=topology-netconf/node=ROADMA01' 09:26:37 body = None 09:26:37 headers = {'User-Agent': 'python-requests/2.32.3', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'Connection': 'keep-alive', 'Content-Type': 'application/json', 'Content-Length': '0', 'Authorization': 'Basic YWRtaW46YWRtaW4='} 09:26:37 retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 09:26:37 redirect = False, assert_same_host = False 09:26:37 timeout = Timeout(connect=10, read=10, total=None), pool_timeout = None 09:26:37 release_conn = False, chunked = False, body_pos = None, preload_content = False 09:26:37 decode_content = False, response_kw = {} 09:26:37 parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/rests/data/network-topology:network-topology/topology=topology-netconf/node=ROADMA01', query=None, fragment=None) 09:26:37 destination_scheme = None, conn = None, release_this_conn = True 09:26:37 http_tunnel_required = False, err = None, clean_exit = False 09:26:37 09:26:37 def urlopen( # type: ignore[override] 09:26:37 self, 09:26:37 method: str, 09:26:37 url: str, 09:26:37 body: _TYPE_BODY | None = None, 09:26:37 headers: typing.Mapping[str, str] | None = None, 09:26:37 retries: Retry | bool | int | None = None, 09:26:37 redirect: bool = True, 09:26:37 assert_same_host: bool = True, 09:26:37 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 09:26:37 pool_timeout: int | None = None, 09:26:37 release_conn: bool | None = None, 09:26:37 chunked: bool = False, 09:26:37 body_pos: _TYPE_BODY_POSITION | None = None, 09:26:37 preload_content: bool = True, 09:26:37 decode_content: bool = True, 09:26:37 **response_kw: typing.Any, 09:26:37 ) -> BaseHTTPResponse: 09:26:37 """ 09:26:37 Get a connection from the pool and perform an HTTP request. This is the 09:26:37 lowest level call for making a request, so you'll need to specify all 09:26:37 the raw details. 09:26:37 09:26:37 .. note:: 09:26:37 09:26:37 More commonly, it's appropriate to use a convenience method 09:26:37 such as :meth:`request`. 09:26:37 09:26:37 .. note:: 09:26:37 09:26:37 `release_conn` will only behave as expected if 09:26:37 `preload_content=False` because we want to make 09:26:37 `preload_content=False` the default behaviour someday soon without 09:26:37 breaking backwards compatibility. 09:26:37 09:26:37 :param method: 09:26:37 HTTP request method (such as GET, POST, PUT, etc.) 09:26:37 09:26:37 :param url: 09:26:37 The URL to perform the request on. 09:26:37 09:26:37 :param body: 09:26:37 Data to send in the request body, either :class:`str`, :class:`bytes`, 09:26:37 an iterable of :class:`str`/:class:`bytes`, or a file-like object. 09:26:37 09:26:37 :param headers: 09:26:37 Dictionary of custom headers to send, such as User-Agent, 09:26:37 If-None-Match, etc. If None, pool headers are used. If provided, 09:26:37 these headers completely replace any pool-specific headers. 09:26:37 09:26:37 :param retries: 09:26:37 Configure the number of retries to allow before raising a 09:26:37 :class:`~urllib3.exceptions.MaxRetryError` exception. 09:26:37 09:26:37 If ``None`` (default) will retry 3 times, see ``Retry.DEFAULT``. Pass a 09:26:37 :class:`~urllib3.util.retry.Retry` object for fine-grained control 09:26:37 over different types of retries. 09:26:37 Pass an integer number to retry connection errors that many times, 09:26:37 but no other types of errors. Pass zero to never retry. 09:26:37 09:26:37 If ``False``, then retries are disabled and any exception is raised 09:26:37 immediately. Also, instead of raising a MaxRetryError on redirects, 09:26:37 the redirect response will be returned. 09:26:37 09:26:37 :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 09:26:37 09:26:37 :param redirect: 09:26:37 If True, automatically handle redirects (status codes 301, 302, 09:26:37 303, 307, 308). Each redirect counts as a retry. Disabling retries 09:26:37 will disable redirect, too. 09:26:37 09:26:37 :param assert_same_host: 09:26:37 If ``True``, will make sure that the host of the pool requests is 09:26:37 consistent else will raise HostChangedError. When ``False``, you can 09:26:37 use the pool on an HTTP proxy and request foreign hosts. 09:26:37 09:26:37 :param timeout: 09:26:37 If specified, overrides the default timeout for this one 09:26:37 request. It may be a float (in seconds) or an instance of 09:26:37 :class:`urllib3.util.Timeout`. 09:26:37 09:26:37 :param pool_timeout: 09:26:37 If set and the pool is set to block=True, then this method will 09:26:37 block for ``pool_timeout`` seconds and raise EmptyPoolError if no 09:26:37 connection is available within the time period. 09:26:37 09:26:37 :param bool preload_content: 09:26:37 If True, the response's body will be preloaded into memory. 09:26:37 09:26:37 :param bool decode_content: 09:26:37 If True, will attempt to decode the body based on the 09:26:37 'content-encoding' header. 09:26:37 09:26:37 :param release_conn: 09:26:37 If False, then the urlopen call will not release the connection 09:26:37 back into the pool once a response is received (but will release if 09:26:37 you read the entire contents of the response such as when 09:26:37 `preload_content=True`). This is useful if you're not preloading 09:26:37 the response's content immediately. You will need to call 09:26:37 ``r.release_conn()`` on the response ``r`` to return the connection 09:26:37 back into the pool. If None, it takes the value of ``preload_content`` 09:26:37 which defaults to ``True``. 09:26:37 09:26:37 :param bool chunked: 09:26:37 If True, urllib3 will send the body using chunked transfer 09:26:37 encoding. Otherwise, urllib3 will send the body using the standard 09:26:37 content-length form. Defaults to False. 09:26:37 09:26:37 :param int body_pos: 09:26:37 Position to seek to in file-like body in the event of a retry or 09:26:37 redirect. Typically this won't need to be set because urllib3 will 09:26:37 auto-populate the value when needed. 09:26:37 """ 09:26:37 parsed_url = parse_url(url) 09:26:37 destination_scheme = parsed_url.scheme 09:26:37 09:26:37 if headers is None: 09:26:37 headers = self.headers 09:26:37 09:26:37 if not isinstance(retries, Retry): 09:26:37 retries = Retry.from_int(retries, redirect=redirect, default=self.retries) 09:26:37 09:26:37 if release_conn is None: 09:26:37 release_conn = preload_content 09:26:37 09:26:37 # Check host 09:26:37 if assert_same_host and not self.is_same_host(url): 09:26:37 raise HostChangedError(self, url, retries) 09:26:37 09:26:37 # Ensure that the URL we're connecting to is properly encoded 09:26:37 if url.startswith("/"): 09:26:37 url = to_str(_encode_target(url)) 09:26:37 else: 09:26:37 url = to_str(parsed_url.url) 09:26:37 09:26:37 conn = None 09:26:37 09:26:37 # Track whether `conn` needs to be released before 09:26:37 # returning/raising/recursing. Update this variable if necessary, and 09:26:37 # leave `release_conn` constant throughout the function. That way, if 09:26:37 # the function recurses, the original value of `release_conn` will be 09:26:37 # passed down into the recursive call, and its value will be respected. 09:26:37 # 09:26:37 # See issue #651 [1] for details. 09:26:37 # 09:26:37 # [1] 09:26:37 release_this_conn = release_conn 09:26:37 09:26:37 http_tunnel_required = connection_requires_http_tunnel( 09:26:37 self.proxy, self.proxy_config, destination_scheme 09:26:37 ) 09:26:37 09:26:37 # Merge the proxy headers. Only done when not using HTTP CONNECT. We 09:26:37 # have to copy the headers dict so we can safely change it without those 09:26:37 # changes being reflected in anyone else's copy. 09:26:37 if not http_tunnel_required: 09:26:37 headers = headers.copy() # type: ignore[attr-defined] 09:26:37 headers.update(self.proxy_headers) # type: ignore[union-attr] 09:26:37 09:26:37 # Must keep the exception bound to a separate variable or else Python 3 09:26:37 # complains about UnboundLocalError. 09:26:37 err = None 09:26:37 09:26:37 # Keep track of whether we cleanly exited the except block. This 09:26:37 # ensures we do proper cleanup in finally. 09:26:37 clean_exit = False 09:26:37 09:26:37 # Rewind body position, if needed. Record current position 09:26:37 # for future rewinds in the event of a redirect/retry. 09:26:37 body_pos = set_file_position(body, body_pos) 09:26:37 09:26:37 try: 09:26:37 # Request a connection from the queue. 09:26:37 timeout_obj = self._get_timeout(timeout) 09:26:37 conn = self._get_conn(timeout=pool_timeout) 09:26:37 09:26:37 conn.timeout = timeout_obj.connect_timeout # type: ignore[assignment] 09:26:37 09:26:37 # Is this a closed/new connection that requires CONNECT tunnelling? 09:26:37 if self.proxy is not None and http_tunnel_required and conn.is_closed: 09:26:37 try: 09:26:37 self._prepare_proxy(conn) 09:26:37 except (BaseSSLError, OSError, SocketTimeout) as e: 09:26:37 self._raise_timeout( 09:26:37 err=e, url=self.proxy.url, timeout_value=conn.timeout 09:26:37 ) 09:26:37 raise 09:26:37 09:26:37 # If we're going to release the connection in ``finally:``, then 09:26:37 # the response doesn't need to know about the connection. Otherwise 09:26:37 # it will also try to release it and we'll have a double-release 09:26:37 # mess. 09:26:37 response_conn = conn if not release_conn else None 09:26:37 09:26:37 # Make the request on the HTTPConnection object 09:26:37 > response = self._make_request( 09:26:37 conn, 09:26:37 method, 09:26:37 url, 09:26:37 timeout=timeout_obj, 09:26:37 body=body, 09:26:37 headers=headers, 09:26:37 chunked=chunked, 09:26:37 retries=retries, 09:26:37 response_conn=response_conn, 09:26:37 preload_content=preload_content, 09:26:37 decode_content=decode_content, 09:26:37 **response_kw, 09:26:37 ) 09:26:37 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:789: 09:26:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:495: in _make_request 09:26:37 conn.request( 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:441: in request 09:26:37 self.endheaders() 09:26:37 /opt/pyenv/versions/3.11.7/lib/python3.11/http/client.py:1289: in endheaders 09:26:37 self._send_output(message_body, encode_chunked=encode_chunked) 09:26:37 /opt/pyenv/versions/3.11.7/lib/python3.11/http/client.py:1048: in _send_output 09:26:37 self.send(msg) 09:26:37 /opt/pyenv/versions/3.11.7/lib/python3.11/http/client.py:986: in send 09:26:37 self.connect() 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:279: in connect 09:26:37 self.sock = self._new_conn() 09:26:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:26:37 09:26:37 self = 09:26:37 09:26:37 def _new_conn(self) -> socket.socket: 09:26:37 """Establish a socket connection and set nodelay settings on it. 09:26:37 09:26:37 :return: New socket connection. 09:26:37 """ 09:26:37 try: 09:26:37 sock = connection.create_connection( 09:26:37 (self._dns_host, self.port), 09:26:37 self.timeout, 09:26:37 source_address=self.source_address, 09:26:37 socket_options=self.socket_options, 09:26:37 ) 09:26:37 except socket.gaierror as e: 09:26:37 raise NameResolutionError(self.host, self, e) from e 09:26:37 except SocketTimeout as e: 09:26:37 raise ConnectTimeoutError( 09:26:37 self, 09:26:37 f"Connection to {self.host} timed out. (connect timeout={self.timeout})", 09:26:37 ) from e 09:26:37 09:26:37 except OSError as e: 09:26:37 > raise NewConnectionError( 09:26:37 self, f"Failed to establish a new connection: {e}" 09:26:37 ) from e 09:26:37 E urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [Errno 111] Connection refused 09:26:37 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:214: NewConnectionError 09:26:37 09:26:37 The above exception was the direct cause of the following exception: 09:26:37 09:26:37 self = 09:26:37 request = , stream = False 09:26:37 timeout = Timeout(connect=10, read=10, total=None), verify = True, cert = None 09:26:37 proxies = OrderedDict() 09:26:37 09:26:37 def send( 09:26:37 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 09:26:37 ): 09:26:37 """Sends PreparedRequest object. Returns Response object. 09:26:37 09:26:37 :param request: The :class:`PreparedRequest ` being sent. 09:26:37 :param stream: (optional) Whether to stream the request content. 09:26:37 :param timeout: (optional) How long to wait for the server to send 09:26:37 data before giving up, as a float, or a :ref:`(connect timeout, 09:26:37 read timeout) ` tuple. 09:26:37 :type timeout: float or tuple or urllib3 Timeout object 09:26:37 :param verify: (optional) Either a boolean, in which case it controls whether 09:26:37 we verify the server's TLS certificate, or a string, in which case it 09:26:37 must be a path to a CA bundle to use 09:26:37 :param cert: (optional) Any user-provided SSL certificate to be trusted. 09:26:37 :param proxies: (optional) The proxies dictionary to apply to the request. 09:26:37 :rtype: requests.Response 09:26:37 """ 09:26:37 09:26:37 try: 09:26:37 conn = self.get_connection_with_tls_context( 09:26:37 request, verify, proxies=proxies, cert=cert 09:26:37 ) 09:26:37 except LocationValueError as e: 09:26:37 raise InvalidURL(e, request=request) 09:26:37 09:26:37 self.cert_verify(conn, request.url, verify, cert) 09:26:37 url = self.request_url(request, proxies) 09:26:37 self.add_headers( 09:26:37 request, 09:26:37 stream=stream, 09:26:37 timeout=timeout, 09:26:37 verify=verify, 09:26:37 cert=cert, 09:26:37 proxies=proxies, 09:26:37 ) 09:26:37 09:26:37 chunked = not (request.body is None or "Content-Length" in request.headers) 09:26:37 09:26:37 if isinstance(timeout, tuple): 09:26:37 try: 09:26:37 connect, read = timeout 09:26:37 timeout = TimeoutSauce(connect=connect, read=read) 09:26:37 except ValueError: 09:26:37 raise ValueError( 09:26:37 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 09:26:37 f"or a single float to set both timeouts to the same value." 09:26:37 ) 09:26:37 elif isinstance(timeout, TimeoutSauce): 09:26:37 pass 09:26:37 else: 09:26:37 timeout = TimeoutSauce(connect=timeout, read=timeout) 09:26:37 09:26:37 try: 09:26:37 > resp = conn.urlopen( 09:26:37 method=request.method, 09:26:37 url=url, 09:26:37 body=request.body, 09:26:37 headers=request.headers, 09:26:37 redirect=False, 09:26:37 assert_same_host=False, 09:26:37 preload_content=False, 09:26:37 decode_content=False, 09:26:37 retries=self.max_retries, 09:26:37 timeout=timeout, 09:26:37 chunked=chunked, 09:26:37 ) 09:26:37 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/requests/adapters.py:667: 09:26:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:843: in urlopen 09:26:37 retries = retries.increment( 09:26:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:26:37 09:26:37 self = Retry(total=0, connect=None, read=False, redirect=None, status=None) 09:26:37 method = 'DELETE' 09:26:37 url = '/rests/data/network-topology:network-topology/topology=topology-netconf/node=ROADMA01' 09:26:37 response = None 09:26:37 error = NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused') 09:26:37 _pool = 09:26:37 _stacktrace = 09:26:37 09:26:37 def increment( 09:26:37 self, 09:26:37 method: str | None = None, 09:26:37 url: str | None = None, 09:26:37 response: BaseHTTPResponse | None = None, 09:26:37 error: Exception | None = None, 09:26:37 _pool: ConnectionPool | None = None, 09:26:37 _stacktrace: TracebackType | None = None, 09:26:37 ) -> Self: 09:26:37 """Return a new Retry object with incremented retry counters. 09:26:37 09:26:37 :param response: A response object, or None, if the server did not 09:26:37 return a response. 09:26:37 :type response: :class:`~urllib3.response.BaseHTTPResponse` 09:26:37 :param Exception error: An error encountered during the request, or 09:26:37 None if the response was received successfully. 09:26:37 09:26:37 :return: A new ``Retry`` object. 09:26:37 """ 09:26:37 if self.total is False and error: 09:26:37 # Disabled, indicate to re-raise the error. 09:26:37 raise reraise(type(error), error, _stacktrace) 09:26:37 09:26:37 total = self.total 09:26:37 if total is not None: 09:26:37 total -= 1 09:26:37 09:26:37 connect = self.connect 09:26:37 read = self.read 09:26:37 redirect = self.redirect 09:26:37 status_count = self.status 09:26:37 other = self.other 09:26:37 cause = "unknown" 09:26:37 status = None 09:26:37 redirect_location = None 09:26:37 09:26:37 if error and self._is_connection_error(error): 09:26:37 # Connect retry? 09:26:37 if connect is False: 09:26:37 raise reraise(type(error), error, _stacktrace) 09:26:37 elif connect is not None: 09:26:37 connect -= 1 09:26:37 09:26:37 elif error and self._is_read_error(error): 09:26:37 # Read retry? 09:26:37 if read is False or method is None or not self._is_method_retryable(method): 09:26:37 raise reraise(type(error), error, _stacktrace) 09:26:37 elif read is not None: 09:26:37 read -= 1 09:26:37 09:26:37 elif error: 09:26:37 # Other retry? 09:26:37 if other is not None: 09:26:37 other -= 1 09:26:37 09:26:37 elif response and response.get_redirect_location(): 09:26:37 # Redirect retry? 09:26:37 if redirect is not None: 09:26:37 redirect -= 1 09:26:37 cause = "too many redirects" 09:26:37 response_redirect_location = response.get_redirect_location() 09:26:37 if response_redirect_location: 09:26:37 redirect_location = response_redirect_location 09:26:37 status = response.status 09:26:37 09:26:37 else: 09:26:37 # Incrementing because of a server error like a 500 in 09:26:37 # status_forcelist and the given method is in the allowed_methods 09:26:37 cause = ResponseError.GENERIC_ERROR 09:26:37 if response and response.status: 09:26:37 if status_count is not None: 09:26:37 status_count -= 1 09:26:37 cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) 09:26:37 status = response.status 09:26:37 09:26:37 history = self.history + ( 09:26:37 RequestHistory(method, url, error, status, redirect_location), 09:26:37 ) 09:26:37 09:26:37 new_retry = self.new( 09:26:37 total=total, 09:26:37 connect=connect, 09:26:37 read=read, 09:26:37 redirect=redirect, 09:26:37 status=status_count, 09:26:37 other=other, 09:26:37 history=history, 09:26:37 ) 09:26:37 09:26:37 if new_retry.is_exhausted(): 09:26:37 reason = error or ResponseError(cause) 09:26:37 > raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] 09:26:37 E urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8182): Max retries exceeded with url: /rests/data/network-topology:network-topology/topology=topology-netconf/node=ROADMA01 (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 09:26:37 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/retry.py:519: MaxRetryError 09:26:37 09:26:37 During handling of the above exception, another exception occurred: 09:26:37 09:26:37 self = 09:26:37 09:26:37 def test_19_rdm_device_disconnection(self): 09:26:37 > response = test_utils.unmount_device("ROADMA01") 09:26:37 09:26:37 transportpce_tests/1.2.1/test01_portmapping.py:211: 09:26:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:26:37 transportpce_tests/common/test_utils.py:358: in unmount_device 09:26:37 response = delete_request(url[RESTCONF_VERSION].format('{}', node)) 09:26:37 transportpce_tests/common/test_utils.py:133: in delete_request 09:26:37 return requests.request( 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/requests/api.py:59: in request 09:26:37 return session.request(method=method, url=url, **kwargs) 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/requests/sessions.py:589: in request 09:26:37 resp = self.send(prep, **send_kwargs) 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/requests/sessions.py:703: in send 09:26:37 r = adapter.send(request, **kwargs) 09:26:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:26:37 09:26:37 self = 09:26:37 request = , stream = False 09:26:37 timeout = Timeout(connect=10, read=10, total=None), verify = True, cert = None 09:26:37 proxies = OrderedDict() 09:26:37 09:26:37 def send( 09:26:37 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 09:26:37 ): 09:26:37 """Sends PreparedRequest object. Returns Response object. 09:26:37 09:26:37 :param request: The :class:`PreparedRequest ` being sent. 09:26:37 :param stream: (optional) Whether to stream the request content. 09:26:37 :param timeout: (optional) How long to wait for the server to send 09:26:37 data before giving up, as a float, or a :ref:`(connect timeout, 09:26:37 read timeout) ` tuple. 09:26:37 :type timeout: float or tuple or urllib3 Timeout object 09:26:37 :param verify: (optional) Either a boolean, in which case it controls whether 09:26:37 we verify the server's TLS certificate, or a string, in which case it 09:26:37 must be a path to a CA bundle to use 09:26:37 :param cert: (optional) Any user-provided SSL certificate to be trusted. 09:26:37 :param proxies: (optional) The proxies dictionary to apply to the request. 09:26:37 :rtype: requests.Response 09:26:37 """ 09:26:37 09:26:37 try: 09:26:37 conn = self.get_connection_with_tls_context( 09:26:37 request, verify, proxies=proxies, cert=cert 09:26:37 ) 09:26:37 except LocationValueError as e: 09:26:37 raise InvalidURL(e, request=request) 09:26:37 09:26:37 self.cert_verify(conn, request.url, verify, cert) 09:26:37 url = self.request_url(request, proxies) 09:26:37 self.add_headers( 09:26:37 request, 09:26:37 stream=stream, 09:26:37 timeout=timeout, 09:26:37 verify=verify, 09:26:37 cert=cert, 09:26:37 proxies=proxies, 09:26:37 ) 09:26:37 09:26:37 chunked = not (request.body is None or "Content-Length" in request.headers) 09:26:37 09:26:37 if isinstance(timeout, tuple): 09:26:37 try: 09:26:37 connect, read = timeout 09:26:37 timeout = TimeoutSauce(connect=connect, read=read) 09:26:37 except ValueError: 09:26:37 raise ValueError( 09:26:37 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 09:26:37 f"or a single float to set both timeouts to the same value." 09:26:37 ) 09:26:37 elif isinstance(timeout, TimeoutSauce): 09:26:37 pass 09:26:37 else: 09:26:37 timeout = TimeoutSauce(connect=timeout, read=timeout) 09:26:37 09:26:37 try: 09:26:37 resp = conn.urlopen( 09:26:37 method=request.method, 09:26:37 url=url, 09:26:37 body=request.body, 09:26:37 headers=request.headers, 09:26:37 redirect=False, 09:26:37 assert_same_host=False, 09:26:37 preload_content=False, 09:26:37 decode_content=False, 09:26:37 retries=self.max_retries, 09:26:37 timeout=timeout, 09:26:37 chunked=chunked, 09:26:37 ) 09:26:37 09:26:37 except (ProtocolError, OSError) as err: 09:26:37 raise ConnectionError(err, request=request) 09:26:37 09:26:37 except MaxRetryError as e: 09:26:37 if isinstance(e.reason, ConnectTimeoutError): 09:26:37 # TODO: Remove this in 3.0.0: see #2811 09:26:37 if not isinstance(e.reason, NewConnectionError): 09:26:37 raise ConnectTimeout(e, request=request) 09:26:37 09:26:37 if isinstance(e.reason, ResponseError): 09:26:37 raise RetryError(e, request=request) 09:26:37 09:26:37 if isinstance(e.reason, _ProxyError): 09:26:37 raise ProxyError(e, request=request) 09:26:37 09:26:37 if isinstance(e.reason, _SSLError): 09:26:37 # This branch is for urllib3 v1.22 and later. 09:26:37 raise SSLError(e, request=request) 09:26:37 09:26:37 > raise ConnectionError(e, request=request) 09:26:37 E requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8182): Max retries exceeded with url: /rests/data/network-topology:network-topology/topology=topology-netconf/node=ROADMA01 (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 09:26:37 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/requests/adapters.py:700: ConnectionError 09:26:37 ----------------------------- Captured stdout call ----------------------------- 09:26:37 execution of test_19_rdm_device_disconnection 09:26:37 ________ TransportPCEPortMappingTesting.test_20_rdm_device_disconnected ________ 09:26:37 09:26:37 self = 09:26:37 09:26:37 def _new_conn(self) -> socket.socket: 09:26:37 """Establish a socket connection and set nodelay settings on it. 09:26:37 09:26:37 :return: New socket connection. 09:26:37 """ 09:26:37 try: 09:26:37 > sock = connection.create_connection( 09:26:37 (self._dns_host, self.port), 09:26:37 self.timeout, 09:26:37 source_address=self.source_address, 09:26:37 socket_options=self.socket_options, 09:26:37 ) 09:26:37 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:199: 09:26:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/connection.py:85: in create_connection 09:26:37 raise err 09:26:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:26:37 09:26:37 address = ('localhost', 8182), timeout = 10, source_address = None 09:26:37 socket_options = [(6, 1, 1)] 09:26:37 09:26:37 def create_connection( 09:26:37 address: tuple[str, int], 09:26:37 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 09:26:37 source_address: tuple[str, int] | None = None, 09:26:37 socket_options: _TYPE_SOCKET_OPTIONS | None = None, 09:26:37 ) -> socket.socket: 09:26:37 """Connect to *address* and return the socket object. 09:26:37 09:26:37 Convenience function. Connect to *address* (a 2-tuple ``(host, 09:26:37 port)``) and return the socket object. Passing the optional 09:26:37 *timeout* parameter will set the timeout on the socket instance 09:26:37 before attempting to connect. If no *timeout* is supplied, the 09:26:37 global default timeout setting returned by :func:`socket.getdefaulttimeout` 09:26:37 is used. If *source_address* is set it must be a tuple of (host, port) 09:26:37 for the socket to bind as a source address before making the connection. 09:26:37 An host of '' or port 0 tells the OS to use the default. 09:26:37 """ 09:26:37 09:26:37 host, port = address 09:26:37 if host.startswith("["): 09:26:37 host = host.strip("[]") 09:26:37 err = None 09:26:37 09:26:37 # Using the value from allowed_gai_family() in the context of getaddrinfo lets 09:26:37 # us select whether to work with IPv4 DNS records, IPv6 records, or both. 09:26:37 # The original create_connection function always returns all records. 09:26:37 family = allowed_gai_family() 09:26:37 09:26:37 try: 09:26:37 host.encode("idna") 09:26:37 except UnicodeError: 09:26:37 raise LocationParseError(f"'{host}', label empty or too long") from None 09:26:37 09:26:37 for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 09:26:37 af, socktype, proto, canonname, sa = res 09:26:37 sock = None 09:26:37 try: 09:26:37 sock = socket.socket(af, socktype, proto) 09:26:37 09:26:37 # If provided, set socket level options before connecting. 09:26:37 _set_socket_options(sock, socket_options) 09:26:37 09:26:37 if timeout is not _DEFAULT_TIMEOUT: 09:26:37 sock.settimeout(timeout) 09:26:37 if source_address: 09:26:37 sock.bind(source_address) 09:26:37 > sock.connect(sa) 09:26:37 E ConnectionRefusedError: [Errno 111] Connection refused 09:26:37 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/connection.py:73: ConnectionRefusedError 09:26:37 09:26:37 The above exception was the direct cause of the following exception: 09:26:37 09:26:37 self = 09:26:37 method = 'GET' 09:26:37 url = '/rests/data/network-topology:network-topology/topology=topology-netconf/node=ROADMA01?content=nonconfig' 09:26:37 body = None 09:26:37 headers = {'User-Agent': 'python-requests/2.32.3', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'Connection': 'keep-alive', 'Content-Type': 'application/json', 'Authorization': 'Basic YWRtaW46YWRtaW4='} 09:26:37 retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 09:26:37 redirect = False, assert_same_host = False 09:26:37 timeout = Timeout(connect=10, read=10, total=None), pool_timeout = None 09:26:37 release_conn = False, chunked = False, body_pos = None, preload_content = False 09:26:37 decode_content = False, response_kw = {} 09:26:37 parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/rests/data/network-topology:network-topology/topology=topology-netconf/node=ROADMA01', query='content=nonconfig', fragment=None) 09:26:37 destination_scheme = None, conn = None, release_this_conn = True 09:26:37 http_tunnel_required = False, err = None, clean_exit = False 09:26:37 09:26:37 def urlopen( # type: ignore[override] 09:26:37 self, 09:26:37 method: str, 09:26:37 url: str, 09:26:37 body: _TYPE_BODY | None = None, 09:26:37 headers: typing.Mapping[str, str] | None = None, 09:26:37 retries: Retry | bool | int | None = None, 09:26:37 redirect: bool = True, 09:26:37 assert_same_host: bool = True, 09:26:37 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 09:26:37 pool_timeout: int | None = None, 09:26:37 release_conn: bool | None = None, 09:26:37 chunked: bool = False, 09:26:37 body_pos: _TYPE_BODY_POSITION | None = None, 09:26:37 preload_content: bool = True, 09:26:37 decode_content: bool = True, 09:26:37 **response_kw: typing.Any, 09:26:37 ) -> BaseHTTPResponse: 09:26:37 """ 09:26:37 Get a connection from the pool and perform an HTTP request. This is the 09:26:37 lowest level call for making a request, so you'll need to specify all 09:26:37 the raw details. 09:26:37 09:26:37 .. note:: 09:26:37 09:26:37 More commonly, it's appropriate to use a convenience method 09:26:37 such as :meth:`request`. 09:26:37 09:26:37 .. note:: 09:26:37 09:26:37 `release_conn` will only behave as expected if 09:26:37 `preload_content=False` because we want to make 09:26:37 `preload_content=False` the default behaviour someday soon without 09:26:37 breaking backwards compatibility. 09:26:37 09:26:37 :param method: 09:26:37 HTTP request method (such as GET, POST, PUT, etc.) 09:26:37 09:26:37 :param url: 09:26:37 The URL to perform the request on. 09:26:37 09:26:37 :param body: 09:26:37 Data to send in the request body, either :class:`str`, :class:`bytes`, 09:26:37 an iterable of :class:`str`/:class:`bytes`, or a file-like object. 09:26:37 09:26:37 :param headers: 09:26:37 Dictionary of custom headers to send, such as User-Agent, 09:26:37 If-None-Match, etc. If None, pool headers are used. If provided, 09:26:37 these headers completely replace any pool-specific headers. 09:26:37 09:26:37 :param retries: 09:26:37 Configure the number of retries to allow before raising a 09:26:37 :class:`~urllib3.exceptions.MaxRetryError` exception. 09:26:37 09:26:37 If ``None`` (default) will retry 3 times, see ``Retry.DEFAULT``. Pass a 09:26:37 :class:`~urllib3.util.retry.Retry` object for fine-grained control 09:26:37 over different types of retries. 09:26:37 Pass an integer number to retry connection errors that many times, 09:26:37 but no other types of errors. Pass zero to never retry. 09:26:37 09:26:37 If ``False``, then retries are disabled and any exception is raised 09:26:37 immediately. Also, instead of raising a MaxRetryError on redirects, 09:26:37 the redirect response will be returned. 09:26:37 09:26:37 :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 09:26:37 09:26:37 :param redirect: 09:26:37 If True, automatically handle redirects (status codes 301, 302, 09:26:37 303, 307, 308). Each redirect counts as a retry. Disabling retries 09:26:37 will disable redirect, too. 09:26:37 09:26:37 :param assert_same_host: 09:26:37 If ``True``, will make sure that the host of the pool requests is 09:26:37 consistent else will raise HostChangedError. When ``False``, you can 09:26:37 use the pool on an HTTP proxy and request foreign hosts. 09:26:37 09:26:37 :param timeout: 09:26:37 If specified, overrides the default timeout for this one 09:26:37 request. It may be a float (in seconds) or an instance of 09:26:37 :class:`urllib3.util.Timeout`. 09:26:37 09:26:37 :param pool_timeout: 09:26:37 If set and the pool is set to block=True, then this method will 09:26:37 block for ``pool_timeout`` seconds and raise EmptyPoolError if no 09:26:37 connection is available within the time period. 09:26:37 09:26:37 :param bool preload_content: 09:26:37 If True, the response's body will be preloaded into memory. 09:26:37 09:26:37 :param bool decode_content: 09:26:37 If True, will attempt to decode the body based on the 09:26:37 'content-encoding' header. 09:26:37 09:26:37 :param release_conn: 09:26:37 If False, then the urlopen call will not release the connection 09:26:37 back into the pool once a response is received (but will release if 09:26:37 you read the entire contents of the response such as when 09:26:37 `preload_content=True`). This is useful if you're not preloading 09:26:37 the response's content immediately. You will need to call 09:26:37 ``r.release_conn()`` on the response ``r`` to return the connection 09:26:37 back into the pool. If None, it takes the value of ``preload_content`` 09:26:37 which defaults to ``True``. 09:26:37 09:26:37 :param bool chunked: 09:26:37 If True, urllib3 will send the body using chunked transfer 09:26:37 encoding. Otherwise, urllib3 will send the body using the standard 09:26:37 content-length form. Defaults to False. 09:26:37 09:26:37 :param int body_pos: 09:26:37 Position to seek to in file-like body in the event of a retry or 09:26:37 redirect. Typically this won't need to be set because urllib3 will 09:26:37 auto-populate the value when needed. 09:26:37 """ 09:26:37 parsed_url = parse_url(url) 09:26:37 destination_scheme = parsed_url.scheme 09:26:37 09:26:37 if headers is None: 09:26:37 headers = self.headers 09:26:37 09:26:37 if not isinstance(retries, Retry): 09:26:37 retries = Retry.from_int(retries, redirect=redirect, default=self.retries) 09:26:37 09:26:37 if release_conn is None: 09:26:37 release_conn = preload_content 09:26:37 09:26:37 # Check host 09:26:37 if assert_same_host and not self.is_same_host(url): 09:26:37 raise HostChangedError(self, url, retries) 09:26:37 09:26:37 # Ensure that the URL we're connecting to is properly encoded 09:26:37 if url.startswith("/"): 09:26:37 url = to_str(_encode_target(url)) 09:26:37 else: 09:26:37 url = to_str(parsed_url.url) 09:26:37 09:26:37 conn = None 09:26:37 09:26:37 # Track whether `conn` needs to be released before 09:26:37 # returning/raising/recursing. Update this variable if necessary, and 09:26:37 # leave `release_conn` constant throughout the function. That way, if 09:26:37 # the function recurses, the original value of `release_conn` will be 09:26:37 # passed down into the recursive call, and its value will be respected. 09:26:37 # 09:26:37 # See issue #651 [1] for details. 09:26:37 # 09:26:37 # [1] 09:26:37 release_this_conn = release_conn 09:26:37 09:26:37 http_tunnel_required = connection_requires_http_tunnel( 09:26:37 self.proxy, self.proxy_config, destination_scheme 09:26:37 ) 09:26:37 09:26:37 # Merge the proxy headers. Only done when not using HTTP CONNECT. We 09:26:37 # have to copy the headers dict so we can safely change it without those 09:26:37 # changes being reflected in anyone else's copy. 09:26:37 if not http_tunnel_required: 09:26:37 headers = headers.copy() # type: ignore[attr-defined] 09:26:37 headers.update(self.proxy_headers) # type: ignore[union-attr] 09:26:37 09:26:37 # Must keep the exception bound to a separate variable or else Python 3 09:26:37 # complains about UnboundLocalError. 09:26:37 err = None 09:26:37 09:26:37 # Keep track of whether we cleanly exited the except block. This 09:26:37 # ensures we do proper cleanup in finally. 09:26:37 clean_exit = False 09:26:37 09:26:37 # Rewind body position, if needed. Record current position 09:26:37 # for future rewinds in the event of a redirect/retry. 09:26:37 body_pos = set_file_position(body, body_pos) 09:26:37 09:26:37 try: 09:26:37 # Request a connection from the queue. 09:26:37 timeout_obj = self._get_timeout(timeout) 09:26:37 conn = self._get_conn(timeout=pool_timeout) 09:26:37 09:26:37 conn.timeout = timeout_obj.connect_timeout # type: ignore[assignment] 09:26:37 09:26:37 # Is this a closed/new connection that requires CONNECT tunnelling? 09:26:37 if self.proxy is not None and http_tunnel_required and conn.is_closed: 09:26:37 try: 09:26:37 self._prepare_proxy(conn) 09:26:37 except (BaseSSLError, OSError, SocketTimeout) as e: 09:26:37 self._raise_timeout( 09:26:37 err=e, url=self.proxy.url, timeout_value=conn.timeout 09:26:37 ) 09:26:37 raise 09:26:37 09:26:37 # If we're going to release the connection in ``finally:``, then 09:26:37 # the response doesn't need to know about the connection. Otherwise 09:26:37 # it will also try to release it and we'll have a double-release 09:26:37 # mess. 09:26:37 response_conn = conn if not release_conn else None 09:26:37 09:26:37 # Make the request on the HTTPConnection object 09:26:37 > response = self._make_request( 09:26:37 conn, 09:26:37 method, 09:26:37 url, 09:26:37 timeout=timeout_obj, 09:26:37 body=body, 09:26:37 headers=headers, 09:26:37 chunked=chunked, 09:26:37 retries=retries, 09:26:37 response_conn=response_conn, 09:26:37 preload_content=preload_content, 09:26:37 decode_content=decode_content, 09:26:37 **response_kw, 09:26:37 ) 09:26:37 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:789: 09:26:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:495: in _make_request 09:26:37 conn.request( 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:441: in request 09:26:37 self.endheaders() 09:26:37 /opt/pyenv/versions/3.11.7/lib/python3.11/http/client.py:1289: in endheaders 09:26:37 self._send_output(message_body, encode_chunked=encode_chunked) 09:26:37 /opt/pyenv/versions/3.11.7/lib/python3.11/http/client.py:1048: in _send_output 09:26:37 self.send(msg) 09:26:37 /opt/pyenv/versions/3.11.7/lib/python3.11/http/client.py:986: in send 09:26:37 self.connect() 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:279: in connect 09:26:37 self.sock = self._new_conn() 09:26:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:26:37 09:26:37 self = 09:26:37 09:26:37 def _new_conn(self) -> socket.socket: 09:26:37 """Establish a socket connection and set nodelay settings on it. 09:26:37 09:26:37 :return: New socket connection. 09:26:37 """ 09:26:37 try: 09:26:37 sock = connection.create_connection( 09:26:37 (self._dns_host, self.port), 09:26:37 self.timeout, 09:26:37 source_address=self.source_address, 09:26:37 socket_options=self.socket_options, 09:26:37 ) 09:26:37 except socket.gaierror as e: 09:26:37 raise NameResolutionError(self.host, self, e) from e 09:26:37 except SocketTimeout as e: 09:26:37 raise ConnectTimeoutError( 09:26:37 self, 09:26:37 f"Connection to {self.host} timed out. (connect timeout={self.timeout})", 09:26:37 ) from e 09:26:37 09:26:37 except OSError as e: 09:26:37 > raise NewConnectionError( 09:26:37 self, f"Failed to establish a new connection: {e}" 09:26:37 ) from e 09:26:37 E urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [Errno 111] Connection refused 09:26:37 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:214: NewConnectionError 09:26:37 09:26:37 The above exception was the direct cause of the following exception: 09:26:37 09:26:37 self = 09:26:37 request = , stream = False 09:26:37 timeout = Timeout(connect=10, read=10, total=None), verify = True, cert = None 09:26:37 proxies = OrderedDict() 09:26:37 09:26:37 def send( 09:26:37 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 09:26:37 ): 09:26:37 """Sends PreparedRequest object. Returns Response object. 09:26:37 09:26:37 :param request: The :class:`PreparedRequest ` being sent. 09:26:37 :param stream: (optional) Whether to stream the request content. 09:26:37 :param timeout: (optional) How long to wait for the server to send 09:26:37 data before giving up, as a float, or a :ref:`(connect timeout, 09:26:37 read timeout) ` tuple. 09:26:37 :type timeout: float or tuple or urllib3 Timeout object 09:26:37 :param verify: (optional) Either a boolean, in which case it controls whether 09:26:37 we verify the server's TLS certificate, or a string, in which case it 09:26:37 must be a path to a CA bundle to use 09:26:37 :param cert: (optional) Any user-provided SSL certificate to be trusted. 09:26:37 :param proxies: (optional) The proxies dictionary to apply to the request. 09:26:37 :rtype: requests.Response 09:26:37 """ 09:26:37 09:26:37 try: 09:26:37 conn = self.get_connection_with_tls_context( 09:26:37 request, verify, proxies=proxies, cert=cert 09:26:37 ) 09:26:37 except LocationValueError as e: 09:26:37 raise InvalidURL(e, request=request) 09:26:37 09:26:37 self.cert_verify(conn, request.url, verify, cert) 09:26:37 url = self.request_url(request, proxies) 09:26:37 self.add_headers( 09:26:37 request, 09:26:37 stream=stream, 09:26:37 timeout=timeout, 09:26:37 verify=verify, 09:26:37 cert=cert, 09:26:37 proxies=proxies, 09:26:37 ) 09:26:37 09:26:37 chunked = not (request.body is None or "Content-Length" in request.headers) 09:26:37 09:26:37 if isinstance(timeout, tuple): 09:26:37 try: 09:26:37 connect, read = timeout 09:26:37 timeout = TimeoutSauce(connect=connect, read=read) 09:26:37 except ValueError: 09:26:37 raise ValueError( 09:26:37 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 09:26:37 f"or a single float to set both timeouts to the same value." 09:26:37 ) 09:26:37 elif isinstance(timeout, TimeoutSauce): 09:26:37 pass 09:26:37 else: 09:26:37 timeout = TimeoutSauce(connect=timeout, read=timeout) 09:26:37 09:26:37 try: 09:26:37 > resp = conn.urlopen( 09:26:37 method=request.method, 09:26:37 url=url, 09:26:37 body=request.body, 09:26:37 headers=request.headers, 09:26:37 redirect=False, 09:26:37 assert_same_host=False, 09:26:37 preload_content=False, 09:26:37 decode_content=False, 09:26:37 retries=self.max_retries, 09:26:37 timeout=timeout, 09:26:37 chunked=chunked, 09:26:37 ) 09:26:37 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/requests/adapters.py:667: 09:26:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:843: in urlopen 09:26:37 retries = retries.increment( 09:26:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:26:37 09:26:37 self = Retry(total=0, connect=None, read=False, redirect=None, status=None) 09:26:37 method = 'GET' 09:26:37 url = '/rests/data/network-topology:network-topology/topology=topology-netconf/node=ROADMA01?content=nonconfig' 09:26:37 response = None 09:26:37 error = NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused') 09:26:37 _pool = 09:26:37 _stacktrace = 09:26:37 09:26:37 def increment( 09:26:37 self, 09:26:37 method: str | None = None, 09:26:37 url: str | None = None, 09:26:37 response: BaseHTTPResponse | None = None, 09:26:37 error: Exception | None = None, 09:26:37 _pool: ConnectionPool | None = None, 09:26:37 _stacktrace: TracebackType | None = None, 09:26:37 ) -> Self: 09:26:37 """Return a new Retry object with incremented retry counters. 09:26:37 09:26:37 :param response: A response object, or None, if the server did not 09:26:37 return a response. 09:26:37 :type response: :class:`~urllib3.response.BaseHTTPResponse` 09:26:37 :param Exception error: An error encountered during the request, or 09:26:37 None if the response was received successfully. 09:26:37 09:26:37 :return: A new ``Retry`` object. 09:26:37 """ 09:26:37 if self.total is False and error: 09:26:37 # Disabled, indicate to re-raise the error. 09:26:37 raise reraise(type(error), error, _stacktrace) 09:26:37 09:26:37 total = self.total 09:26:37 if total is not None: 09:26:37 total -= 1 09:26:37 09:26:37 connect = self.connect 09:26:37 read = self.read 09:26:37 redirect = self.redirect 09:26:37 status_count = self.status 09:26:37 other = self.other 09:26:37 cause = "unknown" 09:26:37 status = None 09:26:37 redirect_location = None 09:26:37 09:26:37 if error and self._is_connection_error(error): 09:26:37 # Connect retry? 09:26:37 if connect is False: 09:26:37 raise reraise(type(error), error, _stacktrace) 09:26:37 elif connect is not None: 09:26:37 connect -= 1 09:26:37 09:26:37 elif error and self._is_read_error(error): 09:26:37 # Read retry? 09:26:37 if read is False or method is None or not self._is_method_retryable(method): 09:26:37 raise reraise(type(error), error, _stacktrace) 09:26:37 elif read is not None: 09:26:37 read -= 1 09:26:37 09:26:37 elif error: 09:26:37 # Other retry? 09:26:37 if other is not None: 09:26:37 other -= 1 09:26:37 09:26:37 elif response and response.get_redirect_location(): 09:26:37 # Redirect retry? 09:26:37 if redirect is not None: 09:26:37 redirect -= 1 09:26:37 cause = "too many redirects" 09:26:37 response_redirect_location = response.get_redirect_location() 09:26:37 if response_redirect_location: 09:26:37 redirect_location = response_redirect_location 09:26:37 status = response.status 09:26:37 09:26:37 else: 09:26:37 # Incrementing because of a server error like a 500 in 09:26:37 # status_forcelist and the given method is in the allowed_methods 09:26:37 cause = ResponseError.GENERIC_ERROR 09:26:37 if response and response.status: 09:26:37 if status_count is not None: 09:26:37 status_count -= 1 09:26:37 cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) 09:26:37 status = response.status 09:26:37 09:26:37 history = self.history + ( 09:26:37 RequestHistory(method, url, error, status, redirect_location), 09:26:37 ) 09:26:37 09:26:37 new_retry = self.new( 09:26:37 total=total, 09:26:37 connect=connect, 09:26:37 read=read, 09:26:37 redirect=redirect, 09:26:37 status=status_count, 09:26:37 other=other, 09:26:37 history=history, 09:26:37 ) 09:26:37 09:26:37 if new_retry.is_exhausted(): 09:26:37 reason = error or ResponseError(cause) 09:26:37 > raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] 09:26:37 E urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8182): Max retries exceeded with url: /rests/data/network-topology:network-topology/topology=topology-netconf/node=ROADMA01?content=nonconfig (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 09:26:37 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/retry.py:519: MaxRetryError 09:26:37 09:26:37 During handling of the above exception, another exception occurred: 09:26:37 09:26:37 self = 09:26:37 09:26:37 def test_20_rdm_device_disconnected(self): 09:26:37 > response = test_utils.check_device_connection("ROADMA01") 09:26:37 09:26:37 transportpce_tests/1.2.1/test01_portmapping.py:215: 09:26:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:26:37 transportpce_tests/common/test_utils.py:369: in check_device_connection 09:26:37 response = get_request(url[RESTCONF_VERSION].format('{}', node)) 09:26:37 transportpce_tests/common/test_utils.py:116: in get_request 09:26:37 return requests.request( 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/requests/api.py:59: in request 09:26:37 return session.request(method=method, url=url, **kwargs) 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/requests/sessions.py:589: in request 09:26:37 resp = self.send(prep, **send_kwargs) 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/requests/sessions.py:703: in send 09:26:37 r = adapter.send(request, **kwargs) 09:26:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:26:37 09:26:37 self = 09:26:37 request = , stream = False 09:26:37 timeout = Timeout(connect=10, read=10, total=None), verify = True, cert = None 09:26:37 proxies = OrderedDict() 09:26:37 09:26:37 def send( 09:26:37 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 09:26:37 ): 09:26:37 """Sends PreparedRequest object. Returns Response object. 09:26:37 09:26:37 :param request: The :class:`PreparedRequest ` being sent. 09:26:37 :param stream: (optional) Whether to stream the request content. 09:26:37 :param timeout: (optional) How long to wait for the server to send 09:26:37 data before giving up, as a float, or a :ref:`(connect timeout, 09:26:37 read timeout) ` tuple. 09:26:37 :type timeout: float or tuple or urllib3 Timeout object 09:26:37 :param verify: (optional) Either a boolean, in which case it controls whether 09:26:37 we verify the server's TLS certificate, or a string, in which case it 09:26:37 must be a path to a CA bundle to use 09:26:37 :param cert: (optional) Any user-provided SSL certificate to be trusted. 09:26:37 :param proxies: (optional) The proxies dictionary to apply to the request. 09:26:37 :rtype: requests.Response 09:26:37 """ 09:26:37 09:26:37 try: 09:26:37 conn = self.get_connection_with_tls_context( 09:26:37 request, verify, proxies=proxies, cert=cert 09:26:37 ) 09:26:37 except LocationValueError as e: 09:26:37 raise InvalidURL(e, request=request) 09:26:37 09:26:37 self.cert_verify(conn, request.url, verify, cert) 09:26:37 url = self.request_url(request, proxies) 09:26:37 self.add_headers( 09:26:37 request, 09:26:37 stream=stream, 09:26:37 timeout=timeout, 09:26:37 verify=verify, 09:26:37 cert=cert, 09:26:37 proxies=proxies, 09:26:37 ) 09:26:37 09:26:37 chunked = not (request.body is None or "Content-Length" in request.headers) 09:26:37 09:26:37 if isinstance(timeout, tuple): 09:26:37 try: 09:26:37 connect, read = timeout 09:26:37 timeout = TimeoutSauce(connect=connect, read=read) 09:26:37 except ValueError: 09:26:37 raise ValueError( 09:26:37 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 09:26:37 f"or a single float to set both timeouts to the same value." 09:26:37 ) 09:26:37 elif isinstance(timeout, TimeoutSauce): 09:26:37 pass 09:26:37 else: 09:26:37 timeout = TimeoutSauce(connect=timeout, read=timeout) 09:26:37 09:26:37 try: 09:26:37 resp = conn.urlopen( 09:26:37 method=request.method, 09:26:37 url=url, 09:26:37 body=request.body, 09:26:37 headers=request.headers, 09:26:37 redirect=False, 09:26:37 assert_same_host=False, 09:26:37 preload_content=False, 09:26:37 decode_content=False, 09:26:37 retries=self.max_retries, 09:26:37 timeout=timeout, 09:26:37 chunked=chunked, 09:26:37 ) 09:26:37 09:26:37 except (ProtocolError, OSError) as err: 09:26:37 raise ConnectionError(err, request=request) 09:26:37 09:26:37 except MaxRetryError as e: 09:26:37 if isinstance(e.reason, ConnectTimeoutError): 09:26:37 # TODO: Remove this in 3.0.0: see #2811 09:26:37 if not isinstance(e.reason, NewConnectionError): 09:26:37 raise ConnectTimeout(e, request=request) 09:26:37 09:26:37 if isinstance(e.reason, ResponseError): 09:26:37 raise RetryError(e, request=request) 09:26:37 09:26:37 if isinstance(e.reason, _ProxyError): 09:26:37 raise ProxyError(e, request=request) 09:26:37 09:26:37 if isinstance(e.reason, _SSLError): 09:26:37 # This branch is for urllib3 v1.22 and later. 09:26:37 raise SSLError(e, request=request) 09:26:37 09:26:37 > raise ConnectionError(e, request=request) 09:26:37 E requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8182): Max retries exceeded with url: /rests/data/network-topology:network-topology/topology=topology-netconf/node=ROADMA01?content=nonconfig (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 09:26:37 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/requests/adapters.py:700: ConnectionError 09:26:37 ----------------------------- Captured stdout call ----------------------------- 09:26:37 execution of test_20_rdm_device_disconnected 09:26:37 _______ TransportPCEPortMappingTesting.test_21_rdm_device_not_connected ________ 09:26:37 09:26:37 self = 09:26:37 09:26:37 def _new_conn(self) -> socket.socket: 09:26:37 """Establish a socket connection and set nodelay settings on it. 09:26:37 09:26:37 :return: New socket connection. 09:26:37 """ 09:26:37 try: 09:26:37 > sock = connection.create_connection( 09:26:37 (self._dns_host, self.port), 09:26:37 self.timeout, 09:26:37 source_address=self.source_address, 09:26:37 socket_options=self.socket_options, 09:26:37 ) 09:26:37 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:199: 09:26:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/connection.py:85: in create_connection 09:26:37 raise err 09:26:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:26:37 09:26:37 address = ('localhost', 8182), timeout = 10, source_address = None 09:26:37 socket_options = [(6, 1, 1)] 09:26:37 09:26:37 def create_connection( 09:26:37 address: tuple[str, int], 09:26:37 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 09:26:37 source_address: tuple[str, int] | None = None, 09:26:37 socket_options: _TYPE_SOCKET_OPTIONS | None = None, 09:26:37 ) -> socket.socket: 09:26:37 """Connect to *address* and return the socket object. 09:26:37 09:26:37 Convenience function. Connect to *address* (a 2-tuple ``(host, 09:26:37 port)``) and return the socket object. Passing the optional 09:26:37 *timeout* parameter will set the timeout on the socket instance 09:26:37 before attempting to connect. If no *timeout* is supplied, the 09:26:37 global default timeout setting returned by :func:`socket.getdefaulttimeout` 09:26:37 is used. If *source_address* is set it must be a tuple of (host, port) 09:26:37 for the socket to bind as a source address before making the connection. 09:26:37 An host of '' or port 0 tells the OS to use the default. 09:26:37 """ 09:26:37 09:26:37 host, port = address 09:26:37 if host.startswith("["): 09:26:37 host = host.strip("[]") 09:26:37 err = None 09:26:37 09:26:37 # Using the value from allowed_gai_family() in the context of getaddrinfo lets 09:26:37 # us select whether to work with IPv4 DNS records, IPv6 records, or both. 09:26:37 # The original create_connection function always returns all records. 09:26:37 family = allowed_gai_family() 09:26:37 09:26:37 try: 09:26:37 host.encode("idna") 09:26:37 except UnicodeError: 09:26:37 raise LocationParseError(f"'{host}', label empty or too long") from None 09:26:37 09:26:37 for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 09:26:37 af, socktype, proto, canonname, sa = res 09:26:37 sock = None 09:26:37 try: 09:26:37 sock = socket.socket(af, socktype, proto) 09:26:37 09:26:37 # If provided, set socket level options before connecting. 09:26:37 _set_socket_options(sock, socket_options) 09:26:37 09:26:37 if timeout is not _DEFAULT_TIMEOUT: 09:26:37 sock.settimeout(timeout) 09:26:37 if source_address: 09:26:37 sock.bind(source_address) 09:26:37 > sock.connect(sa) 09:26:37 E ConnectionRefusedError: [Errno 111] Connection refused 09:26:37 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/connection.py:73: ConnectionRefusedError 09:26:37 09:26:37 The above exception was the direct cause of the following exception: 09:26:37 09:26:37 self = 09:26:37 method = 'GET' 09:26:37 url = '/rests/data/transportpce-portmapping:network/nodes=ROADMA01/node-info' 09:26:37 body = None 09:26:37 headers = {'User-Agent': 'python-requests/2.32.3', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'Connection': 'keep-alive', 'Content-Type': 'application/json', 'Authorization': 'Basic YWRtaW46YWRtaW4='} 09:26:37 retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 09:26:37 redirect = False, assert_same_host = False 09:26:37 timeout = Timeout(connect=10, read=10, total=None), pool_timeout = None 09:26:37 release_conn = False, chunked = False, body_pos = None, preload_content = False 09:26:37 decode_content = False, response_kw = {} 09:26:37 parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/rests/data/transportpce-portmapping:network/nodes=ROADMA01/node-info', query=None, fragment=None) 09:26:37 destination_scheme = None, conn = None, release_this_conn = True 09:26:37 http_tunnel_required = False, err = None, clean_exit = False 09:26:37 09:26:37 def urlopen( # type: ignore[override] 09:26:37 self, 09:26:37 method: str, 09:26:37 url: str, 09:26:37 body: _TYPE_BODY | None = None, 09:26:37 headers: typing.Mapping[str, str] | None = None, 09:26:37 retries: Retry | bool | int | None = None, 09:26:37 redirect: bool = True, 09:26:37 assert_same_host: bool = True, 09:26:37 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 09:26:37 pool_timeout: int | None = None, 09:26:37 release_conn: bool | None = None, 09:26:37 chunked: bool = False, 09:26:37 body_pos: _TYPE_BODY_POSITION | None = None, 09:26:37 preload_content: bool = True, 09:26:37 decode_content: bool = True, 09:26:37 **response_kw: typing.Any, 09:26:37 ) -> BaseHTTPResponse: 09:26:37 """ 09:26:37 Get a connection from the pool and perform an HTTP request. This is the 09:26:37 lowest level call for making a request, so you'll need to specify all 09:26:37 the raw details. 09:26:37 09:26:37 .. note:: 09:26:37 09:26:37 More commonly, it's appropriate to use a convenience method 09:26:37 such as :meth:`request`. 09:26:37 09:26:37 .. note:: 09:26:37 09:26:37 `release_conn` will only behave as expected if 09:26:37 `preload_content=False` because we want to make 09:26:37 `preload_content=False` the default behaviour someday soon without 09:26:37 breaking backwards compatibility. 09:26:37 09:26:37 :param method: 09:26:37 HTTP request method (such as GET, POST, PUT, etc.) 09:26:37 09:26:37 :param url: 09:26:37 The URL to perform the request on. 09:26:37 09:26:37 :param body: 09:26:37 Data to send in the request body, either :class:`str`, :class:`bytes`, 09:26:37 an iterable of :class:`str`/:class:`bytes`, or a file-like object. 09:26:37 09:26:37 :param headers: 09:26:37 Dictionary of custom headers to send, such as User-Agent, 09:26:37 If-None-Match, etc. If None, pool headers are used. If provided, 09:26:37 these headers completely replace any pool-specific headers. 09:26:37 09:26:37 :param retries: 09:26:37 Configure the number of retries to allow before raising a 09:26:37 :class:`~urllib3.exceptions.MaxRetryError` exception. 09:26:37 09:26:37 If ``None`` (default) will retry 3 times, see ``Retry.DEFAULT``. Pass a 09:26:37 :class:`~urllib3.util.retry.Retry` object for fine-grained control 09:26:37 over different types of retries. 09:26:37 Pass an integer number to retry connection errors that many times, 09:26:37 but no other types of errors. Pass zero to never retry. 09:26:37 09:26:37 If ``False``, then retries are disabled and any exception is raised 09:26:37 immediately. Also, instead of raising a MaxRetryError on redirects, 09:26:37 the redirect response will be returned. 09:26:37 09:26:37 :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 09:26:37 09:26:37 :param redirect: 09:26:37 If True, automatically handle redirects (status codes 301, 302, 09:26:37 303, 307, 308). Each redirect counts as a retry. Disabling retries 09:26:37 will disable redirect, too. 09:26:37 09:26:37 :param assert_same_host: 09:26:37 If ``True``, will make sure that the host of the pool requests is 09:26:37 consistent else will raise HostChangedError. When ``False``, you can 09:26:37 use the pool on an HTTP proxy and request foreign hosts. 09:26:37 09:26:37 :param timeout: 09:26:37 If specified, overrides the default timeout for this one 09:26:37 request. It may be a float (in seconds) or an instance of 09:26:37 :class:`urllib3.util.Timeout`. 09:26:37 09:26:37 :param pool_timeout: 09:26:37 If set and the pool is set to block=True, then this method will 09:26:37 block for ``pool_timeout`` seconds and raise EmptyPoolError if no 09:26:37 connection is available within the time period. 09:26:37 09:26:37 :param bool preload_content: 09:26:37 If True, the response's body will be preloaded into memory. 09:26:37 09:26:37 :param bool decode_content: 09:26:37 If True, will attempt to decode the body based on the 09:26:37 'content-encoding' header. 09:26:37 09:26:37 :param release_conn: 09:26:37 If False, then the urlopen call will not release the connection 09:26:37 back into the pool once a response is received (but will release if 09:26:37 you read the entire contents of the response such as when 09:26:37 `preload_content=True`). This is useful if you're not preloading 09:26:37 the response's content immediately. You will need to call 09:26:37 ``r.release_conn()`` on the response ``r`` to return the connection 09:26:37 back into the pool. If None, it takes the value of ``preload_content`` 09:26:37 which defaults to ``True``. 09:26:37 09:26:37 :param bool chunked: 09:26:37 If True, urllib3 will send the body using chunked transfer 09:26:37 encoding. Otherwise, urllib3 will send the body using the standard 09:26:37 content-length form. Defaults to False. 09:26:37 09:26:37 :param int body_pos: 09:26:37 Position to seek to in file-like body in the event of a retry or 09:26:37 redirect. Typically this won't need to be set because urllib3 will 09:26:37 auto-populate the value when needed. 09:26:37 """ 09:26:37 parsed_url = parse_url(url) 09:26:37 destination_scheme = parsed_url.scheme 09:26:37 09:26:37 if headers is None: 09:26:37 headers = self.headers 09:26:37 09:26:37 if not isinstance(retries, Retry): 09:26:37 retries = Retry.from_int(retries, redirect=redirect, default=self.retries) 09:26:37 09:26:37 if release_conn is None: 09:26:37 release_conn = preload_content 09:26:37 09:26:37 # Check host 09:26:37 if assert_same_host and not self.is_same_host(url): 09:26:37 raise HostChangedError(self, url, retries) 09:26:37 09:26:37 # Ensure that the URL we're connecting to is properly encoded 09:26:37 if url.startswith("/"): 09:26:37 url = to_str(_encode_target(url)) 09:26:37 else: 09:26:37 url = to_str(parsed_url.url) 09:26:37 09:26:37 conn = None 09:26:37 09:26:37 # Track whether `conn` needs to be released before 09:26:37 # returning/raising/recursing. Update this variable if necessary, and 09:26:37 # leave `release_conn` constant throughout the function. That way, if 09:26:37 # the function recurses, the original value of `release_conn` will be 09:26:37 # passed down into the recursive call, and its value will be respected. 09:26:37 # 09:26:37 # See issue #651 [1] for details. 09:26:37 # 09:26:37 # [1] 09:26:37 release_this_conn = release_conn 09:26:37 09:26:37 http_tunnel_required = connection_requires_http_tunnel( 09:26:37 self.proxy, self.proxy_config, destination_scheme 09:26:37 ) 09:26:37 09:26:37 # Merge the proxy headers. Only done when not using HTTP CONNECT. We 09:26:37 # have to copy the headers dict so we can safely change it without those 09:26:37 # changes being reflected in anyone else's copy. 09:26:37 if not http_tunnel_required: 09:26:37 headers = headers.copy() # type: ignore[attr-defined] 09:26:37 headers.update(self.proxy_headers) # type: ignore[union-attr] 09:26:37 09:26:37 # Must keep the exception bound to a separate variable or else Python 3 09:26:37 # complains about UnboundLocalError. 09:26:37 err = None 09:26:37 09:26:37 # Keep track of whether we cleanly exited the except block. This 09:26:37 # ensures we do proper cleanup in finally. 09:26:37 clean_exit = False 09:26:37 09:26:37 # Rewind body position, if needed. Record current position 09:26:37 # for future rewinds in the event of a redirect/retry. 09:26:37 body_pos = set_file_position(body, body_pos) 09:26:37 09:26:37 try: 09:26:37 # Request a connection from the queue. 09:26:37 timeout_obj = self._get_timeout(timeout) 09:26:37 conn = self._get_conn(timeout=pool_timeout) 09:26:37 09:26:37 conn.timeout = timeout_obj.connect_timeout # type: ignore[assignment] 09:26:37 09:26:37 # Is this a closed/new connection that requires CONNECT tunnelling? 09:26:37 if self.proxy is not None and http_tunnel_required and conn.is_closed: 09:26:37 try: 09:26:37 self._prepare_proxy(conn) 09:26:37 except (BaseSSLError, OSError, SocketTimeout) as e: 09:26:37 self._raise_timeout( 09:26:37 err=e, url=self.proxy.url, timeout_value=conn.timeout 09:26:37 ) 09:26:37 raise 09:26:37 09:26:37 # If we're going to release the connection in ``finally:``, then 09:26:37 # the response doesn't need to know about the connection. Otherwise 09:26:37 # it will also try to release it and we'll have a double-release 09:26:37 # mess. 09:26:37 response_conn = conn if not release_conn else None 09:26:37 09:26:37 # Make the request on the HTTPConnection object 09:26:37 > response = self._make_request( 09:26:37 conn, 09:26:37 method, 09:26:37 url, 09:26:37 timeout=timeout_obj, 09:26:37 body=body, 09:26:37 headers=headers, 09:26:37 chunked=chunked, 09:26:37 retries=retries, 09:26:37 response_conn=response_conn, 09:26:37 preload_content=preload_content, 09:26:37 decode_content=decode_content, 09:26:37 **response_kw, 09:26:37 ) 09:26:37 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:789: 09:26:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:495: in _make_request 09:26:37 conn.request( 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:441: in request 09:26:37 self.endheaders() 09:26:37 /opt/pyenv/versions/3.11.7/lib/python3.11/http/client.py:1289: in endheaders 09:26:37 self._send_output(message_body, encode_chunked=encode_chunked) 09:26:37 /opt/pyenv/versions/3.11.7/lib/python3.11/http/client.py:1048: in _send_output 09:26:37 self.send(msg) 09:26:37 /opt/pyenv/versions/3.11.7/lib/python3.11/http/client.py:986: in send 09:26:37 self.connect() 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:279: in connect 09:26:37 self.sock = self._new_conn() 09:26:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:26:37 09:26:37 self = 09:26:37 09:26:37 def _new_conn(self) -> socket.socket: 09:26:37 """Establish a socket connection and set nodelay settings on it. 09:26:37 09:26:37 :return: New socket connection. 09:26:37 """ 09:26:37 try: 09:26:37 sock = connection.create_connection( 09:26:37 (self._dns_host, self.port), 09:26:37 self.timeout, 09:26:37 source_address=self.source_address, 09:26:37 socket_options=self.socket_options, 09:26:37 ) 09:26:37 except socket.gaierror as e: 09:26:37 raise NameResolutionError(self.host, self, e) from e 09:26:37 except SocketTimeout as e: 09:26:37 raise ConnectTimeoutError( 09:26:37 self, 09:26:37 f"Connection to {self.host} timed out. (connect timeout={self.timeout})", 09:26:37 ) from e 09:26:37 09:26:37 except OSError as e: 09:26:37 > raise NewConnectionError( 09:26:37 self, f"Failed to establish a new connection: {e}" 09:26:37 ) from e 09:26:37 E urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [Errno 111] Connection refused 09:26:37 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connection.py:214: NewConnectionError 09:26:37 09:26:37 The above exception was the direct cause of the following exception: 09:26:37 09:26:37 self = 09:26:37 request = , stream = False 09:26:37 timeout = Timeout(connect=10, read=10, total=None), verify = True, cert = None 09:26:37 proxies = OrderedDict() 09:26:37 09:26:37 def send( 09:26:37 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 09:26:37 ): 09:26:37 """Sends PreparedRequest object. Returns Response object. 09:26:37 09:26:37 :param request: The :class:`PreparedRequest ` being sent. 09:26:37 :param stream: (optional) Whether to stream the request content. 09:26:37 :param timeout: (optional) How long to wait for the server to send 09:26:37 data before giving up, as a float, or a :ref:`(connect timeout, 09:26:37 read timeout) ` tuple. 09:26:37 :type timeout: float or tuple or urllib3 Timeout object 09:26:37 :param verify: (optional) Either a boolean, in which case it controls whether 09:26:37 we verify the server's TLS certificate, or a string, in which case it 09:26:37 must be a path to a CA bundle to use 09:26:37 :param cert: (optional) Any user-provided SSL certificate to be trusted. 09:26:37 :param proxies: (optional) The proxies dictionary to apply to the request. 09:26:37 :rtype: requests.Response 09:26:37 """ 09:26:37 09:26:37 try: 09:26:37 conn = self.get_connection_with_tls_context( 09:26:37 request, verify, proxies=proxies, cert=cert 09:26:37 ) 09:26:37 except LocationValueError as e: 09:26:37 raise InvalidURL(e, request=request) 09:26:37 09:26:37 self.cert_verify(conn, request.url, verify, cert) 09:26:37 url = self.request_url(request, proxies) 09:26:37 self.add_headers( 09:26:37 request, 09:26:37 stream=stream, 09:26:37 timeout=timeout, 09:26:37 verify=verify, 09:26:37 cert=cert, 09:26:37 proxies=proxies, 09:26:37 ) 09:26:37 09:26:37 chunked = not (request.body is None or "Content-Length" in request.headers) 09:26:37 09:26:37 if isinstance(timeout, tuple): 09:26:37 try: 09:26:37 connect, read = timeout 09:26:37 timeout = TimeoutSauce(connect=connect, read=read) 09:26:37 except ValueError: 09:26:37 raise ValueError( 09:26:37 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 09:26:37 f"or a single float to set both timeouts to the same value." 09:26:37 ) 09:26:37 elif isinstance(timeout, TimeoutSauce): 09:26:37 pass 09:26:37 else: 09:26:37 timeout = TimeoutSauce(connect=timeout, read=timeout) 09:26:37 09:26:37 try: 09:26:37 > resp = conn.urlopen( 09:26:37 method=request.method, 09:26:37 url=url, 09:26:37 body=request.body, 09:26:37 headers=request.headers, 09:26:37 redirect=False, 09:26:37 assert_same_host=False, 09:26:37 preload_content=False, 09:26:37 decode_content=False, 09:26:37 retries=self.max_retries, 09:26:37 timeout=timeout, 09:26:37 chunked=chunked, 09:26:37 ) 09:26:37 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/requests/adapters.py:667: 09:26:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/connectionpool.py:843: in urlopen 09:26:37 retries = retries.increment( 09:26:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:26:37 09:26:37 self = Retry(total=0, connect=None, read=False, redirect=None, status=None) 09:26:37 method = 'GET' 09:26:37 url = '/rests/data/transportpce-portmapping:network/nodes=ROADMA01/node-info' 09:26:37 response = None 09:26:37 error = NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused') 09:26:37 _pool = 09:26:37 _stacktrace = 09:26:37 09:26:37 def increment( 09:26:37 self, 09:26:37 method: str | None = None, 09:26:37 url: str | None = None, 09:26:37 response: BaseHTTPResponse | None = None, 09:26:37 error: Exception | None = None, 09:26:37 _pool: ConnectionPool | None = None, 09:26:37 _stacktrace: TracebackType | None = None, 09:26:37 ) -> Self: 09:26:37 """Return a new Retry object with incremented retry counters. 09:26:37 09:26:37 :param response: A response object, or None, if the server did not 09:26:37 return a response. 09:26:37 :type response: :class:`~urllib3.response.BaseHTTPResponse` 09:26:37 :param Exception error: An error encountered during the request, or 09:26:37 None if the response was received successfully. 09:26:37 09:26:37 :return: A new ``Retry`` object. 09:26:37 """ 09:26:37 if self.total is False and error: 09:26:37 # Disabled, indicate to re-raise the error. 09:26:37 raise reraise(type(error), error, _stacktrace) 09:26:37 09:26:37 total = self.total 09:26:37 if total is not None: 09:26:37 total -= 1 09:26:37 09:26:37 connect = self.connect 09:26:37 read = self.read 09:26:37 redirect = self.redirect 09:26:37 status_count = self.status 09:26:37 other = self.other 09:26:37 cause = "unknown" 09:26:37 status = None 09:26:37 redirect_location = None 09:26:37 09:26:37 if error and self._is_connection_error(error): 09:26:37 # Connect retry? 09:26:37 if connect is False: 09:26:37 raise reraise(type(error), error, _stacktrace) 09:26:37 elif connect is not None: 09:26:37 connect -= 1 09:26:37 09:26:37 elif error and self._is_read_error(error): 09:26:37 # Read retry? 09:26:37 if read is False or method is None or not self._is_method_retryable(method): 09:26:37 raise reraise(type(error), error, _stacktrace) 09:26:37 elif read is not None: 09:26:37 read -= 1 09:26:37 09:26:37 elif error: 09:26:37 # Other retry? 09:26:37 if other is not None: 09:26:37 other -= 1 09:26:37 09:26:37 elif response and response.get_redirect_location(): 09:26:37 # Redirect retry? 09:26:37 if redirect is not None: 09:26:37 redirect -= 1 09:26:37 cause = "too many redirects" 09:26:37 response_redirect_location = response.get_redirect_location() 09:26:37 if response_redirect_location: 09:26:37 redirect_location = response_redirect_location 09:26:37 status = response.status 09:26:37 09:26:37 else: 09:26:37 # Incrementing because of a server error like a 500 in 09:26:37 # status_forcelist and the given method is in the allowed_methods 09:26:37 cause = ResponseError.GENERIC_ERROR 09:26:37 if response and response.status: 09:26:37 if status_count is not None: 09:26:37 status_count -= 1 09:26:37 cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) 09:26:37 status = response.status 09:26:37 09:26:37 history = self.history + ( 09:26:37 RequestHistory(method, url, error, status, redirect_location), 09:26:37 ) 09:26:37 09:26:37 new_retry = self.new( 09:26:37 total=total, 09:26:37 connect=connect, 09:26:37 read=read, 09:26:37 redirect=redirect, 09:26:37 status=status_count, 09:26:37 other=other, 09:26:37 history=history, 09:26:37 ) 09:26:37 09:26:37 if new_retry.is_exhausted(): 09:26:37 reason = error or ResponseError(cause) 09:26:37 > raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] 09:26:37 E urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8182): Max retries exceeded with url: /rests/data/transportpce-portmapping:network/nodes=ROADMA01/node-info (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 09:26:37 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/urllib3/util/retry.py:519: MaxRetryError 09:26:37 09:26:37 During handling of the above exception, another exception occurred: 09:26:37 09:26:37 self = 09:26:37 09:26:37 def test_21_rdm_device_not_connected(self): 09:26:37 > response = test_utils.get_portmapping_node_attr("ROADMA01", "node-info", None) 09:26:37 09:26:37 transportpce_tests/1.2.1/test01_portmapping.py:223: 09:26:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:26:37 transportpce_tests/common/test_utils.py:470: in get_portmapping_node_attr 09:26:37 response = get_request(target_url) 09:26:37 transportpce_tests/common/test_utils.py:116: in get_request 09:26:37 return requests.request( 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/requests/api.py:59: in request 09:26:37 return session.request(method=method, url=url, **kwargs) 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/requests/sessions.py:589: in request 09:26:37 resp = self.send(prep, **send_kwargs) 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/requests/sessions.py:703: in send 09:26:37 r = adapter.send(request, **kwargs) 09:26:37 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:26:37 09:26:37 self = 09:26:37 request = , stream = False 09:26:37 timeout = Timeout(connect=10, read=10, total=None), verify = True, cert = None 09:26:37 proxies = OrderedDict() 09:26:37 09:26:37 def send( 09:26:37 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 09:26:37 ): 09:26:37 """Sends PreparedRequest object. Returns Response object. 09:26:37 09:26:37 :param request: The :class:`PreparedRequest ` being sent. 09:26:37 :param stream: (optional) Whether to stream the request content. 09:26:37 :param timeout: (optional) How long to wait for the server to send 09:26:37 data before giving up, as a float, or a :ref:`(connect timeout, 09:26:37 read timeout) ` tuple. 09:26:37 :type timeout: float or tuple or urllib3 Timeout object 09:26:37 :param verify: (optional) Either a boolean, in which case it controls whether 09:26:37 we verify the server's TLS certificate, or a string, in which case it 09:26:37 must be a path to a CA bundle to use 09:26:37 :param cert: (optional) Any user-provided SSL certificate to be trusted. 09:26:37 :param proxies: (optional) The proxies dictionary to apply to the request. 09:26:37 :rtype: requests.Response 09:26:37 """ 09:26:37 09:26:37 try: 09:26:37 conn = self.get_connection_with_tls_context( 09:26:37 request, verify, proxies=proxies, cert=cert 09:26:37 ) 09:26:37 except LocationValueError as e: 09:26:37 raise InvalidURL(e, request=request) 09:26:37 09:26:37 self.cert_verify(conn, request.url, verify, cert) 09:26:37 url = self.request_url(request, proxies) 09:26:37 self.add_headers( 09:26:37 request, 09:26:37 stream=stream, 09:26:37 timeout=timeout, 09:26:37 verify=verify, 09:26:37 cert=cert, 09:26:37 proxies=proxies, 09:26:37 ) 09:26:37 09:26:37 chunked = not (request.body is None or "Content-Length" in request.headers) 09:26:37 09:26:37 if isinstance(timeout, tuple): 09:26:37 try: 09:26:37 connect, read = timeout 09:26:37 timeout = TimeoutSauce(connect=connect, read=read) 09:26:37 except ValueError: 09:26:37 raise ValueError( 09:26:37 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 09:26:37 f"or a single float to set both timeouts to the same value." 09:26:37 ) 09:26:37 elif isinstance(timeout, TimeoutSauce): 09:26:37 pass 09:26:37 else: 09:26:37 timeout = TimeoutSauce(connect=timeout, read=timeout) 09:26:37 09:26:37 try: 09:26:37 resp = conn.urlopen( 09:26:37 method=request.method, 09:26:37 url=url, 09:26:37 body=request.body, 09:26:37 headers=request.headers, 09:26:37 redirect=False, 09:26:37 assert_same_host=False, 09:26:37 preload_content=False, 09:26:37 decode_content=False, 09:26:37 retries=self.max_retries, 09:26:37 timeout=timeout, 09:26:37 chunked=chunked, 09:26:37 ) 09:26:37 09:26:37 except (ProtocolError, OSError) as err: 09:26:37 raise ConnectionError(err, request=request) 09:26:37 09:26:37 except MaxRetryError as e: 09:26:37 if isinstance(e.reason, ConnectTimeoutError): 09:26:37 # TODO: Remove this in 3.0.0: see #2811 09:26:37 if not isinstance(e.reason, NewConnectionError): 09:26:37 raise ConnectTimeout(e, request=request) 09:26:37 09:26:37 if isinstance(e.reason, ResponseError): 09:26:37 raise RetryError(e, request=request) 09:26:37 09:26:37 if isinstance(e.reason, _ProxyError): 09:26:37 raise ProxyError(e, request=request) 09:26:37 09:26:37 if isinstance(e.reason, _SSLError): 09:26:37 # This branch is for urllib3 v1.22 and later. 09:26:37 raise SSLError(e, request=request) 09:26:37 09:26:37 > raise ConnectionError(e, request=request) 09:26:37 E requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8182): Max retries exceeded with url: /rests/data/transportpce-portmapping:network/nodes=ROADMA01/node-info (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 09:26:37 09:26:37 ../.tox/tests121/lib/python3.11/site-packages/requests/adapters.py:700: ConnectionError 09:26:37 ----------------------------- Captured stdout call ----------------------------- 09:26:37 execution of test_21_rdm_device_not_connected 09:26:37 --------------------------- Captured stdout teardown --------------------------- 09:26:37 all processes killed 09:26:37 =========================== short test summary info ============================ 09:26:37 FAILED transportpce_tests/1.2.1/test01_portmapping.py::TransportPCEPortMappingTesting::test_08_xpdr_device_connected 09:26:37 FAILED transportpce_tests/1.2.1/test01_portmapping.py::TransportPCEPortMappingTesting::test_09_xpdr_portmapping_info 09:26:37 FAILED transportpce_tests/1.2.1/test01_portmapping.py::TransportPCEPortMappingTesting::test_10_xpdr_portmapping_NETWORK1 09:26:37 FAILED transportpce_tests/1.2.1/test01_portmapping.py::TransportPCEPortMappingTesting::test_11_xpdr_portmapping_NETWORK2 09:26:37 FAILED transportpce_tests/1.2.1/test01_portmapping.py::TransportPCEPortMappingTesting::test_12_xpdr_portmapping_CLIENT1 09:26:37 FAILED transportpce_tests/1.2.1/test01_portmapping.py::TransportPCEPortMappingTesting::test_13_xpdr_portmapping_CLIENT2 09:26:37 FAILED transportpce_tests/1.2.1/test01_portmapping.py::TransportPCEPortMappingTesting::test_14_xpdr_portmapping_CLIENT3 09:26:37 FAILED transportpce_tests/1.2.1/test01_portmapping.py::TransportPCEPortMappingTesting::test_15_xpdr_portmapping_CLIENT4 09:26:37 FAILED transportpce_tests/1.2.1/test01_portmapping.py::TransportPCEPortMappingTesting::test_16_xpdr_device_disconnection 09:26:37 FAILED transportpce_tests/1.2.1/test01_portmapping.py::TransportPCEPortMappingTesting::test_17_xpdr_device_disconnected 09:26:37 FAILED transportpce_tests/1.2.1/test01_portmapping.py::TransportPCEPortMappingTesting::test_18_xpdr_device_not_connected 09:26:37 FAILED transportpce_tests/1.2.1/test01_portmapping.py::TransportPCEPortMappingTesting::test_19_rdm_device_disconnection 09:26:37 FAILED transportpce_tests/1.2.1/test01_portmapping.py::TransportPCEPortMappingTesting::test_20_rdm_device_disconnected 09:26:37 FAILED transportpce_tests/1.2.1/test01_portmapping.py::TransportPCEPortMappingTesting::test_21_rdm_device_not_connected 09:26:37 14 failed, 7 passed in 607.05s (0:10:07) 09:26:37 tests121: exit 1 (607.33 seconds) /w/workspace/transportpce-tox-verify-transportpce-master/tests> ./launch_tests.sh 1.2.1 pid=35516 09:27:08 ...................................................................... [100%] 09:30:40 70 passed in 273.50s (0:04:33) 09:30:40 tests121: FAIL ✖ in 10 minutes 13.66 seconds 09:30:40 tests_tapi: OK ✔ in 19 minutes 49.49 seconds 09:30:40 tests71: install_deps> python -I -m pip install 'setuptools>=7.0' -r /w/workspace/transportpce-tox-verify-transportpce-master/tests/requirements.txt -r /w/workspace/transportpce-tox-verify-transportpce-master/tests/test-requirements.txt 09:30:46 tests71: freeze> python -m pip freeze --all 09:30:46 tests71: bcrypt==4.2.0,certifi==2024.8.30,cffi==1.17.1,charset-normalizer==3.3.2,cryptography==43.0.1,dict2xml==1.7.6,idna==3.10,iniconfig==2.0.0,lxml==5.3.0,netconf-client==3.1.1,packaging==24.1,paramiko==3.5.0,pip==24.2,pluggy==1.5.0,psutil==6.0.0,pycparser==2.22,PyNaCl==1.5.0,pytest==8.3.3,requests==2.32.3,setuptools==75.1.0,urllib3==2.2.3,wheel==0.44.0 09:30:46 tests71: commands[0] /w/workspace/transportpce-tox-verify-transportpce-master/tests> ./launch_tests.sh 7.1 09:30:46 using environment variables from ./karaf71.env 09:30:46 pytest -q transportpce_tests/7.1/test01_portmapping.py 09:31:12 FFFFFFFFFFFF [100%] 09:31:27 =================================== FAILURES =================================== 09:31:27 ______ TransportPCE400GPortMappingTesting.test_01_xpdr_device_connection _______ 09:31:27 09:31:27 self = 09:31:27 09:31:27 def _new_conn(self) -> socket.socket: 09:31:27 """Establish a socket connection and set nodelay settings on it. 09:31:27 09:31:27 :return: New socket connection. 09:31:27 """ 09:31:27 try: 09:31:27 > sock = connection.create_connection( 09:31:27 (self._dns_host, self.port), 09:31:27 self.timeout, 09:31:27 source_address=self.source_address, 09:31:27 socket_options=self.socket_options, 09:31:27 ) 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connection.py:199: 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/util/connection.py:85: in create_connection 09:31:27 raise err 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 09:31:27 address = ('localhost', 8184), timeout = 10, source_address = None 09:31:27 socket_options = [(6, 1, 1)] 09:31:27 09:31:27 def create_connection( 09:31:27 address: tuple[str, int], 09:31:27 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 09:31:27 source_address: tuple[str, int] | None = None, 09:31:27 socket_options: _TYPE_SOCKET_OPTIONS | None = None, 09:31:27 ) -> socket.socket: 09:31:27 """Connect to *address* and return the socket object. 09:31:27 09:31:27 Convenience function. Connect to *address* (a 2-tuple ``(host, 09:31:27 port)``) and return the socket object. Passing the optional 09:31:27 *timeout* parameter will set the timeout on the socket instance 09:31:27 before attempting to connect. If no *timeout* is supplied, the 09:31:27 global default timeout setting returned by :func:`socket.getdefaulttimeout` 09:31:27 is used. If *source_address* is set it must be a tuple of (host, port) 09:31:27 for the socket to bind as a source address before making the connection. 09:31:27 An host of '' or port 0 tells the OS to use the default. 09:31:27 """ 09:31:27 09:31:27 host, port = address 09:31:27 if host.startswith("["): 09:31:27 host = host.strip("[]") 09:31:27 err = None 09:31:27 09:31:27 # Using the value from allowed_gai_family() in the context of getaddrinfo lets 09:31:27 # us select whether to work with IPv4 DNS records, IPv6 records, or both. 09:31:27 # The original create_connection function always returns all records. 09:31:27 family = allowed_gai_family() 09:31:27 09:31:27 try: 09:31:27 host.encode("idna") 09:31:27 except UnicodeError: 09:31:27 raise LocationParseError(f"'{host}', label empty or too long") from None 09:31:27 09:31:27 for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 09:31:27 af, socktype, proto, canonname, sa = res 09:31:27 sock = None 09:31:27 try: 09:31:27 sock = socket.socket(af, socktype, proto) 09:31:27 09:31:27 # If provided, set socket level options before connecting. 09:31:27 _set_socket_options(sock, socket_options) 09:31:27 09:31:27 if timeout is not _DEFAULT_TIMEOUT: 09:31:27 sock.settimeout(timeout) 09:31:27 if source_address: 09:31:27 sock.bind(source_address) 09:31:27 > sock.connect(sa) 09:31:27 E ConnectionRefusedError: [Errno 111] Connection refused 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/util/connection.py:73: ConnectionRefusedError 09:31:27 09:31:27 The above exception was the direct cause of the following exception: 09:31:27 09:31:27 self = 09:31:27 method = 'PUT' 09:31:27 url = '/rests/data/network-topology:network-topology/topology=topology-netconf/node=XPDR-A2' 09:31:27 body = '{"node": [{"node-id": "XPDR-A2", "netconf-node-topology:host": "127.0.0.1", "netconf-node-topology:port": "17857", "n...lis": "60000", "netconf-node-topology:max-connection-attempts": "0", "netconf-node-topology:keepalive-delay": "120"}]}' 09:31:27 headers = {'User-Agent': 'python-requests/2.32.3', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'Connection': 'keep-alive', 'Content-Type': 'application/json', 'Content-Length': '588', 'Authorization': 'Basic YWRtaW46YWRtaW4='} 09:31:27 retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 09:31:27 redirect = False, assert_same_host = False 09:31:27 timeout = Timeout(connect=10, read=10, total=None), pool_timeout = None 09:31:27 release_conn = False, chunked = False, body_pos = None, preload_content = False 09:31:27 decode_content = False, response_kw = {} 09:31:27 parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/rests/data/network-topology:network-topology/topology=topology-netconf/node=XPDR-A2', query=None, fragment=None) 09:31:27 destination_scheme = None, conn = None, release_this_conn = True 09:31:27 http_tunnel_required = False, err = None, clean_exit = False 09:31:27 09:31:27 def urlopen( # type: ignore[override] 09:31:27 self, 09:31:27 method: str, 09:31:27 url: str, 09:31:27 body: _TYPE_BODY | None = None, 09:31:27 headers: typing.Mapping[str, str] | None = None, 09:31:27 retries: Retry | bool | int | None = None, 09:31:27 redirect: bool = True, 09:31:27 assert_same_host: bool = True, 09:31:27 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 09:31:27 pool_timeout: int | None = None, 09:31:27 release_conn: bool | None = None, 09:31:27 chunked: bool = False, 09:31:27 body_pos: _TYPE_BODY_POSITION | None = None, 09:31:27 preload_content: bool = True, 09:31:27 decode_content: bool = True, 09:31:27 **response_kw: typing.Any, 09:31:27 ) -> BaseHTTPResponse: 09:31:27 """ 09:31:27 Get a connection from the pool and perform an HTTP request. This is the 09:31:27 lowest level call for making a request, so you'll need to specify all 09:31:27 the raw details. 09:31:27 09:31:27 .. note:: 09:31:27 09:31:27 More commonly, it's appropriate to use a convenience method 09:31:27 such as :meth:`request`. 09:31:27 09:31:27 .. note:: 09:31:27 09:31:27 `release_conn` will only behave as expected if 09:31:27 `preload_content=False` because we want to make 09:31:27 `preload_content=False` the default behaviour someday soon without 09:31:27 breaking backwards compatibility. 09:31:27 09:31:27 :param method: 09:31:27 HTTP request method (such as GET, POST, PUT, etc.) 09:31:27 09:31:27 :param url: 09:31:27 The URL to perform the request on. 09:31:27 09:31:27 :param body: 09:31:27 Data to send in the request body, either :class:`str`, :class:`bytes`, 09:31:27 an iterable of :class:`str`/:class:`bytes`, or a file-like object. 09:31:27 09:31:27 :param headers: 09:31:27 Dictionary of custom headers to send, such as User-Agent, 09:31:27 If-None-Match, etc. If None, pool headers are used. If provided, 09:31:27 these headers completely replace any pool-specific headers. 09:31:27 09:31:27 :param retries: 09:31:27 Configure the number of retries to allow before raising a 09:31:27 :class:`~urllib3.exceptions.MaxRetryError` exception. 09:31:27 09:31:27 If ``None`` (default) will retry 3 times, see ``Retry.DEFAULT``. Pass a 09:31:27 :class:`~urllib3.util.retry.Retry` object for fine-grained control 09:31:27 over different types of retries. 09:31:27 Pass an integer number to retry connection errors that many times, 09:31:27 but no other types of errors. Pass zero to never retry. 09:31:27 09:31:27 If ``False``, then retries are disabled and any exception is raised 09:31:27 immediately. Also, instead of raising a MaxRetryError on redirects, 09:31:27 the redirect response will be returned. 09:31:27 09:31:27 :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 09:31:27 09:31:27 :param redirect: 09:31:27 If True, automatically handle redirects (status codes 301, 302, 09:31:27 303, 307, 308). Each redirect counts as a retry. Disabling retries 09:31:27 will disable redirect, too. 09:31:27 09:31:27 :param assert_same_host: 09:31:27 If ``True``, will make sure that the host of the pool requests is 09:31:27 consistent else will raise HostChangedError. When ``False``, you can 09:31:27 use the pool on an HTTP proxy and request foreign hosts. 09:31:27 09:31:27 :param timeout: 09:31:27 If specified, overrides the default timeout for this one 09:31:27 request. It may be a float (in seconds) or an instance of 09:31:27 :class:`urllib3.util.Timeout`. 09:31:27 09:31:27 :param pool_timeout: 09:31:27 If set and the pool is set to block=True, then this method will 09:31:27 block for ``pool_timeout`` seconds and raise EmptyPoolError if no 09:31:27 connection is available within the time period. 09:31:27 09:31:27 :param bool preload_content: 09:31:27 If True, the response's body will be preloaded into memory. 09:31:27 09:31:27 :param bool decode_content: 09:31:27 If True, will attempt to decode the body based on the 09:31:27 'content-encoding' header. 09:31:27 09:31:27 :param release_conn: 09:31:27 If False, then the urlopen call will not release the connection 09:31:27 back into the pool once a response is received (but will release if 09:31:27 you read the entire contents of the response such as when 09:31:27 `preload_content=True`). This is useful if you're not preloading 09:31:27 the response's content immediately. You will need to call 09:31:27 ``r.release_conn()`` on the response ``r`` to return the connection 09:31:27 back into the pool. If None, it takes the value of ``preload_content`` 09:31:27 which defaults to ``True``. 09:31:27 09:31:27 :param bool chunked: 09:31:27 If True, urllib3 will send the body using chunked transfer 09:31:27 encoding. Otherwise, urllib3 will send the body using the standard 09:31:27 content-length form. Defaults to False. 09:31:27 09:31:27 :param int body_pos: 09:31:27 Position to seek to in file-like body in the event of a retry or 09:31:27 redirect. Typically this won't need to be set because urllib3 will 09:31:27 auto-populate the value when needed. 09:31:27 """ 09:31:27 parsed_url = parse_url(url) 09:31:27 destination_scheme = parsed_url.scheme 09:31:27 09:31:27 if headers is None: 09:31:27 headers = self.headers 09:31:27 09:31:27 if not isinstance(retries, Retry): 09:31:27 retries = Retry.from_int(retries, redirect=redirect, default=self.retries) 09:31:27 09:31:27 if release_conn is None: 09:31:27 release_conn = preload_content 09:31:27 09:31:27 # Check host 09:31:27 if assert_same_host and not self.is_same_host(url): 09:31:27 raise HostChangedError(self, url, retries) 09:31:27 09:31:27 # Ensure that the URL we're connecting to is properly encoded 09:31:27 if url.startswith("/"): 09:31:27 url = to_str(_encode_target(url)) 09:31:27 else: 09:31:27 url = to_str(parsed_url.url) 09:31:27 09:31:27 conn = None 09:31:27 09:31:27 # Track whether `conn` needs to be released before 09:31:27 # returning/raising/recursing. Update this variable if necessary, and 09:31:27 # leave `release_conn` constant throughout the function. That way, if 09:31:27 # the function recurses, the original value of `release_conn` will be 09:31:27 # passed down into the recursive call, and its value will be respected. 09:31:27 # 09:31:27 # See issue #651 [1] for details. 09:31:27 # 09:31:27 # [1] 09:31:27 release_this_conn = release_conn 09:31:27 09:31:27 http_tunnel_required = connection_requires_http_tunnel( 09:31:27 self.proxy, self.proxy_config, destination_scheme 09:31:27 ) 09:31:27 09:31:27 # Merge the proxy headers. Only done when not using HTTP CONNECT. We 09:31:27 # have to copy the headers dict so we can safely change it without those 09:31:27 # changes being reflected in anyone else's copy. 09:31:27 if not http_tunnel_required: 09:31:27 headers = headers.copy() # type: ignore[attr-defined] 09:31:27 headers.update(self.proxy_headers) # type: ignore[union-attr] 09:31:27 09:31:27 # Must keep the exception bound to a separate variable or else Python 3 09:31:27 # complains about UnboundLocalError. 09:31:27 err = None 09:31:27 09:31:27 # Keep track of whether we cleanly exited the except block. This 09:31:27 # ensures we do proper cleanup in finally. 09:31:27 clean_exit = False 09:31:27 09:31:27 # Rewind body position, if needed. Record current position 09:31:27 # for future rewinds in the event of a redirect/retry. 09:31:27 body_pos = set_file_position(body, body_pos) 09:31:27 09:31:27 try: 09:31:27 # Request a connection from the queue. 09:31:27 timeout_obj = self._get_timeout(timeout) 09:31:27 conn = self._get_conn(timeout=pool_timeout) 09:31:27 09:31:27 conn.timeout = timeout_obj.connect_timeout # type: ignore[assignment] 09:31:27 09:31:27 # Is this a closed/new connection that requires CONNECT tunnelling? 09:31:27 if self.proxy is not None and http_tunnel_required and conn.is_closed: 09:31:27 try: 09:31:27 self._prepare_proxy(conn) 09:31:27 except (BaseSSLError, OSError, SocketTimeout) as e: 09:31:27 self._raise_timeout( 09:31:27 err=e, url=self.proxy.url, timeout_value=conn.timeout 09:31:27 ) 09:31:27 raise 09:31:27 09:31:27 # If we're going to release the connection in ``finally:``, then 09:31:27 # the response doesn't need to know about the connection. Otherwise 09:31:27 # it will also try to release it and we'll have a double-release 09:31:27 # mess. 09:31:27 response_conn = conn if not release_conn else None 09:31:27 09:31:27 # Make the request on the HTTPConnection object 09:31:27 > response = self._make_request( 09:31:27 conn, 09:31:27 method, 09:31:27 url, 09:31:27 timeout=timeout_obj, 09:31:27 body=body, 09:31:27 headers=headers, 09:31:27 chunked=chunked, 09:31:27 retries=retries, 09:31:27 response_conn=response_conn, 09:31:27 preload_content=preload_content, 09:31:27 decode_content=decode_content, 09:31:27 **response_kw, 09:31:27 ) 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:789: 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:495: in _make_request 09:31:27 conn.request( 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connection.py:441: in request 09:31:27 self.endheaders() 09:31:27 /opt/pyenv/versions/3.11.7/lib/python3.11/http/client.py:1289: in endheaders 09:31:27 self._send_output(message_body, encode_chunked=encode_chunked) 09:31:27 /opt/pyenv/versions/3.11.7/lib/python3.11/http/client.py:1048: in _send_output 09:31:27 self.send(msg) 09:31:27 /opt/pyenv/versions/3.11.7/lib/python3.11/http/client.py:986: in send 09:31:27 self.connect() 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connection.py:279: in connect 09:31:27 self.sock = self._new_conn() 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 09:31:27 self = 09:31:27 09:31:27 def _new_conn(self) -> socket.socket: 09:31:27 """Establish a socket connection and set nodelay settings on it. 09:31:27 09:31:27 :return: New socket connection. 09:31:27 """ 09:31:27 try: 09:31:27 sock = connection.create_connection( 09:31:27 (self._dns_host, self.port), 09:31:27 self.timeout, 09:31:27 source_address=self.source_address, 09:31:27 socket_options=self.socket_options, 09:31:27 ) 09:31:27 except socket.gaierror as e: 09:31:27 raise NameResolutionError(self.host, self, e) from e 09:31:27 except SocketTimeout as e: 09:31:27 raise ConnectTimeoutError( 09:31:27 self, 09:31:27 f"Connection to {self.host} timed out. (connect timeout={self.timeout})", 09:31:27 ) from e 09:31:27 09:31:27 except OSError as e: 09:31:27 > raise NewConnectionError( 09:31:27 self, f"Failed to establish a new connection: {e}" 09:31:27 ) from e 09:31:27 E urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [Errno 111] Connection refused 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connection.py:214: NewConnectionError 09:31:27 09:31:27 The above exception was the direct cause of the following exception: 09:31:27 09:31:27 self = 09:31:27 request = , stream = False 09:31:27 timeout = Timeout(connect=10, read=10, total=None), verify = True, cert = None 09:31:27 proxies = OrderedDict() 09:31:27 09:31:27 def send( 09:31:27 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 09:31:27 ): 09:31:27 """Sends PreparedRequest object. Returns Response object. 09:31:27 09:31:27 :param request: The :class:`PreparedRequest ` being sent. 09:31:27 :param stream: (optional) Whether to stream the request content. 09:31:27 :param timeout: (optional) How long to wait for the server to send 09:31:27 data before giving up, as a float, or a :ref:`(connect timeout, 09:31:27 read timeout) ` tuple. 09:31:27 :type timeout: float or tuple or urllib3 Timeout object 09:31:27 :param verify: (optional) Either a boolean, in which case it controls whether 09:31:27 we verify the server's TLS certificate, or a string, in which case it 09:31:27 must be a path to a CA bundle to use 09:31:27 :param cert: (optional) Any user-provided SSL certificate to be trusted. 09:31:27 :param proxies: (optional) The proxies dictionary to apply to the request. 09:31:27 :rtype: requests.Response 09:31:27 """ 09:31:27 09:31:27 try: 09:31:27 conn = self.get_connection_with_tls_context( 09:31:27 request, verify, proxies=proxies, cert=cert 09:31:27 ) 09:31:27 except LocationValueError as e: 09:31:27 raise InvalidURL(e, request=request) 09:31:27 09:31:27 self.cert_verify(conn, request.url, verify, cert) 09:31:27 url = self.request_url(request, proxies) 09:31:27 self.add_headers( 09:31:27 request, 09:31:27 stream=stream, 09:31:27 timeout=timeout, 09:31:27 verify=verify, 09:31:27 cert=cert, 09:31:27 proxies=proxies, 09:31:27 ) 09:31:27 09:31:27 chunked = not (request.body is None or "Content-Length" in request.headers) 09:31:27 09:31:27 if isinstance(timeout, tuple): 09:31:27 try: 09:31:27 connect, read = timeout 09:31:27 timeout = TimeoutSauce(connect=connect, read=read) 09:31:27 except ValueError: 09:31:27 raise ValueError( 09:31:27 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 09:31:27 f"or a single float to set both timeouts to the same value." 09:31:27 ) 09:31:27 elif isinstance(timeout, TimeoutSauce): 09:31:27 pass 09:31:27 else: 09:31:27 timeout = TimeoutSauce(connect=timeout, read=timeout) 09:31:27 09:31:27 try: 09:31:27 > resp = conn.urlopen( 09:31:27 method=request.method, 09:31:27 url=url, 09:31:27 body=request.body, 09:31:27 headers=request.headers, 09:31:27 redirect=False, 09:31:27 assert_same_host=False, 09:31:27 preload_content=False, 09:31:27 decode_content=False, 09:31:27 retries=self.max_retries, 09:31:27 timeout=timeout, 09:31:27 chunked=chunked, 09:31:27 ) 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/requests/adapters.py:667: 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:843: in urlopen 09:31:27 retries = retries.increment( 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 09:31:27 self = Retry(total=0, connect=None, read=False, redirect=None, status=None) 09:31:27 method = 'PUT' 09:31:27 url = '/rests/data/network-topology:network-topology/topology=topology-netconf/node=XPDR-A2' 09:31:27 response = None 09:31:27 error = NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused') 09:31:27 _pool = 09:31:27 _stacktrace = 09:31:27 09:31:27 def increment( 09:31:27 self, 09:31:27 method: str | None = None, 09:31:27 url: str | None = None, 09:31:27 response: BaseHTTPResponse | None = None, 09:31:27 error: Exception | None = None, 09:31:27 _pool: ConnectionPool | None = None, 09:31:27 _stacktrace: TracebackType | None = None, 09:31:27 ) -> Self: 09:31:27 """Return a new Retry object with incremented retry counters. 09:31:27 09:31:27 :param response: A response object, or None, if the server did not 09:31:27 return a response. 09:31:27 :type response: :class:`~urllib3.response.BaseHTTPResponse` 09:31:27 :param Exception error: An error encountered during the request, or 09:31:27 None if the response was received successfully. 09:31:27 09:31:27 :return: A new ``Retry`` object. 09:31:27 """ 09:31:27 if self.total is False and error: 09:31:27 # Disabled, indicate to re-raise the error. 09:31:27 raise reraise(type(error), error, _stacktrace) 09:31:27 09:31:27 total = self.total 09:31:27 if total is not None: 09:31:27 total -= 1 09:31:27 09:31:27 connect = self.connect 09:31:27 read = self.read 09:31:27 redirect = self.redirect 09:31:27 status_count = self.status 09:31:27 other = self.other 09:31:27 cause = "unknown" 09:31:27 status = None 09:31:27 redirect_location = None 09:31:27 09:31:27 if error and self._is_connection_error(error): 09:31:27 # Connect retry? 09:31:27 if connect is False: 09:31:27 raise reraise(type(error), error, _stacktrace) 09:31:27 elif connect is not None: 09:31:27 connect -= 1 09:31:27 09:31:27 elif error and self._is_read_error(error): 09:31:27 # Read retry? 09:31:27 if read is False or method is None or not self._is_method_retryable(method): 09:31:27 raise reraise(type(error), error, _stacktrace) 09:31:27 elif read is not None: 09:31:27 read -= 1 09:31:27 09:31:27 elif error: 09:31:27 # Other retry? 09:31:27 if other is not None: 09:31:27 other -= 1 09:31:27 09:31:27 elif response and response.get_redirect_location(): 09:31:27 # Redirect retry? 09:31:27 if redirect is not None: 09:31:27 redirect -= 1 09:31:27 cause = "too many redirects" 09:31:27 response_redirect_location = response.get_redirect_location() 09:31:27 if response_redirect_location: 09:31:27 redirect_location = response_redirect_location 09:31:27 status = response.status 09:31:27 09:31:27 else: 09:31:27 # Incrementing because of a server error like a 500 in 09:31:27 # status_forcelist and the given method is in the allowed_methods 09:31:27 cause = ResponseError.GENERIC_ERROR 09:31:27 if response and response.status: 09:31:27 if status_count is not None: 09:31:27 status_count -= 1 09:31:27 cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) 09:31:27 status = response.status 09:31:27 09:31:27 history = self.history + ( 09:31:27 RequestHistory(method, url, error, status, redirect_location), 09:31:27 ) 09:31:27 09:31:27 new_retry = self.new( 09:31:27 total=total, 09:31:27 connect=connect, 09:31:27 read=read, 09:31:27 redirect=redirect, 09:31:27 status=status_count, 09:31:27 other=other, 09:31:27 history=history, 09:31:27 ) 09:31:27 09:31:27 if new_retry.is_exhausted(): 09:31:27 reason = error or ResponseError(cause) 09:31:27 > raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] 09:31:27 E urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8184): Max retries exceeded with url: /rests/data/network-topology:network-topology/topology=topology-netconf/node=XPDR-A2 (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/util/retry.py:519: MaxRetryError 09:31:27 09:31:27 During handling of the above exception, another exception occurred: 09:31:27 09:31:27 self = 09:31:27 09:31:27 def test_01_xpdr_device_connection(self): 09:31:27 > response = test_utils.mount_device("XPDR-A2", 09:31:27 ('xpdra2', self.NODE_VERSION)) 09:31:27 09:31:27 transportpce_tests/7.1/test01_portmapping.py:48: 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 transportpce_tests/common/test_utils.py:344: in mount_device 09:31:27 response = put_request(url[RESTCONF_VERSION].format('{}', node), body) 09:31:27 transportpce_tests/common/test_utils.py:124: in put_request 09:31:27 return requests.request( 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/requests/api.py:59: in request 09:31:27 return session.request(method=method, url=url, **kwargs) 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/requests/sessions.py:589: in request 09:31:27 resp = self.send(prep, **send_kwargs) 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/requests/sessions.py:703: in send 09:31:27 r = adapter.send(request, **kwargs) 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 09:31:27 self = 09:31:27 request = , stream = False 09:31:27 timeout = Timeout(connect=10, read=10, total=None), verify = True, cert = None 09:31:27 proxies = OrderedDict() 09:31:27 09:31:27 def send( 09:31:27 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 09:31:27 ): 09:31:27 """Sends PreparedRequest object. Returns Response object. 09:31:27 09:31:27 :param request: The :class:`PreparedRequest ` being sent. 09:31:27 :param stream: (optional) Whether to stream the request content. 09:31:27 :param timeout: (optional) How long to wait for the server to send 09:31:27 data before giving up, as a float, or a :ref:`(connect timeout, 09:31:27 read timeout) ` tuple. 09:31:27 :type timeout: float or tuple or urllib3 Timeout object 09:31:27 :param verify: (optional) Either a boolean, in which case it controls whether 09:31:27 we verify the server's TLS certificate, or a string, in which case it 09:31:27 must be a path to a CA bundle to use 09:31:27 :param cert: (optional) Any user-provided SSL certificate to be trusted. 09:31:27 :param proxies: (optional) The proxies dictionary to apply to the request. 09:31:27 :rtype: requests.Response 09:31:27 """ 09:31:27 09:31:27 try: 09:31:27 conn = self.get_connection_with_tls_context( 09:31:27 request, verify, proxies=proxies, cert=cert 09:31:27 ) 09:31:27 except LocationValueError as e: 09:31:27 raise InvalidURL(e, request=request) 09:31:27 09:31:27 self.cert_verify(conn, request.url, verify, cert) 09:31:27 url = self.request_url(request, proxies) 09:31:27 self.add_headers( 09:31:27 request, 09:31:27 stream=stream, 09:31:27 timeout=timeout, 09:31:27 verify=verify, 09:31:27 cert=cert, 09:31:27 proxies=proxies, 09:31:27 ) 09:31:27 09:31:27 chunked = not (request.body is None or "Content-Length" in request.headers) 09:31:27 09:31:27 if isinstance(timeout, tuple): 09:31:27 try: 09:31:27 connect, read = timeout 09:31:27 timeout = TimeoutSauce(connect=connect, read=read) 09:31:27 except ValueError: 09:31:27 raise ValueError( 09:31:27 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 09:31:27 f"or a single float to set both timeouts to the same value." 09:31:27 ) 09:31:27 elif isinstance(timeout, TimeoutSauce): 09:31:27 pass 09:31:27 else: 09:31:27 timeout = TimeoutSauce(connect=timeout, read=timeout) 09:31:27 09:31:27 try: 09:31:27 resp = conn.urlopen( 09:31:27 method=request.method, 09:31:27 url=url, 09:31:27 body=request.body, 09:31:27 headers=request.headers, 09:31:27 redirect=False, 09:31:27 assert_same_host=False, 09:31:27 preload_content=False, 09:31:27 decode_content=False, 09:31:27 retries=self.max_retries, 09:31:27 timeout=timeout, 09:31:27 chunked=chunked, 09:31:27 ) 09:31:27 09:31:27 except (ProtocolError, OSError) as err: 09:31:27 raise ConnectionError(err, request=request) 09:31:27 09:31:27 except MaxRetryError as e: 09:31:27 if isinstance(e.reason, ConnectTimeoutError): 09:31:27 # TODO: Remove this in 3.0.0: see #2811 09:31:27 if not isinstance(e.reason, NewConnectionError): 09:31:27 raise ConnectTimeout(e, request=request) 09:31:27 09:31:27 if isinstance(e.reason, ResponseError): 09:31:27 raise RetryError(e, request=request) 09:31:27 09:31:27 if isinstance(e.reason, _ProxyError): 09:31:27 raise ProxyError(e, request=request) 09:31:27 09:31:27 if isinstance(e.reason, _SSLError): 09:31:27 # This branch is for urllib3 v1.22 and later. 09:31:27 raise SSLError(e, request=request) 09:31:27 09:31:27 > raise ConnectionError(e, request=request) 09:31:27 E requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8184): Max retries exceeded with url: /rests/data/network-topology:network-topology/topology=topology-netconf/node=XPDR-A2 (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/requests/adapters.py:700: ConnectionError 09:31:27 ---------------------------- Captured stdout setup ----------------------------- 09:31:27 starting OpenDaylight... 09:31:27 starting KARAF TransportPCE build... 09:31:27 Searching for pattern 'Transportpce controller started' in karaf.log... Pattern found! OpenDaylight started ! 09:31:27 starting simulator xpdra2 in OpenROADM device version 7.1... 09:31:27 Searching for pattern 'Data tree change listeners registered' in xpdra2-71.log... Pattern found! simulator for xpdra2 started 09:31:27 ----------------------------- Captured stdout call ----------------------------- 09:31:27 execution of test_01_xpdr_device_connection 09:31:27 _______ TransportPCE400GPortMappingTesting.test_02_xpdr_device_connected _______ 09:31:27 09:31:27 self = 09:31:27 09:31:27 def _new_conn(self) -> socket.socket: 09:31:27 """Establish a socket connection and set nodelay settings on it. 09:31:27 09:31:27 :return: New socket connection. 09:31:27 """ 09:31:27 try: 09:31:27 > sock = connection.create_connection( 09:31:27 (self._dns_host, self.port), 09:31:27 self.timeout, 09:31:27 source_address=self.source_address, 09:31:27 socket_options=self.socket_options, 09:31:27 ) 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connection.py:199: 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/util/connection.py:85: in create_connection 09:31:27 raise err 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 09:31:27 address = ('localhost', 8184), timeout = 10, source_address = None 09:31:27 socket_options = [(6, 1, 1)] 09:31:27 09:31:27 def create_connection( 09:31:27 address: tuple[str, int], 09:31:27 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 09:31:27 source_address: tuple[str, int] | None = None, 09:31:27 socket_options: _TYPE_SOCKET_OPTIONS | None = None, 09:31:27 ) -> socket.socket: 09:31:27 """Connect to *address* and return the socket object. 09:31:27 09:31:27 Convenience function. Connect to *address* (a 2-tuple ``(host, 09:31:27 port)``) and return the socket object. Passing the optional 09:31:27 *timeout* parameter will set the timeout on the socket instance 09:31:27 before attempting to connect. If no *timeout* is supplied, the 09:31:27 global default timeout setting returned by :func:`socket.getdefaulttimeout` 09:31:27 is used. If *source_address* is set it must be a tuple of (host, port) 09:31:27 for the socket to bind as a source address before making the connection. 09:31:27 An host of '' or port 0 tells the OS to use the default. 09:31:27 """ 09:31:27 09:31:27 host, port = address 09:31:27 if host.startswith("["): 09:31:27 host = host.strip("[]") 09:31:27 err = None 09:31:27 09:31:27 # Using the value from allowed_gai_family() in the context of getaddrinfo lets 09:31:27 # us select whether to work with IPv4 DNS records, IPv6 records, or both. 09:31:27 # The original create_connection function always returns all records. 09:31:27 family = allowed_gai_family() 09:31:27 09:31:27 try: 09:31:27 host.encode("idna") 09:31:27 except UnicodeError: 09:31:27 raise LocationParseError(f"'{host}', label empty or too long") from None 09:31:27 09:31:27 for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 09:31:27 af, socktype, proto, canonname, sa = res 09:31:27 sock = None 09:31:27 try: 09:31:27 sock = socket.socket(af, socktype, proto) 09:31:27 09:31:27 # If provided, set socket level options before connecting. 09:31:27 _set_socket_options(sock, socket_options) 09:31:27 09:31:27 if timeout is not _DEFAULT_TIMEOUT: 09:31:27 sock.settimeout(timeout) 09:31:27 if source_address: 09:31:27 sock.bind(source_address) 09:31:27 > sock.connect(sa) 09:31:27 E ConnectionRefusedError: [Errno 111] Connection refused 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/util/connection.py:73: ConnectionRefusedError 09:31:27 09:31:27 The above exception was the direct cause of the following exception: 09:31:27 09:31:27 self = 09:31:27 method = 'GET' 09:31:27 url = '/rests/data/network-topology:network-topology/topology=topology-netconf/node=XPDR-A2?content=nonconfig' 09:31:27 body = None 09:31:27 headers = {'User-Agent': 'python-requests/2.32.3', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'Connection': 'keep-alive', 'Content-Type': 'application/json', 'Authorization': 'Basic YWRtaW46YWRtaW4='} 09:31:27 retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 09:31:27 redirect = False, assert_same_host = False 09:31:27 timeout = Timeout(connect=10, read=10, total=None), pool_timeout = None 09:31:27 release_conn = False, chunked = False, body_pos = None, preload_content = False 09:31:27 decode_content = False, response_kw = {} 09:31:27 parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/rests/data/network-topology:network-topology/topology=topology-netconf/node=XPDR-A2', query='content=nonconfig', fragment=None) 09:31:27 destination_scheme = None, conn = None, release_this_conn = True 09:31:27 http_tunnel_required = False, err = None, clean_exit = False 09:31:27 09:31:27 def urlopen( # type: ignore[override] 09:31:27 self, 09:31:27 method: str, 09:31:27 url: str, 09:31:27 body: _TYPE_BODY | None = None, 09:31:27 headers: typing.Mapping[str, str] | None = None, 09:31:27 retries: Retry | bool | int | None = None, 09:31:27 redirect: bool = True, 09:31:27 assert_same_host: bool = True, 09:31:27 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 09:31:27 pool_timeout: int | None = None, 09:31:27 release_conn: bool | None = None, 09:31:27 chunked: bool = False, 09:31:27 body_pos: _TYPE_BODY_POSITION | None = None, 09:31:27 preload_content: bool = True, 09:31:27 decode_content: bool = True, 09:31:27 **response_kw: typing.Any, 09:31:27 ) -> BaseHTTPResponse: 09:31:27 """ 09:31:27 Get a connection from the pool and perform an HTTP request. This is the 09:31:27 lowest level call for making a request, so you'll need to specify all 09:31:27 the raw details. 09:31:27 09:31:27 .. note:: 09:31:27 09:31:27 More commonly, it's appropriate to use a convenience method 09:31:27 such as :meth:`request`. 09:31:27 09:31:27 .. note:: 09:31:27 09:31:27 `release_conn` will only behave as expected if 09:31:27 `preload_content=False` because we want to make 09:31:27 `preload_content=False` the default behaviour someday soon without 09:31:27 breaking backwards compatibility. 09:31:27 09:31:27 :param method: 09:31:27 HTTP request method (such as GET, POST, PUT, etc.) 09:31:27 09:31:27 :param url: 09:31:27 The URL to perform the request on. 09:31:27 09:31:27 :param body: 09:31:27 Data to send in the request body, either :class:`str`, :class:`bytes`, 09:31:27 an iterable of :class:`str`/:class:`bytes`, or a file-like object. 09:31:27 09:31:27 :param headers: 09:31:27 Dictionary of custom headers to send, such as User-Agent, 09:31:27 If-None-Match, etc. If None, pool headers are used. If provided, 09:31:27 these headers completely replace any pool-specific headers. 09:31:27 09:31:27 :param retries: 09:31:27 Configure the number of retries to allow before raising a 09:31:27 :class:`~urllib3.exceptions.MaxRetryError` exception. 09:31:27 09:31:27 If ``None`` (default) will retry 3 times, see ``Retry.DEFAULT``. Pass a 09:31:27 :class:`~urllib3.util.retry.Retry` object for fine-grained control 09:31:27 over different types of retries. 09:31:27 Pass an integer number to retry connection errors that many times, 09:31:27 but no other types of errors. Pass zero to never retry. 09:31:27 09:31:27 If ``False``, then retries are disabled and any exception is raised 09:31:27 immediately. Also, instead of raising a MaxRetryError on redirects, 09:31:27 the redirect response will be returned. 09:31:27 09:31:27 :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 09:31:27 09:31:27 :param redirect: 09:31:27 If True, automatically handle redirects (status codes 301, 302, 09:31:27 303, 307, 308). Each redirect counts as a retry. Disabling retries 09:31:27 will disable redirect, too. 09:31:27 09:31:27 :param assert_same_host: 09:31:27 If ``True``, will make sure that the host of the pool requests is 09:31:27 consistent else will raise HostChangedError. When ``False``, you can 09:31:27 use the pool on an HTTP proxy and request foreign hosts. 09:31:27 09:31:27 :param timeout: 09:31:27 If specified, overrides the default timeout for this one 09:31:27 request. It may be a float (in seconds) or an instance of 09:31:27 :class:`urllib3.util.Timeout`. 09:31:27 09:31:27 :param pool_timeout: 09:31:27 If set and the pool is set to block=True, then this method will 09:31:27 block for ``pool_timeout`` seconds and raise EmptyPoolError if no 09:31:27 connection is available within the time period. 09:31:27 09:31:27 :param bool preload_content: 09:31:27 If True, the response's body will be preloaded into memory. 09:31:27 09:31:27 :param bool decode_content: 09:31:27 If True, will attempt to decode the body based on the 09:31:27 'content-encoding' header. 09:31:27 09:31:27 :param release_conn: 09:31:27 If False, then the urlopen call will not release the connection 09:31:27 back into the pool once a response is received (but will release if 09:31:27 you read the entire contents of the response such as when 09:31:27 `preload_content=True`). This is useful if you're not preloading 09:31:27 the response's content immediately. You will need to call 09:31:27 ``r.release_conn()`` on the response ``r`` to return the connection 09:31:27 back into the pool. If None, it takes the value of ``preload_content`` 09:31:27 which defaults to ``True``. 09:31:27 09:31:27 :param bool chunked: 09:31:27 If True, urllib3 will send the body using chunked transfer 09:31:27 encoding. Otherwise, urllib3 will send the body using the standard 09:31:27 content-length form. Defaults to False. 09:31:27 09:31:27 :param int body_pos: 09:31:27 Position to seek to in file-like body in the event of a retry or 09:31:27 redirect. Typically this won't need to be set because urllib3 will 09:31:27 auto-populate the value when needed. 09:31:27 """ 09:31:27 parsed_url = parse_url(url) 09:31:27 destination_scheme = parsed_url.scheme 09:31:27 09:31:27 if headers is None: 09:31:27 headers = self.headers 09:31:27 09:31:27 if not isinstance(retries, Retry): 09:31:27 retries = Retry.from_int(retries, redirect=redirect, default=self.retries) 09:31:27 09:31:27 if release_conn is None: 09:31:27 release_conn = preload_content 09:31:27 09:31:27 # Check host 09:31:27 if assert_same_host and not self.is_same_host(url): 09:31:27 raise HostChangedError(self, url, retries) 09:31:27 09:31:27 # Ensure that the URL we're connecting to is properly encoded 09:31:27 if url.startswith("/"): 09:31:27 url = to_str(_encode_target(url)) 09:31:27 else: 09:31:27 url = to_str(parsed_url.url) 09:31:27 09:31:27 conn = None 09:31:27 09:31:27 # Track whether `conn` needs to be released before 09:31:27 # returning/raising/recursing. Update this variable if necessary, and 09:31:27 # leave `release_conn` constant throughout the function. That way, if 09:31:27 # the function recurses, the original value of `release_conn` will be 09:31:27 # passed down into the recursive call, and its value will be respected. 09:31:27 # 09:31:27 # See issue #651 [1] for details. 09:31:27 # 09:31:27 # [1] 09:31:27 release_this_conn = release_conn 09:31:27 09:31:27 http_tunnel_required = connection_requires_http_tunnel( 09:31:27 self.proxy, self.proxy_config, destination_scheme 09:31:27 ) 09:31:27 09:31:27 # Merge the proxy headers. Only done when not using HTTP CONNECT. We 09:31:27 # have to copy the headers dict so we can safely change it without those 09:31:27 # changes being reflected in anyone else's copy. 09:31:27 if not http_tunnel_required: 09:31:27 headers = headers.copy() # type: ignore[attr-defined] 09:31:27 headers.update(self.proxy_headers) # type: ignore[union-attr] 09:31:27 09:31:27 # Must keep the exception bound to a separate variable or else Python 3 09:31:27 # complains about UnboundLocalError. 09:31:27 err = None 09:31:27 09:31:27 # Keep track of whether we cleanly exited the except block. This 09:31:27 # ensures we do proper cleanup in finally. 09:31:27 clean_exit = False 09:31:27 09:31:27 # Rewind body position, if needed. Record current position 09:31:27 # for future rewinds in the event of a redirect/retry. 09:31:27 body_pos = set_file_position(body, body_pos) 09:31:27 09:31:27 try: 09:31:27 # Request a connection from the queue. 09:31:27 timeout_obj = self._get_timeout(timeout) 09:31:27 conn = self._get_conn(timeout=pool_timeout) 09:31:27 09:31:27 conn.timeout = timeout_obj.connect_timeout # type: ignore[assignment] 09:31:27 09:31:27 # Is this a closed/new connection that requires CONNECT tunnelling? 09:31:27 if self.proxy is not None and http_tunnel_required and conn.is_closed: 09:31:27 try: 09:31:27 self._prepare_proxy(conn) 09:31:27 except (BaseSSLError, OSError, SocketTimeout) as e: 09:31:27 self._raise_timeout( 09:31:27 err=e, url=self.proxy.url, timeout_value=conn.timeout 09:31:27 ) 09:31:27 raise 09:31:27 09:31:27 # If we're going to release the connection in ``finally:``, then 09:31:27 # the response doesn't need to know about the connection. Otherwise 09:31:27 # it will also try to release it and we'll have a double-release 09:31:27 # mess. 09:31:27 response_conn = conn if not release_conn else None 09:31:27 09:31:27 # Make the request on the HTTPConnection object 09:31:27 > response = self._make_request( 09:31:27 conn, 09:31:27 method, 09:31:27 url, 09:31:27 timeout=timeout_obj, 09:31:27 body=body, 09:31:27 headers=headers, 09:31:27 chunked=chunked, 09:31:27 retries=retries, 09:31:27 response_conn=response_conn, 09:31:27 preload_content=preload_content, 09:31:27 decode_content=decode_content, 09:31:27 **response_kw, 09:31:27 ) 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:789: 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:495: in _make_request 09:31:27 conn.request( 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connection.py:441: in request 09:31:27 self.endheaders() 09:31:27 /opt/pyenv/versions/3.11.7/lib/python3.11/http/client.py:1289: in endheaders 09:31:27 self._send_output(message_body, encode_chunked=encode_chunked) 09:31:27 /opt/pyenv/versions/3.11.7/lib/python3.11/http/client.py:1048: in _send_output 09:31:27 self.send(msg) 09:31:27 /opt/pyenv/versions/3.11.7/lib/python3.11/http/client.py:986: in send 09:31:27 self.connect() 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connection.py:279: in connect 09:31:27 self.sock = self._new_conn() 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 09:31:27 self = 09:31:27 09:31:27 def _new_conn(self) -> socket.socket: 09:31:27 """Establish a socket connection and set nodelay settings on it. 09:31:27 09:31:27 :return: New socket connection. 09:31:27 """ 09:31:27 try: 09:31:27 sock = connection.create_connection( 09:31:27 (self._dns_host, self.port), 09:31:27 self.timeout, 09:31:27 source_address=self.source_address, 09:31:27 socket_options=self.socket_options, 09:31:27 ) 09:31:27 except socket.gaierror as e: 09:31:27 raise NameResolutionError(self.host, self, e) from e 09:31:27 except SocketTimeout as e: 09:31:27 raise ConnectTimeoutError( 09:31:27 self, 09:31:27 f"Connection to {self.host} timed out. (connect timeout={self.timeout})", 09:31:27 ) from e 09:31:27 09:31:27 except OSError as e: 09:31:27 > raise NewConnectionError( 09:31:27 self, f"Failed to establish a new connection: {e}" 09:31:27 ) from e 09:31:27 E urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [Errno 111] Connection refused 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connection.py:214: NewConnectionError 09:31:27 09:31:27 The above exception was the direct cause of the following exception: 09:31:27 09:31:27 self = 09:31:27 request = , stream = False 09:31:27 timeout = Timeout(connect=10, read=10, total=None), verify = True, cert = None 09:31:27 proxies = OrderedDict() 09:31:27 09:31:27 def send( 09:31:27 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 09:31:27 ): 09:31:27 """Sends PreparedRequest object. Returns Response object. 09:31:27 09:31:27 :param request: The :class:`PreparedRequest ` being sent. 09:31:27 :param stream: (optional) Whether to stream the request content. 09:31:27 :param timeout: (optional) How long to wait for the server to send 09:31:27 data before giving up, as a float, or a :ref:`(connect timeout, 09:31:27 read timeout) ` tuple. 09:31:27 :type timeout: float or tuple or urllib3 Timeout object 09:31:27 :param verify: (optional) Either a boolean, in which case it controls whether 09:31:27 we verify the server's TLS certificate, or a string, in which case it 09:31:27 must be a path to a CA bundle to use 09:31:27 :param cert: (optional) Any user-provided SSL certificate to be trusted. 09:31:27 :param proxies: (optional) The proxies dictionary to apply to the request. 09:31:27 :rtype: requests.Response 09:31:27 """ 09:31:27 09:31:27 try: 09:31:27 conn = self.get_connection_with_tls_context( 09:31:27 request, verify, proxies=proxies, cert=cert 09:31:27 ) 09:31:27 except LocationValueError as e: 09:31:27 raise InvalidURL(e, request=request) 09:31:27 09:31:27 self.cert_verify(conn, request.url, verify, cert) 09:31:27 url = self.request_url(request, proxies) 09:31:27 self.add_headers( 09:31:27 request, 09:31:27 stream=stream, 09:31:27 timeout=timeout, 09:31:27 verify=verify, 09:31:27 cert=cert, 09:31:27 proxies=proxies, 09:31:27 ) 09:31:27 09:31:27 chunked = not (request.body is None or "Content-Length" in request.headers) 09:31:27 09:31:27 if isinstance(timeout, tuple): 09:31:27 try: 09:31:27 connect, read = timeout 09:31:27 timeout = TimeoutSauce(connect=connect, read=read) 09:31:27 except ValueError: 09:31:27 raise ValueError( 09:31:27 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 09:31:27 f"or a single float to set both timeouts to the same value." 09:31:27 ) 09:31:27 elif isinstance(timeout, TimeoutSauce): 09:31:27 pass 09:31:27 else: 09:31:27 timeout = TimeoutSauce(connect=timeout, read=timeout) 09:31:27 09:31:27 try: 09:31:27 > resp = conn.urlopen( 09:31:27 method=request.method, 09:31:27 url=url, 09:31:27 body=request.body, 09:31:27 headers=request.headers, 09:31:27 redirect=False, 09:31:27 assert_same_host=False, 09:31:27 preload_content=False, 09:31:27 decode_content=False, 09:31:27 retries=self.max_retries, 09:31:27 timeout=timeout, 09:31:27 chunked=chunked, 09:31:27 ) 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/requests/adapters.py:667: 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:843: in urlopen 09:31:27 retries = retries.increment( 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 09:31:27 self = Retry(total=0, connect=None, read=False, redirect=None, status=None) 09:31:27 method = 'GET' 09:31:27 url = '/rests/data/network-topology:network-topology/topology=topology-netconf/node=XPDR-A2?content=nonconfig' 09:31:27 response = None 09:31:27 error = NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused') 09:31:27 _pool = 09:31:27 _stacktrace = 09:31:27 09:31:27 def increment( 09:31:27 self, 09:31:27 method: str | None = None, 09:31:27 url: str | None = None, 09:31:27 response: BaseHTTPResponse | None = None, 09:31:27 error: Exception | None = None, 09:31:27 _pool: ConnectionPool | None = None, 09:31:27 _stacktrace: TracebackType | None = None, 09:31:27 ) -> Self: 09:31:27 """Return a new Retry object with incremented retry counters. 09:31:27 09:31:27 :param response: A response object, or None, if the server did not 09:31:27 return a response. 09:31:27 :type response: :class:`~urllib3.response.BaseHTTPResponse` 09:31:27 :param Exception error: An error encountered during the request, or 09:31:27 None if the response was received successfully. 09:31:27 09:31:27 :return: A new ``Retry`` object. 09:31:27 """ 09:31:27 if self.total is False and error: 09:31:27 # Disabled, indicate to re-raise the error. 09:31:27 raise reraise(type(error), error, _stacktrace) 09:31:27 09:31:27 total = self.total 09:31:27 if total is not None: 09:31:27 total -= 1 09:31:27 09:31:27 connect = self.connect 09:31:27 read = self.read 09:31:27 redirect = self.redirect 09:31:27 status_count = self.status 09:31:27 other = self.other 09:31:27 cause = "unknown" 09:31:27 status = None 09:31:27 redirect_location = None 09:31:27 09:31:27 if error and self._is_connection_error(error): 09:31:27 # Connect retry? 09:31:27 if connect is False: 09:31:27 raise reraise(type(error), error, _stacktrace) 09:31:27 elif connect is not None: 09:31:27 connect -= 1 09:31:27 09:31:27 elif error and self._is_read_error(error): 09:31:27 # Read retry? 09:31:27 if read is False or method is None or not self._is_method_retryable(method): 09:31:27 raise reraise(type(error), error, _stacktrace) 09:31:27 elif read is not None: 09:31:27 read -= 1 09:31:27 09:31:27 elif error: 09:31:27 # Other retry? 09:31:27 if other is not None: 09:31:27 other -= 1 09:31:27 09:31:27 elif response and response.get_redirect_location(): 09:31:27 # Redirect retry? 09:31:27 if redirect is not None: 09:31:27 redirect -= 1 09:31:27 cause = "too many redirects" 09:31:27 response_redirect_location = response.get_redirect_location() 09:31:27 if response_redirect_location: 09:31:27 redirect_location = response_redirect_location 09:31:27 status = response.status 09:31:27 09:31:27 else: 09:31:27 # Incrementing because of a server error like a 500 in 09:31:27 # status_forcelist and the given method is in the allowed_methods 09:31:27 cause = ResponseError.GENERIC_ERROR 09:31:27 if response and response.status: 09:31:27 if status_count is not None: 09:31:27 status_count -= 1 09:31:27 cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) 09:31:27 status = response.status 09:31:27 09:31:27 history = self.history + ( 09:31:27 RequestHistory(method, url, error, status, redirect_location), 09:31:27 ) 09:31:27 09:31:27 new_retry = self.new( 09:31:27 total=total, 09:31:27 connect=connect, 09:31:27 read=read, 09:31:27 redirect=redirect, 09:31:27 status=status_count, 09:31:27 other=other, 09:31:27 history=history, 09:31:27 ) 09:31:27 09:31:27 if new_retry.is_exhausted(): 09:31:27 reason = error or ResponseError(cause) 09:31:27 > raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] 09:31:27 E urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8184): Max retries exceeded with url: /rests/data/network-topology:network-topology/topology=topology-netconf/node=XPDR-A2?content=nonconfig (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/util/retry.py:519: MaxRetryError 09:31:27 09:31:27 During handling of the above exception, another exception occurred: 09:31:27 09:31:27 self = 09:31:27 09:31:27 def test_02_xpdr_device_connected(self): 09:31:27 > response = test_utils.check_device_connection("XPDR-A2") 09:31:27 09:31:27 transportpce_tests/7.1/test01_portmapping.py:55: 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 transportpce_tests/common/test_utils.py:369: in check_device_connection 09:31:27 response = get_request(url[RESTCONF_VERSION].format('{}', node)) 09:31:27 transportpce_tests/common/test_utils.py:116: in get_request 09:31:27 return requests.request( 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/requests/api.py:59: in request 09:31:27 return session.request(method=method, url=url, **kwargs) 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/requests/sessions.py:589: in request 09:31:27 resp = self.send(prep, **send_kwargs) 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/requests/sessions.py:703: in send 09:31:27 r = adapter.send(request, **kwargs) 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 09:31:27 self = 09:31:27 request = , stream = False 09:31:27 timeout = Timeout(connect=10, read=10, total=None), verify = True, cert = None 09:31:27 proxies = OrderedDict() 09:31:27 09:31:27 def send( 09:31:27 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 09:31:27 ): 09:31:27 """Sends PreparedRequest object. Returns Response object. 09:31:27 09:31:27 :param request: The :class:`PreparedRequest ` being sent. 09:31:27 :param stream: (optional) Whether to stream the request content. 09:31:27 :param timeout: (optional) How long to wait for the server to send 09:31:27 data before giving up, as a float, or a :ref:`(connect timeout, 09:31:27 read timeout) ` tuple. 09:31:27 :type timeout: float or tuple or urllib3 Timeout object 09:31:27 :param verify: (optional) Either a boolean, in which case it controls whether 09:31:27 we verify the server's TLS certificate, or a string, in which case it 09:31:27 must be a path to a CA bundle to use 09:31:27 :param cert: (optional) Any user-provided SSL certificate to be trusted. 09:31:27 :param proxies: (optional) The proxies dictionary to apply to the request. 09:31:27 :rtype: requests.Response 09:31:27 """ 09:31:27 09:31:27 try: 09:31:27 conn = self.get_connection_with_tls_context( 09:31:27 request, verify, proxies=proxies, cert=cert 09:31:27 ) 09:31:27 except LocationValueError as e: 09:31:27 raise InvalidURL(e, request=request) 09:31:27 09:31:27 self.cert_verify(conn, request.url, verify, cert) 09:31:27 url = self.request_url(request, proxies) 09:31:27 self.add_headers( 09:31:27 request, 09:31:27 stream=stream, 09:31:27 timeout=timeout, 09:31:27 verify=verify, 09:31:27 cert=cert, 09:31:27 proxies=proxies, 09:31:27 ) 09:31:27 09:31:27 chunked = not (request.body is None or "Content-Length" in request.headers) 09:31:27 09:31:27 if isinstance(timeout, tuple): 09:31:27 try: 09:31:27 connect, read = timeout 09:31:27 timeout = TimeoutSauce(connect=connect, read=read) 09:31:27 except ValueError: 09:31:27 raise ValueError( 09:31:27 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 09:31:27 f"or a single float to set both timeouts to the same value." 09:31:27 ) 09:31:27 elif isinstance(timeout, TimeoutSauce): 09:31:27 pass 09:31:27 else: 09:31:27 timeout = TimeoutSauce(connect=timeout, read=timeout) 09:31:27 09:31:27 try: 09:31:27 resp = conn.urlopen( 09:31:27 method=request.method, 09:31:27 url=url, 09:31:27 body=request.body, 09:31:27 headers=request.headers, 09:31:27 redirect=False, 09:31:27 assert_same_host=False, 09:31:27 preload_content=False, 09:31:27 decode_content=False, 09:31:27 retries=self.max_retries, 09:31:27 timeout=timeout, 09:31:27 chunked=chunked, 09:31:27 ) 09:31:27 09:31:27 except (ProtocolError, OSError) as err: 09:31:27 raise ConnectionError(err, request=request) 09:31:27 09:31:27 except MaxRetryError as e: 09:31:27 if isinstance(e.reason, ConnectTimeoutError): 09:31:27 # TODO: Remove this in 3.0.0: see #2811 09:31:27 if not isinstance(e.reason, NewConnectionError): 09:31:27 raise ConnectTimeout(e, request=request) 09:31:27 09:31:27 if isinstance(e.reason, ResponseError): 09:31:27 raise RetryError(e, request=request) 09:31:27 09:31:27 if isinstance(e.reason, _ProxyError): 09:31:27 raise ProxyError(e, request=request) 09:31:27 09:31:27 if isinstance(e.reason, _SSLError): 09:31:27 # This branch is for urllib3 v1.22 and later. 09:31:27 raise SSLError(e, request=request) 09:31:27 09:31:27 > raise ConnectionError(e, request=request) 09:31:27 E requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8184): Max retries exceeded with url: /rests/data/network-topology:network-topology/topology=topology-netconf/node=XPDR-A2?content=nonconfig (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/requests/adapters.py:700: ConnectionError 09:31:27 ----------------------------- Captured stdout call ----------------------------- 09:31:27 execution of test_02_xpdr_device_connected 09:31:27 _______ TransportPCE400GPortMappingTesting.test_03_xpdr_portmapping_info _______ 09:31:27 09:31:27 self = 09:31:27 09:31:27 def _new_conn(self) -> socket.socket: 09:31:27 """Establish a socket connection and set nodelay settings on it. 09:31:27 09:31:27 :return: New socket connection. 09:31:27 """ 09:31:27 try: 09:31:27 > sock = connection.create_connection( 09:31:27 (self._dns_host, self.port), 09:31:27 self.timeout, 09:31:27 source_address=self.source_address, 09:31:27 socket_options=self.socket_options, 09:31:27 ) 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connection.py:199: 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/util/connection.py:85: in create_connection 09:31:27 raise err 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 09:31:27 address = ('localhost', 8184), timeout = 10, source_address = None 09:31:27 socket_options = [(6, 1, 1)] 09:31:27 09:31:27 def create_connection( 09:31:27 address: tuple[str, int], 09:31:27 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 09:31:27 source_address: tuple[str, int] | None = None, 09:31:27 socket_options: _TYPE_SOCKET_OPTIONS | None = None, 09:31:27 ) -> socket.socket: 09:31:27 """Connect to *address* and return the socket object. 09:31:27 09:31:27 Convenience function. Connect to *address* (a 2-tuple ``(host, 09:31:27 port)``) and return the socket object. Passing the optional 09:31:27 *timeout* parameter will set the timeout on the socket instance 09:31:27 before attempting to connect. If no *timeout* is supplied, the 09:31:27 global default timeout setting returned by :func:`socket.getdefaulttimeout` 09:31:27 is used. If *source_address* is set it must be a tuple of (host, port) 09:31:27 for the socket to bind as a source address before making the connection. 09:31:27 An host of '' or port 0 tells the OS to use the default. 09:31:27 """ 09:31:27 09:31:27 host, port = address 09:31:27 if host.startswith("["): 09:31:27 host = host.strip("[]") 09:31:27 err = None 09:31:27 09:31:27 # Using the value from allowed_gai_family() in the context of getaddrinfo lets 09:31:27 # us select whether to work with IPv4 DNS records, IPv6 records, or both. 09:31:27 # The original create_connection function always returns all records. 09:31:27 family = allowed_gai_family() 09:31:27 09:31:27 try: 09:31:27 host.encode("idna") 09:31:27 except UnicodeError: 09:31:27 raise LocationParseError(f"'{host}', label empty or too long") from None 09:31:27 09:31:27 for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 09:31:27 af, socktype, proto, canonname, sa = res 09:31:27 sock = None 09:31:27 try: 09:31:27 sock = socket.socket(af, socktype, proto) 09:31:27 09:31:27 # If provided, set socket level options before connecting. 09:31:27 _set_socket_options(sock, socket_options) 09:31:27 09:31:27 if timeout is not _DEFAULT_TIMEOUT: 09:31:27 sock.settimeout(timeout) 09:31:27 if source_address: 09:31:27 sock.bind(source_address) 09:31:27 > sock.connect(sa) 09:31:27 E ConnectionRefusedError: [Errno 111] Connection refused 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/util/connection.py:73: ConnectionRefusedError 09:31:27 09:31:27 The above exception was the direct cause of the following exception: 09:31:27 09:31:27 self = 09:31:27 method = 'GET' 09:31:27 url = '/rests/data/transportpce-portmapping:network/nodes=XPDR-A2/node-info' 09:31:27 body = None 09:31:27 headers = {'User-Agent': 'python-requests/2.32.3', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'Connection': 'keep-alive', 'Content-Type': 'application/json', 'Authorization': 'Basic YWRtaW46YWRtaW4='} 09:31:27 retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 09:31:27 redirect = False, assert_same_host = False 09:31:27 timeout = Timeout(connect=10, read=10, total=None), pool_timeout = None 09:31:27 release_conn = False, chunked = False, body_pos = None, preload_content = False 09:31:27 decode_content = False, response_kw = {} 09:31:27 parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/rests/data/transportpce-portmapping:network/nodes=XPDR-A2/node-info', query=None, fragment=None) 09:31:27 destination_scheme = None, conn = None, release_this_conn = True 09:31:27 http_tunnel_required = False, err = None, clean_exit = False 09:31:27 09:31:27 def urlopen( # type: ignore[override] 09:31:27 self, 09:31:27 method: str, 09:31:27 url: str, 09:31:27 body: _TYPE_BODY | None = None, 09:31:27 headers: typing.Mapping[str, str] | None = None, 09:31:27 retries: Retry | bool | int | None = None, 09:31:27 redirect: bool = True, 09:31:27 assert_same_host: bool = True, 09:31:27 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 09:31:27 pool_timeout: int | None = None, 09:31:27 release_conn: bool | None = None, 09:31:27 chunked: bool = False, 09:31:27 body_pos: _TYPE_BODY_POSITION | None = None, 09:31:27 preload_content: bool = True, 09:31:27 decode_content: bool = True, 09:31:27 **response_kw: typing.Any, 09:31:27 ) -> BaseHTTPResponse: 09:31:27 """ 09:31:27 Get a connection from the pool and perform an HTTP request. This is the 09:31:27 lowest level call for making a request, so you'll need to specify all 09:31:27 the raw details. 09:31:27 09:31:27 .. note:: 09:31:27 09:31:27 More commonly, it's appropriate to use a convenience method 09:31:27 such as :meth:`request`. 09:31:27 09:31:27 .. note:: 09:31:27 09:31:27 `release_conn` will only behave as expected if 09:31:27 `preload_content=False` because we want to make 09:31:27 `preload_content=False` the default behaviour someday soon without 09:31:27 breaking backwards compatibility. 09:31:27 09:31:27 :param method: 09:31:27 HTTP request method (such as GET, POST, PUT, etc.) 09:31:27 09:31:27 :param url: 09:31:27 The URL to perform the request on. 09:31:27 09:31:27 :param body: 09:31:27 Data to send in the request body, either :class:`str`, :class:`bytes`, 09:31:27 an iterable of :class:`str`/:class:`bytes`, or a file-like object. 09:31:27 09:31:27 :param headers: 09:31:27 Dictionary of custom headers to send, such as User-Agent, 09:31:27 If-None-Match, etc. If None, pool headers are used. If provided, 09:31:27 these headers completely replace any pool-specific headers. 09:31:27 09:31:27 :param retries: 09:31:27 Configure the number of retries to allow before raising a 09:31:27 :class:`~urllib3.exceptions.MaxRetryError` exception. 09:31:27 09:31:27 If ``None`` (default) will retry 3 times, see ``Retry.DEFAULT``. Pass a 09:31:27 :class:`~urllib3.util.retry.Retry` object for fine-grained control 09:31:27 over different types of retries. 09:31:27 Pass an integer number to retry connection errors that many times, 09:31:27 but no other types of errors. Pass zero to never retry. 09:31:27 09:31:27 If ``False``, then retries are disabled and any exception is raised 09:31:27 immediately. Also, instead of raising a MaxRetryError on redirects, 09:31:27 the redirect response will be returned. 09:31:27 09:31:27 :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 09:31:27 09:31:27 :param redirect: 09:31:27 If True, automatically handle redirects (status codes 301, 302, 09:31:27 303, 307, 308). Each redirect counts as a retry. Disabling retries 09:31:27 will disable redirect, too. 09:31:27 09:31:27 :param assert_same_host: 09:31:27 If ``True``, will make sure that the host of the pool requests is 09:31:27 consistent else will raise HostChangedError. When ``False``, you can 09:31:27 use the pool on an HTTP proxy and request foreign hosts. 09:31:27 09:31:27 :param timeout: 09:31:27 If specified, overrides the default timeout for this one 09:31:27 request. It may be a float (in seconds) or an instance of 09:31:27 :class:`urllib3.util.Timeout`. 09:31:27 09:31:27 :param pool_timeout: 09:31:27 If set and the pool is set to block=True, then this method will 09:31:27 block for ``pool_timeout`` seconds and raise EmptyPoolError if no 09:31:27 connection is available within the time period. 09:31:27 09:31:27 :param bool preload_content: 09:31:27 If True, the response's body will be preloaded into memory. 09:31:27 09:31:27 :param bool decode_content: 09:31:27 If True, will attempt to decode the body based on the 09:31:27 'content-encoding' header. 09:31:27 09:31:27 :param release_conn: 09:31:27 If False, then the urlopen call will not release the connection 09:31:27 back into the pool once a response is received (but will release if 09:31:27 you read the entire contents of the response such as when 09:31:27 `preload_content=True`). This is useful if you're not preloading 09:31:27 the response's content immediately. You will need to call 09:31:27 ``r.release_conn()`` on the response ``r`` to return the connection 09:31:27 back into the pool. If None, it takes the value of ``preload_content`` 09:31:27 which defaults to ``True``. 09:31:27 09:31:27 :param bool chunked: 09:31:27 If True, urllib3 will send the body using chunked transfer 09:31:27 encoding. Otherwise, urllib3 will send the body using the standard 09:31:27 content-length form. Defaults to False. 09:31:27 09:31:27 :param int body_pos: 09:31:27 Position to seek to in file-like body in the event of a retry or 09:31:27 redirect. Typically this won't need to be set because urllib3 will 09:31:27 auto-populate the value when needed. 09:31:27 """ 09:31:27 parsed_url = parse_url(url) 09:31:27 destination_scheme = parsed_url.scheme 09:31:27 09:31:27 if headers is None: 09:31:27 headers = self.headers 09:31:27 09:31:27 if not isinstance(retries, Retry): 09:31:27 retries = Retry.from_int(retries, redirect=redirect, default=self.retries) 09:31:27 09:31:27 if release_conn is None: 09:31:27 release_conn = preload_content 09:31:27 09:31:27 # Check host 09:31:27 if assert_same_host and not self.is_same_host(url): 09:31:27 raise HostChangedError(self, url, retries) 09:31:27 09:31:27 # Ensure that the URL we're connecting to is properly encoded 09:31:27 if url.startswith("/"): 09:31:27 url = to_str(_encode_target(url)) 09:31:27 else: 09:31:27 url = to_str(parsed_url.url) 09:31:27 09:31:27 conn = None 09:31:27 09:31:27 # Track whether `conn` needs to be released before 09:31:27 # returning/raising/recursing. Update this variable if necessary, and 09:31:27 # leave `release_conn` constant throughout the function. That way, if 09:31:27 # the function recurses, the original value of `release_conn` will be 09:31:27 # passed down into the recursive call, and its value will be respected. 09:31:27 # 09:31:27 # See issue #651 [1] for details. 09:31:27 # 09:31:27 # [1] 09:31:27 release_this_conn = release_conn 09:31:27 09:31:27 http_tunnel_required = connection_requires_http_tunnel( 09:31:27 self.proxy, self.proxy_config, destination_scheme 09:31:27 ) 09:31:27 09:31:27 # Merge the proxy headers. Only done when not using HTTP CONNECT. We 09:31:27 # have to copy the headers dict so we can safely change it without those 09:31:27 # changes being reflected in anyone else's copy. 09:31:27 if not http_tunnel_required: 09:31:27 headers = headers.copy() # type: ignore[attr-defined] 09:31:27 headers.update(self.proxy_headers) # type: ignore[union-attr] 09:31:27 09:31:27 # Must keep the exception bound to a separate variable or else Python 3 09:31:27 # complains about UnboundLocalError. 09:31:27 err = None 09:31:27 09:31:27 # Keep track of whether we cleanly exited the except block. This 09:31:27 # ensures we do proper cleanup in finally. 09:31:27 clean_exit = False 09:31:27 09:31:27 # Rewind body position, if needed. Record current position 09:31:27 # for future rewinds in the event of a redirect/retry. 09:31:27 body_pos = set_file_position(body, body_pos) 09:31:27 09:31:27 try: 09:31:27 # Request a connection from the queue. 09:31:27 timeout_obj = self._get_timeout(timeout) 09:31:27 conn = self._get_conn(timeout=pool_timeout) 09:31:27 09:31:27 conn.timeout = timeout_obj.connect_timeout # type: ignore[assignment] 09:31:27 09:31:27 # Is this a closed/new connection that requires CONNECT tunnelling? 09:31:27 if self.proxy is not None and http_tunnel_required and conn.is_closed: 09:31:27 try: 09:31:27 self._prepare_proxy(conn) 09:31:27 except (BaseSSLError, OSError, SocketTimeout) as e: 09:31:27 self._raise_timeout( 09:31:27 err=e, url=self.proxy.url, timeout_value=conn.timeout 09:31:27 ) 09:31:27 raise 09:31:27 09:31:27 # If we're going to release the connection in ``finally:``, then 09:31:27 # the response doesn't need to know about the connection. Otherwise 09:31:27 # it will also try to release it and we'll have a double-release 09:31:27 # mess. 09:31:27 response_conn = conn if not release_conn else None 09:31:27 09:31:27 # Make the request on the HTTPConnection object 09:31:27 > response = self._make_request( 09:31:27 conn, 09:31:27 method, 09:31:27 url, 09:31:27 timeout=timeout_obj, 09:31:27 body=body, 09:31:27 headers=headers, 09:31:27 chunked=chunked, 09:31:27 retries=retries, 09:31:27 response_conn=response_conn, 09:31:27 preload_content=preload_content, 09:31:27 decode_content=decode_content, 09:31:27 **response_kw, 09:31:27 ) 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:789: 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:495: in _make_request 09:31:27 conn.request( 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connection.py:441: in request 09:31:27 self.endheaders() 09:31:27 /opt/pyenv/versions/3.11.7/lib/python3.11/http/client.py:1289: in endheaders 09:31:27 self._send_output(message_body, encode_chunked=encode_chunked) 09:31:27 /opt/pyenv/versions/3.11.7/lib/python3.11/http/client.py:1048: in _send_output 09:31:27 self.send(msg) 09:31:27 /opt/pyenv/versions/3.11.7/lib/python3.11/http/client.py:986: in send 09:31:27 self.connect() 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connection.py:279: in connect 09:31:27 self.sock = self._new_conn() 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 09:31:27 self = 09:31:27 09:31:27 def _new_conn(self) -> socket.socket: 09:31:27 """Establish a socket connection and set nodelay settings on it. 09:31:27 09:31:27 :return: New socket connection. 09:31:27 """ 09:31:27 try: 09:31:27 sock = connection.create_connection( 09:31:27 (self._dns_host, self.port), 09:31:27 self.timeout, 09:31:27 source_address=self.source_address, 09:31:27 socket_options=self.socket_options, 09:31:27 ) 09:31:27 except socket.gaierror as e: 09:31:27 raise NameResolutionError(self.host, self, e) from e 09:31:27 except SocketTimeout as e: 09:31:27 raise ConnectTimeoutError( 09:31:27 self, 09:31:27 f"Connection to {self.host} timed out. (connect timeout={self.timeout})", 09:31:27 ) from e 09:31:27 09:31:27 except OSError as e: 09:31:27 > raise NewConnectionError( 09:31:27 self, f"Failed to establish a new connection: {e}" 09:31:27 ) from e 09:31:27 E urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [Errno 111] Connection refused 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connection.py:214: NewConnectionError 09:31:27 09:31:27 The above exception was the direct cause of the following exception: 09:31:27 09:31:27 self = 09:31:27 request = , stream = False 09:31:27 timeout = Timeout(connect=10, read=10, total=None), verify = True, cert = None 09:31:27 proxies = OrderedDict() 09:31:27 09:31:27 def send( 09:31:27 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 09:31:27 ): 09:31:27 """Sends PreparedRequest object. Returns Response object. 09:31:27 09:31:27 :param request: The :class:`PreparedRequest ` being sent. 09:31:27 :param stream: (optional) Whether to stream the request content. 09:31:27 :param timeout: (optional) How long to wait for the server to send 09:31:27 data before giving up, as a float, or a :ref:`(connect timeout, 09:31:27 read timeout) ` tuple. 09:31:27 :type timeout: float or tuple or urllib3 Timeout object 09:31:27 :param verify: (optional) Either a boolean, in which case it controls whether 09:31:27 we verify the server's TLS certificate, or a string, in which case it 09:31:27 must be a path to a CA bundle to use 09:31:27 :param cert: (optional) Any user-provided SSL certificate to be trusted. 09:31:27 :param proxies: (optional) The proxies dictionary to apply to the request. 09:31:27 :rtype: requests.Response 09:31:27 """ 09:31:27 09:31:27 try: 09:31:27 conn = self.get_connection_with_tls_context( 09:31:27 request, verify, proxies=proxies, cert=cert 09:31:27 ) 09:31:27 except LocationValueError as e: 09:31:27 raise InvalidURL(e, request=request) 09:31:27 09:31:27 self.cert_verify(conn, request.url, verify, cert) 09:31:27 url = self.request_url(request, proxies) 09:31:27 self.add_headers( 09:31:27 request, 09:31:27 stream=stream, 09:31:27 timeout=timeout, 09:31:27 verify=verify, 09:31:27 cert=cert, 09:31:27 proxies=proxies, 09:31:27 ) 09:31:27 09:31:27 chunked = not (request.body is None or "Content-Length" in request.headers) 09:31:27 09:31:27 if isinstance(timeout, tuple): 09:31:27 try: 09:31:27 connect, read = timeout 09:31:27 timeout = TimeoutSauce(connect=connect, read=read) 09:31:27 except ValueError: 09:31:27 raise ValueError( 09:31:27 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 09:31:27 f"or a single float to set both timeouts to the same value." 09:31:27 ) 09:31:27 elif isinstance(timeout, TimeoutSauce): 09:31:27 pass 09:31:27 else: 09:31:27 timeout = TimeoutSauce(connect=timeout, read=timeout) 09:31:27 09:31:27 try: 09:31:27 > resp = conn.urlopen( 09:31:27 method=request.method, 09:31:27 url=url, 09:31:27 body=request.body, 09:31:27 headers=request.headers, 09:31:27 redirect=False, 09:31:27 assert_same_host=False, 09:31:27 preload_content=False, 09:31:27 decode_content=False, 09:31:27 retries=self.max_retries, 09:31:27 timeout=timeout, 09:31:27 chunked=chunked, 09:31:27 ) 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/requests/adapters.py:667: 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:843: in urlopen 09:31:27 retries = retries.increment( 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 09:31:27 self = Retry(total=0, connect=None, read=False, redirect=None, status=None) 09:31:27 method = 'GET' 09:31:27 url = '/rests/data/transportpce-portmapping:network/nodes=XPDR-A2/node-info' 09:31:27 response = None 09:31:27 error = NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused') 09:31:27 _pool = 09:31:27 _stacktrace = 09:31:27 09:31:27 def increment( 09:31:27 self, 09:31:27 method: str | None = None, 09:31:27 url: str | None = None, 09:31:27 response: BaseHTTPResponse | None = None, 09:31:27 error: Exception | None = None, 09:31:27 _pool: ConnectionPool | None = None, 09:31:27 _stacktrace: TracebackType | None = None, 09:31:27 ) -> Self: 09:31:27 """Return a new Retry object with incremented retry counters. 09:31:27 09:31:27 :param response: A response object, or None, if the server did not 09:31:27 return a response. 09:31:27 :type response: :class:`~urllib3.response.BaseHTTPResponse` 09:31:27 :param Exception error: An error encountered during the request, or 09:31:27 None if the response was received successfully. 09:31:27 09:31:27 :return: A new ``Retry`` object. 09:31:27 """ 09:31:27 if self.total is False and error: 09:31:27 # Disabled, indicate to re-raise the error. 09:31:27 raise reraise(type(error), error, _stacktrace) 09:31:27 09:31:27 total = self.total 09:31:27 if total is not None: 09:31:27 total -= 1 09:31:27 09:31:27 connect = self.connect 09:31:27 read = self.read 09:31:27 redirect = self.redirect 09:31:27 status_count = self.status 09:31:27 other = self.other 09:31:27 cause = "unknown" 09:31:27 status = None 09:31:27 redirect_location = None 09:31:27 09:31:27 if error and self._is_connection_error(error): 09:31:27 # Connect retry? 09:31:27 if connect is False: 09:31:27 raise reraise(type(error), error, _stacktrace) 09:31:27 elif connect is not None: 09:31:27 connect -= 1 09:31:27 09:31:27 elif error and self._is_read_error(error): 09:31:27 # Read retry? 09:31:27 if read is False or method is None or not self._is_method_retryable(method): 09:31:27 raise reraise(type(error), error, _stacktrace) 09:31:27 elif read is not None: 09:31:27 read -= 1 09:31:27 09:31:27 elif error: 09:31:27 # Other retry? 09:31:27 if other is not None: 09:31:27 other -= 1 09:31:27 09:31:27 elif response and response.get_redirect_location(): 09:31:27 # Redirect retry? 09:31:27 if redirect is not None: 09:31:27 redirect -= 1 09:31:27 cause = "too many redirects" 09:31:27 response_redirect_location = response.get_redirect_location() 09:31:27 if response_redirect_location: 09:31:27 redirect_location = response_redirect_location 09:31:27 status = response.status 09:31:27 09:31:27 else: 09:31:27 # Incrementing because of a server error like a 500 in 09:31:27 # status_forcelist and the given method is in the allowed_methods 09:31:27 cause = ResponseError.GENERIC_ERROR 09:31:27 if response and response.status: 09:31:27 if status_count is not None: 09:31:27 status_count -= 1 09:31:27 cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) 09:31:27 status = response.status 09:31:27 09:31:27 history = self.history + ( 09:31:27 RequestHistory(method, url, error, status, redirect_location), 09:31:27 ) 09:31:27 09:31:27 new_retry = self.new( 09:31:27 total=total, 09:31:27 connect=connect, 09:31:27 read=read, 09:31:27 redirect=redirect, 09:31:27 status=status_count, 09:31:27 other=other, 09:31:27 history=history, 09:31:27 ) 09:31:27 09:31:27 if new_retry.is_exhausted(): 09:31:27 reason = error or ResponseError(cause) 09:31:27 > raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] 09:31:27 E urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8184): Max retries exceeded with url: /rests/data/transportpce-portmapping:network/nodes=XPDR-A2/node-info (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/util/retry.py:519: MaxRetryError 09:31:27 09:31:27 During handling of the above exception, another exception occurred: 09:31:27 09:31:27 self = 09:31:27 09:31:27 def test_03_xpdr_portmapping_info(self): 09:31:27 > response = test_utils.get_portmapping_node_attr("XPDR-A2", "node-info", None) 09:31:27 09:31:27 transportpce_tests/7.1/test01_portmapping.py:61: 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 transportpce_tests/common/test_utils.py:470: in get_portmapping_node_attr 09:31:27 response = get_request(target_url) 09:31:27 transportpce_tests/common/test_utils.py:116: in get_request 09:31:27 return requests.request( 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/requests/api.py:59: in request 09:31:27 return session.request(method=method, url=url, **kwargs) 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/requests/sessions.py:589: in request 09:31:27 resp = self.send(prep, **send_kwargs) 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/requests/sessions.py:703: in send 09:31:27 r = adapter.send(request, **kwargs) 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 09:31:27 self = 09:31:27 request = , stream = False 09:31:27 timeout = Timeout(connect=10, read=10, total=None), verify = True, cert = None 09:31:27 proxies = OrderedDict() 09:31:27 09:31:27 def send( 09:31:27 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 09:31:27 ): 09:31:27 """Sends PreparedRequest object. Returns Response object. 09:31:27 09:31:27 :param request: The :class:`PreparedRequest ` being sent. 09:31:27 :param stream: (optional) Whether to stream the request content. 09:31:27 :param timeout: (optional) How long to wait for the server to send 09:31:27 data before giving up, as a float, or a :ref:`(connect timeout, 09:31:27 read timeout) ` tuple. 09:31:27 :type timeout: float or tuple or urllib3 Timeout object 09:31:27 :param verify: (optional) Either a boolean, in which case it controls whether 09:31:27 we verify the server's TLS certificate, or a string, in which case it 09:31:27 must be a path to a CA bundle to use 09:31:27 :param cert: (optional) Any user-provided SSL certificate to be trusted. 09:31:27 :param proxies: (optional) The proxies dictionary to apply to the request. 09:31:27 :rtype: requests.Response 09:31:27 """ 09:31:27 09:31:27 try: 09:31:27 conn = self.get_connection_with_tls_context( 09:31:27 request, verify, proxies=proxies, cert=cert 09:31:27 ) 09:31:27 except LocationValueError as e: 09:31:27 raise InvalidURL(e, request=request) 09:31:27 09:31:27 self.cert_verify(conn, request.url, verify, cert) 09:31:27 url = self.request_url(request, proxies) 09:31:27 self.add_headers( 09:31:27 request, 09:31:27 stream=stream, 09:31:27 timeout=timeout, 09:31:27 verify=verify, 09:31:27 cert=cert, 09:31:27 proxies=proxies, 09:31:27 ) 09:31:27 09:31:27 chunked = not (request.body is None or "Content-Length" in request.headers) 09:31:27 09:31:27 if isinstance(timeout, tuple): 09:31:27 try: 09:31:27 connect, read = timeout 09:31:27 timeout = TimeoutSauce(connect=connect, read=read) 09:31:27 except ValueError: 09:31:27 raise ValueError( 09:31:27 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 09:31:27 f"or a single float to set both timeouts to the same value." 09:31:27 ) 09:31:27 elif isinstance(timeout, TimeoutSauce): 09:31:27 pass 09:31:27 else: 09:31:27 timeout = TimeoutSauce(connect=timeout, read=timeout) 09:31:27 09:31:27 try: 09:31:27 resp = conn.urlopen( 09:31:27 method=request.method, 09:31:27 url=url, 09:31:27 body=request.body, 09:31:27 headers=request.headers, 09:31:27 redirect=False, 09:31:27 assert_same_host=False, 09:31:27 preload_content=False, 09:31:27 decode_content=False, 09:31:27 retries=self.max_retries, 09:31:27 timeout=timeout, 09:31:27 chunked=chunked, 09:31:27 ) 09:31:27 09:31:27 except (ProtocolError, OSError) as err: 09:31:27 raise ConnectionError(err, request=request) 09:31:27 09:31:27 except MaxRetryError as e: 09:31:27 if isinstance(e.reason, ConnectTimeoutError): 09:31:27 # TODO: Remove this in 3.0.0: see #2811 09:31:27 if not isinstance(e.reason, NewConnectionError): 09:31:27 raise ConnectTimeout(e, request=request) 09:31:27 09:31:27 if isinstance(e.reason, ResponseError): 09:31:27 raise RetryError(e, request=request) 09:31:27 09:31:27 if isinstance(e.reason, _ProxyError): 09:31:27 raise ProxyError(e, request=request) 09:31:27 09:31:27 if isinstance(e.reason, _SSLError): 09:31:27 # This branch is for urllib3 v1.22 and later. 09:31:27 raise SSLError(e, request=request) 09:31:27 09:31:27 > raise ConnectionError(e, request=request) 09:31:27 E requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8184): Max retries exceeded with url: /rests/data/transportpce-portmapping:network/nodes=XPDR-A2/node-info (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/requests/adapters.py:700: ConnectionError 09:31:27 ----------------------------- Captured stdout call ----------------------------- 09:31:27 execution of test_03_xpdr_portmapping_info 09:31:27 _____ TransportPCE400GPortMappingTesting.test_04_tpdr_portmapping_NETWORK1 _____ 09:31:27 09:31:27 self = 09:31:27 09:31:27 def _new_conn(self) -> socket.socket: 09:31:27 """Establish a socket connection and set nodelay settings on it. 09:31:27 09:31:27 :return: New socket connection. 09:31:27 """ 09:31:27 try: 09:31:27 > sock = connection.create_connection( 09:31:27 (self._dns_host, self.port), 09:31:27 self.timeout, 09:31:27 source_address=self.source_address, 09:31:27 socket_options=self.socket_options, 09:31:27 ) 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connection.py:199: 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/util/connection.py:85: in create_connection 09:31:27 raise err 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 09:31:27 address = ('localhost', 8184), timeout = 10, source_address = None 09:31:27 socket_options = [(6, 1, 1)] 09:31:27 09:31:27 def create_connection( 09:31:27 address: tuple[str, int], 09:31:27 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 09:31:27 source_address: tuple[str, int] | None = None, 09:31:27 socket_options: _TYPE_SOCKET_OPTIONS | None = None, 09:31:27 ) -> socket.socket: 09:31:27 """Connect to *address* and return the socket object. 09:31:27 09:31:27 Convenience function. Connect to *address* (a 2-tuple ``(host, 09:31:27 port)``) and return the socket object. Passing the optional 09:31:27 *timeout* parameter will set the timeout on the socket instance 09:31:27 before attempting to connect. If no *timeout* is supplied, the 09:31:27 global default timeout setting returned by :func:`socket.getdefaulttimeout` 09:31:27 is used. If *source_address* is set it must be a tuple of (host, port) 09:31:27 for the socket to bind as a source address before making the connection. 09:31:27 An host of '' or port 0 tells the OS to use the default. 09:31:27 """ 09:31:27 09:31:27 host, port = address 09:31:27 if host.startswith("["): 09:31:27 host = host.strip("[]") 09:31:27 err = None 09:31:27 09:31:27 # Using the value from allowed_gai_family() in the context of getaddrinfo lets 09:31:27 # us select whether to work with IPv4 DNS records, IPv6 records, or both. 09:31:27 # The original create_connection function always returns all records. 09:31:27 family = allowed_gai_family() 09:31:27 09:31:27 try: 09:31:27 host.encode("idna") 09:31:27 except UnicodeError: 09:31:27 raise LocationParseError(f"'{host}', label empty or too long") from None 09:31:27 09:31:27 for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 09:31:27 af, socktype, proto, canonname, sa = res 09:31:27 sock = None 09:31:27 try: 09:31:27 sock = socket.socket(af, socktype, proto) 09:31:27 09:31:27 # If provided, set socket level options before connecting. 09:31:27 _set_socket_options(sock, socket_options) 09:31:27 09:31:27 if timeout is not _DEFAULT_TIMEOUT: 09:31:27 sock.settimeout(timeout) 09:31:27 if source_address: 09:31:27 sock.bind(source_address) 09:31:27 > sock.connect(sa) 09:31:27 E ConnectionRefusedError: [Errno 111] Connection refused 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/util/connection.py:73: ConnectionRefusedError 09:31:27 09:31:27 The above exception was the direct cause of the following exception: 09:31:27 09:31:27 self = 09:31:27 method = 'GET' 09:31:27 url = '/rests/data/transportpce-portmapping:network/nodes=XPDR-A2/mapping=XPDR1-NETWORK1' 09:31:27 body = None 09:31:27 headers = {'User-Agent': 'python-requests/2.32.3', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'Connection': 'keep-alive', 'Content-Type': 'application/json', 'Authorization': 'Basic YWRtaW46YWRtaW4='} 09:31:27 retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 09:31:27 redirect = False, assert_same_host = False 09:31:27 timeout = Timeout(connect=10, read=10, total=None), pool_timeout = None 09:31:27 release_conn = False, chunked = False, body_pos = None, preload_content = False 09:31:27 decode_content = False, response_kw = {} 09:31:27 parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/rests/data/transportpce-portmapping:network/nodes=XPDR-A2/mapping=XPDR1-NETWORK1', query=None, fragment=None) 09:31:27 destination_scheme = None, conn = None, release_this_conn = True 09:31:27 http_tunnel_required = False, err = None, clean_exit = False 09:31:27 09:31:27 def urlopen( # type: ignore[override] 09:31:27 self, 09:31:27 method: str, 09:31:27 url: str, 09:31:27 body: _TYPE_BODY | None = None, 09:31:27 headers: typing.Mapping[str, str] | None = None, 09:31:27 retries: Retry | bool | int | None = None, 09:31:27 redirect: bool = True, 09:31:27 assert_same_host: bool = True, 09:31:27 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 09:31:27 pool_timeout: int | None = None, 09:31:27 release_conn: bool | None = None, 09:31:27 chunked: bool = False, 09:31:27 body_pos: _TYPE_BODY_POSITION | None = None, 09:31:27 preload_content: bool = True, 09:31:27 decode_content: bool = True, 09:31:27 **response_kw: typing.Any, 09:31:27 ) -> BaseHTTPResponse: 09:31:27 """ 09:31:27 Get a connection from the pool and perform an HTTP request. This is the 09:31:27 lowest level call for making a request, so you'll need to specify all 09:31:27 the raw details. 09:31:27 09:31:27 .. note:: 09:31:27 09:31:27 More commonly, it's appropriate to use a convenience method 09:31:27 such as :meth:`request`. 09:31:27 09:31:27 .. note:: 09:31:27 09:31:27 `release_conn` will only behave as expected if 09:31:27 `preload_content=False` because we want to make 09:31:27 `preload_content=False` the default behaviour someday soon without 09:31:27 breaking backwards compatibility. 09:31:27 09:31:27 :param method: 09:31:27 HTTP request method (such as GET, POST, PUT, etc.) 09:31:27 09:31:27 :param url: 09:31:27 The URL to perform the request on. 09:31:27 09:31:27 :param body: 09:31:27 Data to send in the request body, either :class:`str`, :class:`bytes`, 09:31:27 an iterable of :class:`str`/:class:`bytes`, or a file-like object. 09:31:27 09:31:27 :param headers: 09:31:27 Dictionary of custom headers to send, such as User-Agent, 09:31:27 If-None-Match, etc. If None, pool headers are used. If provided, 09:31:27 these headers completely replace any pool-specific headers. 09:31:27 09:31:27 :param retries: 09:31:27 Configure the number of retries to allow before raising a 09:31:27 :class:`~urllib3.exceptions.MaxRetryError` exception. 09:31:27 09:31:27 If ``None`` (default) will retry 3 times, see ``Retry.DEFAULT``. Pass a 09:31:27 :class:`~urllib3.util.retry.Retry` object for fine-grained control 09:31:27 over different types of retries. 09:31:27 Pass an integer number to retry connection errors that many times, 09:31:27 but no other types of errors. Pass zero to never retry. 09:31:27 09:31:27 If ``False``, then retries are disabled and any exception is raised 09:31:27 immediately. Also, instead of raising a MaxRetryError on redirects, 09:31:27 the redirect response will be returned. 09:31:27 09:31:27 :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 09:31:27 09:31:27 :param redirect: 09:31:27 If True, automatically handle redirects (status codes 301, 302, 09:31:27 303, 307, 308). Each redirect counts as a retry. Disabling retries 09:31:27 will disable redirect, too. 09:31:27 09:31:27 :param assert_same_host: 09:31:27 If ``True``, will make sure that the host of the pool requests is 09:31:27 consistent else will raise HostChangedError. When ``False``, you can 09:31:27 use the pool on an HTTP proxy and request foreign hosts. 09:31:27 09:31:27 :param timeout: 09:31:27 If specified, overrides the default timeout for this one 09:31:27 request. It may be a float (in seconds) or an instance of 09:31:27 :class:`urllib3.util.Timeout`. 09:31:27 09:31:27 :param pool_timeout: 09:31:27 If set and the pool is set to block=True, then this method will 09:31:27 block for ``pool_timeout`` seconds and raise EmptyPoolError if no 09:31:27 connection is available within the time period. 09:31:27 09:31:27 :param bool preload_content: 09:31:27 If True, the response's body will be preloaded into memory. 09:31:27 09:31:27 :param bool decode_content: 09:31:27 If True, will attempt to decode the body based on the 09:31:27 'content-encoding' header. 09:31:27 09:31:27 :param release_conn: 09:31:27 If False, then the urlopen call will not release the connection 09:31:27 back into the pool once a response is received (but will release if 09:31:27 you read the entire contents of the response such as when 09:31:27 `preload_content=True`). This is useful if you're not preloading 09:31:27 the response's content immediately. You will need to call 09:31:27 ``r.release_conn()`` on the response ``r`` to return the connection 09:31:27 back into the pool. If None, it takes the value of ``preload_content`` 09:31:27 which defaults to ``True``. 09:31:27 09:31:27 :param bool chunked: 09:31:27 If True, urllib3 will send the body using chunked transfer 09:31:27 encoding. Otherwise, urllib3 will send the body using the standard 09:31:27 content-length form. Defaults to False. 09:31:27 09:31:27 :param int body_pos: 09:31:27 Position to seek to in file-like body in the event of a retry or 09:31:27 redirect. Typically this won't need to be set because urllib3 will 09:31:27 auto-populate the value when needed. 09:31:27 """ 09:31:27 parsed_url = parse_url(url) 09:31:27 destination_scheme = parsed_url.scheme 09:31:27 09:31:27 if headers is None: 09:31:27 headers = self.headers 09:31:27 09:31:27 if not isinstance(retries, Retry): 09:31:27 retries = Retry.from_int(retries, redirect=redirect, default=self.retries) 09:31:27 09:31:27 if release_conn is None: 09:31:27 release_conn = preload_content 09:31:27 09:31:27 # Check host 09:31:27 if assert_same_host and not self.is_same_host(url): 09:31:27 raise HostChangedError(self, url, retries) 09:31:27 09:31:27 # Ensure that the URL we're connecting to is properly encoded 09:31:27 if url.startswith("/"): 09:31:27 url = to_str(_encode_target(url)) 09:31:27 else: 09:31:27 url = to_str(parsed_url.url) 09:31:27 09:31:27 conn = None 09:31:27 09:31:27 # Track whether `conn` needs to be released before 09:31:27 # returning/raising/recursing. Update this variable if necessary, and 09:31:27 # leave `release_conn` constant throughout the function. That way, if 09:31:27 # the function recurses, the original value of `release_conn` will be 09:31:27 # passed down into the recursive call, and its value will be respected. 09:31:27 # 09:31:27 # See issue #651 [1] for details. 09:31:27 # 09:31:27 # [1] 09:31:27 release_this_conn = release_conn 09:31:27 09:31:27 http_tunnel_required = connection_requires_http_tunnel( 09:31:27 self.proxy, self.proxy_config, destination_scheme 09:31:27 ) 09:31:27 09:31:27 # Merge the proxy headers. Only done when not using HTTP CONNECT. We 09:31:27 # have to copy the headers dict so we can safely change it without those 09:31:27 # changes being reflected in anyone else's copy. 09:31:27 if not http_tunnel_required: 09:31:27 headers = headers.copy() # type: ignore[attr-defined] 09:31:27 headers.update(self.proxy_headers) # type: ignore[union-attr] 09:31:27 09:31:27 # Must keep the exception bound to a separate variable or else Python 3 09:31:27 # complains about UnboundLocalError. 09:31:27 err = None 09:31:27 09:31:27 # Keep track of whether we cleanly exited the except block. This 09:31:27 # ensures we do proper cleanup in finally. 09:31:27 clean_exit = False 09:31:27 09:31:27 # Rewind body position, if needed. Record current position 09:31:27 # for future rewinds in the event of a redirect/retry. 09:31:27 body_pos = set_file_position(body, body_pos) 09:31:27 09:31:27 try: 09:31:27 # Request a connection from the queue. 09:31:27 timeout_obj = self._get_timeout(timeout) 09:31:27 conn = self._get_conn(timeout=pool_timeout) 09:31:27 09:31:27 conn.timeout = timeout_obj.connect_timeout # type: ignore[assignment] 09:31:27 09:31:27 # Is this a closed/new connection that requires CONNECT tunnelling? 09:31:27 if self.proxy is not None and http_tunnel_required and conn.is_closed: 09:31:27 try: 09:31:27 self._prepare_proxy(conn) 09:31:27 except (BaseSSLError, OSError, SocketTimeout) as e: 09:31:27 self._raise_timeout( 09:31:27 err=e, url=self.proxy.url, timeout_value=conn.timeout 09:31:27 ) 09:31:27 raise 09:31:27 09:31:27 # If we're going to release the connection in ``finally:``, then 09:31:27 # the response doesn't need to know about the connection. Otherwise 09:31:27 # it will also try to release it and we'll have a double-release 09:31:27 # mess. 09:31:27 response_conn = conn if not release_conn else None 09:31:27 09:31:27 # Make the request on the HTTPConnection object 09:31:27 > response = self._make_request( 09:31:27 conn, 09:31:27 method, 09:31:27 url, 09:31:27 timeout=timeout_obj, 09:31:27 body=body, 09:31:27 headers=headers, 09:31:27 chunked=chunked, 09:31:27 retries=retries, 09:31:27 response_conn=response_conn, 09:31:27 preload_content=preload_content, 09:31:27 decode_content=decode_content, 09:31:27 **response_kw, 09:31:27 ) 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:789: 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:495: in _make_request 09:31:27 conn.request( 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connection.py:441: in request 09:31:27 self.endheaders() 09:31:27 /opt/pyenv/versions/3.11.7/lib/python3.11/http/client.py:1289: in endheaders 09:31:27 self._send_output(message_body, encode_chunked=encode_chunked) 09:31:27 /opt/pyenv/versions/3.11.7/lib/python3.11/http/client.py:1048: in _send_output 09:31:27 self.send(msg) 09:31:27 /opt/pyenv/versions/3.11.7/lib/python3.11/http/client.py:986: in send 09:31:27 self.connect() 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connection.py:279: in connect 09:31:27 self.sock = self._new_conn() 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 09:31:27 self = 09:31:27 09:31:27 def _new_conn(self) -> socket.socket: 09:31:27 """Establish a socket connection and set nodelay settings on it. 09:31:27 09:31:27 :return: New socket connection. 09:31:27 """ 09:31:27 try: 09:31:27 sock = connection.create_connection( 09:31:27 (self._dns_host, self.port), 09:31:27 self.timeout, 09:31:27 source_address=self.source_address, 09:31:27 socket_options=self.socket_options, 09:31:27 ) 09:31:27 except socket.gaierror as e: 09:31:27 raise NameResolutionError(self.host, self, e) from e 09:31:27 except SocketTimeout as e: 09:31:27 raise ConnectTimeoutError( 09:31:27 self, 09:31:27 f"Connection to {self.host} timed out. (connect timeout={self.timeout})", 09:31:27 ) from e 09:31:27 09:31:27 except OSError as e: 09:31:27 > raise NewConnectionError( 09:31:27 self, f"Failed to establish a new connection: {e}" 09:31:27 ) from e 09:31:27 E urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [Errno 111] Connection refused 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connection.py:214: NewConnectionError 09:31:27 09:31:27 The above exception was the direct cause of the following exception: 09:31:27 09:31:27 self = 09:31:27 request = , stream = False 09:31:27 timeout = Timeout(connect=10, read=10, total=None), verify = True, cert = None 09:31:27 proxies = OrderedDict() 09:31:27 09:31:27 def send( 09:31:27 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 09:31:27 ): 09:31:27 """Sends PreparedRequest object. Returns Response object. 09:31:27 09:31:27 :param request: The :class:`PreparedRequest ` being sent. 09:31:27 :param stream: (optional) Whether to stream the request content. 09:31:27 :param timeout: (optional) How long to wait for the server to send 09:31:27 data before giving up, as a float, or a :ref:`(connect timeout, 09:31:27 read timeout) ` tuple. 09:31:27 :type timeout: float or tuple or urllib3 Timeout object 09:31:27 :param verify: (optional) Either a boolean, in which case it controls whether 09:31:27 we verify the server's TLS certificate, or a string, in which case it 09:31:27 must be a path to a CA bundle to use 09:31:27 :param cert: (optional) Any user-provided SSL certificate to be trusted. 09:31:27 :param proxies: (optional) The proxies dictionary to apply to the request. 09:31:27 :rtype: requests.Response 09:31:27 """ 09:31:27 09:31:27 try: 09:31:27 conn = self.get_connection_with_tls_context( 09:31:27 request, verify, proxies=proxies, cert=cert 09:31:27 ) 09:31:27 except LocationValueError as e: 09:31:27 raise InvalidURL(e, request=request) 09:31:27 09:31:27 self.cert_verify(conn, request.url, verify, cert) 09:31:27 url = self.request_url(request, proxies) 09:31:27 self.add_headers( 09:31:27 request, 09:31:27 stream=stream, 09:31:27 timeout=timeout, 09:31:27 verify=verify, 09:31:27 cert=cert, 09:31:27 proxies=proxies, 09:31:27 ) 09:31:27 09:31:27 chunked = not (request.body is None or "Content-Length" in request.headers) 09:31:27 09:31:27 if isinstance(timeout, tuple): 09:31:27 try: 09:31:27 connect, read = timeout 09:31:27 timeout = TimeoutSauce(connect=connect, read=read) 09:31:27 except ValueError: 09:31:27 raise ValueError( 09:31:27 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 09:31:27 f"or a single float to set both timeouts to the same value." 09:31:27 ) 09:31:27 elif isinstance(timeout, TimeoutSauce): 09:31:27 pass 09:31:27 else: 09:31:27 timeout = TimeoutSauce(connect=timeout, read=timeout) 09:31:27 09:31:27 try: 09:31:27 > resp = conn.urlopen( 09:31:27 method=request.method, 09:31:27 url=url, 09:31:27 body=request.body, 09:31:27 headers=request.headers, 09:31:27 redirect=False, 09:31:27 assert_same_host=False, 09:31:27 preload_content=False, 09:31:27 decode_content=False, 09:31:27 retries=self.max_retries, 09:31:27 timeout=timeout, 09:31:27 chunked=chunked, 09:31:27 ) 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/requests/adapters.py:667: 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:843: in urlopen 09:31:27 retries = retries.increment( 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 09:31:27 self = Retry(total=0, connect=None, read=False, redirect=None, status=None) 09:31:27 method = 'GET' 09:31:27 url = '/rests/data/transportpce-portmapping:network/nodes=XPDR-A2/mapping=XPDR1-NETWORK1' 09:31:27 response = None 09:31:27 error = NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused') 09:31:27 _pool = 09:31:27 _stacktrace = 09:31:27 09:31:27 def increment( 09:31:27 self, 09:31:27 method: str | None = None, 09:31:27 url: str | None = None, 09:31:27 response: BaseHTTPResponse | None = None, 09:31:27 error: Exception | None = None, 09:31:27 _pool: ConnectionPool | None = None, 09:31:27 _stacktrace: TracebackType | None = None, 09:31:27 ) -> Self: 09:31:27 """Return a new Retry object with incremented retry counters. 09:31:27 09:31:27 :param response: A response object, or None, if the server did not 09:31:27 return a response. 09:31:27 :type response: :class:`~urllib3.response.BaseHTTPResponse` 09:31:27 :param Exception error: An error encountered during the request, or 09:31:27 None if the response was received successfully. 09:31:27 09:31:27 :return: A new ``Retry`` object. 09:31:27 """ 09:31:27 if self.total is False and error: 09:31:27 # Disabled, indicate to re-raise the error. 09:31:27 raise reraise(type(error), error, _stacktrace) 09:31:27 09:31:27 total = self.total 09:31:27 if total is not None: 09:31:27 total -= 1 09:31:27 09:31:27 connect = self.connect 09:31:27 read = self.read 09:31:27 redirect = self.redirect 09:31:27 status_count = self.status 09:31:27 other = self.other 09:31:27 cause = "unknown" 09:31:27 status = None 09:31:27 redirect_location = None 09:31:27 09:31:27 if error and self._is_connection_error(error): 09:31:27 # Connect retry? 09:31:27 if connect is False: 09:31:27 raise reraise(type(error), error, _stacktrace) 09:31:27 elif connect is not None: 09:31:27 connect -= 1 09:31:27 09:31:27 elif error and self._is_read_error(error): 09:31:27 # Read retry? 09:31:27 if read is False or method is None or not self._is_method_retryable(method): 09:31:27 raise reraise(type(error), error, _stacktrace) 09:31:27 elif read is not None: 09:31:27 read -= 1 09:31:27 09:31:27 elif error: 09:31:27 # Other retry? 09:31:27 if other is not None: 09:31:27 other -= 1 09:31:27 09:31:27 elif response and response.get_redirect_location(): 09:31:27 # Redirect retry? 09:31:27 if redirect is not None: 09:31:27 redirect -= 1 09:31:27 cause = "too many redirects" 09:31:27 response_redirect_location = response.get_redirect_location() 09:31:27 if response_redirect_location: 09:31:27 redirect_location = response_redirect_location 09:31:27 status = response.status 09:31:27 09:31:27 else: 09:31:27 # Incrementing because of a server error like a 500 in 09:31:27 # status_forcelist and the given method is in the allowed_methods 09:31:27 cause = ResponseError.GENERIC_ERROR 09:31:27 if response and response.status: 09:31:27 if status_count is not None: 09:31:27 status_count -= 1 09:31:27 cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) 09:31:27 status = response.status 09:31:27 09:31:27 history = self.history + ( 09:31:27 RequestHistory(method, url, error, status, redirect_location), 09:31:27 ) 09:31:27 09:31:27 new_retry = self.new( 09:31:27 total=total, 09:31:27 connect=connect, 09:31:27 read=read, 09:31:27 redirect=redirect, 09:31:27 status=status_count, 09:31:27 other=other, 09:31:27 history=history, 09:31:27 ) 09:31:27 09:31:27 if new_retry.is_exhausted(): 09:31:27 reason = error or ResponseError(cause) 09:31:27 > raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] 09:31:27 E urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8184): Max retries exceeded with url: /rests/data/transportpce-portmapping:network/nodes=XPDR-A2/mapping=XPDR1-NETWORK1 (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/util/retry.py:519: MaxRetryError 09:31:27 09:31:27 During handling of the above exception, another exception occurred: 09:31:27 09:31:27 self = 09:31:27 09:31:27 def test_04_tpdr_portmapping_NETWORK1(self): 09:31:27 > response = test_utils.get_portmapping_node_attr("XPDR-A2", "mapping", "XPDR1-NETWORK1") 09:31:27 09:31:27 transportpce_tests/7.1/test01_portmapping.py:74: 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 transportpce_tests/common/test_utils.py:470: in get_portmapping_node_attr 09:31:27 response = get_request(target_url) 09:31:27 transportpce_tests/common/test_utils.py:116: in get_request 09:31:27 return requests.request( 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/requests/api.py:59: in request 09:31:27 return session.request(method=method, url=url, **kwargs) 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/requests/sessions.py:589: in request 09:31:27 resp = self.send(prep, **send_kwargs) 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/requests/sessions.py:703: in send 09:31:27 r = adapter.send(request, **kwargs) 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 09:31:27 self = 09:31:27 request = , stream = False 09:31:27 timeout = Timeout(connect=10, read=10, total=None), verify = True, cert = None 09:31:27 proxies = OrderedDict() 09:31:27 09:31:27 def send( 09:31:27 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 09:31:27 ): 09:31:27 """Sends PreparedRequest object. Returns Response object. 09:31:27 09:31:27 :param request: The :class:`PreparedRequest ` being sent. 09:31:27 :param stream: (optional) Whether to stream the request content. 09:31:27 :param timeout: (optional) How long to wait for the server to send 09:31:27 data before giving up, as a float, or a :ref:`(connect timeout, 09:31:27 read timeout) ` tuple. 09:31:27 :type timeout: float or tuple or urllib3 Timeout object 09:31:27 :param verify: (optional) Either a boolean, in which case it controls whether 09:31:27 we verify the server's TLS certificate, or a string, in which case it 09:31:27 must be a path to a CA bundle to use 09:31:27 :param cert: (optional) Any user-provided SSL certificate to be trusted. 09:31:27 :param proxies: (optional) The proxies dictionary to apply to the request. 09:31:27 :rtype: requests.Response 09:31:27 """ 09:31:27 09:31:27 try: 09:31:27 conn = self.get_connection_with_tls_context( 09:31:27 request, verify, proxies=proxies, cert=cert 09:31:27 ) 09:31:27 except LocationValueError as e: 09:31:27 raise InvalidURL(e, request=request) 09:31:27 09:31:27 self.cert_verify(conn, request.url, verify, cert) 09:31:27 url = self.request_url(request, proxies) 09:31:27 self.add_headers( 09:31:27 request, 09:31:27 stream=stream, 09:31:27 timeout=timeout, 09:31:27 verify=verify, 09:31:27 cert=cert, 09:31:27 proxies=proxies, 09:31:27 ) 09:31:27 09:31:27 chunked = not (request.body is None or "Content-Length" in request.headers) 09:31:27 09:31:27 if isinstance(timeout, tuple): 09:31:27 try: 09:31:27 connect, read = timeout 09:31:27 timeout = TimeoutSauce(connect=connect, read=read) 09:31:27 except ValueError: 09:31:27 raise ValueError( 09:31:27 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 09:31:27 f"or a single float to set both timeouts to the same value." 09:31:27 ) 09:31:27 elif isinstance(timeout, TimeoutSauce): 09:31:27 pass 09:31:27 else: 09:31:27 timeout = TimeoutSauce(connect=timeout, read=timeout) 09:31:27 09:31:27 try: 09:31:27 resp = conn.urlopen( 09:31:27 method=request.method, 09:31:27 url=url, 09:31:27 body=request.body, 09:31:27 headers=request.headers, 09:31:27 redirect=False, 09:31:27 assert_same_host=False, 09:31:27 preload_content=False, 09:31:27 decode_content=False, 09:31:27 retries=self.max_retries, 09:31:27 timeout=timeout, 09:31:27 chunked=chunked, 09:31:27 ) 09:31:27 09:31:27 except (ProtocolError, OSError) as err: 09:31:27 raise ConnectionError(err, request=request) 09:31:27 09:31:27 except MaxRetryError as e: 09:31:27 if isinstance(e.reason, ConnectTimeoutError): 09:31:27 # TODO: Remove this in 3.0.0: see #2811 09:31:27 if not isinstance(e.reason, NewConnectionError): 09:31:27 raise ConnectTimeout(e, request=request) 09:31:27 09:31:27 if isinstance(e.reason, ResponseError): 09:31:27 raise RetryError(e, request=request) 09:31:27 09:31:27 if isinstance(e.reason, _ProxyError): 09:31:27 raise ProxyError(e, request=request) 09:31:27 09:31:27 if isinstance(e.reason, _SSLError): 09:31:27 # This branch is for urllib3 v1.22 and later. 09:31:27 raise SSLError(e, request=request) 09:31:27 09:31:27 > raise ConnectionError(e, request=request) 09:31:27 E requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8184): Max retries exceeded with url: /rests/data/transportpce-portmapping:network/nodes=XPDR-A2/mapping=XPDR1-NETWORK1 (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/requests/adapters.py:700: ConnectionError 09:31:27 ----------------------------- Captured stdout call ----------------------------- 09:31:27 execution of test_04_tpdr_portmapping_NETWORK1 09:31:27 _____ TransportPCE400GPortMappingTesting.test_05_tpdr_portmapping_CLIENT1 ______ 09:31:27 09:31:27 self = 09:31:27 09:31:27 def _new_conn(self) -> socket.socket: 09:31:27 """Establish a socket connection and set nodelay settings on it. 09:31:27 09:31:27 :return: New socket connection. 09:31:27 """ 09:31:27 try: 09:31:27 > sock = connection.create_connection( 09:31:27 (self._dns_host, self.port), 09:31:27 self.timeout, 09:31:27 source_address=self.source_address, 09:31:27 socket_options=self.socket_options, 09:31:27 ) 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connection.py:199: 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/util/connection.py:85: in create_connection 09:31:27 raise err 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 09:31:27 address = ('localhost', 8184), timeout = 10, source_address = None 09:31:27 socket_options = [(6, 1, 1)] 09:31:27 09:31:27 def create_connection( 09:31:27 address: tuple[str, int], 09:31:27 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 09:31:27 source_address: tuple[str, int] | None = None, 09:31:27 socket_options: _TYPE_SOCKET_OPTIONS | None = None, 09:31:27 ) -> socket.socket: 09:31:27 """Connect to *address* and return the socket object. 09:31:27 09:31:27 Convenience function. Connect to *address* (a 2-tuple ``(host, 09:31:27 port)``) and return the socket object. Passing the optional 09:31:27 *timeout* parameter will set the timeout on the socket instance 09:31:27 before attempting to connect. If no *timeout* is supplied, the 09:31:27 global default timeout setting returned by :func:`socket.getdefaulttimeout` 09:31:27 is used. If *source_address* is set it must be a tuple of (host, port) 09:31:27 for the socket to bind as a source address before making the connection. 09:31:27 An host of '' or port 0 tells the OS to use the default. 09:31:27 """ 09:31:27 09:31:27 host, port = address 09:31:27 if host.startswith("["): 09:31:27 host = host.strip("[]") 09:31:27 err = None 09:31:27 09:31:27 # Using the value from allowed_gai_family() in the context of getaddrinfo lets 09:31:27 # us select whether to work with IPv4 DNS records, IPv6 records, or both. 09:31:27 # The original create_connection function always returns all records. 09:31:27 family = allowed_gai_family() 09:31:27 09:31:27 try: 09:31:27 host.encode("idna") 09:31:27 except UnicodeError: 09:31:27 raise LocationParseError(f"'{host}', label empty or too long") from None 09:31:27 09:31:27 for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 09:31:27 af, socktype, proto, canonname, sa = res 09:31:27 sock = None 09:31:27 try: 09:31:27 sock = socket.socket(af, socktype, proto) 09:31:27 09:31:27 # If provided, set socket level options before connecting. 09:31:27 _set_socket_options(sock, socket_options) 09:31:27 09:31:27 if timeout is not _DEFAULT_TIMEOUT: 09:31:27 sock.settimeout(timeout) 09:31:27 if source_address: 09:31:27 sock.bind(source_address) 09:31:27 > sock.connect(sa) 09:31:27 E ConnectionRefusedError: [Errno 111] Connection refused 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/util/connection.py:73: ConnectionRefusedError 09:31:27 09:31:27 The above exception was the direct cause of the following exception: 09:31:27 09:31:27 self = 09:31:27 method = 'GET' 09:31:27 url = '/rests/data/transportpce-portmapping:network/nodes=XPDR-A2/mapping=XPDR1-CLIENT1' 09:31:27 body = None 09:31:27 headers = {'User-Agent': 'python-requests/2.32.3', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'Connection': 'keep-alive', 'Content-Type': 'application/json', 'Authorization': 'Basic YWRtaW46YWRtaW4='} 09:31:27 retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 09:31:27 redirect = False, assert_same_host = False 09:31:27 timeout = Timeout(connect=10, read=10, total=None), pool_timeout = None 09:31:27 release_conn = False, chunked = False, body_pos = None, preload_content = False 09:31:27 decode_content = False, response_kw = {} 09:31:27 parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/rests/data/transportpce-portmapping:network/nodes=XPDR-A2/mapping=XPDR1-CLIENT1', query=None, fragment=None) 09:31:27 destination_scheme = None, conn = None, release_this_conn = True 09:31:27 http_tunnel_required = False, err = None, clean_exit = False 09:31:27 09:31:27 def urlopen( # type: ignore[override] 09:31:27 self, 09:31:27 method: str, 09:31:27 url: str, 09:31:27 body: _TYPE_BODY | None = None, 09:31:27 headers: typing.Mapping[str, str] | None = None, 09:31:27 retries: Retry | bool | int | None = None, 09:31:27 redirect: bool = True, 09:31:27 assert_same_host: bool = True, 09:31:27 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 09:31:27 pool_timeout: int | None = None, 09:31:27 release_conn: bool | None = None, 09:31:27 chunked: bool = False, 09:31:27 body_pos: _TYPE_BODY_POSITION | None = None, 09:31:27 preload_content: bool = True, 09:31:27 decode_content: bool = True, 09:31:27 **response_kw: typing.Any, 09:31:27 ) -> BaseHTTPResponse: 09:31:27 """ 09:31:27 Get a connection from the pool and perform an HTTP request. This is the 09:31:27 lowest level call for making a request, so you'll need to specify all 09:31:27 the raw details. 09:31:27 09:31:27 .. note:: 09:31:27 09:31:27 More commonly, it's appropriate to use a convenience method 09:31:27 such as :meth:`request`. 09:31:27 09:31:27 .. note:: 09:31:27 09:31:27 `release_conn` will only behave as expected if 09:31:27 `preload_content=False` because we want to make 09:31:27 `preload_content=False` the default behaviour someday soon without 09:31:27 breaking backwards compatibility. 09:31:27 09:31:27 :param method: 09:31:27 HTTP request method (such as GET, POST, PUT, etc.) 09:31:27 09:31:27 :param url: 09:31:27 The URL to perform the request on. 09:31:27 09:31:27 :param body: 09:31:27 Data to send in the request body, either :class:`str`, :class:`bytes`, 09:31:27 an iterable of :class:`str`/:class:`bytes`, or a file-like object. 09:31:27 09:31:27 :param headers: 09:31:27 Dictionary of custom headers to send, such as User-Agent, 09:31:27 If-None-Match, etc. If None, pool headers are used. If provided, 09:31:27 these headers completely replace any pool-specific headers. 09:31:27 09:31:27 :param retries: 09:31:27 Configure the number of retries to allow before raising a 09:31:27 :class:`~urllib3.exceptions.MaxRetryError` exception. 09:31:27 09:31:27 If ``None`` (default) will retry 3 times, see ``Retry.DEFAULT``. Pass a 09:31:27 :class:`~urllib3.util.retry.Retry` object for fine-grained control 09:31:27 over different types of retries. 09:31:27 Pass an integer number to retry connection errors that many times, 09:31:27 but no other types of errors. Pass zero to never retry. 09:31:27 09:31:27 If ``False``, then retries are disabled and any exception is raised 09:31:27 immediately. Also, instead of raising a MaxRetryError on redirects, 09:31:27 the redirect response will be returned. 09:31:27 09:31:27 :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 09:31:27 09:31:27 :param redirect: 09:31:27 If True, automatically handle redirects (status codes 301, 302, 09:31:27 303, 307, 308). Each redirect counts as a retry. Disabling retries 09:31:27 will disable redirect, too. 09:31:27 09:31:27 :param assert_same_host: 09:31:27 If ``True``, will make sure that the host of the pool requests is 09:31:27 consistent else will raise HostChangedError. When ``False``, you can 09:31:27 use the pool on an HTTP proxy and request foreign hosts. 09:31:27 09:31:27 :param timeout: 09:31:27 If specified, overrides the default timeout for this one 09:31:27 request. It may be a float (in seconds) or an instance of 09:31:27 :class:`urllib3.util.Timeout`. 09:31:27 09:31:27 :param pool_timeout: 09:31:27 If set and the pool is set to block=True, then this method will 09:31:27 block for ``pool_timeout`` seconds and raise EmptyPoolError if no 09:31:27 connection is available within the time period. 09:31:27 09:31:27 :param bool preload_content: 09:31:27 If True, the response's body will be preloaded into memory. 09:31:27 09:31:27 :param bool decode_content: 09:31:27 If True, will attempt to decode the body based on the 09:31:27 'content-encoding' header. 09:31:27 09:31:27 :param release_conn: 09:31:27 If False, then the urlopen call will not release the connection 09:31:27 back into the pool once a response is received (but will release if 09:31:27 you read the entire contents of the response such as when 09:31:27 `preload_content=True`). This is useful if you're not preloading 09:31:27 the response's content immediately. You will need to call 09:31:27 ``r.release_conn()`` on the response ``r`` to return the connection 09:31:27 back into the pool. If None, it takes the value of ``preload_content`` 09:31:27 which defaults to ``True``. 09:31:27 09:31:27 :param bool chunked: 09:31:27 If True, urllib3 will send the body using chunked transfer 09:31:27 encoding. Otherwise, urllib3 will send the body using the standard 09:31:27 content-length form. Defaults to False. 09:31:27 09:31:27 :param int body_pos: 09:31:27 Position to seek to in file-like body in the event of a retry or 09:31:27 redirect. Typically this won't need to be set because urllib3 will 09:31:27 auto-populate the value when needed. 09:31:27 """ 09:31:27 parsed_url = parse_url(url) 09:31:27 destination_scheme = parsed_url.scheme 09:31:27 09:31:27 if headers is None: 09:31:27 headers = self.headers 09:31:27 09:31:27 if not isinstance(retries, Retry): 09:31:27 retries = Retry.from_int(retries, redirect=redirect, default=self.retries) 09:31:27 09:31:27 if release_conn is None: 09:31:27 release_conn = preload_content 09:31:27 09:31:27 # Check host 09:31:27 if assert_same_host and not self.is_same_host(url): 09:31:27 raise HostChangedError(self, url, retries) 09:31:27 09:31:27 # Ensure that the URL we're connecting to is properly encoded 09:31:27 if url.startswith("/"): 09:31:27 url = to_str(_encode_target(url)) 09:31:27 else: 09:31:27 url = to_str(parsed_url.url) 09:31:27 09:31:27 conn = None 09:31:27 09:31:27 # Track whether `conn` needs to be released before 09:31:27 # returning/raising/recursing. Update this variable if necessary, and 09:31:27 # leave `release_conn` constant throughout the function. That way, if 09:31:27 # the function recurses, the original value of `release_conn` will be 09:31:27 # passed down into the recursive call, and its value will be respected. 09:31:27 # 09:31:27 # See issue #651 [1] for details. 09:31:27 # 09:31:27 # [1] 09:31:27 release_this_conn = release_conn 09:31:27 09:31:27 http_tunnel_required = connection_requires_http_tunnel( 09:31:27 self.proxy, self.proxy_config, destination_scheme 09:31:27 ) 09:31:27 09:31:27 # Merge the proxy headers. Only done when not using HTTP CONNECT. We 09:31:27 # have to copy the headers dict so we can safely change it without those 09:31:27 # changes being reflected in anyone else's copy. 09:31:27 if not http_tunnel_required: 09:31:27 headers = headers.copy() # type: ignore[attr-defined] 09:31:27 headers.update(self.proxy_headers) # type: ignore[union-attr] 09:31:27 09:31:27 # Must keep the exception bound to a separate variable or else Python 3 09:31:27 # complains about UnboundLocalError. 09:31:27 err = None 09:31:27 09:31:27 # Keep track of whether we cleanly exited the except block. This 09:31:27 # ensures we do proper cleanup in finally. 09:31:27 clean_exit = False 09:31:27 09:31:27 # Rewind body position, if needed. Record current position 09:31:27 # for future rewinds in the event of a redirect/retry. 09:31:27 body_pos = set_file_position(body, body_pos) 09:31:27 09:31:27 try: 09:31:27 # Request a connection from the queue. 09:31:27 timeout_obj = self._get_timeout(timeout) 09:31:27 conn = self._get_conn(timeout=pool_timeout) 09:31:27 09:31:27 conn.timeout = timeout_obj.connect_timeout # type: ignore[assignment] 09:31:27 09:31:27 # Is this a closed/new connection that requires CONNECT tunnelling? 09:31:27 if self.proxy is not None and http_tunnel_required and conn.is_closed: 09:31:27 try: 09:31:27 self._prepare_proxy(conn) 09:31:27 except (BaseSSLError, OSError, SocketTimeout) as e: 09:31:27 self._raise_timeout( 09:31:27 err=e, url=self.proxy.url, timeout_value=conn.timeout 09:31:27 ) 09:31:27 raise 09:31:27 09:31:27 # If we're going to release the connection in ``finally:``, then 09:31:27 # the response doesn't need to know about the connection. Otherwise 09:31:27 # it will also try to release it and we'll have a double-release 09:31:27 # mess. 09:31:27 response_conn = conn if not release_conn else None 09:31:27 09:31:27 # Make the request on the HTTPConnection object 09:31:27 > response = self._make_request( 09:31:27 conn, 09:31:27 method, 09:31:27 url, 09:31:27 timeout=timeout_obj, 09:31:27 body=body, 09:31:27 headers=headers, 09:31:27 chunked=chunked, 09:31:27 retries=retries, 09:31:27 response_conn=response_conn, 09:31:27 preload_content=preload_content, 09:31:27 decode_content=decode_content, 09:31:27 **response_kw, 09:31:27 ) 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:789: 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:495: in _make_request 09:31:27 conn.request( 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connection.py:441: in request 09:31:27 self.endheaders() 09:31:27 /opt/pyenv/versions/3.11.7/lib/python3.11/http/client.py:1289: in endheaders 09:31:27 self._send_output(message_body, encode_chunked=encode_chunked) 09:31:27 /opt/pyenv/versions/3.11.7/lib/python3.11/http/client.py:1048: in _send_output 09:31:27 self.send(msg) 09:31:27 /opt/pyenv/versions/3.11.7/lib/python3.11/http/client.py:986: in send 09:31:27 self.connect() 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connection.py:279: in connect 09:31:27 self.sock = self._new_conn() 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 09:31:27 self = 09:31:27 09:31:27 def _new_conn(self) -> socket.socket: 09:31:27 """Establish a socket connection and set nodelay settings on it. 09:31:27 09:31:27 :return: New socket connection. 09:31:27 """ 09:31:27 try: 09:31:27 sock = connection.create_connection( 09:31:27 (self._dns_host, self.port), 09:31:27 self.timeout, 09:31:27 source_address=self.source_address, 09:31:27 socket_options=self.socket_options, 09:31:27 ) 09:31:27 except socket.gaierror as e: 09:31:27 raise NameResolutionError(self.host, self, e) from e 09:31:27 except SocketTimeout as e: 09:31:27 raise ConnectTimeoutError( 09:31:27 self, 09:31:27 f"Connection to {self.host} timed out. (connect timeout={self.timeout})", 09:31:27 ) from e 09:31:27 09:31:27 except OSError as e: 09:31:27 > raise NewConnectionError( 09:31:27 self, f"Failed to establish a new connection: {e}" 09:31:27 ) from e 09:31:27 E urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [Errno 111] Connection refused 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connection.py:214: NewConnectionError 09:31:27 09:31:27 The above exception was the direct cause of the following exception: 09:31:27 09:31:27 self = 09:31:27 request = , stream = False 09:31:27 timeout = Timeout(connect=10, read=10, total=None), verify = True, cert = None 09:31:27 proxies = OrderedDict() 09:31:27 09:31:27 def send( 09:31:27 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 09:31:27 ): 09:31:27 """Sends PreparedRequest object. Returns Response object. 09:31:27 09:31:27 :param request: The :class:`PreparedRequest ` being sent. 09:31:27 :param stream: (optional) Whether to stream the request content. 09:31:27 :param timeout: (optional) How long to wait for the server to send 09:31:27 data before giving up, as a float, or a :ref:`(connect timeout, 09:31:27 read timeout) ` tuple. 09:31:27 :type timeout: float or tuple or urllib3 Timeout object 09:31:27 :param verify: (optional) Either a boolean, in which case it controls whether 09:31:27 we verify the server's TLS certificate, or a string, in which case it 09:31:27 must be a path to a CA bundle to use 09:31:27 :param cert: (optional) Any user-provided SSL certificate to be trusted. 09:31:27 :param proxies: (optional) The proxies dictionary to apply to the request. 09:31:27 :rtype: requests.Response 09:31:27 """ 09:31:27 09:31:27 try: 09:31:27 conn = self.get_connection_with_tls_context( 09:31:27 request, verify, proxies=proxies, cert=cert 09:31:27 ) 09:31:27 except LocationValueError as e: 09:31:27 raise InvalidURL(e, request=request) 09:31:27 09:31:27 self.cert_verify(conn, request.url, verify, cert) 09:31:27 url = self.request_url(request, proxies) 09:31:27 self.add_headers( 09:31:27 request, 09:31:27 stream=stream, 09:31:27 timeout=timeout, 09:31:27 verify=verify, 09:31:27 cert=cert, 09:31:27 proxies=proxies, 09:31:27 ) 09:31:27 09:31:27 chunked = not (request.body is None or "Content-Length" in request.headers) 09:31:27 09:31:27 if isinstance(timeout, tuple): 09:31:27 try: 09:31:27 connect, read = timeout 09:31:27 timeout = TimeoutSauce(connect=connect, read=read) 09:31:27 except ValueError: 09:31:27 raise ValueError( 09:31:27 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 09:31:27 f"or a single float to set both timeouts to the same value." 09:31:27 ) 09:31:27 elif isinstance(timeout, TimeoutSauce): 09:31:27 pass 09:31:27 else: 09:31:27 timeout = TimeoutSauce(connect=timeout, read=timeout) 09:31:27 09:31:27 try: 09:31:27 > resp = conn.urlopen( 09:31:27 method=request.method, 09:31:27 url=url, 09:31:27 body=request.body, 09:31:27 headers=request.headers, 09:31:27 redirect=False, 09:31:27 assert_same_host=False, 09:31:27 preload_content=False, 09:31:27 decode_content=False, 09:31:27 retries=self.max_retries, 09:31:27 timeout=timeout, 09:31:27 chunked=chunked, 09:31:27 ) 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/requests/adapters.py:667: 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:843: in urlopen 09:31:27 retries = retries.increment( 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 09:31:27 self = Retry(total=0, connect=None, read=False, redirect=None, status=None) 09:31:27 method = 'GET' 09:31:27 url = '/rests/data/transportpce-portmapping:network/nodes=XPDR-A2/mapping=XPDR1-CLIENT1' 09:31:27 response = None 09:31:27 error = NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused') 09:31:27 _pool = 09:31:27 _stacktrace = 09:31:27 09:31:27 def increment( 09:31:27 self, 09:31:27 method: str | None = None, 09:31:27 url: str | None = None, 09:31:27 response: BaseHTTPResponse | None = None, 09:31:27 error: Exception | None = None, 09:31:27 _pool: ConnectionPool | None = None, 09:31:27 _stacktrace: TracebackType | None = None, 09:31:27 ) -> Self: 09:31:27 """Return a new Retry object with incremented retry counters. 09:31:27 09:31:27 :param response: A response object, or None, if the server did not 09:31:27 return a response. 09:31:27 :type response: :class:`~urllib3.response.BaseHTTPResponse` 09:31:27 :param Exception error: An error encountered during the request, or 09:31:27 None if the response was received successfully. 09:31:27 09:31:27 :return: A new ``Retry`` object. 09:31:27 """ 09:31:27 if self.total is False and error: 09:31:27 # Disabled, indicate to re-raise the error. 09:31:27 raise reraise(type(error), error, _stacktrace) 09:31:27 09:31:27 total = self.total 09:31:27 if total is not None: 09:31:27 total -= 1 09:31:27 09:31:27 connect = self.connect 09:31:27 read = self.read 09:31:27 redirect = self.redirect 09:31:27 status_count = self.status 09:31:27 other = self.other 09:31:27 cause = "unknown" 09:31:27 status = None 09:31:27 redirect_location = None 09:31:27 09:31:27 if error and self._is_connection_error(error): 09:31:27 # Connect retry? 09:31:27 if connect is False: 09:31:27 raise reraise(type(error), error, _stacktrace) 09:31:27 elif connect is not None: 09:31:27 connect -= 1 09:31:27 09:31:27 elif error and self._is_read_error(error): 09:31:27 # Read retry? 09:31:27 if read is False or method is None or not self._is_method_retryable(method): 09:31:27 raise reraise(type(error), error, _stacktrace) 09:31:27 elif read is not None: 09:31:27 read -= 1 09:31:27 09:31:27 elif error: 09:31:27 # Other retry? 09:31:27 if other is not None: 09:31:27 other -= 1 09:31:27 09:31:27 elif response and response.get_redirect_location(): 09:31:27 # Redirect retry? 09:31:27 if redirect is not None: 09:31:27 redirect -= 1 09:31:27 cause = "too many redirects" 09:31:27 response_redirect_location = response.get_redirect_location() 09:31:27 if response_redirect_location: 09:31:27 redirect_location = response_redirect_location 09:31:27 status = response.status 09:31:27 09:31:27 else: 09:31:27 # Incrementing because of a server error like a 500 in 09:31:27 # status_forcelist and the given method is in the allowed_methods 09:31:27 cause = ResponseError.GENERIC_ERROR 09:31:27 if response and response.status: 09:31:27 if status_count is not None: 09:31:27 status_count -= 1 09:31:27 cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) 09:31:27 status = response.status 09:31:27 09:31:27 history = self.history + ( 09:31:27 RequestHistory(method, url, error, status, redirect_location), 09:31:27 ) 09:31:27 09:31:27 new_retry = self.new( 09:31:27 total=total, 09:31:27 connect=connect, 09:31:27 read=read, 09:31:27 redirect=redirect, 09:31:27 status=status_count, 09:31:27 other=other, 09:31:27 history=history, 09:31:27 ) 09:31:27 09:31:27 if new_retry.is_exhausted(): 09:31:27 reason = error or ResponseError(cause) 09:31:27 > raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] 09:31:27 E urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8184): Max retries exceeded with url: /rests/data/transportpce-portmapping:network/nodes=XPDR-A2/mapping=XPDR1-CLIENT1 (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/util/retry.py:519: MaxRetryError 09:31:27 09:31:27 During handling of the above exception, another exception occurred: 09:31:27 09:31:27 self = 09:31:27 09:31:27 def test_05_tpdr_portmapping_CLIENT1(self): 09:31:27 > response = test_utils.get_portmapping_node_attr("XPDR-A2", "mapping", "XPDR1-CLIENT1") 09:31:27 09:31:27 transportpce_tests/7.1/test01_portmapping.py:93: 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 transportpce_tests/common/test_utils.py:470: in get_portmapping_node_attr 09:31:27 response = get_request(target_url) 09:31:27 transportpce_tests/common/test_utils.py:116: in get_request 09:31:27 return requests.request( 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/requests/api.py:59: in request 09:31:27 return session.request(method=method, url=url, **kwargs) 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/requests/sessions.py:589: in request 09:31:27 resp = self.send(prep, **send_kwargs) 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/requests/sessions.py:703: in send 09:31:27 r = adapter.send(request, **kwargs) 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 09:31:27 self = 09:31:27 request = , stream = False 09:31:27 timeout = Timeout(connect=10, read=10, total=None), verify = True, cert = None 09:31:27 proxies = OrderedDict() 09:31:27 09:31:27 def send( 09:31:27 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 09:31:27 ): 09:31:27 """Sends PreparedRequest object. Returns Response object. 09:31:27 09:31:27 :param request: The :class:`PreparedRequest ` being sent. 09:31:27 :param stream: (optional) Whether to stream the request content. 09:31:27 :param timeout: (optional) How long to wait for the server to send 09:31:27 data before giving up, as a float, or a :ref:`(connect timeout, 09:31:27 read timeout) ` tuple. 09:31:27 :type timeout: float or tuple or urllib3 Timeout object 09:31:27 :param verify: (optional) Either a boolean, in which case it controls whether 09:31:27 we verify the server's TLS certificate, or a string, in which case it 09:31:27 must be a path to a CA bundle to use 09:31:27 :param cert: (optional) Any user-provided SSL certificate to be trusted. 09:31:27 :param proxies: (optional) The proxies dictionary to apply to the request. 09:31:27 :rtype: requests.Response 09:31:27 """ 09:31:27 09:31:27 try: 09:31:27 conn = self.get_connection_with_tls_context( 09:31:27 request, verify, proxies=proxies, cert=cert 09:31:27 ) 09:31:27 except LocationValueError as e: 09:31:27 raise InvalidURL(e, request=request) 09:31:27 09:31:27 self.cert_verify(conn, request.url, verify, cert) 09:31:27 url = self.request_url(request, proxies) 09:31:27 self.add_headers( 09:31:27 request, 09:31:27 stream=stream, 09:31:27 timeout=timeout, 09:31:27 verify=verify, 09:31:27 cert=cert, 09:31:27 proxies=proxies, 09:31:27 ) 09:31:27 09:31:27 chunked = not (request.body is None or "Content-Length" in request.headers) 09:31:27 09:31:27 if isinstance(timeout, tuple): 09:31:27 try: 09:31:27 connect, read = timeout 09:31:27 timeout = TimeoutSauce(connect=connect, read=read) 09:31:27 except ValueError: 09:31:27 raise ValueError( 09:31:27 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 09:31:27 f"or a single float to set both timeouts to the same value." 09:31:27 ) 09:31:27 elif isinstance(timeout, TimeoutSauce): 09:31:27 pass 09:31:27 else: 09:31:27 timeout = TimeoutSauce(connect=timeout, read=timeout) 09:31:27 09:31:27 try: 09:31:27 resp = conn.urlopen( 09:31:27 method=request.method, 09:31:27 url=url, 09:31:27 body=request.body, 09:31:27 headers=request.headers, 09:31:27 redirect=False, 09:31:27 assert_same_host=False, 09:31:27 preload_content=False, 09:31:27 decode_content=False, 09:31:27 retries=self.max_retries, 09:31:27 timeout=timeout, 09:31:27 chunked=chunked, 09:31:27 ) 09:31:27 09:31:27 except (ProtocolError, OSError) as err: 09:31:27 raise ConnectionError(err, request=request) 09:31:27 09:31:27 except MaxRetryError as e: 09:31:27 if isinstance(e.reason, ConnectTimeoutError): 09:31:27 # TODO: Remove this in 3.0.0: see #2811 09:31:27 if not isinstance(e.reason, NewConnectionError): 09:31:27 raise ConnectTimeout(e, request=request) 09:31:27 09:31:27 if isinstance(e.reason, ResponseError): 09:31:27 raise RetryError(e, request=request) 09:31:27 09:31:27 if isinstance(e.reason, _ProxyError): 09:31:27 raise ProxyError(e, request=request) 09:31:27 09:31:27 if isinstance(e.reason, _SSLError): 09:31:27 # This branch is for urllib3 v1.22 and later. 09:31:27 raise SSLError(e, request=request) 09:31:27 09:31:27 > raise ConnectionError(e, request=request) 09:31:27 E requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8184): Max retries exceeded with url: /rests/data/transportpce-portmapping:network/nodes=XPDR-A2/mapping=XPDR1-CLIENT1 (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/requests/adapters.py:700: ConnectionError 09:31:27 ----------------------------- Captured stdout call ----------------------------- 09:31:27 execution of test_05_tpdr_portmapping_CLIENT1 09:31:27 _____ TransportPCE400GPortMappingTesting.test_06_mpdr_portmapping_NETWORK1 _____ 09:31:27 09:31:27 self = 09:31:27 09:31:27 def _new_conn(self) -> socket.socket: 09:31:27 """Establish a socket connection and set nodelay settings on it. 09:31:27 09:31:27 :return: New socket connection. 09:31:27 """ 09:31:27 try: 09:31:27 > sock = connection.create_connection( 09:31:27 (self._dns_host, self.port), 09:31:27 self.timeout, 09:31:27 source_address=self.source_address, 09:31:27 socket_options=self.socket_options, 09:31:27 ) 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connection.py:199: 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/util/connection.py:85: in create_connection 09:31:27 raise err 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 09:31:27 address = ('localhost', 8184), timeout = 10, source_address = None 09:31:27 socket_options = [(6, 1, 1)] 09:31:27 09:31:27 def create_connection( 09:31:27 address: tuple[str, int], 09:31:27 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 09:31:27 source_address: tuple[str, int] | None = None, 09:31:27 socket_options: _TYPE_SOCKET_OPTIONS | None = None, 09:31:27 ) -> socket.socket: 09:31:27 """Connect to *address* and return the socket object. 09:31:27 09:31:27 Convenience function. Connect to *address* (a 2-tuple ``(host, 09:31:27 port)``) and return the socket object. Passing the optional 09:31:27 *timeout* parameter will set the timeout on the socket instance 09:31:27 before attempting to connect. If no *timeout* is supplied, the 09:31:27 global default timeout setting returned by :func:`socket.getdefaulttimeout` 09:31:27 is used. If *source_address* is set it must be a tuple of (host, port) 09:31:27 for the socket to bind as a source address before making the connection. 09:31:27 An host of '' or port 0 tells the OS to use the default. 09:31:27 """ 09:31:27 09:31:27 host, port = address 09:31:27 if host.startswith("["): 09:31:27 host = host.strip("[]") 09:31:27 err = None 09:31:27 09:31:27 # Using the value from allowed_gai_family() in the context of getaddrinfo lets 09:31:27 # us select whether to work with IPv4 DNS records, IPv6 records, or both. 09:31:27 # The original create_connection function always returns all records. 09:31:27 family = allowed_gai_family() 09:31:27 09:31:27 try: 09:31:27 host.encode("idna") 09:31:27 except UnicodeError: 09:31:27 raise LocationParseError(f"'{host}', label empty or too long") from None 09:31:27 09:31:27 for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 09:31:27 af, socktype, proto, canonname, sa = res 09:31:27 sock = None 09:31:27 try: 09:31:27 sock = socket.socket(af, socktype, proto) 09:31:27 09:31:27 # If provided, set socket level options before connecting. 09:31:27 _set_socket_options(sock, socket_options) 09:31:27 09:31:27 if timeout is not _DEFAULT_TIMEOUT: 09:31:27 sock.settimeout(timeout) 09:31:27 if source_address: 09:31:27 sock.bind(source_address) 09:31:27 > sock.connect(sa) 09:31:27 E ConnectionRefusedError: [Errno 111] Connection refused 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/util/connection.py:73: ConnectionRefusedError 09:31:27 09:31:27 The above exception was the direct cause of the following exception: 09:31:27 09:31:27 self = 09:31:27 method = 'GET' 09:31:27 url = '/rests/data/transportpce-portmapping:network/nodes=XPDR-A2/mapping=XPDR2-NETWORK1' 09:31:27 body = None 09:31:27 headers = {'User-Agent': 'python-requests/2.32.3', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'Connection': 'keep-alive', 'Content-Type': 'application/json', 'Authorization': 'Basic YWRtaW46YWRtaW4='} 09:31:27 retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 09:31:27 redirect = False, assert_same_host = False 09:31:27 timeout = Timeout(connect=10, read=10, total=None), pool_timeout = None 09:31:27 release_conn = False, chunked = False, body_pos = None, preload_content = False 09:31:27 decode_content = False, response_kw = {} 09:31:27 parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/rests/data/transportpce-portmapping:network/nodes=XPDR-A2/mapping=XPDR2-NETWORK1', query=None, fragment=None) 09:31:27 destination_scheme = None, conn = None, release_this_conn = True 09:31:27 http_tunnel_required = False, err = None, clean_exit = False 09:31:27 09:31:27 def urlopen( # type: ignore[override] 09:31:27 self, 09:31:27 method: str, 09:31:27 url: str, 09:31:27 body: _TYPE_BODY | None = None, 09:31:27 headers: typing.Mapping[str, str] | None = None, 09:31:27 retries: Retry | bool | int | None = None, 09:31:27 redirect: bool = True, 09:31:27 assert_same_host: bool = True, 09:31:27 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 09:31:27 pool_timeout: int | None = None, 09:31:27 release_conn: bool | None = None, 09:31:27 chunked: bool = False, 09:31:27 body_pos: _TYPE_BODY_POSITION | None = None, 09:31:27 preload_content: bool = True, 09:31:27 decode_content: bool = True, 09:31:27 **response_kw: typing.Any, 09:31:27 ) -> BaseHTTPResponse: 09:31:27 """ 09:31:27 Get a connection from the pool and perform an HTTP request. This is the 09:31:27 lowest level call for making a request, so you'll need to specify all 09:31:27 the raw details. 09:31:27 09:31:27 .. note:: 09:31:27 09:31:27 More commonly, it's appropriate to use a convenience method 09:31:27 such as :meth:`request`. 09:31:27 09:31:27 .. note:: 09:31:27 09:31:27 `release_conn` will only behave as expected if 09:31:27 `preload_content=False` because we want to make 09:31:27 `preload_content=False` the default behaviour someday soon without 09:31:27 breaking backwards compatibility. 09:31:27 09:31:27 :param method: 09:31:27 HTTP request method (such as GET, POST, PUT, etc.) 09:31:27 09:31:27 :param url: 09:31:27 The URL to perform the request on. 09:31:27 09:31:27 :param body: 09:31:27 Data to send in the request body, either :class:`str`, :class:`bytes`, 09:31:27 an iterable of :class:`str`/:class:`bytes`, or a file-like object. 09:31:27 09:31:27 :param headers: 09:31:27 Dictionary of custom headers to send, such as User-Agent, 09:31:27 If-None-Match, etc. If None, pool headers are used. If provided, 09:31:27 these headers completely replace any pool-specific headers. 09:31:27 09:31:27 :param retries: 09:31:27 Configure the number of retries to allow before raising a 09:31:27 :class:`~urllib3.exceptions.MaxRetryError` exception. 09:31:27 09:31:27 If ``None`` (default) will retry 3 times, see ``Retry.DEFAULT``. Pass a 09:31:27 :class:`~urllib3.util.retry.Retry` object for fine-grained control 09:31:27 over different types of retries. 09:31:27 Pass an integer number to retry connection errors that many times, 09:31:27 but no other types of errors. Pass zero to never retry. 09:31:27 09:31:27 If ``False``, then retries are disabled and any exception is raised 09:31:27 immediately. Also, instead of raising a MaxRetryError on redirects, 09:31:27 the redirect response will be returned. 09:31:27 09:31:27 :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 09:31:27 09:31:27 :param redirect: 09:31:27 If True, automatically handle redirects (status codes 301, 302, 09:31:27 303, 307, 308). Each redirect counts as a retry. Disabling retries 09:31:27 will disable redirect, too. 09:31:27 09:31:27 :param assert_same_host: 09:31:27 If ``True``, will make sure that the host of the pool requests is 09:31:27 consistent else will raise HostChangedError. When ``False``, you can 09:31:27 use the pool on an HTTP proxy and request foreign hosts. 09:31:27 09:31:27 :param timeout: 09:31:27 If specified, overrides the default timeout for this one 09:31:27 request. It may be a float (in seconds) or an instance of 09:31:27 :class:`urllib3.util.Timeout`. 09:31:27 09:31:27 :param pool_timeout: 09:31:27 If set and the pool is set to block=True, then this method will 09:31:27 block for ``pool_timeout`` seconds and raise EmptyPoolError if no 09:31:27 connection is available within the time period. 09:31:27 09:31:27 :param bool preload_content: 09:31:27 If True, the response's body will be preloaded into memory. 09:31:27 09:31:27 :param bool decode_content: 09:31:27 If True, will attempt to decode the body based on the 09:31:27 'content-encoding' header. 09:31:27 09:31:27 :param release_conn: 09:31:27 If False, then the urlopen call will not release the connection 09:31:27 back into the pool once a response is received (but will release if 09:31:27 you read the entire contents of the response such as when 09:31:27 `preload_content=True`). This is useful if you're not preloading 09:31:27 the response's content immediately. You will need to call 09:31:27 ``r.release_conn()`` on the response ``r`` to return the connection 09:31:27 back into the pool. If None, it takes the value of ``preload_content`` 09:31:27 which defaults to ``True``. 09:31:27 09:31:27 :param bool chunked: 09:31:27 If True, urllib3 will send the body using chunked transfer 09:31:27 encoding. Otherwise, urllib3 will send the body using the standard 09:31:27 content-length form. Defaults to False. 09:31:27 09:31:27 :param int body_pos: 09:31:27 Position to seek to in file-like body in the event of a retry or 09:31:27 redirect. Typically this won't need to be set because urllib3 will 09:31:27 auto-populate the value when needed. 09:31:27 """ 09:31:27 parsed_url = parse_url(url) 09:31:27 destination_scheme = parsed_url.scheme 09:31:27 09:31:27 if headers is None: 09:31:27 headers = self.headers 09:31:27 09:31:27 if not isinstance(retries, Retry): 09:31:27 retries = Retry.from_int(retries, redirect=redirect, default=self.retries) 09:31:27 09:31:27 if release_conn is None: 09:31:27 release_conn = preload_content 09:31:27 09:31:27 # Check host 09:31:27 if assert_same_host and not self.is_same_host(url): 09:31:27 raise HostChangedError(self, url, retries) 09:31:27 09:31:27 # Ensure that the URL we're connecting to is properly encoded 09:31:27 if url.startswith("/"): 09:31:27 url = to_str(_encode_target(url)) 09:31:27 else: 09:31:27 url = to_str(parsed_url.url) 09:31:27 09:31:27 conn = None 09:31:27 09:31:27 # Track whether `conn` needs to be released before 09:31:27 # returning/raising/recursing. Update this variable if necessary, and 09:31:27 # leave `release_conn` constant throughout the function. That way, if 09:31:27 # the function recurses, the original value of `release_conn` will be 09:31:27 # passed down into the recursive call, and its value will be respected. 09:31:27 # 09:31:27 # See issue #651 [1] for details. 09:31:27 # 09:31:27 # [1] 09:31:27 release_this_conn = release_conn 09:31:27 09:31:27 http_tunnel_required = connection_requires_http_tunnel( 09:31:27 self.proxy, self.proxy_config, destination_scheme 09:31:27 ) 09:31:27 09:31:27 # Merge the proxy headers. Only done when not using HTTP CONNECT. We 09:31:27 # have to copy the headers dict so we can safely change it without those 09:31:27 # changes being reflected in anyone else's copy. 09:31:27 if not http_tunnel_required: 09:31:27 headers = headers.copy() # type: ignore[attr-defined] 09:31:27 headers.update(self.proxy_headers) # type: ignore[union-attr] 09:31:27 09:31:27 # Must keep the exception bound to a separate variable or else Python 3 09:31:27 # complains about UnboundLocalError. 09:31:27 err = None 09:31:27 09:31:27 # Keep track of whether we cleanly exited the except block. This 09:31:27 # ensures we do proper cleanup in finally. 09:31:27 clean_exit = False 09:31:27 09:31:27 # Rewind body position, if needed. Record current position 09:31:27 # for future rewinds in the event of a redirect/retry. 09:31:27 body_pos = set_file_position(body, body_pos) 09:31:27 09:31:27 try: 09:31:27 # Request a connection from the queue. 09:31:27 timeout_obj = self._get_timeout(timeout) 09:31:27 conn = self._get_conn(timeout=pool_timeout) 09:31:27 09:31:27 conn.timeout = timeout_obj.connect_timeout # type: ignore[assignment] 09:31:27 09:31:27 # Is this a closed/new connection that requires CONNECT tunnelling? 09:31:27 if self.proxy is not None and http_tunnel_required and conn.is_closed: 09:31:27 try: 09:31:27 self._prepare_proxy(conn) 09:31:27 except (BaseSSLError, OSError, SocketTimeout) as e: 09:31:27 self._raise_timeout( 09:31:27 err=e, url=self.proxy.url, timeout_value=conn.timeout 09:31:27 ) 09:31:27 raise 09:31:27 09:31:27 # If we're going to release the connection in ``finally:``, then 09:31:27 # the response doesn't need to know about the connection. Otherwise 09:31:27 # it will also try to release it and we'll have a double-release 09:31:27 # mess. 09:31:27 response_conn = conn if not release_conn else None 09:31:27 09:31:27 # Make the request on the HTTPConnection object 09:31:27 > response = self._make_request( 09:31:27 conn, 09:31:27 method, 09:31:27 url, 09:31:27 timeout=timeout_obj, 09:31:27 body=body, 09:31:27 headers=headers, 09:31:27 chunked=chunked, 09:31:27 retries=retries, 09:31:27 response_conn=response_conn, 09:31:27 preload_content=preload_content, 09:31:27 decode_content=decode_content, 09:31:27 **response_kw, 09:31:27 ) 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:789: 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:495: in _make_request 09:31:27 conn.request( 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connection.py:441: in request 09:31:27 self.endheaders() 09:31:27 /opt/pyenv/versions/3.11.7/lib/python3.11/http/client.py:1289: in endheaders 09:31:27 self._send_output(message_body, encode_chunked=encode_chunked) 09:31:27 /opt/pyenv/versions/3.11.7/lib/python3.11/http/client.py:1048: in _send_output 09:31:27 self.send(msg) 09:31:27 /opt/pyenv/versions/3.11.7/lib/python3.11/http/client.py:986: in send 09:31:27 self.connect() 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connection.py:279: in connect 09:31:27 self.sock = self._new_conn() 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 09:31:27 self = 09:31:27 09:31:27 def _new_conn(self) -> socket.socket: 09:31:27 """Establish a socket connection and set nodelay settings on it. 09:31:27 09:31:27 :return: New socket connection. 09:31:27 """ 09:31:27 try: 09:31:27 sock = connection.create_connection( 09:31:27 (self._dns_host, self.port), 09:31:27 self.timeout, 09:31:27 source_address=self.source_address, 09:31:27 socket_options=self.socket_options, 09:31:27 ) 09:31:27 except socket.gaierror as e: 09:31:27 raise NameResolutionError(self.host, self, e) from e 09:31:27 except SocketTimeout as e: 09:31:27 raise ConnectTimeoutError( 09:31:27 self, 09:31:27 f"Connection to {self.host} timed out. (connect timeout={self.timeout})", 09:31:27 ) from e 09:31:27 09:31:27 except OSError as e: 09:31:27 > raise NewConnectionError( 09:31:27 self, f"Failed to establish a new connection: {e}" 09:31:27 ) from e 09:31:27 E urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [Errno 111] Connection refused 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connection.py:214: NewConnectionError 09:31:27 09:31:27 The above exception was the direct cause of the following exception: 09:31:27 09:31:27 self = 09:31:27 request = , stream = False 09:31:27 timeout = Timeout(connect=10, read=10, total=None), verify = True, cert = None 09:31:27 proxies = OrderedDict() 09:31:27 09:31:27 def send( 09:31:27 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 09:31:27 ): 09:31:27 """Sends PreparedRequest object. Returns Response object. 09:31:27 09:31:27 :param request: The :class:`PreparedRequest ` being sent. 09:31:27 :param stream: (optional) Whether to stream the request content. 09:31:27 :param timeout: (optional) How long to wait for the server to send 09:31:27 data before giving up, as a float, or a :ref:`(connect timeout, 09:31:27 read timeout) ` tuple. 09:31:27 :type timeout: float or tuple or urllib3 Timeout object 09:31:27 :param verify: (optional) Either a boolean, in which case it controls whether 09:31:27 we verify the server's TLS certificate, or a string, in which case it 09:31:27 must be a path to a CA bundle to use 09:31:27 :param cert: (optional) Any user-provided SSL certificate to be trusted. 09:31:27 :param proxies: (optional) The proxies dictionary to apply to the request. 09:31:27 :rtype: requests.Response 09:31:27 """ 09:31:27 09:31:27 try: 09:31:27 conn = self.get_connection_with_tls_context( 09:31:27 request, verify, proxies=proxies, cert=cert 09:31:27 ) 09:31:27 except LocationValueError as e: 09:31:27 raise InvalidURL(e, request=request) 09:31:27 09:31:27 self.cert_verify(conn, request.url, verify, cert) 09:31:27 url = self.request_url(request, proxies) 09:31:27 self.add_headers( 09:31:27 request, 09:31:27 stream=stream, 09:31:27 timeout=timeout, 09:31:27 verify=verify, 09:31:27 cert=cert, 09:31:27 proxies=proxies, 09:31:27 ) 09:31:27 09:31:27 chunked = not (request.body is None or "Content-Length" in request.headers) 09:31:27 09:31:27 if isinstance(timeout, tuple): 09:31:27 try: 09:31:27 connect, read = timeout 09:31:27 timeout = TimeoutSauce(connect=connect, read=read) 09:31:27 except ValueError: 09:31:27 raise ValueError( 09:31:27 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 09:31:27 f"or a single float to set both timeouts to the same value." 09:31:27 ) 09:31:27 elif isinstance(timeout, TimeoutSauce): 09:31:27 pass 09:31:27 else: 09:31:27 timeout = TimeoutSauce(connect=timeout, read=timeout) 09:31:27 09:31:27 try: 09:31:27 > resp = conn.urlopen( 09:31:27 method=request.method, 09:31:27 url=url, 09:31:27 body=request.body, 09:31:27 headers=request.headers, 09:31:27 redirect=False, 09:31:27 assert_same_host=False, 09:31:27 preload_content=False, 09:31:27 decode_content=False, 09:31:27 retries=self.max_retries, 09:31:27 timeout=timeout, 09:31:27 chunked=chunked, 09:31:27 ) 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/requests/adapters.py:667: 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:843: in urlopen 09:31:27 retries = retries.increment( 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 09:31:27 self = Retry(total=0, connect=None, read=False, redirect=None, status=None) 09:31:27 method = 'GET' 09:31:27 url = '/rests/data/transportpce-portmapping:network/nodes=XPDR-A2/mapping=XPDR2-NETWORK1' 09:31:27 response = None 09:31:27 error = NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused') 09:31:27 _pool = 09:31:27 _stacktrace = 09:31:27 09:31:27 def increment( 09:31:27 self, 09:31:27 method: str | None = None, 09:31:27 url: str | None = None, 09:31:27 response: BaseHTTPResponse | None = None, 09:31:27 error: Exception | None = None, 09:31:27 _pool: ConnectionPool | None = None, 09:31:27 _stacktrace: TracebackType | None = None, 09:31:27 ) -> Self: 09:31:27 """Return a new Retry object with incremented retry counters. 09:31:27 09:31:27 :param response: A response object, or None, if the server did not 09:31:27 return a response. 09:31:27 :type response: :class:`~urllib3.response.BaseHTTPResponse` 09:31:27 :param Exception error: An error encountered during the request, or 09:31:27 None if the response was received successfully. 09:31:27 09:31:27 :return: A new ``Retry`` object. 09:31:27 """ 09:31:27 if self.total is False and error: 09:31:27 # Disabled, indicate to re-raise the error. 09:31:27 raise reraise(type(error), error, _stacktrace) 09:31:27 09:31:27 total = self.total 09:31:27 if total is not None: 09:31:27 total -= 1 09:31:27 09:31:27 connect = self.connect 09:31:27 read = self.read 09:31:27 redirect = self.redirect 09:31:27 status_count = self.status 09:31:27 other = self.other 09:31:27 cause = "unknown" 09:31:27 status = None 09:31:27 redirect_location = None 09:31:27 09:31:27 if error and self._is_connection_error(error): 09:31:27 # Connect retry? 09:31:27 if connect is False: 09:31:27 raise reraise(type(error), error, _stacktrace) 09:31:27 elif connect is not None: 09:31:27 connect -= 1 09:31:27 09:31:27 elif error and self._is_read_error(error): 09:31:27 # Read retry? 09:31:27 if read is False or method is None or not self._is_method_retryable(method): 09:31:27 raise reraise(type(error), error, _stacktrace) 09:31:27 elif read is not None: 09:31:27 read -= 1 09:31:27 09:31:27 elif error: 09:31:27 # Other retry? 09:31:27 if other is not None: 09:31:27 other -= 1 09:31:27 09:31:27 elif response and response.get_redirect_location(): 09:31:27 # Redirect retry? 09:31:27 if redirect is not None: 09:31:27 redirect -= 1 09:31:27 cause = "too many redirects" 09:31:27 response_redirect_location = response.get_redirect_location() 09:31:27 if response_redirect_location: 09:31:27 redirect_location = response_redirect_location 09:31:27 status = response.status 09:31:27 09:31:27 else: 09:31:27 # Incrementing because of a server error like a 500 in 09:31:27 # status_forcelist and the given method is in the allowed_methods 09:31:27 cause = ResponseError.GENERIC_ERROR 09:31:27 if response and response.status: 09:31:27 if status_count is not None: 09:31:27 status_count -= 1 09:31:27 cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) 09:31:27 status = response.status 09:31:27 09:31:27 history = self.history + ( 09:31:27 RequestHistory(method, url, error, status, redirect_location), 09:31:27 ) 09:31:27 09:31:27 new_retry = self.new( 09:31:27 total=total, 09:31:27 connect=connect, 09:31:27 read=read, 09:31:27 redirect=redirect, 09:31:27 status=status_count, 09:31:27 other=other, 09:31:27 history=history, 09:31:27 ) 09:31:27 09:31:27 if new_retry.is_exhausted(): 09:31:27 reason = error or ResponseError(cause) 09:31:27 > raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] 09:31:27 E urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8184): Max retries exceeded with url: /rests/data/transportpce-portmapping:network/nodes=XPDR-A2/mapping=XPDR2-NETWORK1 (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/util/retry.py:519: MaxRetryError 09:31:27 09:31:27 During handling of the above exception, another exception occurred: 09:31:27 09:31:27 self = 09:31:27 09:31:27 def test_06_mpdr_portmapping_NETWORK1(self): 09:31:27 > response = test_utils.get_portmapping_node_attr("XPDR-A2", "mapping", "XPDR2-NETWORK1") 09:31:27 09:31:27 transportpce_tests/7.1/test01_portmapping.py:113: 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 transportpce_tests/common/test_utils.py:470: in get_portmapping_node_attr 09:31:27 response = get_request(target_url) 09:31:27 transportpce_tests/common/test_utils.py:116: in get_request 09:31:27 return requests.request( 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/requests/api.py:59: in request 09:31:27 return session.request(method=method, url=url, **kwargs) 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/requests/sessions.py:589: in request 09:31:27 resp = self.send(prep, **send_kwargs) 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/requests/sessions.py:703: in send 09:31:27 r = adapter.send(request, **kwargs) 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 09:31:27 self = 09:31:27 request = , stream = False 09:31:27 timeout = Timeout(connect=10, read=10, total=None), verify = True, cert = None 09:31:27 proxies = OrderedDict() 09:31:27 09:31:27 def send( 09:31:27 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 09:31:27 ): 09:31:27 """Sends PreparedRequest object. Returns Response object. 09:31:27 09:31:27 :param request: The :class:`PreparedRequest ` being sent. 09:31:27 :param stream: (optional) Whether to stream the request content. 09:31:27 :param timeout: (optional) How long to wait for the server to send 09:31:27 data before giving up, as a float, or a :ref:`(connect timeout, 09:31:27 read timeout) ` tuple. 09:31:27 :type timeout: float or tuple or urllib3 Timeout object 09:31:27 :param verify: (optional) Either a boolean, in which case it controls whether 09:31:27 we verify the server's TLS certificate, or a string, in which case it 09:31:27 must be a path to a CA bundle to use 09:31:27 :param cert: (optional) Any user-provided SSL certificate to be trusted. 09:31:27 :param proxies: (optional) The proxies dictionary to apply to the request. 09:31:27 :rtype: requests.Response 09:31:27 """ 09:31:27 09:31:27 try: 09:31:27 conn = self.get_connection_with_tls_context( 09:31:27 request, verify, proxies=proxies, cert=cert 09:31:27 ) 09:31:27 except LocationValueError as e: 09:31:27 raise InvalidURL(e, request=request) 09:31:27 09:31:27 self.cert_verify(conn, request.url, verify, cert) 09:31:27 url = self.request_url(request, proxies) 09:31:27 self.add_headers( 09:31:27 request, 09:31:27 stream=stream, 09:31:27 timeout=timeout, 09:31:27 verify=verify, 09:31:27 cert=cert, 09:31:27 proxies=proxies, 09:31:27 ) 09:31:27 09:31:27 chunked = not (request.body is None or "Content-Length" in request.headers) 09:31:27 09:31:27 if isinstance(timeout, tuple): 09:31:27 try: 09:31:27 connect, read = timeout 09:31:27 timeout = TimeoutSauce(connect=connect, read=read) 09:31:27 except ValueError: 09:31:27 raise ValueError( 09:31:27 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 09:31:27 f"or a single float to set both timeouts to the same value." 09:31:27 ) 09:31:27 elif isinstance(timeout, TimeoutSauce): 09:31:27 pass 09:31:27 else: 09:31:27 timeout = TimeoutSauce(connect=timeout, read=timeout) 09:31:27 09:31:27 try: 09:31:27 resp = conn.urlopen( 09:31:27 method=request.method, 09:31:27 url=url, 09:31:27 body=request.body, 09:31:27 headers=request.headers, 09:31:27 redirect=False, 09:31:27 assert_same_host=False, 09:31:27 preload_content=False, 09:31:27 decode_content=False, 09:31:27 retries=self.max_retries, 09:31:27 timeout=timeout, 09:31:27 chunked=chunked, 09:31:27 ) 09:31:27 09:31:27 except (ProtocolError, OSError) as err: 09:31:27 raise ConnectionError(err, request=request) 09:31:27 09:31:27 except MaxRetryError as e: 09:31:27 if isinstance(e.reason, ConnectTimeoutError): 09:31:27 # TODO: Remove this in 3.0.0: see #2811 09:31:27 if not isinstance(e.reason, NewConnectionError): 09:31:27 raise ConnectTimeout(e, request=request) 09:31:27 09:31:27 if isinstance(e.reason, ResponseError): 09:31:27 raise RetryError(e, request=request) 09:31:27 09:31:27 if isinstance(e.reason, _ProxyError): 09:31:27 raise ProxyError(e, request=request) 09:31:27 09:31:27 if isinstance(e.reason, _SSLError): 09:31:27 # This branch is for urllib3 v1.22 and later. 09:31:27 raise SSLError(e, request=request) 09:31:27 09:31:27 > raise ConnectionError(e, request=request) 09:31:27 E requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8184): Max retries exceeded with url: /rests/data/transportpce-portmapping:network/nodes=XPDR-A2/mapping=XPDR2-NETWORK1 (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/requests/adapters.py:700: ConnectionError 09:31:27 ----------------------------- Captured stdout call ----------------------------- 09:31:27 execution of test_06_mpdr_portmapping_NETWORK1 09:31:27 _____ TransportPCE400GPortMappingTesting.test_07_mpdr_portmapping_CLIENT1 ______ 09:31:27 09:31:27 self = 09:31:27 09:31:27 def _new_conn(self) -> socket.socket: 09:31:27 """Establish a socket connection and set nodelay settings on it. 09:31:27 09:31:27 :return: New socket connection. 09:31:27 """ 09:31:27 try: 09:31:27 > sock = connection.create_connection( 09:31:27 (self._dns_host, self.port), 09:31:27 self.timeout, 09:31:27 source_address=self.source_address, 09:31:27 socket_options=self.socket_options, 09:31:27 ) 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connection.py:199: 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/util/connection.py:85: in create_connection 09:31:27 raise err 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 09:31:27 address = ('localhost', 8184), timeout = 10, source_address = None 09:31:27 socket_options = [(6, 1, 1)] 09:31:27 09:31:27 def create_connection( 09:31:27 address: tuple[str, int], 09:31:27 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 09:31:27 source_address: tuple[str, int] | None = None, 09:31:27 socket_options: _TYPE_SOCKET_OPTIONS | None = None, 09:31:27 ) -> socket.socket: 09:31:27 """Connect to *address* and return the socket object. 09:31:27 09:31:27 Convenience function. Connect to *address* (a 2-tuple ``(host, 09:31:27 port)``) and return the socket object. Passing the optional 09:31:27 *timeout* parameter will set the timeout on the socket instance 09:31:27 before attempting to connect. If no *timeout* is supplied, the 09:31:27 global default timeout setting returned by :func:`socket.getdefaulttimeout` 09:31:27 is used. If *source_address* is set it must be a tuple of (host, port) 09:31:27 for the socket to bind as a source address before making the connection. 09:31:27 An host of '' or port 0 tells the OS to use the default. 09:31:27 """ 09:31:27 09:31:27 host, port = address 09:31:27 if host.startswith("["): 09:31:27 host = host.strip("[]") 09:31:27 err = None 09:31:27 09:31:27 # Using the value from allowed_gai_family() in the context of getaddrinfo lets 09:31:27 # us select whether to work with IPv4 DNS records, IPv6 records, or both. 09:31:27 # The original create_connection function always returns all records. 09:31:27 family = allowed_gai_family() 09:31:27 09:31:27 try: 09:31:27 host.encode("idna") 09:31:27 except UnicodeError: 09:31:27 raise LocationParseError(f"'{host}', label empty or too long") from None 09:31:27 09:31:27 for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 09:31:27 af, socktype, proto, canonname, sa = res 09:31:27 sock = None 09:31:27 try: 09:31:27 sock = socket.socket(af, socktype, proto) 09:31:27 09:31:27 # If provided, set socket level options before connecting. 09:31:27 _set_socket_options(sock, socket_options) 09:31:27 09:31:27 if timeout is not _DEFAULT_TIMEOUT: 09:31:27 sock.settimeout(timeout) 09:31:27 if source_address: 09:31:27 sock.bind(source_address) 09:31:27 > sock.connect(sa) 09:31:27 E ConnectionRefusedError: [Errno 111] Connection refused 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/util/connection.py:73: ConnectionRefusedError 09:31:27 09:31:27 The above exception was the direct cause of the following exception: 09:31:27 09:31:27 self = 09:31:27 method = 'GET' 09:31:27 url = '/rests/data/transportpce-portmapping:network/nodes=XPDR-A2/mapping=XPDR2-CLIENT1' 09:31:27 body = None 09:31:27 headers = {'User-Agent': 'python-requests/2.32.3', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'Connection': 'keep-alive', 'Content-Type': 'application/json', 'Authorization': 'Basic YWRtaW46YWRtaW4='} 09:31:27 retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 09:31:27 redirect = False, assert_same_host = False 09:31:27 timeout = Timeout(connect=10, read=10, total=None), pool_timeout = None 09:31:27 release_conn = False, chunked = False, body_pos = None, preload_content = False 09:31:27 decode_content = False, response_kw = {} 09:31:27 parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/rests/data/transportpce-portmapping:network/nodes=XPDR-A2/mapping=XPDR2-CLIENT1', query=None, fragment=None) 09:31:27 destination_scheme = None, conn = None, release_this_conn = True 09:31:27 http_tunnel_required = False, err = None, clean_exit = False 09:31:27 09:31:27 def urlopen( # type: ignore[override] 09:31:27 self, 09:31:27 method: str, 09:31:27 url: str, 09:31:27 body: _TYPE_BODY | None = None, 09:31:27 headers: typing.Mapping[str, str] | None = None, 09:31:27 retries: Retry | bool | int | None = None, 09:31:27 redirect: bool = True, 09:31:27 assert_same_host: bool = True, 09:31:27 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 09:31:27 pool_timeout: int | None = None, 09:31:27 release_conn: bool | None = None, 09:31:27 chunked: bool = False, 09:31:27 body_pos: _TYPE_BODY_POSITION | None = None, 09:31:27 preload_content: bool = True, 09:31:27 decode_content: bool = True, 09:31:27 **response_kw: typing.Any, 09:31:27 ) -> BaseHTTPResponse: 09:31:27 """ 09:31:27 Get a connection from the pool and perform an HTTP request. This is the 09:31:27 lowest level call for making a request, so you'll need to specify all 09:31:27 the raw details. 09:31:27 09:31:27 .. note:: 09:31:27 09:31:27 More commonly, it's appropriate to use a convenience method 09:31:27 such as :meth:`request`. 09:31:27 09:31:27 .. note:: 09:31:27 09:31:27 `release_conn` will only behave as expected if 09:31:27 `preload_content=False` because we want to make 09:31:27 `preload_content=False` the default behaviour someday soon without 09:31:27 breaking backwards compatibility. 09:31:27 09:31:27 :param method: 09:31:27 HTTP request method (such as GET, POST, PUT, etc.) 09:31:27 09:31:27 :param url: 09:31:27 The URL to perform the request on. 09:31:27 09:31:27 :param body: 09:31:27 Data to send in the request body, either :class:`str`, :class:`bytes`, 09:31:27 an iterable of :class:`str`/:class:`bytes`, or a file-like object. 09:31:27 09:31:27 :param headers: 09:31:27 Dictionary of custom headers to send, such as User-Agent, 09:31:27 If-None-Match, etc. If None, pool headers are used. If provided, 09:31:27 these headers completely replace any pool-specific headers. 09:31:27 09:31:27 :param retries: 09:31:27 Configure the number of retries to allow before raising a 09:31:27 :class:`~urllib3.exceptions.MaxRetryError` exception. 09:31:27 09:31:27 If ``None`` (default) will retry 3 times, see ``Retry.DEFAULT``. Pass a 09:31:27 :class:`~urllib3.util.retry.Retry` object for fine-grained control 09:31:27 over different types of retries. 09:31:27 Pass an integer number to retry connection errors that many times, 09:31:27 but no other types of errors. Pass zero to never retry. 09:31:27 09:31:27 If ``False``, then retries are disabled and any exception is raised 09:31:27 immediately. Also, instead of raising a MaxRetryError on redirects, 09:31:27 the redirect response will be returned. 09:31:27 09:31:27 :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 09:31:27 09:31:27 :param redirect: 09:31:27 If True, automatically handle redirects (status codes 301, 302, 09:31:27 303, 307, 308). Each redirect counts as a retry. Disabling retries 09:31:27 will disable redirect, too. 09:31:27 09:31:27 :param assert_same_host: 09:31:27 If ``True``, will make sure that the host of the pool requests is 09:31:27 consistent else will raise HostChangedError. When ``False``, you can 09:31:27 use the pool on an HTTP proxy and request foreign hosts. 09:31:27 09:31:27 :param timeout: 09:31:27 If specified, overrides the default timeout for this one 09:31:27 request. It may be a float (in seconds) or an instance of 09:31:27 :class:`urllib3.util.Timeout`. 09:31:27 09:31:27 :param pool_timeout: 09:31:27 If set and the pool is set to block=True, then this method will 09:31:27 block for ``pool_timeout`` seconds and raise EmptyPoolError if no 09:31:27 connection is available within the time period. 09:31:27 09:31:27 :param bool preload_content: 09:31:27 If True, the response's body will be preloaded into memory. 09:31:27 09:31:27 :param bool decode_content: 09:31:27 If True, will attempt to decode the body based on the 09:31:27 'content-encoding' header. 09:31:27 09:31:27 :param release_conn: 09:31:27 If False, then the urlopen call will not release the connection 09:31:27 back into the pool once a response is received (but will release if 09:31:27 you read the entire contents of the response such as when 09:31:27 `preload_content=True`). This is useful if you're not preloading 09:31:27 the response's content immediately. You will need to call 09:31:27 ``r.release_conn()`` on the response ``r`` to return the connection 09:31:27 back into the pool. If None, it takes the value of ``preload_content`` 09:31:27 which defaults to ``True``. 09:31:27 09:31:27 :param bool chunked: 09:31:27 If True, urllib3 will send the body using chunked transfer 09:31:27 encoding. Otherwise, urllib3 will send the body using the standard 09:31:27 content-length form. Defaults to False. 09:31:27 09:31:27 :param int body_pos: 09:31:27 Position to seek to in file-like body in the event of a retry or 09:31:27 redirect. Typically this won't need to be set because urllib3 will 09:31:27 auto-populate the value when needed. 09:31:27 """ 09:31:27 parsed_url = parse_url(url) 09:31:27 destination_scheme = parsed_url.scheme 09:31:27 09:31:27 if headers is None: 09:31:27 headers = self.headers 09:31:27 09:31:27 if not isinstance(retries, Retry): 09:31:27 retries = Retry.from_int(retries, redirect=redirect, default=self.retries) 09:31:27 09:31:27 if release_conn is None: 09:31:27 release_conn = preload_content 09:31:27 09:31:27 # Check host 09:31:27 if assert_same_host and not self.is_same_host(url): 09:31:27 raise HostChangedError(self, url, retries) 09:31:27 09:31:27 # Ensure that the URL we're connecting to is properly encoded 09:31:27 if url.startswith("/"): 09:31:27 url = to_str(_encode_target(url)) 09:31:27 else: 09:31:27 url = to_str(parsed_url.url) 09:31:27 09:31:27 conn = None 09:31:27 09:31:27 # Track whether `conn` needs to be released before 09:31:27 # returning/raising/recursing. Update this variable if necessary, and 09:31:27 # leave `release_conn` constant throughout the function. That way, if 09:31:27 # the function recurses, the original value of `release_conn` will be 09:31:27 # passed down into the recursive call, and its value will be respected. 09:31:27 # 09:31:27 # See issue #651 [1] for details. 09:31:27 # 09:31:27 # [1] 09:31:27 release_this_conn = release_conn 09:31:27 09:31:27 http_tunnel_required = connection_requires_http_tunnel( 09:31:27 self.proxy, self.proxy_config, destination_scheme 09:31:27 ) 09:31:27 09:31:27 # Merge the proxy headers. Only done when not using HTTP CONNECT. We 09:31:27 # have to copy the headers dict so we can safely change it without those 09:31:27 # changes being reflected in anyone else's copy. 09:31:27 if not http_tunnel_required: 09:31:27 headers = headers.copy() # type: ignore[attr-defined] 09:31:27 headers.update(self.proxy_headers) # type: ignore[union-attr] 09:31:27 09:31:27 # Must keep the exception bound to a separate variable or else Python 3 09:31:27 # complains about UnboundLocalError. 09:31:27 err = None 09:31:27 09:31:27 # Keep track of whether we cleanly exited the except block. This 09:31:27 # ensures we do proper cleanup in finally. 09:31:27 clean_exit = False 09:31:27 09:31:27 # Rewind body position, if needed. Record current position 09:31:27 # for future rewinds in the event of a redirect/retry. 09:31:27 body_pos = set_file_position(body, body_pos) 09:31:27 09:31:27 try: 09:31:27 # Request a connection from the queue. 09:31:27 timeout_obj = self._get_timeout(timeout) 09:31:27 conn = self._get_conn(timeout=pool_timeout) 09:31:27 09:31:27 conn.timeout = timeout_obj.connect_timeout # type: ignore[assignment] 09:31:27 09:31:27 # Is this a closed/new connection that requires CONNECT tunnelling? 09:31:27 if self.proxy is not None and http_tunnel_required and conn.is_closed: 09:31:27 try: 09:31:27 self._prepare_proxy(conn) 09:31:27 except (BaseSSLError, OSError, SocketTimeout) as e: 09:31:27 self._raise_timeout( 09:31:27 err=e, url=self.proxy.url, timeout_value=conn.timeout 09:31:27 ) 09:31:27 raise 09:31:27 09:31:27 # If we're going to release the connection in ``finally:``, then 09:31:27 # the response doesn't need to know about the connection. Otherwise 09:31:27 # it will also try to release it and we'll have a double-release 09:31:27 # mess. 09:31:27 response_conn = conn if not release_conn else None 09:31:27 09:31:27 # Make the request on the HTTPConnection object 09:31:27 > response = self._make_request( 09:31:27 conn, 09:31:27 method, 09:31:27 url, 09:31:27 timeout=timeout_obj, 09:31:27 body=body, 09:31:27 headers=headers, 09:31:27 chunked=chunked, 09:31:27 retries=retries, 09:31:27 response_conn=response_conn, 09:31:27 preload_content=preload_content, 09:31:27 decode_content=decode_content, 09:31:27 **response_kw, 09:31:27 ) 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:789: 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:495: in _make_request 09:31:27 conn.request( 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connection.py:441: in request 09:31:27 self.endheaders() 09:31:27 /opt/pyenv/versions/3.11.7/lib/python3.11/http/client.py:1289: in endheaders 09:31:27 self._send_output(message_body, encode_chunked=encode_chunked) 09:31:27 /opt/pyenv/versions/3.11.7/lib/python3.11/http/client.py:1048: in _send_output 09:31:27 self.send(msg) 09:31:27 /opt/pyenv/versions/3.11.7/lib/python3.11/http/client.py:986: in send 09:31:27 self.connect() 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connection.py:279: in connect 09:31:27 self.sock = self._new_conn() 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 09:31:27 self = 09:31:27 09:31:27 def _new_conn(self) -> socket.socket: 09:31:27 """Establish a socket connection and set nodelay settings on it. 09:31:27 09:31:27 :return: New socket connection. 09:31:27 """ 09:31:27 try: 09:31:27 sock = connection.create_connection( 09:31:27 (self._dns_host, self.port), 09:31:27 self.timeout, 09:31:27 source_address=self.source_address, 09:31:27 socket_options=self.socket_options, 09:31:27 ) 09:31:27 except socket.gaierror as e: 09:31:27 raise NameResolutionError(self.host, self, e) from e 09:31:27 except SocketTimeout as e: 09:31:27 raise ConnectTimeoutError( 09:31:27 self, 09:31:27 f"Connection to {self.host} timed out. (connect timeout={self.timeout})", 09:31:27 ) from e 09:31:27 09:31:27 except OSError as e: 09:31:27 > raise NewConnectionError( 09:31:27 self, f"Failed to establish a new connection: {e}" 09:31:27 ) from e 09:31:27 E urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [Errno 111] Connection refused 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connection.py:214: NewConnectionError 09:31:27 09:31:27 The above exception was the direct cause of the following exception: 09:31:27 09:31:27 self = 09:31:27 request = , stream = False 09:31:27 timeout = Timeout(connect=10, read=10, total=None), verify = True, cert = None 09:31:27 proxies = OrderedDict() 09:31:27 09:31:27 def send( 09:31:27 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 09:31:27 ): 09:31:27 """Sends PreparedRequest object. Returns Response object. 09:31:27 09:31:27 :param request: The :class:`PreparedRequest ` being sent. 09:31:27 :param stream: (optional) Whether to stream the request content. 09:31:27 :param timeout: (optional) How long to wait for the server to send 09:31:27 data before giving up, as a float, or a :ref:`(connect timeout, 09:31:27 read timeout) ` tuple. 09:31:27 :type timeout: float or tuple or urllib3 Timeout object 09:31:27 :param verify: (optional) Either a boolean, in which case it controls whether 09:31:27 we verify the server's TLS certificate, or a string, in which case it 09:31:27 must be a path to a CA bundle to use 09:31:27 :param cert: (optional) Any user-provided SSL certificate to be trusted. 09:31:27 :param proxies: (optional) The proxies dictionary to apply to the request. 09:31:27 :rtype: requests.Response 09:31:27 """ 09:31:27 09:31:27 try: 09:31:27 conn = self.get_connection_with_tls_context( 09:31:27 request, verify, proxies=proxies, cert=cert 09:31:27 ) 09:31:27 except LocationValueError as e: 09:31:27 raise InvalidURL(e, request=request) 09:31:27 09:31:27 self.cert_verify(conn, request.url, verify, cert) 09:31:27 url = self.request_url(request, proxies) 09:31:27 self.add_headers( 09:31:27 request, 09:31:27 stream=stream, 09:31:27 timeout=timeout, 09:31:27 verify=verify, 09:31:27 cert=cert, 09:31:27 proxies=proxies, 09:31:27 ) 09:31:27 09:31:27 chunked = not (request.body is None or "Content-Length" in request.headers) 09:31:27 09:31:27 if isinstance(timeout, tuple): 09:31:27 try: 09:31:27 connect, read = timeout 09:31:27 timeout = TimeoutSauce(connect=connect, read=read) 09:31:27 except ValueError: 09:31:27 raise ValueError( 09:31:27 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 09:31:27 f"or a single float to set both timeouts to the same value." 09:31:27 ) 09:31:27 elif isinstance(timeout, TimeoutSauce): 09:31:27 pass 09:31:27 else: 09:31:27 timeout = TimeoutSauce(connect=timeout, read=timeout) 09:31:27 09:31:27 try: 09:31:27 > resp = conn.urlopen( 09:31:27 method=request.method, 09:31:27 url=url, 09:31:27 body=request.body, 09:31:27 headers=request.headers, 09:31:27 redirect=False, 09:31:27 assert_same_host=False, 09:31:27 preload_content=False, 09:31:27 decode_content=False, 09:31:27 retries=self.max_retries, 09:31:27 timeout=timeout, 09:31:27 chunked=chunked, 09:31:27 ) 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/requests/adapters.py:667: 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:843: in urlopen 09:31:27 retries = retries.increment( 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 09:31:27 self = Retry(total=0, connect=None, read=False, redirect=None, status=None) 09:31:27 method = 'GET' 09:31:27 url = '/rests/data/transportpce-portmapping:network/nodes=XPDR-A2/mapping=XPDR2-CLIENT1' 09:31:27 response = None 09:31:27 error = NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused') 09:31:27 _pool = 09:31:27 _stacktrace = 09:31:27 09:31:27 def increment( 09:31:27 self, 09:31:27 method: str | None = None, 09:31:27 url: str | None = None, 09:31:27 response: BaseHTTPResponse | None = None, 09:31:27 error: Exception | None = None, 09:31:27 _pool: ConnectionPool | None = None, 09:31:27 _stacktrace: TracebackType | None = None, 09:31:27 ) -> Self: 09:31:27 """Return a new Retry object with incremented retry counters. 09:31:27 09:31:27 :param response: A response object, or None, if the server did not 09:31:27 return a response. 09:31:27 :type response: :class:`~urllib3.response.BaseHTTPResponse` 09:31:27 :param Exception error: An error encountered during the request, or 09:31:27 None if the response was received successfully. 09:31:27 09:31:27 :return: A new ``Retry`` object. 09:31:27 """ 09:31:27 if self.total is False and error: 09:31:27 # Disabled, indicate to re-raise the error. 09:31:27 raise reraise(type(error), error, _stacktrace) 09:31:27 09:31:27 total = self.total 09:31:27 if total is not None: 09:31:27 total -= 1 09:31:27 09:31:27 connect = self.connect 09:31:27 read = self.read 09:31:27 redirect = self.redirect 09:31:27 status_count = self.status 09:31:27 other = self.other 09:31:27 cause = "unknown" 09:31:27 status = None 09:31:27 redirect_location = None 09:31:27 09:31:27 if error and self._is_connection_error(error): 09:31:27 # Connect retry? 09:31:27 if connect is False: 09:31:27 raise reraise(type(error), error, _stacktrace) 09:31:27 elif connect is not None: 09:31:27 connect -= 1 09:31:27 09:31:27 elif error and self._is_read_error(error): 09:31:27 # Read retry? 09:31:27 if read is False or method is None or not self._is_method_retryable(method): 09:31:27 raise reraise(type(error), error, _stacktrace) 09:31:27 elif read is not None: 09:31:27 read -= 1 09:31:27 09:31:27 elif error: 09:31:27 # Other retry? 09:31:27 if other is not None: 09:31:27 other -= 1 09:31:27 09:31:27 elif response and response.get_redirect_location(): 09:31:27 # Redirect retry? 09:31:27 if redirect is not None: 09:31:27 redirect -= 1 09:31:27 cause = "too many redirects" 09:31:27 response_redirect_location = response.get_redirect_location() 09:31:27 if response_redirect_location: 09:31:27 redirect_location = response_redirect_location 09:31:27 status = response.status 09:31:27 09:31:27 else: 09:31:27 # Incrementing because of a server error like a 500 in 09:31:27 # status_forcelist and the given method is in the allowed_methods 09:31:27 cause = ResponseError.GENERIC_ERROR 09:31:27 if response and response.status: 09:31:27 if status_count is not None: 09:31:27 status_count -= 1 09:31:27 cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) 09:31:27 status = response.status 09:31:27 09:31:27 history = self.history + ( 09:31:27 RequestHistory(method, url, error, status, redirect_location), 09:31:27 ) 09:31:27 09:31:27 new_retry = self.new( 09:31:27 total=total, 09:31:27 connect=connect, 09:31:27 read=read, 09:31:27 redirect=redirect, 09:31:27 status=status_count, 09:31:27 other=other, 09:31:27 history=history, 09:31:27 ) 09:31:27 09:31:27 if new_retry.is_exhausted(): 09:31:27 reason = error or ResponseError(cause) 09:31:27 > raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] 09:31:27 E urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8184): Max retries exceeded with url: /rests/data/transportpce-portmapping:network/nodes=XPDR-A2/mapping=XPDR2-CLIENT1 (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/util/retry.py:519: MaxRetryError 09:31:27 09:31:27 During handling of the above exception, another exception occurred: 09:31:27 09:31:27 self = 09:31:27 09:31:27 def test_07_mpdr_portmapping_CLIENT1(self): 09:31:27 > res = test_utils.get_portmapping_node_attr("XPDR-A2", "mapping", "XPDR2-CLIENT1") 09:31:27 09:31:27 transportpce_tests/7.1/test01_portmapping.py:131: 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 transportpce_tests/common/test_utils.py:470: in get_portmapping_node_attr 09:31:27 response = get_request(target_url) 09:31:27 transportpce_tests/common/test_utils.py:116: in get_request 09:31:27 return requests.request( 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/requests/api.py:59: in request 09:31:27 return session.request(method=method, url=url, **kwargs) 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/requests/sessions.py:589: in request 09:31:27 resp = self.send(prep, **send_kwargs) 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/requests/sessions.py:703: in send 09:31:27 r = adapter.send(request, **kwargs) 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 09:31:27 self = 09:31:27 request = , stream = False 09:31:27 timeout = Timeout(connect=10, read=10, total=None), verify = True, cert = None 09:31:27 proxies = OrderedDict() 09:31:27 09:31:27 def send( 09:31:27 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 09:31:27 ): 09:31:27 """Sends PreparedRequest object. Returns Response object. 09:31:27 09:31:27 :param request: The :class:`PreparedRequest ` being sent. 09:31:27 :param stream: (optional) Whether to stream the request content. 09:31:27 :param timeout: (optional) How long to wait for the server to send 09:31:27 data before giving up, as a float, or a :ref:`(connect timeout, 09:31:27 read timeout) ` tuple. 09:31:27 :type timeout: float or tuple or urllib3 Timeout object 09:31:27 :param verify: (optional) Either a boolean, in which case it controls whether 09:31:27 we verify the server's TLS certificate, or a string, in which case it 09:31:27 must be a path to a CA bundle to use 09:31:27 :param cert: (optional) Any user-provided SSL certificate to be trusted. 09:31:27 :param proxies: (optional) The proxies dictionary to apply to the request. 09:31:27 :rtype: requests.Response 09:31:27 """ 09:31:27 09:31:27 try: 09:31:27 conn = self.get_connection_with_tls_context( 09:31:27 request, verify, proxies=proxies, cert=cert 09:31:27 ) 09:31:27 except LocationValueError as e: 09:31:27 raise InvalidURL(e, request=request) 09:31:27 09:31:27 self.cert_verify(conn, request.url, verify, cert) 09:31:27 url = self.request_url(request, proxies) 09:31:27 self.add_headers( 09:31:27 request, 09:31:27 stream=stream, 09:31:27 timeout=timeout, 09:31:27 verify=verify, 09:31:27 cert=cert, 09:31:27 proxies=proxies, 09:31:27 ) 09:31:27 09:31:27 chunked = not (request.body is None or "Content-Length" in request.headers) 09:31:27 09:31:27 if isinstance(timeout, tuple): 09:31:27 try: 09:31:27 connect, read = timeout 09:31:27 timeout = TimeoutSauce(connect=connect, read=read) 09:31:27 except ValueError: 09:31:27 raise ValueError( 09:31:27 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 09:31:27 f"or a single float to set both timeouts to the same value." 09:31:27 ) 09:31:27 elif isinstance(timeout, TimeoutSauce): 09:31:27 pass 09:31:27 else: 09:31:27 timeout = TimeoutSauce(connect=timeout, read=timeout) 09:31:27 09:31:27 try: 09:31:27 resp = conn.urlopen( 09:31:27 method=request.method, 09:31:27 url=url, 09:31:27 body=request.body, 09:31:27 headers=request.headers, 09:31:27 redirect=False, 09:31:27 assert_same_host=False, 09:31:27 preload_content=False, 09:31:27 decode_content=False, 09:31:27 retries=self.max_retries, 09:31:27 timeout=timeout, 09:31:27 chunked=chunked, 09:31:27 ) 09:31:27 09:31:27 except (ProtocolError, OSError) as err: 09:31:27 raise ConnectionError(err, request=request) 09:31:27 09:31:27 except MaxRetryError as e: 09:31:27 if isinstance(e.reason, ConnectTimeoutError): 09:31:27 # TODO: Remove this in 3.0.0: see #2811 09:31:27 if not isinstance(e.reason, NewConnectionError): 09:31:27 raise ConnectTimeout(e, request=request) 09:31:27 09:31:27 if isinstance(e.reason, ResponseError): 09:31:27 raise RetryError(e, request=request) 09:31:27 09:31:27 if isinstance(e.reason, _ProxyError): 09:31:27 raise ProxyError(e, request=request) 09:31:27 09:31:27 if isinstance(e.reason, _SSLError): 09:31:27 # This branch is for urllib3 v1.22 and later. 09:31:27 raise SSLError(e, request=request) 09:31:27 09:31:27 > raise ConnectionError(e, request=request) 09:31:27 E requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8184): Max retries exceeded with url: /rests/data/transportpce-portmapping:network/nodes=XPDR-A2/mapping=XPDR2-CLIENT1 (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/requests/adapters.py:700: ConnectionError 09:31:27 ----------------------------- Captured stdout call ----------------------------- 09:31:27 execution of test_07_mpdr_portmapping_CLIENT1 09:31:27 ________ TransportPCE400GPortMappingTesting.test_08_check_mccapprofile _________ 09:31:27 09:31:27 self = 09:31:27 09:31:27 def _new_conn(self) -> socket.socket: 09:31:27 """Establish a socket connection and set nodelay settings on it. 09:31:27 09:31:27 :return: New socket connection. 09:31:27 """ 09:31:27 try: 09:31:27 > sock = connection.create_connection( 09:31:27 (self._dns_host, self.port), 09:31:27 self.timeout, 09:31:27 source_address=self.source_address, 09:31:27 socket_options=self.socket_options, 09:31:27 ) 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connection.py:199: 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/util/connection.py:85: in create_connection 09:31:27 raise err 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 09:31:27 address = ('localhost', 8184), timeout = 10, source_address = None 09:31:27 socket_options = [(6, 1, 1)] 09:31:27 09:31:27 def create_connection( 09:31:27 address: tuple[str, int], 09:31:27 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 09:31:27 source_address: tuple[str, int] | None = None, 09:31:27 socket_options: _TYPE_SOCKET_OPTIONS | None = None, 09:31:27 ) -> socket.socket: 09:31:27 """Connect to *address* and return the socket object. 09:31:27 09:31:27 Convenience function. Connect to *address* (a 2-tuple ``(host, 09:31:27 port)``) and return the socket object. Passing the optional 09:31:27 *timeout* parameter will set the timeout on the socket instance 09:31:27 before attempting to connect. If no *timeout* is supplied, the 09:31:27 global default timeout setting returned by :func:`socket.getdefaulttimeout` 09:31:27 is used. If *source_address* is set it must be a tuple of (host, port) 09:31:27 for the socket to bind as a source address before making the connection. 09:31:27 An host of '' or port 0 tells the OS to use the default. 09:31:27 """ 09:31:27 09:31:27 host, port = address 09:31:27 if host.startswith("["): 09:31:27 host = host.strip("[]") 09:31:27 err = None 09:31:27 09:31:27 # Using the value from allowed_gai_family() in the context of getaddrinfo lets 09:31:27 # us select whether to work with IPv4 DNS records, IPv6 records, or both. 09:31:27 # The original create_connection function always returns all records. 09:31:27 family = allowed_gai_family() 09:31:27 09:31:27 try: 09:31:27 host.encode("idna") 09:31:27 except UnicodeError: 09:31:27 raise LocationParseError(f"'{host}', label empty or too long") from None 09:31:27 09:31:27 for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 09:31:27 af, socktype, proto, canonname, sa = res 09:31:27 sock = None 09:31:27 try: 09:31:27 sock = socket.socket(af, socktype, proto) 09:31:27 09:31:27 # If provided, set socket level options before connecting. 09:31:27 _set_socket_options(sock, socket_options) 09:31:27 09:31:27 if timeout is not _DEFAULT_TIMEOUT: 09:31:27 sock.settimeout(timeout) 09:31:27 if source_address: 09:31:27 sock.bind(source_address) 09:31:27 > sock.connect(sa) 09:31:27 E ConnectionRefusedError: [Errno 111] Connection refused 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/util/connection.py:73: ConnectionRefusedError 09:31:27 09:31:27 The above exception was the direct cause of the following exception: 09:31:27 09:31:27 self = 09:31:27 method = 'GET' 09:31:27 url = '/rests/data/transportpce-portmapping:network/nodes=XPDR-A2/mc-capabilities=XPDR-mcprofile' 09:31:27 body = None 09:31:27 headers = {'User-Agent': 'python-requests/2.32.3', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'Connection': 'keep-alive', 'Content-Type': 'application/json', 'Authorization': 'Basic YWRtaW46YWRtaW4='} 09:31:27 retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 09:31:27 redirect = False, assert_same_host = False 09:31:27 timeout = Timeout(connect=10, read=10, total=None), pool_timeout = None 09:31:27 release_conn = False, chunked = False, body_pos = None, preload_content = False 09:31:27 decode_content = False, response_kw = {} 09:31:27 parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/rests/data/transportpce-portmapping:network/nodes=XPDR-A2/mc-capabilities=XPDR-mcprofile', query=None, fragment=None) 09:31:27 destination_scheme = None, conn = None, release_this_conn = True 09:31:27 http_tunnel_required = False, err = None, clean_exit = False 09:31:27 09:31:27 def urlopen( # type: ignore[override] 09:31:27 self, 09:31:27 method: str, 09:31:27 url: str, 09:31:27 body: _TYPE_BODY | None = None, 09:31:27 headers: typing.Mapping[str, str] | None = None, 09:31:27 retries: Retry | bool | int | None = None, 09:31:27 redirect: bool = True, 09:31:27 assert_same_host: bool = True, 09:31:27 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 09:31:27 pool_timeout: int | None = None, 09:31:27 release_conn: bool | None = None, 09:31:27 chunked: bool = False, 09:31:27 body_pos: _TYPE_BODY_POSITION | None = None, 09:31:27 preload_content: bool = True, 09:31:27 decode_content: bool = True, 09:31:27 **response_kw: typing.Any, 09:31:27 ) -> BaseHTTPResponse: 09:31:27 """ 09:31:27 Get a connection from the pool and perform an HTTP request. This is the 09:31:27 lowest level call for making a request, so you'll need to specify all 09:31:27 the raw details. 09:31:27 09:31:27 .. note:: 09:31:27 09:31:27 More commonly, it's appropriate to use a convenience method 09:31:27 such as :meth:`request`. 09:31:27 09:31:27 .. note:: 09:31:27 09:31:27 `release_conn` will only behave as expected if 09:31:27 `preload_content=False` because we want to make 09:31:27 `preload_content=False` the default behaviour someday soon without 09:31:27 breaking backwards compatibility. 09:31:27 09:31:27 :param method: 09:31:27 HTTP request method (such as GET, POST, PUT, etc.) 09:31:27 09:31:27 :param url: 09:31:27 The URL to perform the request on. 09:31:27 09:31:27 :param body: 09:31:27 Data to send in the request body, either :class:`str`, :class:`bytes`, 09:31:27 an iterable of :class:`str`/:class:`bytes`, or a file-like object. 09:31:27 09:31:27 :param headers: 09:31:27 Dictionary of custom headers to send, such as User-Agent, 09:31:27 If-None-Match, etc. If None, pool headers are used. If provided, 09:31:27 these headers completely replace any pool-specific headers. 09:31:27 09:31:27 :param retries: 09:31:27 Configure the number of retries to allow before raising a 09:31:27 :class:`~urllib3.exceptions.MaxRetryError` exception. 09:31:27 09:31:27 If ``None`` (default) will retry 3 times, see ``Retry.DEFAULT``. Pass a 09:31:27 :class:`~urllib3.util.retry.Retry` object for fine-grained control 09:31:27 over different types of retries. 09:31:27 Pass an integer number to retry connection errors that many times, 09:31:27 but no other types of errors. Pass zero to never retry. 09:31:27 09:31:27 If ``False``, then retries are disabled and any exception is raised 09:31:27 immediately. Also, instead of raising a MaxRetryError on redirects, 09:31:27 the redirect response will be returned. 09:31:27 09:31:27 :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 09:31:27 09:31:27 :param redirect: 09:31:27 If True, automatically handle redirects (status codes 301, 302, 09:31:27 303, 307, 308). Each redirect counts as a retry. Disabling retries 09:31:27 will disable redirect, too. 09:31:27 09:31:27 :param assert_same_host: 09:31:27 If ``True``, will make sure that the host of the pool requests is 09:31:27 consistent else will raise HostChangedError. When ``False``, you can 09:31:27 use the pool on an HTTP proxy and request foreign hosts. 09:31:27 09:31:27 :param timeout: 09:31:27 If specified, overrides the default timeout for this one 09:31:27 request. It may be a float (in seconds) or an instance of 09:31:27 :class:`urllib3.util.Timeout`. 09:31:27 09:31:27 :param pool_timeout: 09:31:27 If set and the pool is set to block=True, then this method will 09:31:27 block for ``pool_timeout`` seconds and raise EmptyPoolError if no 09:31:27 connection is available within the time period. 09:31:27 09:31:27 :param bool preload_content: 09:31:27 If True, the response's body will be preloaded into memory. 09:31:27 09:31:27 :param bool decode_content: 09:31:27 If True, will attempt to decode the body based on the 09:31:27 'content-encoding' header. 09:31:27 09:31:27 :param release_conn: 09:31:27 If False, then the urlopen call will not release the connection 09:31:27 back into the pool once a response is received (but will release if 09:31:27 you read the entire contents of the response such as when 09:31:27 `preload_content=True`). This is useful if you're not preloading 09:31:27 the response's content immediately. You will need to call 09:31:27 ``r.release_conn()`` on the response ``r`` to return the connection 09:31:27 back into the pool. If None, it takes the value of ``preload_content`` 09:31:27 which defaults to ``True``. 09:31:27 09:31:27 :param bool chunked: 09:31:27 If True, urllib3 will send the body using chunked transfer 09:31:27 encoding. Otherwise, urllib3 will send the body using the standard 09:31:27 content-length form. Defaults to False. 09:31:27 09:31:27 :param int body_pos: 09:31:27 Position to seek to in file-like body in the event of a retry or 09:31:27 redirect. Typically this won't need to be set because urllib3 will 09:31:27 auto-populate the value when needed. 09:31:27 """ 09:31:27 parsed_url = parse_url(url) 09:31:27 destination_scheme = parsed_url.scheme 09:31:27 09:31:27 if headers is None: 09:31:27 headers = self.headers 09:31:27 09:31:27 if not isinstance(retries, Retry): 09:31:27 retries = Retry.from_int(retries, redirect=redirect, default=self.retries) 09:31:27 09:31:27 if release_conn is None: 09:31:27 release_conn = preload_content 09:31:27 09:31:27 # Check host 09:31:27 if assert_same_host and not self.is_same_host(url): 09:31:27 raise HostChangedError(self, url, retries) 09:31:27 09:31:27 # Ensure that the URL we're connecting to is properly encoded 09:31:27 if url.startswith("/"): 09:31:27 url = to_str(_encode_target(url)) 09:31:27 else: 09:31:27 url = to_str(parsed_url.url) 09:31:27 09:31:27 conn = None 09:31:27 09:31:27 # Track whether `conn` needs to be released before 09:31:27 # returning/raising/recursing. Update this variable if necessary, and 09:31:27 # leave `release_conn` constant throughout the function. That way, if 09:31:27 # the function recurses, the original value of `release_conn` will be 09:31:27 # passed down into the recursive call, and its value will be respected. 09:31:27 # 09:31:27 # See issue #651 [1] for details. 09:31:27 # 09:31:27 # [1] 09:31:27 release_this_conn = release_conn 09:31:27 09:31:27 http_tunnel_required = connection_requires_http_tunnel( 09:31:27 self.proxy, self.proxy_config, destination_scheme 09:31:27 ) 09:31:27 09:31:27 # Merge the proxy headers. Only done when not using HTTP CONNECT. We 09:31:27 # have to copy the headers dict so we can safely change it without those 09:31:27 # changes being reflected in anyone else's copy. 09:31:27 if not http_tunnel_required: 09:31:27 headers = headers.copy() # type: ignore[attr-defined] 09:31:27 headers.update(self.proxy_headers) # type: ignore[union-attr] 09:31:27 09:31:27 # Must keep the exception bound to a separate variable or else Python 3 09:31:27 # complains about UnboundLocalError. 09:31:27 err = None 09:31:27 09:31:27 # Keep track of whether we cleanly exited the except block. This 09:31:27 # ensures we do proper cleanup in finally. 09:31:27 clean_exit = False 09:31:27 09:31:27 # Rewind body position, if needed. Record current position 09:31:27 # for future rewinds in the event of a redirect/retry. 09:31:27 body_pos = set_file_position(body, body_pos) 09:31:27 09:31:27 try: 09:31:27 # Request a connection from the queue. 09:31:27 timeout_obj = self._get_timeout(timeout) 09:31:27 conn = self._get_conn(timeout=pool_timeout) 09:31:27 09:31:27 conn.timeout = timeout_obj.connect_timeout # type: ignore[assignment] 09:31:27 09:31:27 # Is this a closed/new connection that requires CONNECT tunnelling? 09:31:27 if self.proxy is not None and http_tunnel_required and conn.is_closed: 09:31:27 try: 09:31:27 self._prepare_proxy(conn) 09:31:27 except (BaseSSLError, OSError, SocketTimeout) as e: 09:31:27 self._raise_timeout( 09:31:27 err=e, url=self.proxy.url, timeout_value=conn.timeout 09:31:27 ) 09:31:27 raise 09:31:27 09:31:27 # If we're going to release the connection in ``finally:``, then 09:31:27 # the response doesn't need to know about the connection. Otherwise 09:31:27 # it will also try to release it and we'll have a double-release 09:31:27 # mess. 09:31:27 response_conn = conn if not release_conn else None 09:31:27 09:31:27 # Make the request on the HTTPConnection object 09:31:27 > response = self._make_request( 09:31:27 conn, 09:31:27 method, 09:31:27 url, 09:31:27 timeout=timeout_obj, 09:31:27 body=body, 09:31:27 headers=headers, 09:31:27 chunked=chunked, 09:31:27 retries=retries, 09:31:27 response_conn=response_conn, 09:31:27 preload_content=preload_content, 09:31:27 decode_content=decode_content, 09:31:27 **response_kw, 09:31:27 ) 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:789: 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:495: in _make_request 09:31:27 conn.request( 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connection.py:441: in request 09:31:27 self.endheaders() 09:31:27 /opt/pyenv/versions/3.11.7/lib/python3.11/http/client.py:1289: in endheaders 09:31:27 self._send_output(message_body, encode_chunked=encode_chunked) 09:31:27 /opt/pyenv/versions/3.11.7/lib/python3.11/http/client.py:1048: in _send_output 09:31:27 self.send(msg) 09:31:27 /opt/pyenv/versions/3.11.7/lib/python3.11/http/client.py:986: in send 09:31:27 self.connect() 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connection.py:279: in connect 09:31:27 self.sock = self._new_conn() 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 09:31:27 self = 09:31:27 09:31:27 def _new_conn(self) -> socket.socket: 09:31:27 """Establish a socket connection and set nodelay settings on it. 09:31:27 09:31:27 :return: New socket connection. 09:31:27 """ 09:31:27 try: 09:31:27 sock = connection.create_connection( 09:31:27 (self._dns_host, self.port), 09:31:27 self.timeout, 09:31:27 source_address=self.source_address, 09:31:27 socket_options=self.socket_options, 09:31:27 ) 09:31:27 except socket.gaierror as e: 09:31:27 raise NameResolutionError(self.host, self, e) from e 09:31:27 except SocketTimeout as e: 09:31:27 raise ConnectTimeoutError( 09:31:27 self, 09:31:27 f"Connection to {self.host} timed out. (connect timeout={self.timeout})", 09:31:27 ) from e 09:31:27 09:31:27 except OSError as e: 09:31:27 > raise NewConnectionError( 09:31:27 self, f"Failed to establish a new connection: {e}" 09:31:27 ) from e 09:31:27 E urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [Errno 111] Connection refused 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connection.py:214: NewConnectionError 09:31:27 09:31:27 The above exception was the direct cause of the following exception: 09:31:27 09:31:27 self = 09:31:27 request = , stream = False 09:31:27 timeout = Timeout(connect=10, read=10, total=None), verify = True, cert = None 09:31:27 proxies = OrderedDict() 09:31:27 09:31:27 def send( 09:31:27 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 09:31:27 ): 09:31:27 """Sends PreparedRequest object. Returns Response object. 09:31:27 09:31:27 :param request: The :class:`PreparedRequest ` being sent. 09:31:27 :param stream: (optional) Whether to stream the request content. 09:31:27 :param timeout: (optional) How long to wait for the server to send 09:31:27 data before giving up, as a float, or a :ref:`(connect timeout, 09:31:27 read timeout) ` tuple. 09:31:27 :type timeout: float or tuple or urllib3 Timeout object 09:31:27 :param verify: (optional) Either a boolean, in which case it controls whether 09:31:27 we verify the server's TLS certificate, or a string, in which case it 09:31:27 must be a path to a CA bundle to use 09:31:27 :param cert: (optional) Any user-provided SSL certificate to be trusted. 09:31:27 :param proxies: (optional) The proxies dictionary to apply to the request. 09:31:27 :rtype: requests.Response 09:31:27 """ 09:31:27 09:31:27 try: 09:31:27 conn = self.get_connection_with_tls_context( 09:31:27 request, verify, proxies=proxies, cert=cert 09:31:27 ) 09:31:27 except LocationValueError as e: 09:31:27 raise InvalidURL(e, request=request) 09:31:27 09:31:27 self.cert_verify(conn, request.url, verify, cert) 09:31:27 url = self.request_url(request, proxies) 09:31:27 self.add_headers( 09:31:27 request, 09:31:27 stream=stream, 09:31:27 timeout=timeout, 09:31:27 verify=verify, 09:31:27 cert=cert, 09:31:27 proxies=proxies, 09:31:27 ) 09:31:27 09:31:27 chunked = not (request.body is None or "Content-Length" in request.headers) 09:31:27 09:31:27 if isinstance(timeout, tuple): 09:31:27 try: 09:31:27 connect, read = timeout 09:31:27 timeout = TimeoutSauce(connect=connect, read=read) 09:31:27 except ValueError: 09:31:27 raise ValueError( 09:31:27 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 09:31:27 f"or a single float to set both timeouts to the same value." 09:31:27 ) 09:31:27 elif isinstance(timeout, TimeoutSauce): 09:31:27 pass 09:31:27 else: 09:31:27 timeout = TimeoutSauce(connect=timeout, read=timeout) 09:31:27 09:31:27 try: 09:31:27 > resp = conn.urlopen( 09:31:27 method=request.method, 09:31:27 url=url, 09:31:27 body=request.body, 09:31:27 headers=request.headers, 09:31:27 redirect=False, 09:31:27 assert_same_host=False, 09:31:27 preload_content=False, 09:31:27 decode_content=False, 09:31:27 retries=self.max_retries, 09:31:27 timeout=timeout, 09:31:27 chunked=chunked, 09:31:27 ) 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/requests/adapters.py:667: 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:843: in urlopen 09:31:27 retries = retries.increment( 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 09:31:27 self = Retry(total=0, connect=None, read=False, redirect=None, status=None) 09:31:27 method = 'GET' 09:31:27 url = '/rests/data/transportpce-portmapping:network/nodes=XPDR-A2/mc-capabilities=XPDR-mcprofile' 09:31:27 response = None 09:31:27 error = NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused') 09:31:27 _pool = 09:31:27 _stacktrace = 09:31:27 09:31:27 def increment( 09:31:27 self, 09:31:27 method: str | None = None, 09:31:27 url: str | None = None, 09:31:27 response: BaseHTTPResponse | None = None, 09:31:27 error: Exception | None = None, 09:31:27 _pool: ConnectionPool | None = None, 09:31:27 _stacktrace: TracebackType | None = None, 09:31:27 ) -> Self: 09:31:27 """Return a new Retry object with incremented retry counters. 09:31:27 09:31:27 :param response: A response object, or None, if the server did not 09:31:27 return a response. 09:31:27 :type response: :class:`~urllib3.response.BaseHTTPResponse` 09:31:27 :param Exception error: An error encountered during the request, or 09:31:27 None if the response was received successfully. 09:31:27 09:31:27 :return: A new ``Retry`` object. 09:31:27 """ 09:31:27 if self.total is False and error: 09:31:27 # Disabled, indicate to re-raise the error. 09:31:27 raise reraise(type(error), error, _stacktrace) 09:31:27 09:31:27 total = self.total 09:31:27 if total is not None: 09:31:27 total -= 1 09:31:27 09:31:27 connect = self.connect 09:31:27 read = self.read 09:31:27 redirect = self.redirect 09:31:27 status_count = self.status 09:31:27 other = self.other 09:31:27 cause = "unknown" 09:31:27 status = None 09:31:27 redirect_location = None 09:31:27 09:31:27 if error and self._is_connection_error(error): 09:31:27 # Connect retry? 09:31:27 if connect is False: 09:31:27 raise reraise(type(error), error, _stacktrace) 09:31:27 elif connect is not None: 09:31:27 connect -= 1 09:31:27 09:31:27 elif error and self._is_read_error(error): 09:31:27 # Read retry? 09:31:27 if read is False or method is None or not self._is_method_retryable(method): 09:31:27 raise reraise(type(error), error, _stacktrace) 09:31:27 elif read is not None: 09:31:27 read -= 1 09:31:27 09:31:27 elif error: 09:31:27 # Other retry? 09:31:27 if other is not None: 09:31:27 other -= 1 09:31:27 09:31:27 elif response and response.get_redirect_location(): 09:31:27 # Redirect retry? 09:31:27 if redirect is not None: 09:31:27 redirect -= 1 09:31:27 cause = "too many redirects" 09:31:27 response_redirect_location = response.get_redirect_location() 09:31:27 if response_redirect_location: 09:31:27 redirect_location = response_redirect_location 09:31:27 status = response.status 09:31:27 09:31:27 else: 09:31:27 # Incrementing because of a server error like a 500 in 09:31:27 # status_forcelist and the given method is in the allowed_methods 09:31:27 cause = ResponseError.GENERIC_ERROR 09:31:27 if response and response.status: 09:31:27 if status_count is not None: 09:31:27 status_count -= 1 09:31:27 cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) 09:31:27 status = response.status 09:31:27 09:31:27 history = self.history + ( 09:31:27 RequestHistory(method, url, error, status, redirect_location), 09:31:27 ) 09:31:27 09:31:27 new_retry = self.new( 09:31:27 total=total, 09:31:27 connect=connect, 09:31:27 read=read, 09:31:27 redirect=redirect, 09:31:27 status=status_count, 09:31:27 other=other, 09:31:27 history=history, 09:31:27 ) 09:31:27 09:31:27 if new_retry.is_exhausted(): 09:31:27 reason = error or ResponseError(cause) 09:31:27 > raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] 09:31:27 E urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8184): Max retries exceeded with url: /rests/data/transportpce-portmapping:network/nodes=XPDR-A2/mc-capabilities=XPDR-mcprofile (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/util/retry.py:519: MaxRetryError 09:31:27 09:31:27 During handling of the above exception, another exception occurred: 09:31:27 09:31:27 self = 09:31:27 09:31:27 def test_08_check_mccapprofile(self): 09:31:27 > res = test_utils.get_portmapping_node_attr("XPDR-A2", "mc-capabilities", "XPDR-mcprofile") 09:31:27 09:31:27 transportpce_tests/7.1/test01_portmapping.py:151: 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 transportpce_tests/common/test_utils.py:470: in get_portmapping_node_attr 09:31:27 response = get_request(target_url) 09:31:27 transportpce_tests/common/test_utils.py:116: in get_request 09:31:27 return requests.request( 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/requests/api.py:59: in request 09:31:27 return session.request(method=method, url=url, **kwargs) 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/requests/sessions.py:589: in request 09:31:27 resp = self.send(prep, **send_kwargs) 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/requests/sessions.py:703: in send 09:31:27 r = adapter.send(request, **kwargs) 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 09:31:27 self = 09:31:27 request = , stream = False 09:31:27 timeout = Timeout(connect=10, read=10, total=None), verify = True, cert = None 09:31:27 proxies = OrderedDict() 09:31:27 09:31:27 def send( 09:31:27 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 09:31:27 ): 09:31:27 """Sends PreparedRequest object. Returns Response object. 09:31:27 09:31:27 :param request: The :class:`PreparedRequest ` being sent. 09:31:27 :param stream: (optional) Whether to stream the request content. 09:31:27 :param timeout: (optional) How long to wait for the server to send 09:31:27 data before giving up, as a float, or a :ref:`(connect timeout, 09:31:27 read timeout) ` tuple. 09:31:27 :type timeout: float or tuple or urllib3 Timeout object 09:31:27 :param verify: (optional) Either a boolean, in which case it controls whether 09:31:27 we verify the server's TLS certificate, or a string, in which case it 09:31:27 must be a path to a CA bundle to use 09:31:27 :param cert: (optional) Any user-provided SSL certificate to be trusted. 09:31:27 :param proxies: (optional) The proxies dictionary to apply to the request. 09:31:27 :rtype: requests.Response 09:31:27 """ 09:31:27 09:31:27 try: 09:31:27 conn = self.get_connection_with_tls_context( 09:31:27 request, verify, proxies=proxies, cert=cert 09:31:27 ) 09:31:27 except LocationValueError as e: 09:31:27 raise InvalidURL(e, request=request) 09:31:27 09:31:27 self.cert_verify(conn, request.url, verify, cert) 09:31:27 url = self.request_url(request, proxies) 09:31:27 self.add_headers( 09:31:27 request, 09:31:27 stream=stream, 09:31:27 timeout=timeout, 09:31:27 verify=verify, 09:31:27 cert=cert, 09:31:27 proxies=proxies, 09:31:27 ) 09:31:27 09:31:27 chunked = not (request.body is None or "Content-Length" in request.headers) 09:31:27 09:31:27 if isinstance(timeout, tuple): 09:31:27 try: 09:31:27 connect, read = timeout 09:31:27 timeout = TimeoutSauce(connect=connect, read=read) 09:31:27 except ValueError: 09:31:27 raise ValueError( 09:31:27 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 09:31:27 f"or a single float to set both timeouts to the same value." 09:31:27 ) 09:31:27 elif isinstance(timeout, TimeoutSauce): 09:31:27 pass 09:31:27 else: 09:31:27 timeout = TimeoutSauce(connect=timeout, read=timeout) 09:31:27 09:31:27 try: 09:31:27 resp = conn.urlopen( 09:31:27 method=request.method, 09:31:27 url=url, 09:31:27 body=request.body, 09:31:27 headers=request.headers, 09:31:27 redirect=False, 09:31:27 assert_same_host=False, 09:31:27 preload_content=False, 09:31:27 decode_content=False, 09:31:27 retries=self.max_retries, 09:31:27 timeout=timeout, 09:31:27 chunked=chunked, 09:31:27 ) 09:31:27 09:31:27 except (ProtocolError, OSError) as err: 09:31:27 raise ConnectionError(err, request=request) 09:31:27 09:31:27 except MaxRetryError as e: 09:31:27 if isinstance(e.reason, ConnectTimeoutError): 09:31:27 # TODO: Remove this in 3.0.0: see #2811 09:31:27 if not isinstance(e.reason, NewConnectionError): 09:31:27 raise ConnectTimeout(e, request=request) 09:31:27 09:31:27 if isinstance(e.reason, ResponseError): 09:31:27 raise RetryError(e, request=request) 09:31:27 09:31:27 if isinstance(e.reason, _ProxyError): 09:31:27 raise ProxyError(e, request=request) 09:31:27 09:31:27 if isinstance(e.reason, _SSLError): 09:31:27 # This branch is for urllib3 v1.22 and later. 09:31:27 raise SSLError(e, request=request) 09:31:27 09:31:27 > raise ConnectionError(e, request=request) 09:31:27 E requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8184): Max retries exceeded with url: /rests/data/transportpce-portmapping:network/nodes=XPDR-A2/mc-capabilities=XPDR-mcprofile (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/requests/adapters.py:700: ConnectionError 09:31:27 ----------------------------- Captured stdout call ----------------------------- 09:31:27 execution of test_08_check_mccapprofile 09:31:27 ________ TransportPCE400GPortMappingTesting.test_09_mpdr_switching_pool ________ 09:31:27 09:31:27 self = 09:31:27 09:31:27 def _new_conn(self) -> socket.socket: 09:31:27 """Establish a socket connection and set nodelay settings on it. 09:31:27 09:31:27 :return: New socket connection. 09:31:27 """ 09:31:27 try: 09:31:27 > sock = connection.create_connection( 09:31:27 (self._dns_host, self.port), 09:31:27 self.timeout, 09:31:27 source_address=self.source_address, 09:31:27 socket_options=self.socket_options, 09:31:27 ) 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connection.py:199: 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/util/connection.py:85: in create_connection 09:31:27 raise err 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 09:31:27 address = ('localhost', 8184), timeout = 10, source_address = None 09:31:27 socket_options = [(6, 1, 1)] 09:31:27 09:31:27 def create_connection( 09:31:27 address: tuple[str, int], 09:31:27 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 09:31:27 source_address: tuple[str, int] | None = None, 09:31:27 socket_options: _TYPE_SOCKET_OPTIONS | None = None, 09:31:27 ) -> socket.socket: 09:31:27 """Connect to *address* and return the socket object. 09:31:27 09:31:27 Convenience function. Connect to *address* (a 2-tuple ``(host, 09:31:27 port)``) and return the socket object. Passing the optional 09:31:27 *timeout* parameter will set the timeout on the socket instance 09:31:27 before attempting to connect. If no *timeout* is supplied, the 09:31:27 global default timeout setting returned by :func:`socket.getdefaulttimeout` 09:31:27 is used. If *source_address* is set it must be a tuple of (host, port) 09:31:27 for the socket to bind as a source address before making the connection. 09:31:27 An host of '' or port 0 tells the OS to use the default. 09:31:27 """ 09:31:27 09:31:27 host, port = address 09:31:27 if host.startswith("["): 09:31:27 host = host.strip("[]") 09:31:27 err = None 09:31:27 09:31:27 # Using the value from allowed_gai_family() in the context of getaddrinfo lets 09:31:27 # us select whether to work with IPv4 DNS records, IPv6 records, or both. 09:31:27 # The original create_connection function always returns all records. 09:31:27 family = allowed_gai_family() 09:31:27 09:31:27 try: 09:31:27 host.encode("idna") 09:31:27 except UnicodeError: 09:31:27 raise LocationParseError(f"'{host}', label empty or too long") from None 09:31:27 09:31:27 for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 09:31:27 af, socktype, proto, canonname, sa = res 09:31:27 sock = None 09:31:27 try: 09:31:27 sock = socket.socket(af, socktype, proto) 09:31:27 09:31:27 # If provided, set socket level options before connecting. 09:31:27 _set_socket_options(sock, socket_options) 09:31:27 09:31:27 if timeout is not _DEFAULT_TIMEOUT: 09:31:27 sock.settimeout(timeout) 09:31:27 if source_address: 09:31:27 sock.bind(source_address) 09:31:27 > sock.connect(sa) 09:31:27 E ConnectionRefusedError: [Errno 111] Connection refused 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/util/connection.py:73: ConnectionRefusedError 09:31:27 09:31:27 The above exception was the direct cause of the following exception: 09:31:27 09:31:27 self = 09:31:27 method = 'GET' 09:31:27 url = '/rests/data/transportpce-portmapping:network/nodes=XPDR-A2/switching-pool-lcp=1' 09:31:27 body = None 09:31:27 headers = {'User-Agent': 'python-requests/2.32.3', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'Connection': 'keep-alive', 'Content-Type': 'application/json', 'Authorization': 'Basic YWRtaW46YWRtaW4='} 09:31:27 retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 09:31:27 redirect = False, assert_same_host = False 09:31:27 timeout = Timeout(connect=10, read=10, total=None), pool_timeout = None 09:31:27 release_conn = False, chunked = False, body_pos = None, preload_content = False 09:31:27 decode_content = False, response_kw = {} 09:31:27 parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/rests/data/transportpce-portmapping:network/nodes=XPDR-A2/switching-pool-lcp=1', query=None, fragment=None) 09:31:27 destination_scheme = None, conn = None, release_this_conn = True 09:31:27 http_tunnel_required = False, err = None, clean_exit = False 09:31:27 09:31:27 def urlopen( # type: ignore[override] 09:31:27 self, 09:31:27 method: str, 09:31:27 url: str, 09:31:27 body: _TYPE_BODY | None = None, 09:31:27 headers: typing.Mapping[str, str] | None = None, 09:31:27 retries: Retry | bool | int | None = None, 09:31:27 redirect: bool = True, 09:31:27 assert_same_host: bool = True, 09:31:27 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 09:31:27 pool_timeout: int | None = None, 09:31:27 release_conn: bool | None = None, 09:31:27 chunked: bool = False, 09:31:27 body_pos: _TYPE_BODY_POSITION | None = None, 09:31:27 preload_content: bool = True, 09:31:27 decode_content: bool = True, 09:31:27 **response_kw: typing.Any, 09:31:27 ) -> BaseHTTPResponse: 09:31:27 """ 09:31:27 Get a connection from the pool and perform an HTTP request. This is the 09:31:27 lowest level call for making a request, so you'll need to specify all 09:31:27 the raw details. 09:31:27 09:31:27 .. note:: 09:31:27 09:31:27 More commonly, it's appropriate to use a convenience method 09:31:27 such as :meth:`request`. 09:31:27 09:31:27 .. note:: 09:31:27 09:31:27 `release_conn` will only behave as expected if 09:31:27 `preload_content=False` because we want to make 09:31:27 `preload_content=False` the default behaviour someday soon without 09:31:27 breaking backwards compatibility. 09:31:27 09:31:27 :param method: 09:31:27 HTTP request method (such as GET, POST, PUT, etc.) 09:31:27 09:31:27 :param url: 09:31:27 The URL to perform the request on. 09:31:27 09:31:27 :param body: 09:31:27 Data to send in the request body, either :class:`str`, :class:`bytes`, 09:31:27 an iterable of :class:`str`/:class:`bytes`, or a file-like object. 09:31:27 09:31:27 :param headers: 09:31:27 Dictionary of custom headers to send, such as User-Agent, 09:31:27 If-None-Match, etc. If None, pool headers are used. If provided, 09:31:27 these headers completely replace any pool-specific headers. 09:31:27 09:31:27 :param retries: 09:31:27 Configure the number of retries to allow before raising a 09:31:27 :class:`~urllib3.exceptions.MaxRetryError` exception. 09:31:27 09:31:27 If ``None`` (default) will retry 3 times, see ``Retry.DEFAULT``. Pass a 09:31:27 :class:`~urllib3.util.retry.Retry` object for fine-grained control 09:31:27 over different types of retries. 09:31:27 Pass an integer number to retry connection errors that many times, 09:31:27 but no other types of errors. Pass zero to never retry. 09:31:27 09:31:27 If ``False``, then retries are disabled and any exception is raised 09:31:27 immediately. Also, instead of raising a MaxRetryError on redirects, 09:31:27 the redirect response will be returned. 09:31:27 09:31:27 :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 09:31:27 09:31:27 :param redirect: 09:31:27 If True, automatically handle redirects (status codes 301, 302, 09:31:27 303, 307, 308). Each redirect counts as a retry. Disabling retries 09:31:27 will disable redirect, too. 09:31:27 09:31:27 :param assert_same_host: 09:31:27 If ``True``, will make sure that the host of the pool requests is 09:31:27 consistent else will raise HostChangedError. When ``False``, you can 09:31:27 use the pool on an HTTP proxy and request foreign hosts. 09:31:27 09:31:27 :param timeout: 09:31:27 If specified, overrides the default timeout for this one 09:31:27 request. It may be a float (in seconds) or an instance of 09:31:27 :class:`urllib3.util.Timeout`. 09:31:27 09:31:27 :param pool_timeout: 09:31:27 If set and the pool is set to block=True, then this method will 09:31:27 block for ``pool_timeout`` seconds and raise EmptyPoolError if no 09:31:27 connection is available within the time period. 09:31:27 09:31:27 :param bool preload_content: 09:31:27 If True, the response's body will be preloaded into memory. 09:31:27 09:31:27 :param bool decode_content: 09:31:27 If True, will attempt to decode the body based on the 09:31:27 'content-encoding' header. 09:31:27 09:31:27 :param release_conn: 09:31:27 If False, then the urlopen call will not release the connection 09:31:27 back into the pool once a response is received (but will release if 09:31:27 you read the entire contents of the response such as when 09:31:27 `preload_content=True`). This is useful if you're not preloading 09:31:27 the response's content immediately. You will need to call 09:31:27 ``r.release_conn()`` on the response ``r`` to return the connection 09:31:27 back into the pool. If None, it takes the value of ``preload_content`` 09:31:27 which defaults to ``True``. 09:31:27 09:31:27 :param bool chunked: 09:31:27 If True, urllib3 will send the body using chunked transfer 09:31:27 encoding. Otherwise, urllib3 will send the body using the standard 09:31:27 content-length form. Defaults to False. 09:31:27 09:31:27 :param int body_pos: 09:31:27 Position to seek to in file-like body in the event of a retry or 09:31:27 redirect. Typically this won't need to be set because urllib3 will 09:31:27 auto-populate the value when needed. 09:31:27 """ 09:31:27 parsed_url = parse_url(url) 09:31:27 destination_scheme = parsed_url.scheme 09:31:27 09:31:27 if headers is None: 09:31:27 headers = self.headers 09:31:27 09:31:27 if not isinstance(retries, Retry): 09:31:27 retries = Retry.from_int(retries, redirect=redirect, default=self.retries) 09:31:27 09:31:27 if release_conn is None: 09:31:27 release_conn = preload_content 09:31:27 09:31:27 # Check host 09:31:27 if assert_same_host and not self.is_same_host(url): 09:31:27 raise HostChangedError(self, url, retries) 09:31:27 09:31:27 # Ensure that the URL we're connecting to is properly encoded 09:31:27 if url.startswith("/"): 09:31:27 url = to_str(_encode_target(url)) 09:31:27 else: 09:31:27 url = to_str(parsed_url.url) 09:31:27 09:31:27 conn = None 09:31:27 09:31:27 # Track whether `conn` needs to be released before 09:31:27 # returning/raising/recursing. Update this variable if necessary, and 09:31:27 # leave `release_conn` constant throughout the function. That way, if 09:31:27 # the function recurses, the original value of `release_conn` will be 09:31:27 # passed down into the recursive call, and its value will be respected. 09:31:27 # 09:31:27 # See issue #651 [1] for details. 09:31:27 # 09:31:27 # [1] 09:31:27 release_this_conn = release_conn 09:31:27 09:31:27 http_tunnel_required = connection_requires_http_tunnel( 09:31:27 self.proxy, self.proxy_config, destination_scheme 09:31:27 ) 09:31:27 09:31:27 # Merge the proxy headers. Only done when not using HTTP CONNECT. We 09:31:27 # have to copy the headers dict so we can safely change it without those 09:31:27 # changes being reflected in anyone else's copy. 09:31:27 if not http_tunnel_required: 09:31:27 headers = headers.copy() # type: ignore[attr-defined] 09:31:27 headers.update(self.proxy_headers) # type: ignore[union-attr] 09:31:27 09:31:27 # Must keep the exception bound to a separate variable or else Python 3 09:31:27 # complains about UnboundLocalError. 09:31:27 err = None 09:31:27 09:31:27 # Keep track of whether we cleanly exited the except block. This 09:31:27 # ensures we do proper cleanup in finally. 09:31:27 clean_exit = False 09:31:27 09:31:27 # Rewind body position, if needed. Record current position 09:31:27 # for future rewinds in the event of a redirect/retry. 09:31:27 body_pos = set_file_position(body, body_pos) 09:31:27 09:31:27 try: 09:31:27 # Request a connection from the queue. 09:31:27 timeout_obj = self._get_timeout(timeout) 09:31:27 conn = self._get_conn(timeout=pool_timeout) 09:31:27 09:31:27 conn.timeout = timeout_obj.connect_timeout # type: ignore[assignment] 09:31:27 09:31:27 # Is this a closed/new connection that requires CONNECT tunnelling? 09:31:27 if self.proxy is not None and http_tunnel_required and conn.is_closed: 09:31:27 try: 09:31:27 self._prepare_proxy(conn) 09:31:27 except (BaseSSLError, OSError, SocketTimeout) as e: 09:31:27 self._raise_timeout( 09:31:27 err=e, url=self.proxy.url, timeout_value=conn.timeout 09:31:27 ) 09:31:27 raise 09:31:27 09:31:27 # If we're going to release the connection in ``finally:``, then 09:31:27 # the response doesn't need to know about the connection. Otherwise 09:31:27 # it will also try to release it and we'll have a double-release 09:31:27 # mess. 09:31:27 response_conn = conn if not release_conn else None 09:31:27 09:31:27 # Make the request on the HTTPConnection object 09:31:27 > response = self._make_request( 09:31:27 conn, 09:31:27 method, 09:31:27 url, 09:31:27 timeout=timeout_obj, 09:31:27 body=body, 09:31:27 headers=headers, 09:31:27 chunked=chunked, 09:31:27 retries=retries, 09:31:27 response_conn=response_conn, 09:31:27 preload_content=preload_content, 09:31:27 decode_content=decode_content, 09:31:27 **response_kw, 09:31:27 ) 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:789: 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:495: in _make_request 09:31:27 conn.request( 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connection.py:441: in request 09:31:27 self.endheaders() 09:31:27 /opt/pyenv/versions/3.11.7/lib/python3.11/http/client.py:1289: in endheaders 09:31:27 self._send_output(message_body, encode_chunked=encode_chunked) 09:31:27 /opt/pyenv/versions/3.11.7/lib/python3.11/http/client.py:1048: in _send_output 09:31:27 self.send(msg) 09:31:27 /opt/pyenv/versions/3.11.7/lib/python3.11/http/client.py:986: in send 09:31:27 self.connect() 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connection.py:279: in connect 09:31:27 self.sock = self._new_conn() 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 09:31:27 self = 09:31:27 09:31:27 def _new_conn(self) -> socket.socket: 09:31:27 """Establish a socket connection and set nodelay settings on it. 09:31:27 09:31:27 :return: New socket connection. 09:31:27 """ 09:31:27 try: 09:31:27 sock = connection.create_connection( 09:31:27 (self._dns_host, self.port), 09:31:27 self.timeout, 09:31:27 source_address=self.source_address, 09:31:27 socket_options=self.socket_options, 09:31:27 ) 09:31:27 except socket.gaierror as e: 09:31:27 raise NameResolutionError(self.host, self, e) from e 09:31:27 except SocketTimeout as e: 09:31:27 raise ConnectTimeoutError( 09:31:27 self, 09:31:27 f"Connection to {self.host} timed out. (connect timeout={self.timeout})", 09:31:27 ) from e 09:31:27 09:31:27 except OSError as e: 09:31:27 > raise NewConnectionError( 09:31:27 self, f"Failed to establish a new connection: {e}" 09:31:27 ) from e 09:31:27 E urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [Errno 111] Connection refused 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connection.py:214: NewConnectionError 09:31:27 09:31:27 The above exception was the direct cause of the following exception: 09:31:27 09:31:27 self = 09:31:27 request = , stream = False 09:31:27 timeout = Timeout(connect=10, read=10, total=None), verify = True, cert = None 09:31:27 proxies = OrderedDict() 09:31:27 09:31:27 def send( 09:31:27 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 09:31:27 ): 09:31:27 """Sends PreparedRequest object. Returns Response object. 09:31:27 09:31:27 :param request: The :class:`PreparedRequest ` being sent. 09:31:27 :param stream: (optional) Whether to stream the request content. 09:31:27 :param timeout: (optional) How long to wait for the server to send 09:31:27 data before giving up, as a float, or a :ref:`(connect timeout, 09:31:27 read timeout) ` tuple. 09:31:27 :type timeout: float or tuple or urllib3 Timeout object 09:31:27 :param verify: (optional) Either a boolean, in which case it controls whether 09:31:27 we verify the server's TLS certificate, or a string, in which case it 09:31:27 must be a path to a CA bundle to use 09:31:27 :param cert: (optional) Any user-provided SSL certificate to be trusted. 09:31:27 :param proxies: (optional) The proxies dictionary to apply to the request. 09:31:27 :rtype: requests.Response 09:31:27 """ 09:31:27 09:31:27 try: 09:31:27 conn = self.get_connection_with_tls_context( 09:31:27 request, verify, proxies=proxies, cert=cert 09:31:27 ) 09:31:27 except LocationValueError as e: 09:31:27 raise InvalidURL(e, request=request) 09:31:27 09:31:27 self.cert_verify(conn, request.url, verify, cert) 09:31:27 url = self.request_url(request, proxies) 09:31:27 self.add_headers( 09:31:27 request, 09:31:27 stream=stream, 09:31:27 timeout=timeout, 09:31:27 verify=verify, 09:31:27 cert=cert, 09:31:27 proxies=proxies, 09:31:27 ) 09:31:27 09:31:27 chunked = not (request.body is None or "Content-Length" in request.headers) 09:31:27 09:31:27 if isinstance(timeout, tuple): 09:31:27 try: 09:31:27 connect, read = timeout 09:31:27 timeout = TimeoutSauce(connect=connect, read=read) 09:31:27 except ValueError: 09:31:27 raise ValueError( 09:31:27 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 09:31:27 f"or a single float to set both timeouts to the same value." 09:31:27 ) 09:31:27 elif isinstance(timeout, TimeoutSauce): 09:31:27 pass 09:31:27 else: 09:31:27 timeout = TimeoutSauce(connect=timeout, read=timeout) 09:31:27 09:31:27 try: 09:31:27 > resp = conn.urlopen( 09:31:27 method=request.method, 09:31:27 url=url, 09:31:27 body=request.body, 09:31:27 headers=request.headers, 09:31:27 redirect=False, 09:31:27 assert_same_host=False, 09:31:27 preload_content=False, 09:31:27 decode_content=False, 09:31:27 retries=self.max_retries, 09:31:27 timeout=timeout, 09:31:27 chunked=chunked, 09:31:27 ) 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/requests/adapters.py:667: 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:843: in urlopen 09:31:27 retries = retries.increment( 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 09:31:27 self = Retry(total=0, connect=None, read=False, redirect=None, status=None) 09:31:27 method = 'GET' 09:31:27 url = '/rests/data/transportpce-portmapping:network/nodes=XPDR-A2/switching-pool-lcp=1' 09:31:27 response = None 09:31:27 error = NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused') 09:31:27 _pool = 09:31:27 _stacktrace = 09:31:27 09:31:27 def increment( 09:31:27 self, 09:31:27 method: str | None = None, 09:31:27 url: str | None = None, 09:31:27 response: BaseHTTPResponse | None = None, 09:31:27 error: Exception | None = None, 09:31:27 _pool: ConnectionPool | None = None, 09:31:27 _stacktrace: TracebackType | None = None, 09:31:27 ) -> Self: 09:31:27 """Return a new Retry object with incremented retry counters. 09:31:27 09:31:27 :param response: A response object, or None, if the server did not 09:31:27 return a response. 09:31:27 :type response: :class:`~urllib3.response.BaseHTTPResponse` 09:31:27 :param Exception error: An error encountered during the request, or 09:31:27 None if the response was received successfully. 09:31:27 09:31:27 :return: A new ``Retry`` object. 09:31:27 """ 09:31:27 if self.total is False and error: 09:31:27 # Disabled, indicate to re-raise the error. 09:31:27 raise reraise(type(error), error, _stacktrace) 09:31:27 09:31:27 total = self.total 09:31:27 if total is not None: 09:31:27 total -= 1 09:31:27 09:31:27 connect = self.connect 09:31:27 read = self.read 09:31:27 redirect = self.redirect 09:31:27 status_count = self.status 09:31:27 other = self.other 09:31:27 cause = "unknown" 09:31:27 status = None 09:31:27 redirect_location = None 09:31:27 09:31:27 if error and self._is_connection_error(error): 09:31:27 # Connect retry? 09:31:27 if connect is False: 09:31:27 raise reraise(type(error), error, _stacktrace) 09:31:27 elif connect is not None: 09:31:27 connect -= 1 09:31:27 09:31:27 elif error and self._is_read_error(error): 09:31:27 # Read retry? 09:31:27 if read is False or method is None or not self._is_method_retryable(method): 09:31:27 raise reraise(type(error), error, _stacktrace) 09:31:27 elif read is not None: 09:31:27 read -= 1 09:31:27 09:31:27 elif error: 09:31:27 # Other retry? 09:31:27 if other is not None: 09:31:27 other -= 1 09:31:27 09:31:27 elif response and response.get_redirect_location(): 09:31:27 # Redirect retry? 09:31:27 if redirect is not None: 09:31:27 redirect -= 1 09:31:27 cause = "too many redirects" 09:31:27 response_redirect_location = response.get_redirect_location() 09:31:27 if response_redirect_location: 09:31:27 redirect_location = response_redirect_location 09:31:27 status = response.status 09:31:27 09:31:27 else: 09:31:27 # Incrementing because of a server error like a 500 in 09:31:27 # status_forcelist and the given method is in the allowed_methods 09:31:27 cause = ResponseError.GENERIC_ERROR 09:31:27 if response and response.status: 09:31:27 if status_count is not None: 09:31:27 status_count -= 1 09:31:27 cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) 09:31:27 status = response.status 09:31:27 09:31:27 history = self.history + ( 09:31:27 RequestHistory(method, url, error, status, redirect_location), 09:31:27 ) 09:31:27 09:31:27 new_retry = self.new( 09:31:27 total=total, 09:31:27 connect=connect, 09:31:27 read=read, 09:31:27 redirect=redirect, 09:31:27 status=status_count, 09:31:27 other=other, 09:31:27 history=history, 09:31:27 ) 09:31:27 09:31:27 if new_retry.is_exhausted(): 09:31:27 reason = error or ResponseError(cause) 09:31:27 > raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] 09:31:27 E urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8184): Max retries exceeded with url: /rests/data/transportpce-portmapping:network/nodes=XPDR-A2/switching-pool-lcp=1 (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/util/retry.py:519: MaxRetryError 09:31:27 09:31:27 During handling of the above exception, another exception occurred: 09:31:27 09:31:27 self = 09:31:27 09:31:27 def test_09_mpdr_switching_pool(self): 09:31:27 > response = test_utils.get_portmapping_node_attr("XPDR-A2", "switching-pool-lcp", "1") 09:31:27 09:31:27 transportpce_tests/7.1/test01_portmapping.py:158: 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 transportpce_tests/common/test_utils.py:470: in get_portmapping_node_attr 09:31:27 response = get_request(target_url) 09:31:27 transportpce_tests/common/test_utils.py:116: in get_request 09:31:27 return requests.request( 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/requests/api.py:59: in request 09:31:27 return session.request(method=method, url=url, **kwargs) 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/requests/sessions.py:589: in request 09:31:27 resp = self.send(prep, **send_kwargs) 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/requests/sessions.py:703: in send 09:31:27 r = adapter.send(request, **kwargs) 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 09:31:27 self = 09:31:27 request = , stream = False 09:31:27 timeout = Timeout(connect=10, read=10, total=None), verify = True, cert = None 09:31:27 proxies = OrderedDict() 09:31:27 09:31:27 def send( 09:31:27 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 09:31:27 ): 09:31:27 """Sends PreparedRequest object. Returns Response object. 09:31:27 09:31:27 :param request: The :class:`PreparedRequest ` being sent. 09:31:27 :param stream: (optional) Whether to stream the request content. 09:31:27 :param timeout: (optional) How long to wait for the server to send 09:31:27 data before giving up, as a float, or a :ref:`(connect timeout, 09:31:27 read timeout) ` tuple. 09:31:27 :type timeout: float or tuple or urllib3 Timeout object 09:31:27 :param verify: (optional) Either a boolean, in which case it controls whether 09:31:27 we verify the server's TLS certificate, or a string, in which case it 09:31:27 must be a path to a CA bundle to use 09:31:27 :param cert: (optional) Any user-provided SSL certificate to be trusted. 09:31:27 :param proxies: (optional) The proxies dictionary to apply to the request. 09:31:27 :rtype: requests.Response 09:31:27 """ 09:31:27 09:31:27 try: 09:31:27 conn = self.get_connection_with_tls_context( 09:31:27 request, verify, proxies=proxies, cert=cert 09:31:27 ) 09:31:27 except LocationValueError as e: 09:31:27 raise InvalidURL(e, request=request) 09:31:27 09:31:27 self.cert_verify(conn, request.url, verify, cert) 09:31:27 url = self.request_url(request, proxies) 09:31:27 self.add_headers( 09:31:27 request, 09:31:27 stream=stream, 09:31:27 timeout=timeout, 09:31:27 verify=verify, 09:31:27 cert=cert, 09:31:27 proxies=proxies, 09:31:27 ) 09:31:27 09:31:27 chunked = not (request.body is None or "Content-Length" in request.headers) 09:31:27 09:31:27 if isinstance(timeout, tuple): 09:31:27 try: 09:31:27 connect, read = timeout 09:31:27 timeout = TimeoutSauce(connect=connect, read=read) 09:31:27 except ValueError: 09:31:27 raise ValueError( 09:31:27 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 09:31:27 f"or a single float to set both timeouts to the same value." 09:31:27 ) 09:31:27 elif isinstance(timeout, TimeoutSauce): 09:31:27 pass 09:31:27 else: 09:31:27 timeout = TimeoutSauce(connect=timeout, read=timeout) 09:31:27 09:31:27 try: 09:31:27 resp = conn.urlopen( 09:31:27 method=request.method, 09:31:27 url=url, 09:31:27 body=request.body, 09:31:27 headers=request.headers, 09:31:27 redirect=False, 09:31:27 assert_same_host=False, 09:31:27 preload_content=False, 09:31:27 decode_content=False, 09:31:27 retries=self.max_retries, 09:31:27 timeout=timeout, 09:31:27 chunked=chunked, 09:31:27 ) 09:31:27 09:31:27 except (ProtocolError, OSError) as err: 09:31:27 raise ConnectionError(err, request=request) 09:31:27 09:31:27 except MaxRetryError as e: 09:31:27 if isinstance(e.reason, ConnectTimeoutError): 09:31:27 # TODO: Remove this in 3.0.0: see #2811 09:31:27 if not isinstance(e.reason, NewConnectionError): 09:31:27 raise ConnectTimeout(e, request=request) 09:31:27 09:31:27 if isinstance(e.reason, ResponseError): 09:31:27 raise RetryError(e, request=request) 09:31:27 09:31:27 if isinstance(e.reason, _ProxyError): 09:31:27 raise ProxyError(e, request=request) 09:31:27 09:31:27 if isinstance(e.reason, _SSLError): 09:31:27 # This branch is for urllib3 v1.22 and later. 09:31:27 raise SSLError(e, request=request) 09:31:27 09:31:27 > raise ConnectionError(e, request=request) 09:31:27 E requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8184): Max retries exceeded with url: /rests/data/transportpce-portmapping:network/nodes=XPDR-A2/switching-pool-lcp=1 (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/requests/adapters.py:700: ConnectionError 09:31:27 ----------------------------- Captured stdout call ----------------------------- 09:31:27 execution of test_09_mpdr_switching_pool 09:31:27 _____ TransportPCE400GPortMappingTesting.test_10_xpdr_device_disconnection _____ 09:31:27 09:31:27 self = 09:31:27 09:31:27 def _new_conn(self) -> socket.socket: 09:31:27 """Establish a socket connection and set nodelay settings on it. 09:31:27 09:31:27 :return: New socket connection. 09:31:27 """ 09:31:27 try: 09:31:27 > sock = connection.create_connection( 09:31:27 (self._dns_host, self.port), 09:31:27 self.timeout, 09:31:27 source_address=self.source_address, 09:31:27 socket_options=self.socket_options, 09:31:27 ) 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connection.py:199: 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/util/connection.py:85: in create_connection 09:31:27 raise err 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 09:31:27 address = ('localhost', 8184), timeout = 10, source_address = None 09:31:27 socket_options = [(6, 1, 1)] 09:31:27 09:31:27 def create_connection( 09:31:27 address: tuple[str, int], 09:31:27 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 09:31:27 source_address: tuple[str, int] | None = None, 09:31:27 socket_options: _TYPE_SOCKET_OPTIONS | None = None, 09:31:27 ) -> socket.socket: 09:31:27 """Connect to *address* and return the socket object. 09:31:27 09:31:27 Convenience function. Connect to *address* (a 2-tuple ``(host, 09:31:27 port)``) and return the socket object. Passing the optional 09:31:27 *timeout* parameter will set the timeout on the socket instance 09:31:27 before attempting to connect. If no *timeout* is supplied, the 09:31:27 global default timeout setting returned by :func:`socket.getdefaulttimeout` 09:31:27 is used. If *source_address* is set it must be a tuple of (host, port) 09:31:27 for the socket to bind as a source address before making the connection. 09:31:27 An host of '' or port 0 tells the OS to use the default. 09:31:27 """ 09:31:27 09:31:27 host, port = address 09:31:27 if host.startswith("["): 09:31:27 host = host.strip("[]") 09:31:27 err = None 09:31:27 09:31:27 # Using the value from allowed_gai_family() in the context of getaddrinfo lets 09:31:27 # us select whether to work with IPv4 DNS records, IPv6 records, or both. 09:31:27 # The original create_connection function always returns all records. 09:31:27 family = allowed_gai_family() 09:31:27 09:31:27 try: 09:31:27 host.encode("idna") 09:31:27 except UnicodeError: 09:31:27 raise LocationParseError(f"'{host}', label empty or too long") from None 09:31:27 09:31:27 for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 09:31:27 af, socktype, proto, canonname, sa = res 09:31:27 sock = None 09:31:27 try: 09:31:27 sock = socket.socket(af, socktype, proto) 09:31:27 09:31:27 # If provided, set socket level options before connecting. 09:31:27 _set_socket_options(sock, socket_options) 09:31:27 09:31:27 if timeout is not _DEFAULT_TIMEOUT: 09:31:27 sock.settimeout(timeout) 09:31:27 if source_address: 09:31:27 sock.bind(source_address) 09:31:27 > sock.connect(sa) 09:31:27 E ConnectionRefusedError: [Errno 111] Connection refused 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/util/connection.py:73: ConnectionRefusedError 09:31:27 09:31:27 The above exception was the direct cause of the following exception: 09:31:27 09:31:27 self = 09:31:27 method = 'DELETE' 09:31:27 url = '/rests/data/network-topology:network-topology/topology=topology-netconf/node=XPDR-A2' 09:31:27 body = None 09:31:27 headers = {'User-Agent': 'python-requests/2.32.3', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'Connection': 'keep-alive', 'Content-Type': 'application/json', 'Content-Length': '0', 'Authorization': 'Basic YWRtaW46YWRtaW4='} 09:31:27 retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 09:31:27 redirect = False, assert_same_host = False 09:31:27 timeout = Timeout(connect=10, read=10, total=None), pool_timeout = None 09:31:27 release_conn = False, chunked = False, body_pos = None, preload_content = False 09:31:27 decode_content = False, response_kw = {} 09:31:27 parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/rests/data/network-topology:network-topology/topology=topology-netconf/node=XPDR-A2', query=None, fragment=None) 09:31:27 destination_scheme = None, conn = None, release_this_conn = True 09:31:27 http_tunnel_required = False, err = None, clean_exit = False 09:31:27 09:31:27 def urlopen( # type: ignore[override] 09:31:27 self, 09:31:27 method: str, 09:31:27 url: str, 09:31:27 body: _TYPE_BODY | None = None, 09:31:27 headers: typing.Mapping[str, str] | None = None, 09:31:27 retries: Retry | bool | int | None = None, 09:31:27 redirect: bool = True, 09:31:27 assert_same_host: bool = True, 09:31:27 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 09:31:27 pool_timeout: int | None = None, 09:31:27 release_conn: bool | None = None, 09:31:27 chunked: bool = False, 09:31:27 body_pos: _TYPE_BODY_POSITION | None = None, 09:31:27 preload_content: bool = True, 09:31:27 decode_content: bool = True, 09:31:27 **response_kw: typing.Any, 09:31:27 ) -> BaseHTTPResponse: 09:31:27 """ 09:31:27 Get a connection from the pool and perform an HTTP request. This is the 09:31:27 lowest level call for making a request, so you'll need to specify all 09:31:27 the raw details. 09:31:27 09:31:27 .. note:: 09:31:27 09:31:27 More commonly, it's appropriate to use a convenience method 09:31:27 such as :meth:`request`. 09:31:27 09:31:27 .. note:: 09:31:27 09:31:27 `release_conn` will only behave as expected if 09:31:27 `preload_content=False` because we want to make 09:31:27 `preload_content=False` the default behaviour someday soon without 09:31:27 breaking backwards compatibility. 09:31:27 09:31:27 :param method: 09:31:27 HTTP request method (such as GET, POST, PUT, etc.) 09:31:27 09:31:27 :param url: 09:31:27 The URL to perform the request on. 09:31:27 09:31:27 :param body: 09:31:27 Data to send in the request body, either :class:`str`, :class:`bytes`, 09:31:27 an iterable of :class:`str`/:class:`bytes`, or a file-like object. 09:31:27 09:31:27 :param headers: 09:31:27 Dictionary of custom headers to send, such as User-Agent, 09:31:27 If-None-Match, etc. If None, pool headers are used. If provided, 09:31:27 these headers completely replace any pool-specific headers. 09:31:27 09:31:27 :param retries: 09:31:27 Configure the number of retries to allow before raising a 09:31:27 :class:`~urllib3.exceptions.MaxRetryError` exception. 09:31:27 09:31:27 If ``None`` (default) will retry 3 times, see ``Retry.DEFAULT``. Pass a 09:31:27 :class:`~urllib3.util.retry.Retry` object for fine-grained control 09:31:27 over different types of retries. 09:31:27 Pass an integer number to retry connection errors that many times, 09:31:27 but no other types of errors. Pass zero to never retry. 09:31:27 09:31:27 If ``False``, then retries are disabled and any exception is raised 09:31:27 immediately. Also, instead of raising a MaxRetryError on redirects, 09:31:27 the redirect response will be returned. 09:31:27 09:31:27 :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 09:31:27 09:31:27 :param redirect: 09:31:27 If True, automatically handle redirects (status codes 301, 302, 09:31:27 303, 307, 308). Each redirect counts as a retry. Disabling retries 09:31:27 will disable redirect, too. 09:31:27 09:31:27 :param assert_same_host: 09:31:27 If ``True``, will make sure that the host of the pool requests is 09:31:27 consistent else will raise HostChangedError. When ``False``, you can 09:31:27 use the pool on an HTTP proxy and request foreign hosts. 09:31:27 09:31:27 :param timeout: 09:31:27 If specified, overrides the default timeout for this one 09:31:27 request. It may be a float (in seconds) or an instance of 09:31:27 :class:`urllib3.util.Timeout`. 09:31:27 09:31:27 :param pool_timeout: 09:31:27 If set and the pool is set to block=True, then this method will 09:31:27 block for ``pool_timeout`` seconds and raise EmptyPoolError if no 09:31:27 connection is available within the time period. 09:31:27 09:31:27 :param bool preload_content: 09:31:27 If True, the response's body will be preloaded into memory. 09:31:27 09:31:27 :param bool decode_content: 09:31:27 If True, will attempt to decode the body based on the 09:31:27 'content-encoding' header. 09:31:27 09:31:27 :param release_conn: 09:31:27 If False, then the urlopen call will not release the connection 09:31:27 back into the pool once a response is received (but will release if 09:31:27 you read the entire contents of the response such as when 09:31:27 `preload_content=True`). This is useful if you're not preloading 09:31:27 the response's content immediately. You will need to call 09:31:27 ``r.release_conn()`` on the response ``r`` to return the connection 09:31:27 back into the pool. If None, it takes the value of ``preload_content`` 09:31:27 which defaults to ``True``. 09:31:27 09:31:27 :param bool chunked: 09:31:27 If True, urllib3 will send the body using chunked transfer 09:31:27 encoding. Otherwise, urllib3 will send the body using the standard 09:31:27 content-length form. Defaults to False. 09:31:27 09:31:27 :param int body_pos: 09:31:27 Position to seek to in file-like body in the event of a retry or 09:31:27 redirect. Typically this won't need to be set because urllib3 will 09:31:27 auto-populate the value when needed. 09:31:27 """ 09:31:27 parsed_url = parse_url(url) 09:31:27 destination_scheme = parsed_url.scheme 09:31:27 09:31:27 if headers is None: 09:31:27 headers = self.headers 09:31:27 09:31:27 if not isinstance(retries, Retry): 09:31:27 retries = Retry.from_int(retries, redirect=redirect, default=self.retries) 09:31:27 09:31:27 if release_conn is None: 09:31:27 release_conn = preload_content 09:31:27 09:31:27 # Check host 09:31:27 if assert_same_host and not self.is_same_host(url): 09:31:27 raise HostChangedError(self, url, retries) 09:31:27 09:31:27 # Ensure that the URL we're connecting to is properly encoded 09:31:27 if url.startswith("/"): 09:31:27 url = to_str(_encode_target(url)) 09:31:27 else: 09:31:27 url = to_str(parsed_url.url) 09:31:27 09:31:27 conn = None 09:31:27 09:31:27 # Track whether `conn` needs to be released before 09:31:27 # returning/raising/recursing. Update this variable if necessary, and 09:31:27 # leave `release_conn` constant throughout the function. That way, if 09:31:27 # the function recurses, the original value of `release_conn` will be 09:31:27 # passed down into the recursive call, and its value will be respected. 09:31:27 # 09:31:27 # See issue #651 [1] for details. 09:31:27 # 09:31:27 # [1] 09:31:27 release_this_conn = release_conn 09:31:27 09:31:27 http_tunnel_required = connection_requires_http_tunnel( 09:31:27 self.proxy, self.proxy_config, destination_scheme 09:31:27 ) 09:31:27 09:31:27 # Merge the proxy headers. Only done when not using HTTP CONNECT. We 09:31:27 # have to copy the headers dict so we can safely change it without those 09:31:27 # changes being reflected in anyone else's copy. 09:31:27 if not http_tunnel_required: 09:31:27 headers = headers.copy() # type: ignore[attr-defined] 09:31:27 headers.update(self.proxy_headers) # type: ignore[union-attr] 09:31:27 09:31:27 # Must keep the exception bound to a separate variable or else Python 3 09:31:27 # complains about UnboundLocalError. 09:31:27 err = None 09:31:27 09:31:27 # Keep track of whether we cleanly exited the except block. This 09:31:27 # ensures we do proper cleanup in finally. 09:31:27 clean_exit = False 09:31:27 09:31:27 # Rewind body position, if needed. Record current position 09:31:27 # for future rewinds in the event of a redirect/retry. 09:31:27 body_pos = set_file_position(body, body_pos) 09:31:27 09:31:27 try: 09:31:27 # Request a connection from the queue. 09:31:27 timeout_obj = self._get_timeout(timeout) 09:31:27 conn = self._get_conn(timeout=pool_timeout) 09:31:27 09:31:27 conn.timeout = timeout_obj.connect_timeout # type: ignore[assignment] 09:31:27 09:31:27 # Is this a closed/new connection that requires CONNECT tunnelling? 09:31:27 if self.proxy is not None and http_tunnel_required and conn.is_closed: 09:31:27 try: 09:31:27 self._prepare_proxy(conn) 09:31:27 except (BaseSSLError, OSError, SocketTimeout) as e: 09:31:27 self._raise_timeout( 09:31:27 err=e, url=self.proxy.url, timeout_value=conn.timeout 09:31:27 ) 09:31:27 raise 09:31:27 09:31:27 # If we're going to release the connection in ``finally:``, then 09:31:27 # the response doesn't need to know about the connection. Otherwise 09:31:27 # it will also try to release it and we'll have a double-release 09:31:27 # mess. 09:31:27 response_conn = conn if not release_conn else None 09:31:27 09:31:27 # Make the request on the HTTPConnection object 09:31:27 > response = self._make_request( 09:31:27 conn, 09:31:27 method, 09:31:27 url, 09:31:27 timeout=timeout_obj, 09:31:27 body=body, 09:31:27 headers=headers, 09:31:27 chunked=chunked, 09:31:27 retries=retries, 09:31:27 response_conn=response_conn, 09:31:27 preload_content=preload_content, 09:31:27 decode_content=decode_content, 09:31:27 **response_kw, 09:31:27 ) 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:789: 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:495: in _make_request 09:31:27 conn.request( 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connection.py:441: in request 09:31:27 self.endheaders() 09:31:27 /opt/pyenv/versions/3.11.7/lib/python3.11/http/client.py:1289: in endheaders 09:31:27 self._send_output(message_body, encode_chunked=encode_chunked) 09:31:27 /opt/pyenv/versions/3.11.7/lib/python3.11/http/client.py:1048: in _send_output 09:31:27 self.send(msg) 09:31:27 /opt/pyenv/versions/3.11.7/lib/python3.11/http/client.py:986: in send 09:31:27 self.connect() 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connection.py:279: in connect 09:31:27 self.sock = self._new_conn() 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 09:31:27 self = 09:31:27 09:31:27 def _new_conn(self) -> socket.socket: 09:31:27 """Establish a socket connection and set nodelay settings on it. 09:31:27 09:31:27 :return: New socket connection. 09:31:27 """ 09:31:27 try: 09:31:27 sock = connection.create_connection( 09:31:27 (self._dns_host, self.port), 09:31:27 self.timeout, 09:31:27 source_address=self.source_address, 09:31:27 socket_options=self.socket_options, 09:31:27 ) 09:31:27 except socket.gaierror as e: 09:31:27 raise NameResolutionError(self.host, self, e) from e 09:31:27 except SocketTimeout as e: 09:31:27 raise ConnectTimeoutError( 09:31:27 self, 09:31:27 f"Connection to {self.host} timed out. (connect timeout={self.timeout})", 09:31:27 ) from e 09:31:27 09:31:27 except OSError as e: 09:31:27 > raise NewConnectionError( 09:31:27 self, f"Failed to establish a new connection: {e}" 09:31:27 ) from e 09:31:27 E urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [Errno 111] Connection refused 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connection.py:214: NewConnectionError 09:31:27 09:31:27 The above exception was the direct cause of the following exception: 09:31:27 09:31:27 self = 09:31:27 request = , stream = False 09:31:27 timeout = Timeout(connect=10, read=10, total=None), verify = True, cert = None 09:31:27 proxies = OrderedDict() 09:31:27 09:31:27 def send( 09:31:27 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 09:31:27 ): 09:31:27 """Sends PreparedRequest object. Returns Response object. 09:31:27 09:31:27 :param request: The :class:`PreparedRequest ` being sent. 09:31:27 :param stream: (optional) Whether to stream the request content. 09:31:27 :param timeout: (optional) How long to wait for the server to send 09:31:27 data before giving up, as a float, or a :ref:`(connect timeout, 09:31:27 read timeout) ` tuple. 09:31:27 :type timeout: float or tuple or urllib3 Timeout object 09:31:27 :param verify: (optional) Either a boolean, in which case it controls whether 09:31:27 we verify the server's TLS certificate, or a string, in which case it 09:31:27 must be a path to a CA bundle to use 09:31:27 :param cert: (optional) Any user-provided SSL certificate to be trusted. 09:31:27 :param proxies: (optional) The proxies dictionary to apply to the request. 09:31:27 :rtype: requests.Response 09:31:27 """ 09:31:27 09:31:27 try: 09:31:27 conn = self.get_connection_with_tls_context( 09:31:27 request, verify, proxies=proxies, cert=cert 09:31:27 ) 09:31:27 except LocationValueError as e: 09:31:27 raise InvalidURL(e, request=request) 09:31:27 09:31:27 self.cert_verify(conn, request.url, verify, cert) 09:31:27 url = self.request_url(request, proxies) 09:31:27 self.add_headers( 09:31:27 request, 09:31:27 stream=stream, 09:31:27 timeout=timeout, 09:31:27 verify=verify, 09:31:27 cert=cert, 09:31:27 proxies=proxies, 09:31:27 ) 09:31:27 09:31:27 chunked = not (request.body is None or "Content-Length" in request.headers) 09:31:27 09:31:27 if isinstance(timeout, tuple): 09:31:27 try: 09:31:27 connect, read = timeout 09:31:27 timeout = TimeoutSauce(connect=connect, read=read) 09:31:27 except ValueError: 09:31:27 raise ValueError( 09:31:27 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 09:31:27 f"or a single float to set both timeouts to the same value." 09:31:27 ) 09:31:27 elif isinstance(timeout, TimeoutSauce): 09:31:27 pass 09:31:27 else: 09:31:27 timeout = TimeoutSauce(connect=timeout, read=timeout) 09:31:27 09:31:27 try: 09:31:27 > resp = conn.urlopen( 09:31:27 method=request.method, 09:31:27 url=url, 09:31:27 body=request.body, 09:31:27 headers=request.headers, 09:31:27 redirect=False, 09:31:27 assert_same_host=False, 09:31:27 preload_content=False, 09:31:27 decode_content=False, 09:31:27 retries=self.max_retries, 09:31:27 timeout=timeout, 09:31:27 chunked=chunked, 09:31:27 ) 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/requests/adapters.py:667: 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:843: in urlopen 09:31:27 retries = retries.increment( 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 09:31:27 self = Retry(total=0, connect=None, read=False, redirect=None, status=None) 09:31:27 method = 'DELETE' 09:31:27 url = '/rests/data/network-topology:network-topology/topology=topology-netconf/node=XPDR-A2' 09:31:27 response = None 09:31:27 error = NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused') 09:31:27 _pool = 09:31:27 _stacktrace = 09:31:27 09:31:27 def increment( 09:31:27 self, 09:31:27 method: str | None = None, 09:31:27 url: str | None = None, 09:31:27 response: BaseHTTPResponse | None = None, 09:31:27 error: Exception | None = None, 09:31:27 _pool: ConnectionPool | None = None, 09:31:27 _stacktrace: TracebackType | None = None, 09:31:27 ) -> Self: 09:31:27 """Return a new Retry object with incremented retry counters. 09:31:27 09:31:27 :param response: A response object, or None, if the server did not 09:31:27 return a response. 09:31:27 :type response: :class:`~urllib3.response.BaseHTTPResponse` 09:31:27 :param Exception error: An error encountered during the request, or 09:31:27 None if the response was received successfully. 09:31:27 09:31:27 :return: A new ``Retry`` object. 09:31:27 """ 09:31:27 if self.total is False and error: 09:31:27 # Disabled, indicate to re-raise the error. 09:31:27 raise reraise(type(error), error, _stacktrace) 09:31:27 09:31:27 total = self.total 09:31:27 if total is not None: 09:31:27 total -= 1 09:31:27 09:31:27 connect = self.connect 09:31:27 read = self.read 09:31:27 redirect = self.redirect 09:31:27 status_count = self.status 09:31:27 other = self.other 09:31:27 cause = "unknown" 09:31:27 status = None 09:31:27 redirect_location = None 09:31:27 09:31:27 if error and self._is_connection_error(error): 09:31:27 # Connect retry? 09:31:27 if connect is False: 09:31:27 raise reraise(type(error), error, _stacktrace) 09:31:27 elif connect is not None: 09:31:27 connect -= 1 09:31:27 09:31:27 elif error and self._is_read_error(error): 09:31:27 # Read retry? 09:31:27 if read is False or method is None or not self._is_method_retryable(method): 09:31:27 raise reraise(type(error), error, _stacktrace) 09:31:27 elif read is not None: 09:31:27 read -= 1 09:31:27 09:31:27 elif error: 09:31:27 # Other retry? 09:31:27 if other is not None: 09:31:27 other -= 1 09:31:27 09:31:27 elif response and response.get_redirect_location(): 09:31:27 # Redirect retry? 09:31:27 if redirect is not None: 09:31:27 redirect -= 1 09:31:27 cause = "too many redirects" 09:31:27 response_redirect_location = response.get_redirect_location() 09:31:27 if response_redirect_location: 09:31:27 redirect_location = response_redirect_location 09:31:27 status = response.status 09:31:27 09:31:27 else: 09:31:27 # Incrementing because of a server error like a 500 in 09:31:27 # status_forcelist and the given method is in the allowed_methods 09:31:27 cause = ResponseError.GENERIC_ERROR 09:31:27 if response and response.status: 09:31:27 if status_count is not None: 09:31:27 status_count -= 1 09:31:27 cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) 09:31:27 status = response.status 09:31:27 09:31:27 history = self.history + ( 09:31:27 RequestHistory(method, url, error, status, redirect_location), 09:31:27 ) 09:31:27 09:31:27 new_retry = self.new( 09:31:27 total=total, 09:31:27 connect=connect, 09:31:27 read=read, 09:31:27 redirect=redirect, 09:31:27 status=status_count, 09:31:27 other=other, 09:31:27 history=history, 09:31:27 ) 09:31:27 09:31:27 if new_retry.is_exhausted(): 09:31:27 reason = error or ResponseError(cause) 09:31:27 > raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] 09:31:27 E urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8184): Max retries exceeded with url: /rests/data/network-topology:network-topology/topology=topology-netconf/node=XPDR-A2 (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/util/retry.py:519: MaxRetryError 09:31:27 09:31:27 During handling of the above exception, another exception occurred: 09:31:27 09:31:27 self = 09:31:27 09:31:27 def test_10_xpdr_device_disconnection(self): 09:31:27 > response = test_utils.unmount_device("XPDR-A2") 09:31:27 09:31:27 transportpce_tests/7.1/test01_portmapping.py:171: 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 transportpce_tests/common/test_utils.py:358: in unmount_device 09:31:27 response = delete_request(url[RESTCONF_VERSION].format('{}', node)) 09:31:27 transportpce_tests/common/test_utils.py:133: in delete_request 09:31:27 return requests.request( 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/requests/api.py:59: in request 09:31:27 return session.request(method=method, url=url, **kwargs) 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/requests/sessions.py:589: in request 09:31:27 resp = self.send(prep, **send_kwargs) 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/requests/sessions.py:703: in send 09:31:27 r = adapter.send(request, **kwargs) 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 09:31:27 self = 09:31:27 request = , stream = False 09:31:27 timeout = Timeout(connect=10, read=10, total=None), verify = True, cert = None 09:31:27 proxies = OrderedDict() 09:31:27 09:31:27 def send( 09:31:27 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 09:31:27 ): 09:31:27 """Sends PreparedRequest object. Returns Response object. 09:31:27 09:31:27 :param request: The :class:`PreparedRequest ` being sent. 09:31:27 :param stream: (optional) Whether to stream the request content. 09:31:27 :param timeout: (optional) How long to wait for the server to send 09:31:27 data before giving up, as a float, or a :ref:`(connect timeout, 09:31:27 read timeout) ` tuple. 09:31:27 :type timeout: float or tuple or urllib3 Timeout object 09:31:27 :param verify: (optional) Either a boolean, in which case it controls whether 09:31:27 we verify the server's TLS certificate, or a string, in which case it 09:31:27 must be a path to a CA bundle to use 09:31:27 :param cert: (optional) Any user-provided SSL certificate to be trusted. 09:31:27 :param proxies: (optional) The proxies dictionary to apply to the request. 09:31:27 :rtype: requests.Response 09:31:27 """ 09:31:27 09:31:27 try: 09:31:27 conn = self.get_connection_with_tls_context( 09:31:27 request, verify, proxies=proxies, cert=cert 09:31:27 ) 09:31:27 except LocationValueError as e: 09:31:27 raise InvalidURL(e, request=request) 09:31:27 09:31:27 self.cert_verify(conn, request.url, verify, cert) 09:31:27 url = self.request_url(request, proxies) 09:31:27 self.add_headers( 09:31:27 request, 09:31:27 stream=stream, 09:31:27 timeout=timeout, 09:31:27 verify=verify, 09:31:27 cert=cert, 09:31:27 proxies=proxies, 09:31:27 ) 09:31:27 09:31:27 chunked = not (request.body is None or "Content-Length" in request.headers) 09:31:27 09:31:27 if isinstance(timeout, tuple): 09:31:27 try: 09:31:27 connect, read = timeout 09:31:27 timeout = TimeoutSauce(connect=connect, read=read) 09:31:27 except ValueError: 09:31:27 raise ValueError( 09:31:27 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 09:31:27 f"or a single float to set both timeouts to the same value." 09:31:27 ) 09:31:27 elif isinstance(timeout, TimeoutSauce): 09:31:27 pass 09:31:27 else: 09:31:27 timeout = TimeoutSauce(connect=timeout, read=timeout) 09:31:27 09:31:27 try: 09:31:27 resp = conn.urlopen( 09:31:27 method=request.method, 09:31:27 url=url, 09:31:27 body=request.body, 09:31:27 headers=request.headers, 09:31:27 redirect=False, 09:31:27 assert_same_host=False, 09:31:27 preload_content=False, 09:31:27 decode_content=False, 09:31:27 retries=self.max_retries, 09:31:27 timeout=timeout, 09:31:27 chunked=chunked, 09:31:27 ) 09:31:27 09:31:27 except (ProtocolError, OSError) as err: 09:31:27 raise ConnectionError(err, request=request) 09:31:27 09:31:27 except MaxRetryError as e: 09:31:27 if isinstance(e.reason, ConnectTimeoutError): 09:31:27 # TODO: Remove this in 3.0.0: see #2811 09:31:27 if not isinstance(e.reason, NewConnectionError): 09:31:27 raise ConnectTimeout(e, request=request) 09:31:27 09:31:27 if isinstance(e.reason, ResponseError): 09:31:27 raise RetryError(e, request=request) 09:31:27 09:31:27 if isinstance(e.reason, _ProxyError): 09:31:27 raise ProxyError(e, request=request) 09:31:27 09:31:27 if isinstance(e.reason, _SSLError): 09:31:27 # This branch is for urllib3 v1.22 and later. 09:31:27 raise SSLError(e, request=request) 09:31:27 09:31:27 > raise ConnectionError(e, request=request) 09:31:27 E requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8184): Max retries exceeded with url: /rests/data/network-topology:network-topology/topology=topology-netconf/node=XPDR-A2 (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/requests/adapters.py:700: ConnectionError 09:31:27 ----------------------------- Captured stdout call ----------------------------- 09:31:27 execution of test_10_xpdr_device_disconnection 09:31:27 _____ TransportPCE400GPortMappingTesting.test_11_xpdr_device_disconnected ______ 09:31:27 09:31:27 self = 09:31:27 09:31:27 def _new_conn(self) -> socket.socket: 09:31:27 """Establish a socket connection and set nodelay settings on it. 09:31:27 09:31:27 :return: New socket connection. 09:31:27 """ 09:31:27 try: 09:31:27 > sock = connection.create_connection( 09:31:27 (self._dns_host, self.port), 09:31:27 self.timeout, 09:31:27 source_address=self.source_address, 09:31:27 socket_options=self.socket_options, 09:31:27 ) 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connection.py:199: 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/util/connection.py:85: in create_connection 09:31:27 raise err 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 09:31:27 address = ('localhost', 8184), timeout = 10, source_address = None 09:31:27 socket_options = [(6, 1, 1)] 09:31:27 09:31:27 def create_connection( 09:31:27 address: tuple[str, int], 09:31:27 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 09:31:27 source_address: tuple[str, int] | None = None, 09:31:27 socket_options: _TYPE_SOCKET_OPTIONS | None = None, 09:31:27 ) -> socket.socket: 09:31:27 """Connect to *address* and return the socket object. 09:31:27 09:31:27 Convenience function. Connect to *address* (a 2-tuple ``(host, 09:31:27 port)``) and return the socket object. Passing the optional 09:31:27 *timeout* parameter will set the timeout on the socket instance 09:31:27 before attempting to connect. If no *timeout* is supplied, the 09:31:27 global default timeout setting returned by :func:`socket.getdefaulttimeout` 09:31:27 is used. If *source_address* is set it must be a tuple of (host, port) 09:31:27 for the socket to bind as a source address before making the connection. 09:31:27 An host of '' or port 0 tells the OS to use the default. 09:31:27 """ 09:31:27 09:31:27 host, port = address 09:31:27 if host.startswith("["): 09:31:27 host = host.strip("[]") 09:31:27 err = None 09:31:27 09:31:27 # Using the value from allowed_gai_family() in the context of getaddrinfo lets 09:31:27 # us select whether to work with IPv4 DNS records, IPv6 records, or both. 09:31:27 # The original create_connection function always returns all records. 09:31:27 family = allowed_gai_family() 09:31:27 09:31:27 try: 09:31:27 host.encode("idna") 09:31:27 except UnicodeError: 09:31:27 raise LocationParseError(f"'{host}', label empty or too long") from None 09:31:27 09:31:27 for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 09:31:27 af, socktype, proto, canonname, sa = res 09:31:27 sock = None 09:31:27 try: 09:31:27 sock = socket.socket(af, socktype, proto) 09:31:27 09:31:27 # If provided, set socket level options before connecting. 09:31:27 _set_socket_options(sock, socket_options) 09:31:27 09:31:27 if timeout is not _DEFAULT_TIMEOUT: 09:31:27 sock.settimeout(timeout) 09:31:27 if source_address: 09:31:27 sock.bind(source_address) 09:31:27 > sock.connect(sa) 09:31:27 E ConnectionRefusedError: [Errno 111] Connection refused 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/util/connection.py:73: ConnectionRefusedError 09:31:27 09:31:27 The above exception was the direct cause of the following exception: 09:31:27 09:31:27 self = 09:31:27 method = 'GET' 09:31:27 url = '/rests/data/network-topology:network-topology/topology=topology-netconf/node=XPDR-A2?content=nonconfig' 09:31:27 body = None 09:31:27 headers = {'User-Agent': 'python-requests/2.32.3', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'Connection': 'keep-alive', 'Content-Type': 'application/json', 'Authorization': 'Basic YWRtaW46YWRtaW4='} 09:31:27 retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 09:31:27 redirect = False, assert_same_host = False 09:31:27 timeout = Timeout(connect=10, read=10, total=None), pool_timeout = None 09:31:27 release_conn = False, chunked = False, body_pos = None, preload_content = False 09:31:27 decode_content = False, response_kw = {} 09:31:27 parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/rests/data/network-topology:network-topology/topology=topology-netconf/node=XPDR-A2', query='content=nonconfig', fragment=None) 09:31:27 destination_scheme = None, conn = None, release_this_conn = True 09:31:27 http_tunnel_required = False, err = None, clean_exit = False 09:31:27 09:31:27 def urlopen( # type: ignore[override] 09:31:27 self, 09:31:27 method: str, 09:31:27 url: str, 09:31:27 body: _TYPE_BODY | None = None, 09:31:27 headers: typing.Mapping[str, str] | None = None, 09:31:27 retries: Retry | bool | int | None = None, 09:31:27 redirect: bool = True, 09:31:27 assert_same_host: bool = True, 09:31:27 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 09:31:27 pool_timeout: int | None = None, 09:31:27 release_conn: bool | None = None, 09:31:27 chunked: bool = False, 09:31:27 body_pos: _TYPE_BODY_POSITION | None = None, 09:31:27 preload_content: bool = True, 09:31:27 decode_content: bool = True, 09:31:27 **response_kw: typing.Any, 09:31:27 ) -> BaseHTTPResponse: 09:31:27 """ 09:31:27 Get a connection from the pool and perform an HTTP request. This is the 09:31:27 lowest level call for making a request, so you'll need to specify all 09:31:27 the raw details. 09:31:27 09:31:27 .. note:: 09:31:27 09:31:27 More commonly, it's appropriate to use a convenience method 09:31:27 such as :meth:`request`. 09:31:27 09:31:27 .. note:: 09:31:27 09:31:27 `release_conn` will only behave as expected if 09:31:27 `preload_content=False` because we want to make 09:31:27 `preload_content=False` the default behaviour someday soon without 09:31:27 breaking backwards compatibility. 09:31:27 09:31:27 :param method: 09:31:27 HTTP request method (such as GET, POST, PUT, etc.) 09:31:27 09:31:27 :param url: 09:31:27 The URL to perform the request on. 09:31:27 09:31:27 :param body: 09:31:27 Data to send in the request body, either :class:`str`, :class:`bytes`, 09:31:27 an iterable of :class:`str`/:class:`bytes`, or a file-like object. 09:31:27 09:31:27 :param headers: 09:31:27 Dictionary of custom headers to send, such as User-Agent, 09:31:27 If-None-Match, etc. If None, pool headers are used. If provided, 09:31:27 these headers completely replace any pool-specific headers. 09:31:27 09:31:27 :param retries: 09:31:27 Configure the number of retries to allow before raising a 09:31:27 :class:`~urllib3.exceptions.MaxRetryError` exception. 09:31:27 09:31:27 If ``None`` (default) will retry 3 times, see ``Retry.DEFAULT``. Pass a 09:31:27 :class:`~urllib3.util.retry.Retry` object for fine-grained control 09:31:27 over different types of retries. 09:31:27 Pass an integer number to retry connection errors that many times, 09:31:27 but no other types of errors. Pass zero to never retry. 09:31:27 09:31:27 If ``False``, then retries are disabled and any exception is raised 09:31:27 immediately. Also, instead of raising a MaxRetryError on redirects, 09:31:27 the redirect response will be returned. 09:31:27 09:31:27 :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 09:31:27 09:31:27 :param redirect: 09:31:27 If True, automatically handle redirects (status codes 301, 302, 09:31:27 303, 307, 308). Each redirect counts as a retry. Disabling retries 09:31:27 will disable redirect, too. 09:31:27 09:31:27 :param assert_same_host: 09:31:27 If ``True``, will make sure that the host of the pool requests is 09:31:27 consistent else will raise HostChangedError. When ``False``, you can 09:31:27 use the pool on an HTTP proxy and request foreign hosts. 09:31:27 09:31:27 :param timeout: 09:31:27 If specified, overrides the default timeout for this one 09:31:27 request. It may be a float (in seconds) or an instance of 09:31:27 :class:`urllib3.util.Timeout`. 09:31:27 09:31:27 :param pool_timeout: 09:31:27 If set and the pool is set to block=True, then this method will 09:31:27 block for ``pool_timeout`` seconds and raise EmptyPoolError if no 09:31:27 connection is available within the time period. 09:31:27 09:31:27 :param bool preload_content: 09:31:27 If True, the response's body will be preloaded into memory. 09:31:27 09:31:27 :param bool decode_content: 09:31:27 If True, will attempt to decode the body based on the 09:31:27 'content-encoding' header. 09:31:27 09:31:27 :param release_conn: 09:31:27 If False, then the urlopen call will not release the connection 09:31:27 back into the pool once a response is received (but will release if 09:31:27 you read the entire contents of the response such as when 09:31:27 `preload_content=True`). This is useful if you're not preloading 09:31:27 the response's content immediately. You will need to call 09:31:27 ``r.release_conn()`` on the response ``r`` to return the connection 09:31:27 back into the pool. If None, it takes the value of ``preload_content`` 09:31:27 which defaults to ``True``. 09:31:27 09:31:27 :param bool chunked: 09:31:27 If True, urllib3 will send the body using chunked transfer 09:31:27 encoding. Otherwise, urllib3 will send the body using the standard 09:31:27 content-length form. Defaults to False. 09:31:27 09:31:27 :param int body_pos: 09:31:27 Position to seek to in file-like body in the event of a retry or 09:31:27 redirect. Typically this won't need to be set because urllib3 will 09:31:27 auto-populate the value when needed. 09:31:27 """ 09:31:27 parsed_url = parse_url(url) 09:31:27 destination_scheme = parsed_url.scheme 09:31:27 09:31:27 if headers is None: 09:31:27 headers = self.headers 09:31:27 09:31:27 if not isinstance(retries, Retry): 09:31:27 retries = Retry.from_int(retries, redirect=redirect, default=self.retries) 09:31:27 09:31:27 if release_conn is None: 09:31:27 release_conn = preload_content 09:31:27 09:31:27 # Check host 09:31:27 if assert_same_host and not self.is_same_host(url): 09:31:27 raise HostChangedError(self, url, retries) 09:31:27 09:31:27 # Ensure that the URL we're connecting to is properly encoded 09:31:27 if url.startswith("/"): 09:31:27 url = to_str(_encode_target(url)) 09:31:27 else: 09:31:27 url = to_str(parsed_url.url) 09:31:27 09:31:27 conn = None 09:31:27 09:31:27 # Track whether `conn` needs to be released before 09:31:27 # returning/raising/recursing. Update this variable if necessary, and 09:31:27 # leave `release_conn` constant throughout the function. That way, if 09:31:27 # the function recurses, the original value of `release_conn` will be 09:31:27 # passed down into the recursive call, and its value will be respected. 09:31:27 # 09:31:27 # See issue #651 [1] for details. 09:31:27 # 09:31:27 # [1] 09:31:27 release_this_conn = release_conn 09:31:27 09:31:27 http_tunnel_required = connection_requires_http_tunnel( 09:31:27 self.proxy, self.proxy_config, destination_scheme 09:31:27 ) 09:31:27 09:31:27 # Merge the proxy headers. Only done when not using HTTP CONNECT. We 09:31:27 # have to copy the headers dict so we can safely change it without those 09:31:27 # changes being reflected in anyone else's copy. 09:31:27 if not http_tunnel_required: 09:31:27 headers = headers.copy() # type: ignore[attr-defined] 09:31:27 headers.update(self.proxy_headers) # type: ignore[union-attr] 09:31:27 09:31:27 # Must keep the exception bound to a separate variable or else Python 3 09:31:27 # complains about UnboundLocalError. 09:31:27 err = None 09:31:27 09:31:27 # Keep track of whether we cleanly exited the except block. This 09:31:27 # ensures we do proper cleanup in finally. 09:31:27 clean_exit = False 09:31:27 09:31:27 # Rewind body position, if needed. Record current position 09:31:27 # for future rewinds in the event of a redirect/retry. 09:31:27 body_pos = set_file_position(body, body_pos) 09:31:27 09:31:27 try: 09:31:27 # Request a connection from the queue. 09:31:27 timeout_obj = self._get_timeout(timeout) 09:31:27 conn = self._get_conn(timeout=pool_timeout) 09:31:27 09:31:27 conn.timeout = timeout_obj.connect_timeout # type: ignore[assignment] 09:31:27 09:31:27 # Is this a closed/new connection that requires CONNECT tunnelling? 09:31:27 if self.proxy is not None and http_tunnel_required and conn.is_closed: 09:31:27 try: 09:31:27 self._prepare_proxy(conn) 09:31:27 except (BaseSSLError, OSError, SocketTimeout) as e: 09:31:27 self._raise_timeout( 09:31:27 err=e, url=self.proxy.url, timeout_value=conn.timeout 09:31:27 ) 09:31:27 raise 09:31:27 09:31:27 # If we're going to release the connection in ``finally:``, then 09:31:27 # the response doesn't need to know about the connection. Otherwise 09:31:27 # it will also try to release it and we'll have a double-release 09:31:27 # mess. 09:31:27 response_conn = conn if not release_conn else None 09:31:27 09:31:27 # Make the request on the HTTPConnection object 09:31:27 > response = self._make_request( 09:31:27 conn, 09:31:27 method, 09:31:27 url, 09:31:27 timeout=timeout_obj, 09:31:27 body=body, 09:31:27 headers=headers, 09:31:27 chunked=chunked, 09:31:27 retries=retries, 09:31:27 response_conn=response_conn, 09:31:27 preload_content=preload_content, 09:31:27 decode_content=decode_content, 09:31:27 **response_kw, 09:31:27 ) 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:789: 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:495: in _make_request 09:31:27 conn.request( 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connection.py:441: in request 09:31:27 self.endheaders() 09:31:27 /opt/pyenv/versions/3.11.7/lib/python3.11/http/client.py:1289: in endheaders 09:31:27 self._send_output(message_body, encode_chunked=encode_chunked) 09:31:27 /opt/pyenv/versions/3.11.7/lib/python3.11/http/client.py:1048: in _send_output 09:31:27 self.send(msg) 09:31:27 /opt/pyenv/versions/3.11.7/lib/python3.11/http/client.py:986: in send 09:31:27 self.connect() 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connection.py:279: in connect 09:31:27 self.sock = self._new_conn() 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 09:31:27 self = 09:31:27 09:31:27 def _new_conn(self) -> socket.socket: 09:31:27 """Establish a socket connection and set nodelay settings on it. 09:31:27 09:31:27 :return: New socket connection. 09:31:27 """ 09:31:27 try: 09:31:27 sock = connection.create_connection( 09:31:27 (self._dns_host, self.port), 09:31:27 self.timeout, 09:31:27 source_address=self.source_address, 09:31:27 socket_options=self.socket_options, 09:31:27 ) 09:31:27 except socket.gaierror as e: 09:31:27 raise NameResolutionError(self.host, self, e) from e 09:31:27 except SocketTimeout as e: 09:31:27 raise ConnectTimeoutError( 09:31:27 self, 09:31:27 f"Connection to {self.host} timed out. (connect timeout={self.timeout})", 09:31:27 ) from e 09:31:27 09:31:27 except OSError as e: 09:31:27 > raise NewConnectionError( 09:31:27 self, f"Failed to establish a new connection: {e}" 09:31:27 ) from e 09:31:27 E urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [Errno 111] Connection refused 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connection.py:214: NewConnectionError 09:31:27 09:31:27 The above exception was the direct cause of the following exception: 09:31:27 09:31:27 self = 09:31:27 request = , stream = False 09:31:27 timeout = Timeout(connect=10, read=10, total=None), verify = True, cert = None 09:31:27 proxies = OrderedDict() 09:31:27 09:31:27 def send( 09:31:27 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 09:31:27 ): 09:31:27 """Sends PreparedRequest object. Returns Response object. 09:31:27 09:31:27 :param request: The :class:`PreparedRequest ` being sent. 09:31:27 :param stream: (optional) Whether to stream the request content. 09:31:27 :param timeout: (optional) How long to wait for the server to send 09:31:27 data before giving up, as a float, or a :ref:`(connect timeout, 09:31:27 read timeout) ` tuple. 09:31:27 :type timeout: float or tuple or urllib3 Timeout object 09:31:27 :param verify: (optional) Either a boolean, in which case it controls whether 09:31:27 we verify the server's TLS certificate, or a string, in which case it 09:31:27 must be a path to a CA bundle to use 09:31:27 :param cert: (optional) Any user-provided SSL certificate to be trusted. 09:31:27 :param proxies: (optional) The proxies dictionary to apply to the request. 09:31:27 :rtype: requests.Response 09:31:27 """ 09:31:27 09:31:27 try: 09:31:27 conn = self.get_connection_with_tls_context( 09:31:27 request, verify, proxies=proxies, cert=cert 09:31:27 ) 09:31:27 except LocationValueError as e: 09:31:27 raise InvalidURL(e, request=request) 09:31:27 09:31:27 self.cert_verify(conn, request.url, verify, cert) 09:31:27 url = self.request_url(request, proxies) 09:31:27 self.add_headers( 09:31:27 request, 09:31:27 stream=stream, 09:31:27 timeout=timeout, 09:31:27 verify=verify, 09:31:27 cert=cert, 09:31:27 proxies=proxies, 09:31:27 ) 09:31:27 09:31:27 chunked = not (request.body is None or "Content-Length" in request.headers) 09:31:27 09:31:27 if isinstance(timeout, tuple): 09:31:27 try: 09:31:27 connect, read = timeout 09:31:27 timeout = TimeoutSauce(connect=connect, read=read) 09:31:27 except ValueError: 09:31:27 raise ValueError( 09:31:27 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 09:31:27 f"or a single float to set both timeouts to the same value." 09:31:27 ) 09:31:27 elif isinstance(timeout, TimeoutSauce): 09:31:27 pass 09:31:27 else: 09:31:27 timeout = TimeoutSauce(connect=timeout, read=timeout) 09:31:27 09:31:27 try: 09:31:27 > resp = conn.urlopen( 09:31:27 method=request.method, 09:31:27 url=url, 09:31:27 body=request.body, 09:31:27 headers=request.headers, 09:31:27 redirect=False, 09:31:27 assert_same_host=False, 09:31:27 preload_content=False, 09:31:27 decode_content=False, 09:31:27 retries=self.max_retries, 09:31:27 timeout=timeout, 09:31:27 chunked=chunked, 09:31:27 ) 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/requests/adapters.py:667: 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:843: in urlopen 09:31:27 retries = retries.increment( 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 09:31:27 self = Retry(total=0, connect=None, read=False, redirect=None, status=None) 09:31:27 method = 'GET' 09:31:27 url = '/rests/data/network-topology:network-topology/topology=topology-netconf/node=XPDR-A2?content=nonconfig' 09:31:27 response = None 09:31:27 error = NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused') 09:31:27 _pool = 09:31:27 _stacktrace = 09:31:27 09:31:27 def increment( 09:31:27 self, 09:31:27 method: str | None = None, 09:31:27 url: str | None = None, 09:31:27 response: BaseHTTPResponse | None = None, 09:31:27 error: Exception | None = None, 09:31:27 _pool: ConnectionPool | None = None, 09:31:27 _stacktrace: TracebackType | None = None, 09:31:27 ) -> Self: 09:31:27 """Return a new Retry object with incremented retry counters. 09:31:27 09:31:27 :param response: A response object, or None, if the server did not 09:31:27 return a response. 09:31:27 :type response: :class:`~urllib3.response.BaseHTTPResponse` 09:31:27 :param Exception error: An error encountered during the request, or 09:31:27 None if the response was received successfully. 09:31:27 09:31:27 :return: A new ``Retry`` object. 09:31:27 """ 09:31:27 if self.total is False and error: 09:31:27 # Disabled, indicate to re-raise the error. 09:31:27 raise reraise(type(error), error, _stacktrace) 09:31:27 09:31:27 total = self.total 09:31:27 if total is not None: 09:31:27 total -= 1 09:31:27 09:31:27 connect = self.connect 09:31:27 read = self.read 09:31:27 redirect = self.redirect 09:31:27 status_count = self.status 09:31:27 other = self.other 09:31:27 cause = "unknown" 09:31:27 status = None 09:31:27 redirect_location = None 09:31:27 09:31:27 if error and self._is_connection_error(error): 09:31:27 # Connect retry? 09:31:27 if connect is False: 09:31:27 raise reraise(type(error), error, _stacktrace) 09:31:27 elif connect is not None: 09:31:27 connect -= 1 09:31:27 09:31:27 elif error and self._is_read_error(error): 09:31:27 # Read retry? 09:31:27 if read is False or method is None or not self._is_method_retryable(method): 09:31:27 raise reraise(type(error), error, _stacktrace) 09:31:27 elif read is not None: 09:31:27 read -= 1 09:31:27 09:31:27 elif error: 09:31:27 # Other retry? 09:31:27 if other is not None: 09:31:27 other -= 1 09:31:27 09:31:27 elif response and response.get_redirect_location(): 09:31:27 # Redirect retry? 09:31:27 if redirect is not None: 09:31:27 redirect -= 1 09:31:27 cause = "too many redirects" 09:31:27 response_redirect_location = response.get_redirect_location() 09:31:27 if response_redirect_location: 09:31:27 redirect_location = response_redirect_location 09:31:27 status = response.status 09:31:27 09:31:27 else: 09:31:27 # Incrementing because of a server error like a 500 in 09:31:27 # status_forcelist and the given method is in the allowed_methods 09:31:27 cause = ResponseError.GENERIC_ERROR 09:31:27 if response and response.status: 09:31:27 if status_count is not None: 09:31:27 status_count -= 1 09:31:27 cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) 09:31:27 status = response.status 09:31:27 09:31:27 history = self.history + ( 09:31:27 RequestHistory(method, url, error, status, redirect_location), 09:31:27 ) 09:31:27 09:31:27 new_retry = self.new( 09:31:27 total=total, 09:31:27 connect=connect, 09:31:27 read=read, 09:31:27 redirect=redirect, 09:31:27 status=status_count, 09:31:27 other=other, 09:31:27 history=history, 09:31:27 ) 09:31:27 09:31:27 if new_retry.is_exhausted(): 09:31:27 reason = error or ResponseError(cause) 09:31:27 > raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] 09:31:27 E urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8184): Max retries exceeded with url: /rests/data/network-topology:network-topology/topology=topology-netconf/node=XPDR-A2?content=nonconfig (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/util/retry.py:519: MaxRetryError 09:31:27 09:31:27 During handling of the above exception, another exception occurred: 09:31:27 09:31:27 self = 09:31:27 09:31:27 def test_11_xpdr_device_disconnected(self): 09:31:27 > response = test_utils.check_device_connection("XPDR-A2") 09:31:27 09:31:27 transportpce_tests/7.1/test01_portmapping.py:175: 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 transportpce_tests/common/test_utils.py:369: in check_device_connection 09:31:27 response = get_request(url[RESTCONF_VERSION].format('{}', node)) 09:31:27 transportpce_tests/common/test_utils.py:116: in get_request 09:31:27 return requests.request( 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/requests/api.py:59: in request 09:31:27 return session.request(method=method, url=url, **kwargs) 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/requests/sessions.py:589: in request 09:31:27 resp = self.send(prep, **send_kwargs) 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/requests/sessions.py:703: in send 09:31:27 r = adapter.send(request, **kwargs) 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 09:31:27 self = 09:31:27 request = , stream = False 09:31:27 timeout = Timeout(connect=10, read=10, total=None), verify = True, cert = None 09:31:27 proxies = OrderedDict() 09:31:27 09:31:27 def send( 09:31:27 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 09:31:27 ): 09:31:27 """Sends PreparedRequest object. Returns Response object. 09:31:27 09:31:27 :param request: The :class:`PreparedRequest ` being sent. 09:31:27 :param stream: (optional) Whether to stream the request content. 09:31:27 :param timeout: (optional) How long to wait for the server to send 09:31:27 data before giving up, as a float, or a :ref:`(connect timeout, 09:31:27 read timeout) ` tuple. 09:31:27 :type timeout: float or tuple or urllib3 Timeout object 09:31:27 :param verify: (optional) Either a boolean, in which case it controls whether 09:31:27 we verify the server's TLS certificate, or a string, in which case it 09:31:27 must be a path to a CA bundle to use 09:31:27 :param cert: (optional) Any user-provided SSL certificate to be trusted. 09:31:27 :param proxies: (optional) The proxies dictionary to apply to the request. 09:31:27 :rtype: requests.Response 09:31:27 """ 09:31:27 09:31:27 try: 09:31:27 conn = self.get_connection_with_tls_context( 09:31:27 request, verify, proxies=proxies, cert=cert 09:31:27 ) 09:31:27 except LocationValueError as e: 09:31:27 raise InvalidURL(e, request=request) 09:31:27 09:31:27 self.cert_verify(conn, request.url, verify, cert) 09:31:27 url = self.request_url(request, proxies) 09:31:27 self.add_headers( 09:31:27 request, 09:31:27 stream=stream, 09:31:27 timeout=timeout, 09:31:27 verify=verify, 09:31:27 cert=cert, 09:31:27 proxies=proxies, 09:31:27 ) 09:31:27 09:31:27 chunked = not (request.body is None or "Content-Length" in request.headers) 09:31:27 09:31:27 if isinstance(timeout, tuple): 09:31:27 try: 09:31:27 connect, read = timeout 09:31:27 timeout = TimeoutSauce(connect=connect, read=read) 09:31:27 except ValueError: 09:31:27 raise ValueError( 09:31:27 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 09:31:27 f"or a single float to set both timeouts to the same value." 09:31:27 ) 09:31:27 elif isinstance(timeout, TimeoutSauce): 09:31:27 pass 09:31:27 else: 09:31:27 timeout = TimeoutSauce(connect=timeout, read=timeout) 09:31:27 09:31:27 try: 09:31:27 resp = conn.urlopen( 09:31:27 method=request.method, 09:31:27 url=url, 09:31:27 body=request.body, 09:31:27 headers=request.headers, 09:31:27 redirect=False, 09:31:27 assert_same_host=False, 09:31:27 preload_content=False, 09:31:27 decode_content=False, 09:31:27 retries=self.max_retries, 09:31:27 timeout=timeout, 09:31:27 chunked=chunked, 09:31:27 ) 09:31:27 09:31:27 except (ProtocolError, OSError) as err: 09:31:27 raise ConnectionError(err, request=request) 09:31:27 09:31:27 except MaxRetryError as e: 09:31:27 if isinstance(e.reason, ConnectTimeoutError): 09:31:27 # TODO: Remove this in 3.0.0: see #2811 09:31:27 if not isinstance(e.reason, NewConnectionError): 09:31:27 raise ConnectTimeout(e, request=request) 09:31:27 09:31:27 if isinstance(e.reason, ResponseError): 09:31:27 raise RetryError(e, request=request) 09:31:27 09:31:27 if isinstance(e.reason, _ProxyError): 09:31:27 raise ProxyError(e, request=request) 09:31:27 09:31:27 if isinstance(e.reason, _SSLError): 09:31:27 # This branch is for urllib3 v1.22 and later. 09:31:27 raise SSLError(e, request=request) 09:31:27 09:31:27 > raise ConnectionError(e, request=request) 09:31:27 E requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8184): Max retries exceeded with url: /rests/data/network-topology:network-topology/topology=topology-netconf/node=XPDR-A2?content=nonconfig (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/requests/adapters.py:700: ConnectionError 09:31:27 ----------------------------- Captured stdout call ----------------------------- 09:31:27 execution of test_11_xpdr_device_disconnected 09:31:27 _____ TransportPCE400GPortMappingTesting.test_12_xpdr_device_not_connected _____ 09:31:27 09:31:27 self = 09:31:27 09:31:27 def _new_conn(self) -> socket.socket: 09:31:27 """Establish a socket connection and set nodelay settings on it. 09:31:27 09:31:27 :return: New socket connection. 09:31:27 """ 09:31:27 try: 09:31:27 > sock = connection.create_connection( 09:31:27 (self._dns_host, self.port), 09:31:27 self.timeout, 09:31:27 source_address=self.source_address, 09:31:27 socket_options=self.socket_options, 09:31:27 ) 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connection.py:199: 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/util/connection.py:85: in create_connection 09:31:27 raise err 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 09:31:27 address = ('localhost', 8184), timeout = 10, source_address = None 09:31:27 socket_options = [(6, 1, 1)] 09:31:27 09:31:27 def create_connection( 09:31:27 address: tuple[str, int], 09:31:27 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 09:31:27 source_address: tuple[str, int] | None = None, 09:31:27 socket_options: _TYPE_SOCKET_OPTIONS | None = None, 09:31:27 ) -> socket.socket: 09:31:27 """Connect to *address* and return the socket object. 09:31:27 09:31:27 Convenience function. Connect to *address* (a 2-tuple ``(host, 09:31:27 port)``) and return the socket object. Passing the optional 09:31:27 *timeout* parameter will set the timeout on the socket instance 09:31:27 before attempting to connect. If no *timeout* is supplied, the 09:31:27 global default timeout setting returned by :func:`socket.getdefaulttimeout` 09:31:27 is used. If *source_address* is set it must be a tuple of (host, port) 09:31:27 for the socket to bind as a source address before making the connection. 09:31:27 An host of '' or port 0 tells the OS to use the default. 09:31:27 """ 09:31:27 09:31:27 host, port = address 09:31:27 if host.startswith("["): 09:31:27 host = host.strip("[]") 09:31:27 err = None 09:31:27 09:31:27 # Using the value from allowed_gai_family() in the context of getaddrinfo lets 09:31:27 # us select whether to work with IPv4 DNS records, IPv6 records, or both. 09:31:27 # The original create_connection function always returns all records. 09:31:27 family = allowed_gai_family() 09:31:27 09:31:27 try: 09:31:27 host.encode("idna") 09:31:27 except UnicodeError: 09:31:27 raise LocationParseError(f"'{host}', label empty or too long") from None 09:31:27 09:31:27 for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 09:31:27 af, socktype, proto, canonname, sa = res 09:31:27 sock = None 09:31:27 try: 09:31:27 sock = socket.socket(af, socktype, proto) 09:31:27 09:31:27 # If provided, set socket level options before connecting. 09:31:27 _set_socket_options(sock, socket_options) 09:31:27 09:31:27 if timeout is not _DEFAULT_TIMEOUT: 09:31:27 sock.settimeout(timeout) 09:31:27 if source_address: 09:31:27 sock.bind(source_address) 09:31:27 > sock.connect(sa) 09:31:27 E ConnectionRefusedError: [Errno 111] Connection refused 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/util/connection.py:73: ConnectionRefusedError 09:31:27 09:31:27 The above exception was the direct cause of the following exception: 09:31:27 09:31:27 self = 09:31:27 method = 'GET' 09:31:27 url = '/rests/data/transportpce-portmapping:network/nodes=XPDR-A2/node-info' 09:31:27 body = None 09:31:27 headers = {'User-Agent': 'python-requests/2.32.3', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'Connection': 'keep-alive', 'Content-Type': 'application/json', 'Authorization': 'Basic YWRtaW46YWRtaW4='} 09:31:27 retries = Retry(total=0, connect=None, read=False, redirect=None, status=None) 09:31:27 redirect = False, assert_same_host = False 09:31:27 timeout = Timeout(connect=10, read=10, total=None), pool_timeout = None 09:31:27 release_conn = False, chunked = False, body_pos = None, preload_content = False 09:31:27 decode_content = False, response_kw = {} 09:31:27 parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/rests/data/transportpce-portmapping:network/nodes=XPDR-A2/node-info', query=None, fragment=None) 09:31:27 destination_scheme = None, conn = None, release_this_conn = True 09:31:27 http_tunnel_required = False, err = None, clean_exit = False 09:31:27 09:31:27 def urlopen( # type: ignore[override] 09:31:27 self, 09:31:27 method: str, 09:31:27 url: str, 09:31:27 body: _TYPE_BODY | None = None, 09:31:27 headers: typing.Mapping[str, str] | None = None, 09:31:27 retries: Retry | bool | int | None = None, 09:31:27 redirect: bool = True, 09:31:27 assert_same_host: bool = True, 09:31:27 timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, 09:31:27 pool_timeout: int | None = None, 09:31:27 release_conn: bool | None = None, 09:31:27 chunked: bool = False, 09:31:27 body_pos: _TYPE_BODY_POSITION | None = None, 09:31:27 preload_content: bool = True, 09:31:27 decode_content: bool = True, 09:31:27 **response_kw: typing.Any, 09:31:27 ) -> BaseHTTPResponse: 09:31:27 """ 09:31:27 Get a connection from the pool and perform an HTTP request. This is the 09:31:27 lowest level call for making a request, so you'll need to specify all 09:31:27 the raw details. 09:31:27 09:31:27 .. note:: 09:31:27 09:31:27 More commonly, it's appropriate to use a convenience method 09:31:27 such as :meth:`request`. 09:31:27 09:31:27 .. note:: 09:31:27 09:31:27 `release_conn` will only behave as expected if 09:31:27 `preload_content=False` because we want to make 09:31:27 `preload_content=False` the default behaviour someday soon without 09:31:27 breaking backwards compatibility. 09:31:27 09:31:27 :param method: 09:31:27 HTTP request method (such as GET, POST, PUT, etc.) 09:31:27 09:31:27 :param url: 09:31:27 The URL to perform the request on. 09:31:27 09:31:27 :param body: 09:31:27 Data to send in the request body, either :class:`str`, :class:`bytes`, 09:31:27 an iterable of :class:`str`/:class:`bytes`, or a file-like object. 09:31:27 09:31:27 :param headers: 09:31:27 Dictionary of custom headers to send, such as User-Agent, 09:31:27 If-None-Match, etc. If None, pool headers are used. If provided, 09:31:27 these headers completely replace any pool-specific headers. 09:31:27 09:31:27 :param retries: 09:31:27 Configure the number of retries to allow before raising a 09:31:27 :class:`~urllib3.exceptions.MaxRetryError` exception. 09:31:27 09:31:27 If ``None`` (default) will retry 3 times, see ``Retry.DEFAULT``. Pass a 09:31:27 :class:`~urllib3.util.retry.Retry` object for fine-grained control 09:31:27 over different types of retries. 09:31:27 Pass an integer number to retry connection errors that many times, 09:31:27 but no other types of errors. Pass zero to never retry. 09:31:27 09:31:27 If ``False``, then retries are disabled and any exception is raised 09:31:27 immediately. Also, instead of raising a MaxRetryError on redirects, 09:31:27 the redirect response will be returned. 09:31:27 09:31:27 :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. 09:31:27 09:31:27 :param redirect: 09:31:27 If True, automatically handle redirects (status codes 301, 302, 09:31:27 303, 307, 308). Each redirect counts as a retry. Disabling retries 09:31:27 will disable redirect, too. 09:31:27 09:31:27 :param assert_same_host: 09:31:27 If ``True``, will make sure that the host of the pool requests is 09:31:27 consistent else will raise HostChangedError. When ``False``, you can 09:31:27 use the pool on an HTTP proxy and request foreign hosts. 09:31:27 09:31:27 :param timeout: 09:31:27 If specified, overrides the default timeout for this one 09:31:27 request. It may be a float (in seconds) or an instance of 09:31:27 :class:`urllib3.util.Timeout`. 09:31:27 09:31:27 :param pool_timeout: 09:31:27 If set and the pool is set to block=True, then this method will 09:31:27 block for ``pool_timeout`` seconds and raise EmptyPoolError if no 09:31:27 connection is available within the time period. 09:31:27 09:31:27 :param bool preload_content: 09:31:27 If True, the response's body will be preloaded into memory. 09:31:27 09:31:27 :param bool decode_content: 09:31:27 If True, will attempt to decode the body based on the 09:31:27 'content-encoding' header. 09:31:27 09:31:27 :param release_conn: 09:31:27 If False, then the urlopen call will not release the connection 09:31:27 back into the pool once a response is received (but will release if 09:31:27 you read the entire contents of the response such as when 09:31:27 `preload_content=True`). This is useful if you're not preloading 09:31:27 the response's content immediately. You will need to call 09:31:27 ``r.release_conn()`` on the response ``r`` to return the connection 09:31:27 back into the pool. If None, it takes the value of ``preload_content`` 09:31:27 which defaults to ``True``. 09:31:27 09:31:27 :param bool chunked: 09:31:27 If True, urllib3 will send the body using chunked transfer 09:31:27 encoding. Otherwise, urllib3 will send the body using the standard 09:31:27 content-length form. Defaults to False. 09:31:27 09:31:27 :param int body_pos: 09:31:27 Position to seek to in file-like body in the event of a retry or 09:31:27 redirect. Typically this won't need to be set because urllib3 will 09:31:27 auto-populate the value when needed. 09:31:27 """ 09:31:27 parsed_url = parse_url(url) 09:31:27 destination_scheme = parsed_url.scheme 09:31:27 09:31:27 if headers is None: 09:31:27 headers = self.headers 09:31:27 09:31:27 if not isinstance(retries, Retry): 09:31:27 retries = Retry.from_int(retries, redirect=redirect, default=self.retries) 09:31:27 09:31:27 if release_conn is None: 09:31:27 release_conn = preload_content 09:31:27 09:31:27 # Check host 09:31:27 if assert_same_host and not self.is_same_host(url): 09:31:27 raise HostChangedError(self, url, retries) 09:31:27 09:31:27 # Ensure that the URL we're connecting to is properly encoded 09:31:27 if url.startswith("/"): 09:31:27 url = to_str(_encode_target(url)) 09:31:27 else: 09:31:27 url = to_str(parsed_url.url) 09:31:27 09:31:27 conn = None 09:31:27 09:31:27 # Track whether `conn` needs to be released before 09:31:27 # returning/raising/recursing. Update this variable if necessary, and 09:31:27 # leave `release_conn` constant throughout the function. That way, if 09:31:27 # the function recurses, the original value of `release_conn` will be 09:31:27 # passed down into the recursive call, and its value will be respected. 09:31:27 # 09:31:27 # See issue #651 [1] for details. 09:31:27 # 09:31:27 # [1] 09:31:27 release_this_conn = release_conn 09:31:27 09:31:27 http_tunnel_required = connection_requires_http_tunnel( 09:31:27 self.proxy, self.proxy_config, destination_scheme 09:31:27 ) 09:31:27 09:31:27 # Merge the proxy headers. Only done when not using HTTP CONNECT. We 09:31:27 # have to copy the headers dict so we can safely change it without those 09:31:27 # changes being reflected in anyone else's copy. 09:31:27 if not http_tunnel_required: 09:31:27 headers = headers.copy() # type: ignore[attr-defined] 09:31:27 headers.update(self.proxy_headers) # type: ignore[union-attr] 09:31:27 09:31:27 # Must keep the exception bound to a separate variable or else Python 3 09:31:27 # complains about UnboundLocalError. 09:31:27 err = None 09:31:27 09:31:27 # Keep track of whether we cleanly exited the except block. This 09:31:27 # ensures we do proper cleanup in finally. 09:31:27 clean_exit = False 09:31:27 09:31:27 # Rewind body position, if needed. Record current position 09:31:27 # for future rewinds in the event of a redirect/retry. 09:31:27 body_pos = set_file_position(body, body_pos) 09:31:27 09:31:27 try: 09:31:27 # Request a connection from the queue. 09:31:27 timeout_obj = self._get_timeout(timeout) 09:31:27 conn = self._get_conn(timeout=pool_timeout) 09:31:27 09:31:27 conn.timeout = timeout_obj.connect_timeout # type: ignore[assignment] 09:31:27 09:31:27 # Is this a closed/new connection that requires CONNECT tunnelling? 09:31:27 if self.proxy is not None and http_tunnel_required and conn.is_closed: 09:31:27 try: 09:31:27 self._prepare_proxy(conn) 09:31:27 except (BaseSSLError, OSError, SocketTimeout) as e: 09:31:27 self._raise_timeout( 09:31:27 err=e, url=self.proxy.url, timeout_value=conn.timeout 09:31:27 ) 09:31:27 raise 09:31:27 09:31:27 # If we're going to release the connection in ``finally:``, then 09:31:27 # the response doesn't need to know about the connection. Otherwise 09:31:27 # it will also try to release it and we'll have a double-release 09:31:27 # mess. 09:31:27 response_conn = conn if not release_conn else None 09:31:27 09:31:27 # Make the request on the HTTPConnection object 09:31:27 > response = self._make_request( 09:31:27 conn, 09:31:27 method, 09:31:27 url, 09:31:27 timeout=timeout_obj, 09:31:27 body=body, 09:31:27 headers=headers, 09:31:27 chunked=chunked, 09:31:27 retries=retries, 09:31:27 response_conn=response_conn, 09:31:27 preload_content=preload_content, 09:31:27 decode_content=decode_content, 09:31:27 **response_kw, 09:31:27 ) 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:789: 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:495: in _make_request 09:31:27 conn.request( 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connection.py:441: in request 09:31:27 self.endheaders() 09:31:27 /opt/pyenv/versions/3.11.7/lib/python3.11/http/client.py:1289: in endheaders 09:31:27 self._send_output(message_body, encode_chunked=encode_chunked) 09:31:27 /opt/pyenv/versions/3.11.7/lib/python3.11/http/client.py:1048: in _send_output 09:31:27 self.send(msg) 09:31:27 /opt/pyenv/versions/3.11.7/lib/python3.11/http/client.py:986: in send 09:31:27 self.connect() 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connection.py:279: in connect 09:31:27 self.sock = self._new_conn() 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 09:31:27 self = 09:31:27 09:31:27 def _new_conn(self) -> socket.socket: 09:31:27 """Establish a socket connection and set nodelay settings on it. 09:31:27 09:31:27 :return: New socket connection. 09:31:27 """ 09:31:27 try: 09:31:27 sock = connection.create_connection( 09:31:27 (self._dns_host, self.port), 09:31:27 self.timeout, 09:31:27 source_address=self.source_address, 09:31:27 socket_options=self.socket_options, 09:31:27 ) 09:31:27 except socket.gaierror as e: 09:31:27 raise NameResolutionError(self.host, self, e) from e 09:31:27 except SocketTimeout as e: 09:31:27 raise ConnectTimeoutError( 09:31:27 self, 09:31:27 f"Connection to {self.host} timed out. (connect timeout={self.timeout})", 09:31:27 ) from e 09:31:27 09:31:27 except OSError as e: 09:31:27 > raise NewConnectionError( 09:31:27 self, f"Failed to establish a new connection: {e}" 09:31:27 ) from e 09:31:27 E urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [Errno 111] Connection refused 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connection.py:214: NewConnectionError 09:31:27 09:31:27 The above exception was the direct cause of the following exception: 09:31:27 09:31:27 self = 09:31:27 request = , stream = False 09:31:27 timeout = Timeout(connect=10, read=10, total=None), verify = True, cert = None 09:31:27 proxies = OrderedDict() 09:31:27 09:31:27 def send( 09:31:27 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 09:31:27 ): 09:31:27 """Sends PreparedRequest object. Returns Response object. 09:31:27 09:31:27 :param request: The :class:`PreparedRequest ` being sent. 09:31:27 :param stream: (optional) Whether to stream the request content. 09:31:27 :param timeout: (optional) How long to wait for the server to send 09:31:27 data before giving up, as a float, or a :ref:`(connect timeout, 09:31:27 read timeout) ` tuple. 09:31:27 :type timeout: float or tuple or urllib3 Timeout object 09:31:27 :param verify: (optional) Either a boolean, in which case it controls whether 09:31:27 we verify the server's TLS certificate, or a string, in which case it 09:31:27 must be a path to a CA bundle to use 09:31:27 :param cert: (optional) Any user-provided SSL certificate to be trusted. 09:31:27 :param proxies: (optional) The proxies dictionary to apply to the request. 09:31:27 :rtype: requests.Response 09:31:27 """ 09:31:27 09:31:27 try: 09:31:27 conn = self.get_connection_with_tls_context( 09:31:27 request, verify, proxies=proxies, cert=cert 09:31:27 ) 09:31:27 except LocationValueError as e: 09:31:27 raise InvalidURL(e, request=request) 09:31:27 09:31:27 self.cert_verify(conn, request.url, verify, cert) 09:31:27 url = self.request_url(request, proxies) 09:31:27 self.add_headers( 09:31:27 request, 09:31:27 stream=stream, 09:31:27 timeout=timeout, 09:31:27 verify=verify, 09:31:27 cert=cert, 09:31:27 proxies=proxies, 09:31:27 ) 09:31:27 09:31:27 chunked = not (request.body is None or "Content-Length" in request.headers) 09:31:27 09:31:27 if isinstance(timeout, tuple): 09:31:27 try: 09:31:27 connect, read = timeout 09:31:27 timeout = TimeoutSauce(connect=connect, read=read) 09:31:27 except ValueError: 09:31:27 raise ValueError( 09:31:27 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 09:31:27 f"or a single float to set both timeouts to the same value." 09:31:27 ) 09:31:27 elif isinstance(timeout, TimeoutSauce): 09:31:27 pass 09:31:27 else: 09:31:27 timeout = TimeoutSauce(connect=timeout, read=timeout) 09:31:27 09:31:27 try: 09:31:27 > resp = conn.urlopen( 09:31:27 method=request.method, 09:31:27 url=url, 09:31:27 body=request.body, 09:31:27 headers=request.headers, 09:31:27 redirect=False, 09:31:27 assert_same_host=False, 09:31:27 preload_content=False, 09:31:27 decode_content=False, 09:31:27 retries=self.max_retries, 09:31:27 timeout=timeout, 09:31:27 chunked=chunked, 09:31:27 ) 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/requests/adapters.py:667: 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/connectionpool.py:843: in urlopen 09:31:27 retries = retries.increment( 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 09:31:27 self = Retry(total=0, connect=None, read=False, redirect=None, status=None) 09:31:27 method = 'GET' 09:31:27 url = '/rests/data/transportpce-portmapping:network/nodes=XPDR-A2/node-info' 09:31:27 response = None 09:31:27 error = NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused') 09:31:27 _pool = 09:31:27 _stacktrace = 09:31:27 09:31:27 def increment( 09:31:27 self, 09:31:27 method: str | None = None, 09:31:27 url: str | None = None, 09:31:27 response: BaseHTTPResponse | None = None, 09:31:27 error: Exception | None = None, 09:31:27 _pool: ConnectionPool | None = None, 09:31:27 _stacktrace: TracebackType | None = None, 09:31:27 ) -> Self: 09:31:27 """Return a new Retry object with incremented retry counters. 09:31:27 09:31:27 :param response: A response object, or None, if the server did not 09:31:27 return a response. 09:31:27 :type response: :class:`~urllib3.response.BaseHTTPResponse` 09:31:27 :param Exception error: An error encountered during the request, or 09:31:27 None if the response was received successfully. 09:31:27 09:31:27 :return: A new ``Retry`` object. 09:31:27 """ 09:31:27 if self.total is False and error: 09:31:27 # Disabled, indicate to re-raise the error. 09:31:27 raise reraise(type(error), error, _stacktrace) 09:31:27 09:31:27 total = self.total 09:31:27 if total is not None: 09:31:27 total -= 1 09:31:27 09:31:27 connect = self.connect 09:31:27 read = self.read 09:31:27 redirect = self.redirect 09:31:27 status_count = self.status 09:31:27 other = self.other 09:31:27 cause = "unknown" 09:31:27 status = None 09:31:27 redirect_location = None 09:31:27 09:31:27 if error and self._is_connection_error(error): 09:31:27 # Connect retry? 09:31:27 if connect is False: 09:31:27 raise reraise(type(error), error, _stacktrace) 09:31:27 elif connect is not None: 09:31:27 connect -= 1 09:31:27 09:31:27 elif error and self._is_read_error(error): 09:31:27 # Read retry? 09:31:27 if read is False or method is None or not self._is_method_retryable(method): 09:31:27 raise reraise(type(error), error, _stacktrace) 09:31:27 elif read is not None: 09:31:27 read -= 1 09:31:27 09:31:27 elif error: 09:31:27 # Other retry? 09:31:27 if other is not None: 09:31:27 other -= 1 09:31:27 09:31:27 elif response and response.get_redirect_location(): 09:31:27 # Redirect retry? 09:31:27 if redirect is not None: 09:31:27 redirect -= 1 09:31:27 cause = "too many redirects" 09:31:27 response_redirect_location = response.get_redirect_location() 09:31:27 if response_redirect_location: 09:31:27 redirect_location = response_redirect_location 09:31:27 status = response.status 09:31:27 09:31:27 else: 09:31:27 # Incrementing because of a server error like a 500 in 09:31:27 # status_forcelist and the given method is in the allowed_methods 09:31:27 cause = ResponseError.GENERIC_ERROR 09:31:27 if response and response.status: 09:31:27 if status_count is not None: 09:31:27 status_count -= 1 09:31:27 cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) 09:31:27 status = response.status 09:31:27 09:31:27 history = self.history + ( 09:31:27 RequestHistory(method, url, error, status, redirect_location), 09:31:27 ) 09:31:27 09:31:27 new_retry = self.new( 09:31:27 total=total, 09:31:27 connect=connect, 09:31:27 read=read, 09:31:27 redirect=redirect, 09:31:27 status=status_count, 09:31:27 other=other, 09:31:27 history=history, 09:31:27 ) 09:31:27 09:31:27 if new_retry.is_exhausted(): 09:31:27 reason = error or ResponseError(cause) 09:31:27 > raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] 09:31:27 E urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8184): Max retries exceeded with url: /rests/data/transportpce-portmapping:network/nodes=XPDR-A2/node-info (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/urllib3/util/retry.py:519: MaxRetryError 09:31:27 09:31:27 During handling of the above exception, another exception occurred: 09:31:27 09:31:27 self = 09:31:27 09:31:27 def test_12_xpdr_device_not_connected(self): 09:31:27 > response = test_utils.get_portmapping_node_attr("XPDR-A2", "node-info", None) 09:31:27 09:31:27 transportpce_tests/7.1/test01_portmapping.py:183: 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 transportpce_tests/common/test_utils.py:470: in get_portmapping_node_attr 09:31:27 response = get_request(target_url) 09:31:27 transportpce_tests/common/test_utils.py:116: in get_request 09:31:27 return requests.request( 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/requests/api.py:59: in request 09:31:27 return session.request(method=method, url=url, **kwargs) 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/requests/sessions.py:589: in request 09:31:27 resp = self.send(prep, **send_kwargs) 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/requests/sessions.py:703: in send 09:31:27 r = adapter.send(request, **kwargs) 09:31:27 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 09:31:27 09:31:27 self = 09:31:27 request = , stream = False 09:31:27 timeout = Timeout(connect=10, read=10, total=None), verify = True, cert = None 09:31:27 proxies = OrderedDict() 09:31:27 09:31:27 def send( 09:31:27 self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None 09:31:27 ): 09:31:27 """Sends PreparedRequest object. Returns Response object. 09:31:27 09:31:27 :param request: The :class:`PreparedRequest ` being sent. 09:31:27 :param stream: (optional) Whether to stream the request content. 09:31:27 :param timeout: (optional) How long to wait for the server to send 09:31:27 data before giving up, as a float, or a :ref:`(connect timeout, 09:31:27 read timeout) ` tuple. 09:31:27 :type timeout: float or tuple or urllib3 Timeout object 09:31:27 :param verify: (optional) Either a boolean, in which case it controls whether 09:31:27 we verify the server's TLS certificate, or a string, in which case it 09:31:27 must be a path to a CA bundle to use 09:31:27 :param cert: (optional) Any user-provided SSL certificate to be trusted. 09:31:27 :param proxies: (optional) The proxies dictionary to apply to the request. 09:31:27 :rtype: requests.Response 09:31:27 """ 09:31:27 09:31:27 try: 09:31:27 conn = self.get_connection_with_tls_context( 09:31:27 request, verify, proxies=proxies, cert=cert 09:31:27 ) 09:31:27 except LocationValueError as e: 09:31:27 raise InvalidURL(e, request=request) 09:31:27 09:31:27 self.cert_verify(conn, request.url, verify, cert) 09:31:27 url = self.request_url(request, proxies) 09:31:27 self.add_headers( 09:31:27 request, 09:31:27 stream=stream, 09:31:27 timeout=timeout, 09:31:27 verify=verify, 09:31:27 cert=cert, 09:31:27 proxies=proxies, 09:31:27 ) 09:31:27 09:31:27 chunked = not (request.body is None or "Content-Length" in request.headers) 09:31:27 09:31:27 if isinstance(timeout, tuple): 09:31:27 try: 09:31:27 connect, read = timeout 09:31:27 timeout = TimeoutSauce(connect=connect, read=read) 09:31:27 except ValueError: 09:31:27 raise ValueError( 09:31:27 f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " 09:31:27 f"or a single float to set both timeouts to the same value." 09:31:27 ) 09:31:27 elif isinstance(timeout, TimeoutSauce): 09:31:27 pass 09:31:27 else: 09:31:27 timeout = TimeoutSauce(connect=timeout, read=timeout) 09:31:27 09:31:27 try: 09:31:27 resp = conn.urlopen( 09:31:27 method=request.method, 09:31:27 url=url, 09:31:27 body=request.body, 09:31:27 headers=request.headers, 09:31:27 redirect=False, 09:31:27 assert_same_host=False, 09:31:27 preload_content=False, 09:31:27 decode_content=False, 09:31:27 retries=self.max_retries, 09:31:27 timeout=timeout, 09:31:27 chunked=chunked, 09:31:27 ) 09:31:27 09:31:27 except (ProtocolError, OSError) as err: 09:31:27 raise ConnectionError(err, request=request) 09:31:27 09:31:27 except MaxRetryError as e: 09:31:27 if isinstance(e.reason, ConnectTimeoutError): 09:31:27 # TODO: Remove this in 3.0.0: see #2811 09:31:27 if not isinstance(e.reason, NewConnectionError): 09:31:27 raise ConnectTimeout(e, request=request) 09:31:27 09:31:27 if isinstance(e.reason, ResponseError): 09:31:27 raise RetryError(e, request=request) 09:31:27 09:31:27 if isinstance(e.reason, _ProxyError): 09:31:27 raise ProxyError(e, request=request) 09:31:27 09:31:27 if isinstance(e.reason, _SSLError): 09:31:27 # This branch is for urllib3 v1.22 and later. 09:31:27 raise SSLError(e, request=request) 09:31:27 09:31:27 > raise ConnectionError(e, request=request) 09:31:27 E requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8184): Max retries exceeded with url: /rests/data/transportpce-portmapping:network/nodes=XPDR-A2/node-info (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) 09:31:27 09:31:27 ../.tox/tests71/lib/python3.11/site-packages/requests/adapters.py:700: ConnectionError 09:31:27 ----------------------------- Captured stdout call ----------------------------- 09:31:27 execution of test_12_xpdr_device_not_connected 09:31:27 --------------------------- Captured stdout teardown --------------------------- 09:31:27 all processes killed 09:31:27 =========================== short test summary info ============================ 09:31:27 FAILED transportpce_tests/7.1/test01_portmapping.py::TransportPCE400GPortMappingTesting::test_01_xpdr_device_connection 09:31:27 FAILED transportpce_tests/7.1/test01_portmapping.py::TransportPCE400GPortMappingTesting::test_02_xpdr_device_connected 09:31:27 FAILED transportpce_tests/7.1/test01_portmapping.py::TransportPCE400GPortMappingTesting::test_03_xpdr_portmapping_info 09:31:27 FAILED transportpce_tests/7.1/test01_portmapping.py::TransportPCE400GPortMappingTesting::test_04_tpdr_portmapping_NETWORK1 09:31:27 FAILED transportpce_tests/7.1/test01_portmapping.py::TransportPCE400GPortMappingTesting::test_05_tpdr_portmapping_CLIENT1 09:31:27 FAILED transportpce_tests/7.1/test01_portmapping.py::TransportPCE400GPortMappingTesting::test_06_mpdr_portmapping_NETWORK1 09:31:27 FAILED transportpce_tests/7.1/test01_portmapping.py::TransportPCE400GPortMappingTesting::test_07_mpdr_portmapping_CLIENT1 09:31:27 FAILED transportpce_tests/7.1/test01_portmapping.py::TransportPCE400GPortMappingTesting::test_08_check_mccapprofile 09:31:27 FAILED transportpce_tests/7.1/test01_portmapping.py::TransportPCE400GPortMappingTesting::test_09_mpdr_switching_pool 09:31:27 FAILED transportpce_tests/7.1/test01_portmapping.py::TransportPCE400GPortMappingTesting::test_10_xpdr_device_disconnection 09:31:27 FAILED transportpce_tests/7.1/test01_portmapping.py::TransportPCE400GPortMappingTesting::test_11_xpdr_device_disconnected 09:31:27 FAILED transportpce_tests/7.1/test01_portmapping.py::TransportPCE400GPortMappingTesting::test_12_xpdr_device_not_connected 09:31:27 12 failed in 41.28s 09:31:27 tests71: exit 1 (41.53 seconds) /w/workspace/transportpce-tox-verify-transportpce-master/tests> ./launch_tests.sh 7.1 pid=39873 09:31:28 tests71: FAIL ✖ in 47.72 seconds 09:31:28 tests221: install_deps> python -I -m pip install 'setuptools>=7.0' -r /w/workspace/transportpce-tox-verify-transportpce-master/tests/requirements.txt -r /w/workspace/transportpce-tox-verify-transportpce-master/tests/test-requirements.txt 09:31:36 tests221: freeze> python -m pip freeze --all 09:31:36 tests221: bcrypt==4.2.0,certifi==2024.8.30,cffi==1.17.1,charset-normalizer==3.3.2,cryptography==43.0.1,dict2xml==1.7.6,idna==3.10,iniconfig==2.0.0,lxml==5.3.0,netconf-client==3.1.1,packaging==24.1,paramiko==3.5.0,pip==24.2,pluggy==1.5.0,psutil==6.0.0,pycparser==2.22,PyNaCl==1.5.0,pytest==8.3.3,requests==2.32.3,setuptools==75.1.0,urllib3==2.2.3,wheel==0.44.0 09:31:36 tests221: commands[0] /w/workspace/transportpce-tox-verify-transportpce-master/tests> ./launch_tests.sh 2.2.1 09:31:36 using environment variables from ./karaf221.env 09:31:36 pytest -q transportpce_tests/2.2.1/test01_portmapping.py 09:32:14 ................................... [100%] 09:35:54 35 passed in 257.61s (0:04:17) 09:35:54 pytest -q transportpce_tests/2.2.1/test02_topo_portmapping.py 09:36:26 ...... [100%] 09:36:39 6 passed in 45.52s 09:36:39 pytest -q transportpce_tests/2.2.1/test03_topology.py 09:37:23 ............................................ [100%] 09:38:57 44 passed in 137.47s (0:02:17) 09:38:57 pytest -q transportpce_tests/2.2.1/test04_otn_topology.py 09:39:33 ............ [100%] 09:39:57 12 passed in 60.04s (0:01:00) 09:39:57 pytest -q transportpce_tests/2.2.1/test05_flex_grid.py 09:40:24 ................ [100%] 09:41:53 16 passed in 115.01s (0:01:55) 09:41:53 pytest -q transportpce_tests/2.2.1/test06_renderer_service_path_nominal.py 09:42:22 ............................... [100%] 09:42:29 31 passed in 35.85s 09:42:29 pytest -q transportpce_tests/2.2.1/test07_otn_renderer.py 09:43:04 .......................... [100%] 09:44:00 26 passed in 91.15s (0:01:31) 09:44:00 pytest -q transportpce_tests/2.2.1/test08_otn_sh_renderer.py 09:44:36 ...................... [100%] 09:45:39 22 passed in 99.25s (0:01:39) 09:45:40 pytest -q transportpce_tests/2.2.1/test09_olm.py 09:46:22 ........................................ [100%] 09:48:44 40 passed in 183.96s (0:03:03) 09:48:44 pytest -q transportpce_tests/2.2.1/test11_otn_end2end.py 09:49:27 ........................................................................ [ 74%] 09:55:03 ......................... [100%] 09:56:54 97 passed in 490.57s (0:08:10) 09:56:54 pytest -q transportpce_tests/2.2.1/test12_end2end.py 09:57:34 ...................................................... [100%] 10:04:21 54 passed in 446.16s (0:07:26) 10:04:21 pytest -q transportpce_tests/2.2.1/test14_otn_switch_end2end.py 10:05:15 ........................................................................ [ 71%] 10:10:23 ............................. [100%] 10:12:32 101 passed in 491.40s (0:08:11) 10:12:33 pytest -q transportpce_tests/2.2.1/test15_otn_end2end_with_intermediate_switch.py 10:13:27 ........................................................................ [ 67%] 10:19:14 ................................... [100%] 10:22:34 107 passed in 601.67s (0:10:01) 10:22:35 tests221: OK ✔ in 51 minutes 6.98 seconds 10:22:35 tests_hybrid: install_deps> python -I -m pip install 'setuptools>=7.0' -r /w/workspace/transportpce-tox-verify-transportpce-master/tests/requirements.txt -r /w/workspace/transportpce-tox-verify-transportpce-master/tests/test-requirements.txt 10:22:40 tests_hybrid: freeze> python -m pip freeze --all 10:22:40 tests_hybrid: bcrypt==4.2.0,certifi==2024.8.30,cffi==1.17.1,charset-normalizer==3.3.2,cryptography==43.0.1,dict2xml==1.7.6,idna==3.10,iniconfig==2.0.0,lxml==5.3.0,netconf-client==3.1.1,packaging==24.1,paramiko==3.5.0,pip==24.2,pluggy==1.5.0,psutil==6.0.0,pycparser==2.22,PyNaCl==1.5.0,pytest==8.3.3,requests==2.32.3,setuptools==75.1.0,urllib3==2.2.3,wheel==0.44.0 10:22:40 tests_hybrid: commands[0] /w/workspace/transportpce-tox-verify-transportpce-master/tests> ./launch_tests.sh hybrid 10:22:40 using environment variables from ./karaf121.env 10:22:40 pytest -q transportpce_tests/hybrid/test01_device_change_notifications.py 10:23:25 ................................................... [100%] 10:25:11 51 passed in 150.65s (0:02:30) 10:25:11 pytest -q transportpce_tests/hybrid/test02_B100G_end2end.py 10:25:52 ........................................................................ [ 66%] 10:30:12 ..................................... [100%] 10:32:18 109 passed in 427.12s (0:07:07) 10:32:18 pytest -q transportpce_tests/hybrid/test03_autonomous_reroute.py 10:33:06 ..................................................... [100%] 10:36:38 53 passed in 259.73s (0:04:19) 10:36:39 tests_hybrid: OK ✔ in 14 minutes 3.86 seconds 10:36:39 buildlighty: install_deps> python -I -m pip install 'setuptools>=7.0' -r /w/workspace/transportpce-tox-verify-transportpce-master/tests/requirements.txt -r /w/workspace/transportpce-tox-verify-transportpce-master/tests/test-requirements.txt 10:36:44 buildlighty: freeze> python -m pip freeze --all 10:36:45 buildlighty: bcrypt==4.2.0,certifi==2024.8.30,cffi==1.17.1,charset-normalizer==3.3.2,cryptography==43.0.1,dict2xml==1.7.6,idna==3.10,iniconfig==2.0.0,lxml==5.3.0,netconf-client==3.1.1,packaging==24.1,paramiko==3.5.0,pip==24.2,pluggy==1.5.0,psutil==6.0.0,pycparser==2.22,PyNaCl==1.5.0,pytest==8.3.3,requests==2.32.3,setuptools==75.1.0,urllib3==2.2.3,wheel==0.44.0 10:36:45 buildlighty: commands[0] /w/workspace/transportpce-tox-verify-transportpce-master/lighty> ./build.sh 10:36:45 NOTE: Picked up JDK_JAVA_OPTIONS: --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED 10:36:56 [ERROR] COMPILATION ERROR : 10:36:56 [ERROR] /w/workspace/transportpce-tox-verify-transportpce-master/lighty/src/main/java/io/lighty/controllers/tpce/utils/TPCEUtils.java:[17,42] cannot find symbol 10:36:56 symbol: class YangModuleInfo 10:36:56 location: package org.opendaylight.yangtools.binding 10:36:56 [ERROR] /w/workspace/transportpce-tox-verify-transportpce-master/lighty/src/main/java/io/lighty/controllers/tpce/utils/TPCEUtils.java:[21,30] cannot find symbol 10:36:56 symbol: class YangModuleInfo 10:36:56 location: class io.lighty.controllers.tpce.utils.TPCEUtils 10:36:56 [ERROR] /w/workspace/transportpce-tox-verify-transportpce-master/lighty/src/main/java/io/lighty/controllers/tpce/utils/TPCEUtils.java:[343,30] cannot find symbol 10:36:56 symbol: class YangModuleInfo 10:36:56 location: class io.lighty.controllers.tpce.utils.TPCEUtils 10:36:56 [ERROR] /w/workspace/transportpce-tox-verify-transportpce-master/lighty/src/main/java/io/lighty/controllers/tpce/utils/TPCEUtils.java:[350,23] cannot find symbol 10:36:56 symbol: class YangModuleInfo 10:36:56 location: class io.lighty.controllers.tpce.utils.TPCEUtils 10:36:56 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.13.0:compile (default-compile) on project tpce: Compilation failure: Compilation failure: 10:36:56 [ERROR] /w/workspace/transportpce-tox-verify-transportpce-master/lighty/src/main/java/io/lighty/controllers/tpce/utils/TPCEUtils.java:[17,42] cannot find symbol 10:36:56 [ERROR] symbol: class YangModuleInfo 10:36:56 [ERROR] location: package org.opendaylight.yangtools.binding 10:36:56 [ERROR] /w/workspace/transportpce-tox-verify-transportpce-master/lighty/src/main/java/io/lighty/controllers/tpce/utils/TPCEUtils.java:[21,30] cannot find symbol 10:36:56 [ERROR] symbol: class YangModuleInfo 10:36:56 [ERROR] location: class io.lighty.controllers.tpce.utils.TPCEUtils 10:36:56 [ERROR] /w/workspace/transportpce-tox-verify-transportpce-master/lighty/src/main/java/io/lighty/controllers/tpce/utils/TPCEUtils.java:[343,30] cannot find symbol 10:36:56 [ERROR] symbol: class YangModuleInfo 10:36:56 [ERROR] location: class io.lighty.controllers.tpce.utils.TPCEUtils 10:36:56 [ERROR] /w/workspace/transportpce-tox-verify-transportpce-master/lighty/src/main/java/io/lighty/controllers/tpce/utils/TPCEUtils.java:[350,23] cannot find symbol 10:36:56 [ERROR] symbol: class YangModuleInfo 10:36:56 [ERROR] location: class io.lighty.controllers.tpce.utils.TPCEUtils 10:36:56 [ERROR] -> [Help 1] 10:36:56 [ERROR] 10:36:56 [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. 10:36:56 [ERROR] Re-run Maven using the -X switch to enable full debug logging. 10:36:56 [ERROR] 10:36:56 [ERROR] For more information about the errors and possible solutions, please read the following articles: 10:36:56 [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException 10:36:56 unzip: cannot find or open target/tpce-bin.zip, target/tpce-bin.zip.zip or target/tpce-bin.zip.ZIP. 10:36:56 buildlighty: exit 9 (11.90 seconds) /w/workspace/transportpce-tox-verify-transportpce-master/lighty> ./build.sh pid=59717 10:36:56 buildlighty: command failed but is marked ignore outcome so handling it as success 10:36:56 buildcontroller: OK (110.75=setup[9.76]+cmd[100.98] seconds) 10:36:56 testsPCE: OK (463.76=setup[223.43]+cmd[240.34] seconds) 10:36:56 sims: OK (45.14=setup[40.55]+cmd[4.59] seconds) 10:36:56 build_karaf_tests121: OK (130.58=setup[39.87]+cmd[90.71] seconds) 10:36:56 tests121: FAIL code 1 (613.66=setup[6.34]+cmd[607.33] seconds) 10:36:56 build_karaf_tests221: OK (127.52=setup[39.77]+cmd[87.74] seconds) 10:36:56 tests_tapi: OK (1189.49=setup[11.70]+cmd[1177.79] seconds) 10:36:56 tests221: OK (3066.98=setup[8.32]+cmd[3058.65] seconds) 10:36:56 build_karaf_tests71: OK (143.70=setup[88.32]+cmd[55.38] seconds) 10:36:56 tests71: FAIL code 1 (47.72=setup[6.19]+cmd[41.53] seconds) 10:36:56 build_karaf_tests_hybrid: OK (75.72=setup[14.13]+cmd[61.59] seconds) 10:36:56 tests_hybrid: OK (843.86=setup[5.67]+cmd[838.19] seconds) 10:36:56 buildlighty: OK (18.12=setup[6.22]+cmd[11.90] seconds) 10:36:56 docs: OK (32.83=setup[30.18]+cmd[2.65] seconds) 10:36:56 docs-linkcheck: OK (34.18=setup[30.90]+cmd[3.28] seconds) 10:36:56 checkbashisms: OK (3.24=setup[2.22]+cmd[0.01,0.13,0.87] seconds) 10:36:56 pre-commit: OK (44.88=setup[3.65]+cmd[0.01,0.02,33.50,7.69] seconds) 10:36:56 pylint: OK (27.12=setup[5.74]+cmd[21.38] seconds) 10:36:56 evaluation failed :( (5407.59 seconds) 10:36:56 + tox_status=255 10:36:56 + echo '---> Completed tox runs' 10:36:56 ---> Completed tox runs 10:36:56 + for i in .tox/*/log 10:36:56 ++ echo .tox/build_karaf_tests121/log 10:36:56 ++ awk -F/ '{print $2}' 10:36:56 + tox_env=build_karaf_tests121 10:36:56 + cp -r .tox/build_karaf_tests121/log /w/workspace/transportpce-tox-verify-transportpce-master/archives/tox/build_karaf_tests121 10:36:56 + for i in .tox/*/log 10:36:56 ++ echo .tox/build_karaf_tests221/log 10:36:56 ++ awk -F/ '{print $2}' 10:36:56 + tox_env=build_karaf_tests221 10:36:56 + cp -r .tox/build_karaf_tests221/log /w/workspace/transportpce-tox-verify-transportpce-master/archives/tox/build_karaf_tests221 10:36:56 + for i in .tox/*/log 10:36:56 ++ echo .tox/build_karaf_tests71/log 10:36:56 ++ awk -F/ '{print $2}' 10:36:57 + tox_env=build_karaf_tests71 10:36:57 + cp -r .tox/build_karaf_tests71/log /w/workspace/transportpce-tox-verify-transportpce-master/archives/tox/build_karaf_tests71 10:36:57 + for i in .tox/*/log 10:36:57 ++ echo .tox/build_karaf_tests_hybrid/log 10:36:57 ++ awk -F/ '{print $2}' 10:36:57 + tox_env=build_karaf_tests_hybrid 10:36:57 + cp -r .tox/build_karaf_tests_hybrid/log /w/workspace/transportpce-tox-verify-transportpce-master/archives/tox/build_karaf_tests_hybrid 10:36:57 + for i in .tox/*/log 10:36:57 ++ echo .tox/buildcontroller/log 10:36:57 ++ awk -F/ '{print $2}' 10:36:57 + tox_env=buildcontroller 10:36:57 + cp -r .tox/buildcontroller/log /w/workspace/transportpce-tox-verify-transportpce-master/archives/tox/buildcontroller 10:36:57 + for i in .tox/*/log 10:36:57 ++ echo .tox/buildlighty/log 10:36:57 ++ awk -F/ '{print $2}' 10:36:57 + tox_env=buildlighty 10:36:57 + cp -r .tox/buildlighty/log /w/workspace/transportpce-tox-verify-transportpce-master/archives/tox/buildlighty 10:36:57 + for i in .tox/*/log 10:36:57 ++ echo .tox/checkbashisms/log 10:36:57 ++ awk -F/ '{print $2}' 10:36:57 + tox_env=checkbashisms 10:36:57 + cp -r .tox/checkbashisms/log /w/workspace/transportpce-tox-verify-transportpce-master/archives/tox/checkbashisms 10:36:57 + for i in .tox/*/log 10:36:57 ++ echo .tox/docs-linkcheck/log 10:36:57 ++ awk -F/ '{print $2}' 10:36:57 + tox_env=docs-linkcheck 10:36:57 + cp -r .tox/docs-linkcheck/log /w/workspace/transportpce-tox-verify-transportpce-master/archives/tox/docs-linkcheck 10:36:57 + for i in .tox/*/log 10:36:57 ++ echo .tox/docs/log 10:36:57 ++ awk -F/ '{print $2}' 10:36:57 + tox_env=docs 10:36:57 + cp -r .tox/docs/log /w/workspace/transportpce-tox-verify-transportpce-master/archives/tox/docs 10:36:57 + for i in .tox/*/log 10:36:57 ++ echo .tox/pre-commit/log 10:36:57 ++ awk -F/ '{print $2}' 10:36:57 + tox_env=pre-commit 10:36:57 + cp -r .tox/pre-commit/log /w/workspace/transportpce-tox-verify-transportpce-master/archives/tox/pre-commit 10:36:57 + for i in .tox/*/log 10:36:57 ++ echo .tox/pylint/log 10:36:57 ++ awk -F/ '{print $2}' 10:36:57 + tox_env=pylint 10:36:57 + cp -r .tox/pylint/log /w/workspace/transportpce-tox-verify-transportpce-master/archives/tox/pylint 10:36:57 + for i in .tox/*/log 10:36:57 ++ echo .tox/sims/log 10:36:57 ++ awk -F/ '{print $2}' 10:36:57 + tox_env=sims 10:36:57 + cp -r .tox/sims/log /w/workspace/transportpce-tox-verify-transportpce-master/archives/tox/sims 10:36:57 + for i in .tox/*/log 10:36:57 ++ echo .tox/tests121/log 10:36:57 ++ awk -F/ '{print $2}' 10:36:57 + tox_env=tests121 10:36:57 + cp -r .tox/tests121/log /w/workspace/transportpce-tox-verify-transportpce-master/archives/tox/tests121 10:36:57 + for i in .tox/*/log 10:36:57 ++ echo .tox/tests221/log 10:36:57 ++ awk -F/ '{print $2}' 10:36:57 + tox_env=tests221 10:36:57 + cp -r .tox/tests221/log /w/workspace/transportpce-tox-verify-transportpce-master/archives/tox/tests221 10:36:57 + for i in .tox/*/log 10:36:57 ++ echo .tox/tests71/log 10:36:57 ++ awk -F/ '{print $2}' 10:36:57 + tox_env=tests71 10:36:57 + cp -r .tox/tests71/log /w/workspace/transportpce-tox-verify-transportpce-master/archives/tox/tests71 10:36:57 + for i in .tox/*/log 10:36:57 ++ echo .tox/testsPCE/log 10:36:57 ++ awk -F/ '{print $2}' 10:36:57 + tox_env=testsPCE 10:36:57 + cp -r .tox/testsPCE/log /w/workspace/transportpce-tox-verify-transportpce-master/archives/tox/testsPCE 10:36:57 + for i in .tox/*/log 10:36:57 ++ echo .tox/tests_hybrid/log 10:36:57 ++ awk -F/ '{print $2}' 10:36:57 + tox_env=tests_hybrid 10:36:57 + cp -r .tox/tests_hybrid/log /w/workspace/transportpce-tox-verify-transportpce-master/archives/tox/tests_hybrid 10:36:57 + for i in .tox/*/log 10:36:57 ++ echo .tox/tests_tapi/log 10:36:57 ++ awk -F/ '{print $2}' 10:36:57 + tox_env=tests_tapi 10:36:57 + cp -r .tox/tests_tapi/log /w/workspace/transportpce-tox-verify-transportpce-master/archives/tox/tests_tapi 10:36:57 + DOC_DIR=docs/_build/html 10:36:57 + [[ -d docs/_build/html ]] 10:36:57 + echo '---> Archiving generated docs' 10:36:57 ---> Archiving generated docs 10:36:57 + mv docs/_build/html /w/workspace/transportpce-tox-verify-transportpce-master/archives/docs 10:36:57 + echo '---> tox-run.sh ends' 10:36:57 ---> tox-run.sh ends 10:36:57 + test 255 -eq 0 10:36:57 + exit 255 10:36:57 ++ '[' 1 = 1 ']' 10:36:57 ++ '[' -x /usr/bin/clear_console ']' 10:36:57 ++ /usr/bin/clear_console -q 10:36:57 Build step 'Execute shell' marked build as failure 10:36:57 $ ssh-agent -k 10:36:57 unset SSH_AUTH_SOCK; 10:36:57 unset SSH_AGENT_PID; 10:36:57 echo Agent pid 14113 killed; 10:36:57 [ssh-agent] Stopped. 10:36:57 [PostBuildScript] - [INFO] Executing post build scripts. 10:36:57 [transportpce-tox-verify-transportpce-master] $ /bin/bash /tmp/jenkins1554531164584059625.sh 10:36:57 ---> sysstat.sh 10:36:57 [transportpce-tox-verify-transportpce-master] $ /bin/bash /tmp/jenkins16230415503184108554.sh 10:36:57 ---> package-listing.sh 10:36:57 ++ facter osfamily 10:36:57 ++ tr '[:upper:]' '[:lower:]' 10:36:58 + OS_FAMILY=debian 10:36:58 + workspace=/w/workspace/transportpce-tox-verify-transportpce-master 10:36:58 + START_PACKAGES=/tmp/packages_start.txt 10:36:58 + END_PACKAGES=/tmp/packages_end.txt 10:36:58 + DIFF_PACKAGES=/tmp/packages_diff.txt 10:36:58 + PACKAGES=/tmp/packages_start.txt 10:36:58 + '[' /w/workspace/transportpce-tox-verify-transportpce-master ']' 10:36:58 + PACKAGES=/tmp/packages_end.txt 10:36:58 + case "${OS_FAMILY}" in 10:36:58 + dpkg -l 10:36:58 + grep '^ii' 10:36:58 + '[' -f /tmp/packages_start.txt ']' 10:36:58 + '[' -f /tmp/packages_end.txt ']' 10:36:58 + diff /tmp/packages_start.txt /tmp/packages_end.txt 10:36:58 + '[' /w/workspace/transportpce-tox-verify-transportpce-master ']' 10:36:58 + mkdir -p /w/workspace/transportpce-tox-verify-transportpce-master/archives/ 10:36:58 + cp -f /tmp/packages_diff.txt /tmp/packages_end.txt /tmp/packages_start.txt /w/workspace/transportpce-tox-verify-transportpce-master/archives/ 10:36:58 [transportpce-tox-verify-transportpce-master] $ /bin/bash /tmp/jenkins3474389082814188102.sh 10:36:58 ---> capture-instance-metadata.sh 10:36:58 Setup pyenv: 10:36:58 system 10:36:58 3.8.13 10:36:58 3.9.13 10:36:58 3.10.13 10:36:58 * 3.11.7 (set by /w/workspace/transportpce-tox-verify-transportpce-master/.python-version) 10:36:58 lf-activate-venv(): INFO: Reuse venv:/tmp/venv-O20p from file:/tmp/.os_lf_venv 10:36:59 lf-activate-venv(): INFO: Installing: lftools 10:37:10 lf-activate-venv(): INFO: Adding /tmp/venv-O20p/bin to PATH 10:37:10 INFO: Running in OpenStack, capturing instance metadata 10:37:10 [transportpce-tox-verify-transportpce-master] $ /bin/bash /tmp/jenkins17493660737683116638.sh 10:37:10 provisioning config files... 10:37:11 Could not find credentials [logs] for transportpce-tox-verify-transportpce-master #2026 10:37:11 copy managed file [jenkins-log-archives-settings] to file:/w/workspace/transportpce-tox-verify-transportpce-master@tmp/config8477726619373877246tmp 10:37:11 Regular expression run condition: Expression=[^.*logs-s3.*], Label=[odl-logs-s3-cloudfront-index] 10:37:11 Run condition [Regular expression match] enabling perform for step [Provide Configuration files] 10:37:11 provisioning config files... 10:37:11 copy managed file [jenkins-s3-log-ship] to file:/home/jenkins/.aws/credentials 10:37:11 [EnvInject] - Injecting environment variables from a build step. 10:37:11 [EnvInject] - Injecting as environment variables the properties content 10:37:11 SERVER_ID=logs 10:37:11 10:37:11 [EnvInject] - Variables injected successfully. 10:37:11 [transportpce-tox-verify-transportpce-master] $ /bin/bash /tmp/jenkins1608950766908056402.sh 10:37:11 ---> create-netrc.sh 10:37:11 WARN: Log server credential not found. 10:37:11 [transportpce-tox-verify-transportpce-master] $ /bin/bash /tmp/jenkins12220845658670284825.sh 10:37:11 ---> python-tools-install.sh 10:37:11 Setup pyenv: 10:37:11 system 10:37:11 3.8.13 10:37:11 3.9.13 10:37:11 3.10.13 10:37:11 * 3.11.7 (set by /w/workspace/transportpce-tox-verify-transportpce-master/.python-version) 10:37:11 lf-activate-venv(): INFO: Reuse venv:/tmp/venv-O20p from file:/tmp/.os_lf_venv 10:37:12 lf-activate-venv(): INFO: Installing: lftools 10:37:20 lf-activate-venv(): INFO: Adding /tmp/venv-O20p/bin to PATH 10:37:20 [transportpce-tox-verify-transportpce-master] $ /bin/bash /tmp/jenkins4268831625769532116.sh 10:37:20 ---> sudo-logs.sh 10:37:20 Archiving 'sudo' log.. 10:37:21 [transportpce-tox-verify-transportpce-master] $ /bin/bash /tmp/jenkins12425917939117793398.sh 10:37:21 ---> job-cost.sh 10:37:21 Setup pyenv: 10:37:21 system 10:37:21 3.8.13 10:37:21 3.9.13 10:37:21 3.10.13 10:37:21 * 3.11.7 (set by /w/workspace/transportpce-tox-verify-transportpce-master/.python-version) 10:37:21 lf-activate-venv(): INFO: Reuse venv:/tmp/venv-O20p from file:/tmp/.os_lf_venv 10:37:22 lf-activate-venv(): INFO: Installing: zipp==1.1.0 python-openstackclient urllib3~=1.26.15 10:37:27 lf-activate-venv(): INFO: Adding /tmp/venv-O20p/bin to PATH 10:37:27 INFO: No Stack... 10:37:27 INFO: Retrieving Pricing Info for: v3-standard-4 10:37:28 INFO: Archiving Costs 10:37:28 [transportpce-tox-verify-transportpce-master] $ /bin/bash -l /tmp/jenkins7470545776761775757.sh 10:37:28 ---> logs-deploy.sh 10:37:28 Setup pyenv: 10:37:28 system 10:37:28 3.8.13 10:37:28 3.9.13 10:37:28 3.10.13 10:37:28 * 3.11.7 (set by /w/workspace/transportpce-tox-verify-transportpce-master/.python-version) 10:37:28 lf-activate-venv(): INFO: Reuse venv:/tmp/venv-O20p from file:/tmp/.os_lf_venv 10:37:29 lf-activate-venv(): INFO: Installing: lftools 10:37:37 lf-activate-venv(): INFO: Adding /tmp/venv-O20p/bin to PATH 10:37:37 WARNING: Nexus logging server not set 10:37:37 INFO: S3 path logs/releng/vex-yul-odl-jenkins-1/transportpce-tox-verify-transportpce-master/2026/ 10:37:37 INFO: archiving logs to S3 10:37:39 ---> uname -a: 10:37:39 Linux prd-ubuntu2004-docker-4c-16g-28093 5.4.0-190-generic #210-Ubuntu SMP Fri Jul 5 17:03:38 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux 10:37:39 10:37:39 10:37:39 ---> lscpu: 10:37:39 Architecture: x86_64 10:37:39 CPU op-mode(s): 32-bit, 64-bit 10:37:39 Byte Order: Little Endian 10:37:39 Address sizes: 40 bits physical, 48 bits virtual 10:37:39 CPU(s): 4 10:37:39 On-line CPU(s) list: 0-3 10:37:39 Thread(s) per core: 1 10:37:39 Core(s) per socket: 1 10:37:39 Socket(s): 4 10:37:39 NUMA node(s): 1 10:37:39 Vendor ID: AuthenticAMD 10:37:39 CPU family: 23 10:37:39 Model: 49 10:37:39 Model name: AMD EPYC-Rome Processor 10:37:39 Stepping: 0 10:37:39 CPU MHz: 2799.998 10:37:39 BogoMIPS: 5599.99 10:37:39 Virtualization: AMD-V 10:37:39 Hypervisor vendor: KVM 10:37:39 Virtualization type: full 10:37:39 L1d cache: 128 KiB 10:37:39 L1i cache: 128 KiB 10:37:39 L2 cache: 2 MiB 10:37:39 L3 cache: 64 MiB 10:37:39 NUMA node0 CPU(s): 0-3 10:37:39 Vulnerability Gather data sampling: Not affected 10:37:39 Vulnerability Itlb multihit: Not affected 10:37:39 Vulnerability L1tf: Not affected 10:37:39 Vulnerability Mds: Not affected 10:37:39 Vulnerability Meltdown: Not affected 10:37:39 Vulnerability Mmio stale data: Not affected 10:37:39 Vulnerability Retbleed: Vulnerable 10:37:39 Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp 10:37:39 Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization 10:37:39 Vulnerability Spectre v2: Mitigation; Retpolines; IBPB conditional; IBRS_FW; STIBP disabled; RSB filling; PBRSB-eIBRS Not affected; BHI Not affected 10:37:39 Vulnerability Srbds: Not affected 10:37:39 Vulnerability Tsx async abort: Not affected 10:37:39 Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm rep_good nopl cpuid extd_apicid tsc_known_freq pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext perfctr_core ssbd ibrs ibpb stibp vmmcall fsgsbase tsc_adjust bmi1 avx2 smep bmi2 rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 clzero xsaveerptr wbnoinvd arat npt nrip_save umip rdpid arch_capabilities 10:37:39 10:37:39 10:37:39 ---> nproc: 10:37:39 4 10:37:39 10:37:39 10:37:39 ---> df -h: 10:37:39 Filesystem Size Used Avail Use% Mounted on 10:37:39 udev 7.8G 0 7.8G 0% /dev 10:37:39 tmpfs 1.6G 1.1M 1.6G 1% /run 10:37:39 /dev/vda1 78G 17G 62G 21% / 10:37:39 tmpfs 7.9G 0 7.9G 0% /dev/shm 10:37:39 tmpfs 5.0M 0 5.0M 0% /run/lock 10:37:39 tmpfs 7.9G 0 7.9G 0% /sys/fs/cgroup 10:37:39 /dev/loop0 68M 68M 0 100% /snap/lxd/22753 10:37:39 /dev/loop2 62M 62M 0 100% /snap/core20/1405 10:37:39 /dev/vda15 105M 6.1M 99M 6% /boot/efi 10:37:39 tmpfs 1.6G 0 1.6G 0% /run/user/1001 10:37:39 /dev/loop3 39M 39M 0 100% /snap/snapd/21759 10:37:39 /dev/loop4 64M 64M 0 100% /snap/core20/2379 10:37:39 /dev/loop5 92M 92M 0 100% /snap/lxd/29619 10:37:39 10:37:39 10:37:39 ---> free -m: 10:37:39 total used free shared buff/cache available 10:37:39 Mem: 15997 655 7032 1 8309 15002 10:37:39 Swap: 1023 0 1023 10:37:39 10:37:39 10:37:39 ---> ip addr: 10:37:39 1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 10:37:39 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 10:37:39 inet 127.0.0.1/8 scope host lo 10:37:39 valid_lft forever preferred_lft forever 10:37:39 inet6 ::1/128 scope host 10:37:39 valid_lft forever preferred_lft forever 10:37:39 2: ens3: mtu 1458 qdisc mq state UP group default qlen 1000 10:37:39 link/ether fa:16:3e:e4:be:de brd ff:ff:ff:ff:ff:ff 10:37:39 inet 10.30.171.21/23 brd 10.30.171.255 scope global dynamic ens3 10:37:39 valid_lft 80788sec preferred_lft 80788sec 10:37:39 inet6 fe80::f816:3eff:fee4:bede/64 scope link 10:37:39 valid_lft forever preferred_lft forever 10:37:39 3: docker0: mtu 1458 qdisc noqueue state DOWN group default 10:37:39 link/ether 02:42:33:2b:2f:35 brd ff:ff:ff:ff:ff:ff 10:37:39 inet 10.250.0.254/24 brd 10.250.0.255 scope global docker0 10:37:39 valid_lft forever preferred_lft forever 10:37:39 10:37:39 10:37:39 ---> sar -b -r -n DEV: 10:37:39 Linux 5.4.0-190-generic (prd-ubuntu2004-docker-4c-16g-28093) 09/26/24 _x86_64_ (4 CPU) 10:37:39 10:37:39 09:04:10 LINUX RESTART (4 CPU) 10:37:39 10:37:39 09:05:01 tps rtps wtps dtps bread/s bwrtn/s bdscd/s 10:37:39 09:06:01 215.58 80.35 135.23 0.00 2476.92 7742.86 0.00 10:37:39 09:07:01 102.35 10.61 91.73 0.00 1459.49 16031.06 0.00 10:37:39 09:08:01 196.82 31.34 165.48 0.00 1311.43 47460.31 0.00 10:37:39 09:09:01 50.61 1.22 49.39 0.00 38.93 27297.98 0.00 10:37:39 09:10:01 46.99 1.42 45.58 0.00 109.98 24747.61 0.00 10:37:39 09:11:01 87.55 0.57 86.99 0.00 23.06 80256.98 0.00 10:37:39 09:12:01 119.59 12.36 107.23 0.00 4548.97 80023.45 0.00 10:37:39 09:13:01 103.47 3.17 100.30 0.00 319.41 27480.22 0.00 10:37:39 09:14:01 92.05 1.57 90.49 0.00 50.11 7131.23 0.00 10:37:39 09:15:01 58.87 1.42 57.46 0.00 151.31 1358.84 0.00 10:37:39 09:16:01 65.67 0.00 65.67 0.00 0.00 944.78 0.00 10:37:39 09:17:01 95.40 2.58 92.82 0.00 459.66 4445.66 0.00 10:37:39 09:18:01 7.66 0.05 7.61 0.00 1.07 5341.86 0.00 10:37:39 09:19:01 3.07 0.00 3.07 0.00 0.00 39.06 0.00 10:37:39 09:20:01 3.82 1.00 2.82 0.00 30.79 34.66 0.00 10:37:39 09:21:01 3.93 0.02 3.92 0.00 0.13 153.44 0.00 10:37:39 09:22:01 38.06 0.40 37.66 0.00 21.73 811.86 0.00 10:37:39 09:23:01 42.81 0.00 42.81 0.00 0.00 637.76 0.00 10:37:39 09:24:01 1.83 0.00 1.83 0.00 0.00 55.59 0.00 10:37:39 09:25:01 3.37 0.00 3.37 0.00 0.00 58.66 0.00 10:37:39 09:26:01 2.15 0.00 2.15 0.00 0.00 46.39 0.00 10:37:39 09:27:01 49.61 0.05 49.56 0.00 1.87 803.20 0.00 10:37:39 09:28:01 48.43 0.00 48.43 0.00 0.00 705.10 0.00 10:37:39 09:29:01 1.78 0.00 1.78 0.00 0.00 37.19 0.00 10:37:39 09:30:01 1.77 0.00 1.77 0.00 0.00 32.79 0.00 10:37:39 09:31:01 10.15 0.03 10.11 0.00 0.27 1098.62 0.00 10:37:39 09:32:01 78.34 0.03 78.31 0.00 0.27 9430.46 0.00 10:37:39 09:33:01 37.66 0.02 37.64 0.00 0.13 1960.74 0.00 10:37:39 09:34:01 1.45 0.00 1.45 0.00 0.00 17.46 0.00 10:37:39 09:35:01 1.95 0.00 1.95 0.00 0.00 23.60 0.00 10:37:39 09:36:01 14.95 0.00 14.95 0.00 0.00 241.92 0.00 10:37:39 09:37:01 81.82 0.00 81.82 0.00 0.00 1125.01 0.00 10:37:39 09:38:01 43.48 0.00 43.48 0.00 0.00 639.09 0.00 10:37:39 09:39:01 16.03 0.00 16.03 0.00 0.00 259.16 0.00 10:37:39 09:40:01 71.99 0.00 71.99 0.00 0.00 1052.76 0.00 10:37:39 09:41:01 41.31 0.00 41.31 0.00 0.00 608.03 0.00 10:37:39 09:42:01 15.46 0.00 15.46 0.00 0.00 253.96 0.00 10:37:39 09:43:01 116.30 0.00 116.30 0.00 0.00 1694.12 0.00 10:37:39 09:44:02 1.95 0.00 1.95 0.00 0.00 34.66 0.00 10:37:39 09:45:01 57.45 0.00 57.45 0.00 0.00 863.99 0.00 10:37:39 09:46:01 16.60 0.00 16.60 0.00 0.00 278.09 0.00 10:37:39 09:47:01 49.28 0.00 49.28 0.00 0.00 713.61 0.00 10:37:39 09:48:01 1.62 0.00 1.62 0.00 0.00 39.06 0.00 10:37:39 09:49:01 16.54 0.00 16.54 0.00 0.00 283.64 0.00 10:37:39 09:50:01 28.06 0.00 28.06 0.00 0.00 440.06 0.00 10:37:39 09:51:01 2.40 0.00 2.40 0.00 0.00 41.72 0.00 10:37:39 09:52:01 1.98 0.00 1.98 0.00 0.00 34.93 0.00 10:37:39 09:53:01 3.18 0.00 3.18 0.00 0.00 53.72 0.00 10:37:39 09:54:01 2.53 0.00 2.53 0.00 0.00 57.45 0.00 10:37:39 09:55:01 2.37 0.00 2.37 0.00 0.00 39.46 0.00 10:37:39 09:56:01 2.22 0.00 2.22 0.00 0.00 35.33 0.00 10:37:39 09:57:01 16.45 0.00 16.45 0.00 0.00 271.15 0.00 10:37:39 09:58:01 56.19 0.00 56.19 0.00 0.00 822.93 0.00 10:37:39 09:59:01 3.10 0.00 3.10 0.00 0.00 70.25 0.00 10:37:39 10:00:01 2.90 0.00 2.90 0.00 0.00 65.84 0.00 10:37:39 10:01:01 3.13 0.00 3.13 0.00 0.00 55.99 0.00 10:37:39 10:02:01 1.65 0.00 1.65 0.00 0.00 36.53 0.00 10:37:39 10:03:01 2.82 0.00 2.82 0.00 0.00 65.99 0.00 10:37:39 10:04:01 2.47 0.00 2.47 0.00 0.00 63.99 0.00 10:37:39 10:05:01 28.01 0.00 28.01 0.00 0.00 456.32 0.00 10:37:39 10:06:01 62.42 0.00 62.42 0.00 0.00 885.05 0.00 10:37:39 10:07:01 3.63 0.00 3.63 0.00 0.00 70.92 0.00 10:37:39 10:08:01 2.07 0.00 2.07 0.00 0.00 43.73 0.00 10:37:39 10:09:01 1.90 0.00 1.90 0.00 0.00 34.53 0.00 10:37:39 10:10:01 2.02 0.00 2.02 0.00 0.00 37.86 0.00 10:37:39 10:11:01 2.60 0.00 2.60 0.00 0.00 54.12 0.00 10:37:39 10:12:01 1.80 0.00 1.80 0.00 0.00 42.26 0.00 10:37:39 10:13:01 27.13 0.00 27.13 0.00 0.00 432.19 0.00 10:37:39 10:14:01 61.79 0.00 61.79 0.00 0.00 883.85 0.00 10:37:39 10:15:01 3.45 0.00 3.45 0.00 0.00 70.25 0.00 10:37:39 10:16:01 1.90 0.00 1.90 0.00 0.00 44.66 0.00 10:37:39 10:17:01 3.37 0.00 3.37 0.00 0.00 54.92 0.00 10:37:39 10:18:01 2.63 0.00 2.63 0.00 0.00 47.98 0.00 10:37:39 10:19:01 2.77 0.00 2.77 0.00 0.00 45.33 0.00 10:37:39 10:20:01 1.87 0.00 1.87 0.00 0.00 34.26 0.00 10:37:39 10:21:01 2.93 0.00 2.93 0.00 0.00 49.33 0.00 10:37:39 10:22:01 2.90 0.00 2.90 0.00 0.00 60.79 0.00 10:37:39 10:23:01 46.78 0.00 46.78 0.00 0.00 1937.54 0.00 10:37:39 10:24:01 67.72 0.00 67.72 0.00 0.00 8252.76 0.00 10:37:39 10:25:01 3.77 0.00 3.77 0.00 0.00 69.06 0.00 10:37:39 10:26:01 76.15 0.00 76.15 0.00 0.00 1222.60 0.00 10:37:39 10:27:01 2.18 0.00 2.18 0.00 0.00 48.39 0.00 10:37:39 10:28:01 1.73 0.00 1.73 0.00 0.00 34.53 0.00 10:37:39 10:29:01 2.05 0.00 2.05 0.00 0.00 36.79 0.00 10:37:39 10:30:01 2.13 0.00 2.13 0.00 0.00 39.73 0.00 10:37:39 10:31:01 2.43 0.00 2.43 0.00 0.00 52.12 0.00 10:37:39 10:32:01 1.85 0.00 1.85 0.00 0.00 28.39 0.00 10:37:39 10:33:01 24.43 0.00 24.43 0.00 0.00 408.07 0.00 10:37:39 10:34:01 48.34 0.00 48.34 0.00 0.00 796.93 0.00 10:37:39 10:35:01 2.62 0.00 2.62 0.00 0.00 63.72 0.00 10:37:39 10:36:01 2.13 0.00 2.13 0.00 0.00 56.12 0.00 10:37:39 10:37:01 31.54 9.50 22.05 0.00 347.01 3481.69 0.00 10:37:39 Average: 30.21 1.71 28.50 0.00 123.44 4091.72 0.00 10:37:39 10:37:39 09:05:01 kbmemfree kbavail kbmemused %memused kbbuffers kbcached kbcommit %commit kbactive kbinact kbdirty 10:37:39 09:06:01 13424156 15457080 524552 3.20 69504 2161112 1265048 7.26 779308 1904164 151324 10:37:39 09:07:01 12478444 15132580 826804 5.05 94292 2718840 1718696 9.86 1164444 2402156 365172 10:37:39 09:08:01 10420228 14275248 1682460 10.27 137536 3780524 2412476 13.84 2173936 3352920 146888 10:37:39 09:09:01 9897080 15152304 804804 4.91 157024 5100720 1671932 9.59 1612348 4378040 713212 10:37:39 09:10:01 7473428 13726076 2229240 13.61 175804 6037068 3041424 17.45 3241836 5119496 924240 10:37:39 09:11:01 7574032 14534340 1416044 8.64 185092 6703268 2294860 13.17 2877896 5351624 70344 10:37:39 09:12:01 4612408 13861260 2083828 12.72 211720 8885872 3248364 18.64 4246488 6856540 364112 10:37:39 09:13:01 3013324 12473412 3469116 21.18 224420 9063220 4915580 28.20 5712628 6958844 164984 10:37:39 09:14:01 166424 8742552 7197708 43.94 220740 8197876 8154788 46.79 9282204 6235396 472 10:37:39 09:15:01 844456 9330800 6609100 40.35 223476 8106080 7974432 45.75 8727372 6115364 1184 10:37:39 09:16:01 373024 8862948 7076984 43.20 225760 8107272 8092948 46.43 9200052 6114724 416 10:37:39 09:17:01 161080 7668096 8271064 50.49 235280 7128128 9580628 54.97 10340796 5192348 157640 10:37:39 09:18:01 167880 7560744 8378284 51.15 235312 7015656 9580628 54.97 10440152 5087800 280 10:37:39 09:19:01 168984 7561876 8377152 51.14 235324 7015672 9596632 55.06 10438780 5087540 136 10:37:39 09:20:01 165692 7559580 8379260 51.15 235396 7016556 9632084 55.26 10442144 5085836 132 10:37:39 09:21:01 182188 7487476 8451584 51.59 235396 6929204 9632084 55.26 10505072 5006880 112 10:37:39 09:22:01 5488388 12794908 3146316 19.21 235700 6929952 4150668 23.81 5227464 4998532 584 10:37:39 09:23:01 2186420 9495176 6445064 39.34 237596 6930324 7468004 42.85 8522920 4996604 348 10:37:39 09:24:01 1997144 9306580 6633336 40.49 237632 6930952 7602320 43.62 8709512 4996592 236 10:37:39 09:25:01 1966976 9276712 6663160 40.68 237688 6931200 7602320 43.62 8739268 4996772 36 10:37:39 09:26:01 1942736 9252868 6687044 40.82 237760 6931520 7618536 43.71 8762784 4997084 156 10:37:39 09:27:01 5235388 12547060 3395264 20.73 238644 6932108 4818696 27.65 5491928 4988456 368 10:37:39 09:28:01 4227592 11541736 4399872 26.86 240412 6932772 5266256 30.21 6496672 4988844 220 10:37:39 09:29:01 4196376 11510688 4430876 27.05 240428 6932968 5266256 30.21 6527436 4988920 220 10:37:39 09:30:01 4174640 11489220 4452356 27.18 240456 6933176 5284896 30.32 6547872 4989160 264 10:37:39 09:31:01 7176852 14725952 1217452 7.43 246624 7154920 2050080 11.76 3370100 5173328 223668 10:37:39 09:32:01 5876184 13497460 2444984 14.93 250492 7219456 3493132 20.04 4614332 5221700 43416 10:37:39 09:33:01 4747492 12369996 3571864 21.80 251568 7219608 4430352 25.42 5737912 5221824 80 10:37:39 09:34:01 4747344 12369860 3571980 21.81 251572 7219612 4430352 25.42 5737588 5221828 48 10:37:39 09:35:01 4746604 12369128 3572784 21.81 251588 7219608 4430352 25.42 5737916 5221828 60 10:37:39 09:36:01 7318940 14941516 1001660 6.11 251632 7219596 1855180 10.64 3181996 5216728 368 10:37:39 09:37:01 6077132 13702108 2240188 13.68 253344 7220176 3471708 19.92 4426436 5208724 652 10:37:39 09:38:01 4215860 11842228 4099028 25.02 254512 7220348 5090584 29.21 6278796 5208896 56 10:37:39 09:39:01 7423168 15049540 893740 5.46 254528 7220332 1749012 10.03 3087340 5207788 264 10:37:39 09:40:01 7448880 15077044 866172 5.29 255968 7220640 1744232 10.01 3059896 5207652 304 10:37:39 09:41:01 6059220 13689332 2253088 13.75 257468 7221052 3089160 17.72 4444344 5208060 156 10:37:39 09:42:01 7198924 14829160 1113836 6.80 257488 7221120 1946552 11.17 3310108 5207920 404 10:37:39 09:43:01 6172172 13805464 2136824 13.04 259764 7221836 2985824 17.13 4329756 5208520 132 10:37:39 09:44:02 7671876 15305324 637860 3.89 259768 7221988 1746656 10.02 2838376 5208632 172 10:37:39 09:45:01 5205444 12839960 3101908 18.94 260388 7222420 3923588 22.51 5292260 5209064 84 10:37:39 09:46:01 6118492 13753324 2188912 13.36 260416 7222704 3543488 20.33 4383380 5209308 788 10:37:39 09:47:01 3904044 11539848 4401092 26.87 261020 7223060 5242224 30.08 6586260 5209648 236 10:37:39 09:48:01 3872876 11508956 4431972 27.05 261028 7223324 5242224 30.08 6618916 5209912 336 10:37:39 09:49:01 6659024 14295532 1646812 10.05 261076 7223680 2761864 15.85 3843816 5210140 720 10:37:39 09:50:01 3881644 11518996 4421832 26.99 261488 7224104 5221116 29.95 6608116 5210548 220 10:37:39 09:51:01 3857872 11495348 4445604 27.14 261492 7224224 5253136 30.14 6633988 5210668 160 10:37:39 09:52:01 3834956 11472640 4468344 27.28 261500 7224428 5269184 30.23 6655928 5210868 204 10:37:39 09:53:01 3823144 11460940 4480040 27.35 261504 7224528 5269184 30.23 6667440 5210972 244 10:37:39 09:54:01 3805352 11443608 4497288 27.45 261516 7224988 5269184 30.23 6683900 5211416 28 10:37:39 09:55:01 3803148 11441608 4499296 27.47 261528 7225168 5269184 30.23 6686244 5211604 108 10:37:39 09:56:01 3755952 11394568 4546332 27.75 261536 7225320 5318076 30.51 6733992 5211756 152 10:37:39 09:57:01 7315676 14954484 988320 6.03 261556 7225468 1850768 10.62 3188120 5211880 376 10:37:39 09:58:01 3884408 11525224 4415576 26.95 263012 7225972 5274128 30.26 6603136 5212364 440 10:37:39 09:59:01 3857664 11498864 4441844 27.12 263032 7226336 5322176 30.53 6630892 5212732 104 10:37:39 10:00:01 3825228 11467108 4473664 27.31 263048 7226992 5322176 30.53 6661664 5213388 64 10:37:39 10:01:01 3809352 11451584 4489180 27.40 263072 7227324 5338568 30.63 6676084 5213720 320 10:37:39 10:02:01 3791484 11434168 4506548 27.51 263080 7227784 5338568 30.63 6693936 5214156 484 10:37:39 10:03:01 3771692 11415012 4525604 27.63 263092 7228364 5354980 30.72 6714096 5214764 344 10:37:39 10:04:01 3730000 11373956 4566608 27.88 263100 7228996 5354980 30.72 6753428 5215388 348 10:37:39 10:05:01 4108620 11752768 4188028 25.57 263204 7229040 5668720 32.52 6378972 5215236 168 10:37:39 10:06:01 2584264 10228884 5711196 34.86 263576 7229132 6598384 37.86 7900212 5215320 372 10:37:39 10:07:01 2375564 10020644 5919148 36.13 263576 7229568 6728948 38.61 8107552 5215756 356 10:37:39 10:08:01 2299984 9945368 5994332 36.59 263588 7229860 6778836 38.89 8181800 5216048 100 10:37:39 10:09:01 2274888 9920568 6019048 36.74 263588 7230156 6778836 38.89 8206520 5216344 532 10:37:39 10:10:01 2248844 9894876 6044628 36.90 263588 7230520 6810968 39.08 8232108 5216696 560 10:37:39 10:11:01 2230864 9877208 6062244 37.01 263600 7230836 6810968 39.08 8249304 5216992 472 10:37:39 10:12:01 2201592 9848184 6091292 37.18 263608 7231052 6843968 39.27 8278348 5217236 260 10:37:39 10:13:01 5374096 13020776 2920604 17.83 263764 7230956 4213232 24.17 5116924 5217088 504 10:37:39 10:14:01 2629416 10276680 5663304 34.57 264104 7231192 6532132 37.48 7854600 5217312 152 10:37:39 10:15:01 2442428 10090136 5849620 35.71 264112 7231628 6663248 38.23 8038316 5217748 452 10:37:39 10:16:01 2352732 10000840 5938840 36.25 264116 7232020 6728368 38.60 8128124 5218144 476 10:37:39 10:17:01 2341012 9989244 5950436 36.32 264116 7232140 6728368 38.60 8138084 5218260 288 10:37:39 10:18:01 2330884 9979344 5960176 36.38 264128 7232348 6728368 38.60 8147792 5218440 100 10:37:39 10:19:01 2319332 9967980 5971544 36.45 264140 7232504 6728368 38.60 8160332 5218600 148 10:37:39 10:20:01 2308496 9957408 5982056 36.52 264140 7232764 6744444 38.69 8170996 5218864 232 10:37:39 10:21:01 2285768 9934800 6004628 36.66 264160 7232864 6744444 38.69 8192964 5218968 204 10:37:39 10:22:01 2242736 9892160 6047100 36.91 264164 7233268 6810440 39.07 8235100 5219344 320 10:37:39 10:23:01 6371144 14259400 1682264 10.27 270440 7458416 2823260 16.20 3939952 5394344 217156 10:37:39 10:24:01 3682892 11573756 4366220 26.65 271040 7460164 5209664 29.89 6623384 5388016 192 10:37:39 10:25:01 3543084 11434364 4505504 27.50 271048 7460572 5266188 30.21 6761220 5388312 240 10:37:39 10:26:01 3724852 11616984 4323148 26.39 271460 7460860 5124584 29.40 6600948 5367132 472 10:37:39 10:27:01 3654472 11546968 4392888 26.82 271464 7461220 5189156 29.77 6672320 5366704 388 10:37:39 10:28:01 3647572 11540272 4399564 26.86 271472 7461416 5189156 29.77 6678520 5366816 140 10:37:39 10:29:01 3629396 11522364 4417560 26.97 271476 7461680 5205148 29.86 6696200 5367068 208 10:37:39 10:30:01 3626144 11519264 4420660 26.99 271480 7461824 5221176 29.96 6699100 5367212 108 10:37:39 10:31:01 3574940 11468624 4471184 27.29 271492 7462368 5237940 30.05 6749704 5367740 424 10:37:39 10:32:01 3572664 11466640 4473160 27.31 271496 7462656 5216624 29.93 6749536 5368028 400 10:37:39 10:33:01 3554808 11448280 4491896 27.42 271552 7462100 5668900 32.52 6783556 5356504 360 10:37:39 10:34:01 2880340 10774668 5164916 31.53 271816 7462652 5983616 34.33 7455076 5356884 540 10:37:39 10:35:01 2801068 10696156 5243300 32.01 271816 7463420 6015628 34.51 7531972 5357572 420 10:37:39 10:36:01 2760472 10656304 5283164 32.25 271824 7464128 6031624 34.61 7571476 5358300 636 10:37:39 10:37:01 7303636 15411876 530476 3.24 276688 7657316 1288860 7.39 2864800 5524664 105212 10:37:39 Average: 4143539 11641249 4300800 26.25 248566 7110436 5211468 29.90 6388887 5184522 39904 10:37:39 10:37:39 09:05:01 IFACE rxpck/s txpck/s rxkB/s txkB/s rxcmp/s txcmp/s rxmcst/s %ifutil 10:37:39 09:06:01 lo 0.80 0.80 0.08 0.08 0.00 0.00 0.00 0.00 10:37:39 09:06:01 ens3 161.41 125.80 1155.33 27.93 0.00 0.00 0.00 0.00 10:37:39 09:06:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 09:07:01 lo 2.60 2.60 0.24 0.24 0.00 0.00 0.00 0.00 10:37:39 09:07:01 ens3 136.18 109.23 2071.12 14.32 0.00 0.00 0.00 0.00 10:37:39 09:07:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 09:08:01 lo 4.00 4.00 0.43 0.43 0.00 0.00 0.00 0.00 10:37:39 09:08:01 ens3 435.05 353.25 6043.17 36.08 0.00 0.00 0.00 0.00 10:37:39 09:08:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 09:09:01 lo 1.00 1.00 0.09 0.09 0.00 0.00 0.00 0.00 10:37:39 09:09:01 ens3 219.73 174.80 3284.09 19.27 0.00 0.00 0.00 0.00 10:37:39 09:09:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 09:10:01 lo 1.00 1.00 0.10 0.10 0.00 0.00 0.00 0.00 10:37:39 09:10:01 ens3 219.33 114.50 2428.93 8.88 0.00 0.00 0.00 0.00 10:37:39 09:10:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 09:11:01 lo 0.73 0.73 0.07 0.07 0.00 0.00 0.00 0.00 10:37:39 09:11:01 ens3 103.33 65.00 444.71 6.47 0.00 0.00 0.00 0.00 10:37:39 09:11:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 09:12:01 lo 2.27 2.27 0.21 0.21 0.00 0.00 0.00 0.00 10:37:39 09:12:01 ens3 228.33 120.95 3830.15 9.00 0.00 0.00 0.00 0.00 10:37:39 09:12:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 09:13:01 lo 3.85 3.85 0.39 0.39 0.00 0.00 0.00 0.00 10:37:39 09:13:01 ens3 1.52 1.28 0.45 0.19 0.00 0.00 0.00 0.00 10:37:39 09:13:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 09:14:01 lo 34.20 34.20 41.94 41.94 0.00 0.00 0.00 0.00 10:37:39 09:14:01 ens3 2.25 1.37 0.36 0.25 0.00 0.00 0.00 0.00 10:37:39 09:14:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 09:15:01 lo 28.88 28.88 15.80 15.80 0.00 0.00 0.00 0.00 10:37:39 09:15:01 ens3 1.92 1.38 0.60 0.50 0.00 0.00 0.00 0.00 10:37:39 09:15:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 09:16:01 lo 31.28 31.28 13.58 13.58 0.00 0.00 0.00 0.00 10:37:39 09:16:01 ens3 0.92 0.68 0.20 0.13 0.00 0.00 0.00 0.00 10:37:39 09:16:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 09:17:01 lo 3.92 3.92 2.02 2.02 0.00 0.00 0.00 0.00 10:37:39 09:17:01 ens3 1.78 1.97 0.78 0.70 0.00 0.00 0.00 0.00 10:37:39 09:17:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 09:18:01 lo 5.63 5.63 5.28 5.28 0.00 0.00 0.00 0.00 10:37:39 09:18:01 ens3 0.55 0.00 0.05 0.00 0.00 0.00 0.00 0.00 10:37:39 09:18:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 09:19:01 lo 0.60 0.60 0.05 0.05 0.00 0.00 0.00 0.00 10:37:39 09:19:01 ens3 0.87 0.35 0.33 0.24 0.00 0.00 0.00 0.00 10:37:39 09:19:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 09:20:01 lo 0.37 0.37 0.18 0.18 0.00 0.00 0.00 0.00 10:37:39 09:20:01 ens3 0.47 0.30 0.15 0.08 0.00 0.00 0.00 0.00 10:37:39 09:20:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 09:21:01 lo 2.57 2.57 1.60 1.60 0.00 0.00 0.00 0.00 10:37:39 09:21:01 ens3 0.47 0.32 0.05 0.05 0.00 0.00 0.00 0.00 10:37:39 09:21:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 09:22:01 lo 3.60 3.60 0.37 0.37 0.00 0.00 0.00 0.00 10:37:39 09:22:01 ens3 0.92 0.43 0.11 0.07 0.00 0.00 0.00 0.00 10:37:39 09:22:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 09:23:01 lo 16.06 16.06 15.22 15.22 0.00 0.00 0.00 0.00 10:37:39 09:23:01 ens3 1.13 0.65 0.14 0.08 0.00 0.00 0.00 0.00 10:37:39 09:23:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 09:24:01 lo 20.91 20.91 11.79 11.79 0.00 0.00 0.00 0.00 10:37:39 09:24:01 ens3 1.48 1.02 0.23 0.16 0.00 0.00 0.00 0.00 10:37:39 09:24:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 09:25:01 lo 16.43 16.43 7.33 7.33 0.00 0.00 0.00 0.00 10:37:39 09:25:01 ens3 0.93 0.82 0.44 0.33 0.00 0.00 0.00 0.00 10:37:39 09:25:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 09:26:01 lo 22.25 22.25 7.08 7.08 0.00 0.00 0.00 0.00 10:37:39 09:26:01 ens3 0.55 0.32 0.07 0.06 0.00 0.00 0.00 0.00 10:37:39 09:26:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 09:27:01 lo 4.02 4.02 0.40 0.40 0.00 0.00 0.00 0.00 10:37:39 09:27:01 ens3 4.05 3.20 1.16 3.44 0.00 0.00 0.00 0.00 10:37:39 09:27:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 09:28:01 lo 34.72 34.72 13.59 13.59 0.00 0.00 0.00 0.00 10:37:39 09:28:01 ens3 1.08 1.07 0.41 0.36 0.00 0.00 0.00 0.00 10:37:39 09:28:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 09:29:01 lo 8.70 8.70 6.06 6.06 0.00 0.00 0.00 0.00 10:37:39 09:29:01 ens3 0.98 1.20 0.19 0.19 0.00 0.00 0.00 0.00 10:37:39 09:29:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 09:30:01 lo 10.46 10.46 8.10 8.10 0.00 0.00 0.00 0.00 10:37:39 09:30:01 ens3 1.18 1.52 0.29 0.29 0.00 0.00 0.00 0.00 10:37:39 09:30:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 09:31:01 lo 27.86 27.86 7.75 7.75 0.00 0.00 0.00 0.00 10:37:39 09:31:01 ens3 1.77 2.30 0.86 0.74 0.00 0.00 0.00 0.00 10:37:39 09:31:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 09:32:01 lo 2.37 2.37 0.20 0.20 0.00 0.00 0.00 0.00 10:37:39 09:32:01 ens3 13.53 11.50 3.69 8.76 0.00 0.00 0.00 0.00 10:37:39 09:32:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 09:33:01 lo 14.93 14.93 10.05 10.05 0.00 0.00 0.00 0.00 10:37:39 09:33:01 ens3 1.77 1.42 0.56 0.47 0.00 0.00 0.00 0.00 10:37:39 09:33:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 09:34:01 lo 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 09:34:01 ens3 0.13 0.00 0.01 0.00 0.00 0.00 0.00 0.00 10:37:39 09:34:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 09:35:01 lo 0.20 0.20 0.01 0.01 0.00 0.00 0.00 0.00 10:37:39 09:35:01 ens3 0.43 0.22 0.09 0.07 0.00 0.00 0.00 0.00 10:37:39 09:35:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 09:36:01 lo 1.25 1.25 0.12 0.12 0.00 0.00 0.00 0.00 10:37:39 09:36:01 ens3 0.55 0.27 0.12 0.05 0.00 0.00 0.00 0.00 10:37:39 09:36:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 09:37:01 lo 13.40 13.40 4.64 4.64 0.00 0.00 0.00 0.00 10:37:39 09:37:01 ens3 1.62 0.97 0.41 0.31 0.00 0.00 0.00 0.00 10:37:39 09:37:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 09:38:01 lo 15.38 15.38 7.20 7.20 0.00 0.00 0.00 0.00 10:37:39 09:38:01 ens3 0.87 0.75 0.16 0.14 0.00 0.00 0.00 0.00 10:37:39 09:38:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 09:39:01 lo 16.65 16.65 6.87 6.87 0.00 0.00 0.00 0.00 10:37:39 09:39:01 ens3 1.27 1.10 0.24 0.22 0.00 0.00 0.00 0.00 10:37:39 09:39:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 09:40:01 lo 5.48 5.48 6.26 6.26 0.00 0.00 0.00 0.00 10:37:39 09:40:01 ens3 1.38 0.72 0.28 0.18 0.00 0.00 0.00 0.00 10:37:39 09:40:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 09:41:01 lo 8.17 8.17 3.06 3.06 0.00 0.00 0.00 0.00 10:37:39 09:41:01 ens3 0.60 0.38 0.07 0.06 0.00 0.00 0.00 0.00 10:37:39 09:41:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 09:42:01 lo 3.50 3.50 0.59 0.59 0.00 0.00 0.00 0.00 10:37:39 09:42:01 ens3 0.57 0.48 0.10 0.10 0.00 0.00 0.00 0.00 10:37:39 09:42:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 09:43:01 lo 29.95 29.95 14.70 14.70 0.00 0.00 0.00 0.00 10:37:39 09:43:01 ens3 0.95 0.63 0.17 0.10 0.00 0.00 0.00 0.00 10:37:39 09:43:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 09:44:02 lo 20.31 20.31 8.59 8.59 0.00 0.00 0.00 0.00 10:37:39 09:44:02 ens3 1.28 1.12 0.24 0.23 0.00 0.00 0.00 0.00 10:37:39 09:44:02 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 09:45:01 lo 12.95 12.95 15.39 15.39 0.00 0.00 0.00 0.00 10:37:39 09:45:01 ens3 0.85 0.73 0.21 0.15 0.00 0.00 0.00 0.00 10:37:39 09:45:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 09:46:01 lo 11.96 11.96 5.72 5.72 0.00 0.00 0.00 0.00 10:37:39 09:46:01 ens3 1.03 1.13 0.17 0.17 0.00 0.00 0.00 0.00 10:37:39 09:46:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 09:47:01 lo 35.66 35.66 14.30 14.30 0.00 0.00 0.00 0.00 10:37:39 09:47:01 ens3 0.98 1.02 0.15 0.15 0.00 0.00 0.00 0.00 10:37:39 09:47:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 09:48:01 lo 39.83 39.83 11.92 11.92 0.00 0.00 0.00 0.00 10:37:39 09:48:01 ens3 0.70 0.67 0.11 0.11 0.00 0.00 0.00 0.00 10:37:39 09:48:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 09:49:01 lo 19.16 19.16 5.78 5.78 0.00 0.00 0.00 0.00 10:37:39 09:49:01 ens3 1.63 1.22 0.43 0.33 0.00 0.00 0.00 0.00 10:37:39 09:49:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 09:50:01 lo 29.60 29.60 21.46 21.46 0.00 0.00 0.00 0.00 10:37:39 09:50:01 ens3 0.92 0.68 0.25 0.17 0.00 0.00 0.00 0.00 10:37:39 09:50:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 09:51:01 lo 7.38 7.38 3.20 3.20 0.00 0.00 0.00 0.00 10:37:39 09:51:01 ens3 1.30 0.57 0.18 0.11 0.00 0.00 0.00 0.00 10:37:39 09:51:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 09:52:01 lo 19.00 19.00 9.85 9.85 0.00 0.00 0.00 0.00 10:37:39 09:52:01 ens3 1.62 0.78 0.46 0.31 0.00 0.00 0.00 0.00 10:37:39 09:52:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 09:53:01 lo 14.08 14.08 6.50 6.50 0.00 0.00 0.00 0.00 10:37:39 09:53:01 ens3 0.82 0.55 0.12 0.10 0.00 0.00 0.00 0.00 10:37:39 09:53:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 09:54:01 lo 25.97 25.97 10.10 10.10 0.00 0.00 0.00 0.00 10:37:39 09:54:01 ens3 0.62 0.42 0.10 0.09 0.00 0.00 0.00 0.00 10:37:39 09:54:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 09:55:01 lo 9.22 9.22 4.29 4.29 0.00 0.00 0.00 0.00 10:37:39 09:55:01 ens3 0.63 0.50 0.14 0.13 0.00 0.00 0.00 0.00 10:37:39 09:55:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 09:56:01 lo 18.28 18.28 8.73 8.73 0.00 0.00 0.00 0.00 10:37:39 09:56:01 ens3 0.87 0.97 0.20 0.15 0.00 0.00 0.00 0.00 10:37:39 09:56:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 09:57:01 lo 21.71 21.71 6.94 6.94 0.00 0.00 0.00 0.00 10:37:39 09:57:01 ens3 0.63 0.67 0.10 0.10 0.00 0.00 0.00 0.00 10:37:39 09:57:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 09:58:01 lo 32.38 32.38 12.59 12.59 0.00 0.00 0.00 0.00 10:37:39 09:58:01 ens3 0.90 0.90 0.13 0.13 0.00 0.00 0.00 0.00 10:37:39 09:58:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 09:59:01 lo 21.78 21.78 7.04 7.04 0.00 0.00 0.00 0.00 10:37:39 09:59:01 ens3 0.68 0.73 0.11 0.11 0.00 0.00 0.00 0.00 10:37:39 09:59:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 10:00:01 lo 51.82 51.82 16.22 16.22 0.00 0.00 0.00 0.00 10:37:39 10:00:01 ens3 0.68 0.60 0.21 0.14 0.00 0.00 0.00 0.00 10:37:39 10:00:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 10:01:01 lo 21.53 21.53 6.16 6.16 0.00 0.00 0.00 0.00 10:37:39 10:01:01 ens3 0.50 0.35 0.07 0.06 0.00 0.00 0.00 0.00 10:37:39 10:01:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 10:02:01 lo 33.09 33.09 9.69 9.69 0.00 0.00 0.00 0.00 10:37:39 10:02:01 ens3 0.50 0.32 0.06 0.07 0.00 0.00 0.00 0.00 10:37:39 10:02:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 10:03:01 lo 36.03 36.03 11.24 11.24 0.00 0.00 0.00 0.00 10:37:39 10:03:01 ens3 0.32 0.18 0.02 0.02 0.00 0.00 0.00 0.00 10:37:39 10:03:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 10:04:01 lo 66.47 66.47 20.05 20.05 0.00 0.00 0.00 0.00 10:37:39 10:04:01 ens3 0.15 0.00 0.01 0.00 0.00 0.00 0.00 0.00 10:37:39 10:04:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 10:05:01 lo 2.97 2.97 0.27 0.27 0.00 0.00 0.00 0.00 10:37:39 10:05:01 ens3 81.64 53.01 52.63 73.49 0.00 0.00 0.00 0.00 10:37:39 10:05:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 10:06:01 lo 23.45 23.45 22.65 22.65 0.00 0.00 0.00 0.00 10:37:39 10:06:01 ens3 0.65 0.77 0.12 0.12 0.00 0.00 0.00 0.00 10:37:39 10:06:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 10:07:01 lo 32.86 32.86 14.09 14.09 0.00 0.00 0.00 0.00 10:37:39 10:07:01 ens3 0.77 0.80 0.12 0.12 0.00 0.00 0.00 0.00 10:37:39 10:07:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 10:08:01 lo 18.16 18.16 7.52 7.52 0.00 0.00 0.00 0.00 10:37:39 10:08:01 ens3 0.75 0.87 0.14 0.14 0.00 0.00 0.00 0.00 10:37:39 10:08:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 10:09:01 lo 29.26 29.26 12.45 12.45 0.00 0.00 0.00 0.00 10:37:39 10:09:01 ens3 0.77 0.90 0.13 0.14 0.00 0.00 0.00 0.00 10:37:39 10:09:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 10:10:01 lo 32.21 32.21 10.69 10.69 0.00 0.00 0.00 0.00 10:37:39 10:10:01 ens3 0.67 0.63 0.20 0.14 0.00 0.00 0.00 0.00 10:37:39 10:10:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 10:11:01 lo 18.01 18.01 8.33 8.33 0.00 0.00 0.00 0.00 10:37:39 10:11:01 ens3 0.73 0.83 0.13 0.13 0.00 0.00 0.00 0.00 10:37:39 10:11:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 10:12:01 lo 21.70 21.70 8.31 8.31 0.00 0.00 0.00 0.00 10:37:39 10:12:01 ens3 0.53 0.48 0.08 0.07 0.00 0.00 0.00 0.00 10:37:39 10:12:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 10:13:01 lo 4.88 4.88 2.15 2.15 0.00 0.00 0.00 0.00 10:37:39 10:13:01 ens3 0.87 0.93 0.13 0.13 0.00 0.00 0.00 0.00 10:37:39 10:13:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 10:14:01 lo 22.73 22.73 22.57 22.57 0.00 0.00 0.00 0.00 10:37:39 10:14:01 ens3 1.35 0.73 0.19 0.11 0.00 0.00 0.00 0.00 10:37:39 10:14:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 10:15:01 lo 33.66 33.66 13.88 13.88 0.00 0.00 0.00 0.00 10:37:39 10:15:01 ens3 1.43 1.27 0.56 0.44 0.00 0.00 0.00 0.00 10:37:39 10:15:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 10:16:01 lo 17.96 17.96 9.45 9.45 0.00 0.00 0.00 0.00 10:37:39 10:16:01 ens3 0.45 0.25 0.06 0.05 0.00 0.00 0.00 0.00 10:37:39 10:16:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 10:17:01 lo 10.68 10.68 5.83 5.83 0.00 0.00 0.00 0.00 10:37:39 10:17:01 ens3 0.87 0.68 0.15 0.13 0.00 0.00 0.00 0.00 10:37:39 10:17:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 10:18:01 lo 22.86 22.86 12.24 12.24 0.00 0.00 0.00 0.00 10:37:39 10:18:01 ens3 0.53 0.37 0.09 0.07 0.00 0.00 0.00 0.00 10:37:39 10:18:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 10:19:01 lo 8.72 8.72 5.98 5.98 0.00 0.00 0.00 0.00 10:37:39 10:19:01 ens3 0.60 0.50 0.10 0.09 0.00 0.00 0.00 0.00 10:37:39 10:19:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 10:20:01 lo 24.38 24.38 12.02 12.02 0.00 0.00 0.00 0.00 10:37:39 10:20:01 ens3 0.73 0.52 0.22 0.15 0.00 0.00 0.00 0.00 10:37:39 10:20:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 10:21:01 lo 10.13 10.13 6.15 6.15 0.00 0.00 0.00 0.00 10:37:39 10:21:01 ens3 1.32 0.40 0.18 0.07 0.00 0.00 0.00 0.00 10:37:39 10:21:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 10:22:01 lo 35.36 35.36 12.56 12.56 0.00 0.00 0.00 0.00 10:37:39 10:22:01 ens3 1.27 0.37 0.39 0.26 0.00 0.00 0.00 0.00 10:37:39 10:22:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 10:23:01 lo 5.67 5.67 2.64 2.64 0.00 0.00 0.00 0.00 10:37:39 10:23:01 ens3 2.28 2.40 1.11 0.95 0.00 0.00 0.00 0.00 10:37:39 10:23:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 10:24:01 lo 37.31 37.31 33.72 33.72 0.00 0.00 0.00 0.00 10:37:39 10:24:01 ens3 0.75 0.55 0.10 0.09 0.00 0.00 0.00 0.00 10:37:39 10:24:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 10:25:01 lo 33.38 33.38 13.22 13.22 0.00 0.00 0.00 0.00 10:37:39 10:25:01 ens3 2.23 1.58 0.47 0.31 0.00 0.00 0.00 0.00 10:37:39 10:25:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 10:26:01 lo 18.43 18.43 12.26 12.26 0.00 0.00 0.00 0.00 10:37:39 10:26:01 ens3 2.02 1.32 0.74 0.56 0.00 0.00 0.00 0.00 10:37:39 10:26:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 10:27:01 lo 23.21 23.21 8.01 8.01 0.00 0.00 0.00 0.00 10:37:39 10:27:01 ens3 0.97 0.73 0.16 0.14 0.00 0.00 0.00 0.00 10:37:39 10:27:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 10:28:01 lo 12.26 12.26 5.45 5.45 0.00 0.00 0.00 0.00 10:37:39 10:28:01 ens3 0.78 0.67 0.15 0.14 0.00 0.00 0.00 0.00 10:37:39 10:28:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 10:29:01 lo 26.60 26.60 10.46 10.46 0.00 0.00 0.00 0.00 10:37:39 10:29:01 ens3 1.13 0.48 0.12 0.09 0.00 0.00 0.00 0.00 10:37:39 10:29:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 10:30:01 lo 15.91 15.91 5.76 5.76 0.00 0.00 0.00 0.00 10:37:39 10:30:01 ens3 1.28 0.63 0.27 0.17 0.00 0.00 0.00 0.00 10:37:39 10:30:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 10:31:01 lo 44.81 44.81 15.33 15.33 0.00 0.00 0.00 0.00 10:37:39 10:31:01 ens3 1.75 0.67 0.18 0.13 0.00 0.00 0.00 0.00 10:37:39 10:31:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 10:32:01 lo 34.24 34.24 11.15 11.15 0.00 0.00 0.00 0.00 10:37:39 10:32:01 ens3 2.23 0.68 0.45 0.29 0.00 0.00 0.00 0.00 10:37:39 10:32:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 10:33:01 lo 5.57 5.57 1.18 1.18 0.00 0.00 0.00 0.00 10:37:39 10:33:01 ens3 1.67 1.27 0.47 0.39 0.00 0.00 0.00 0.00 10:37:39 10:33:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 10:34:01 lo 46.08 46.08 22.36 22.36 0.00 0.00 0.00 0.00 10:37:39 10:34:01 ens3 0.83 0.67 0.15 0.13 0.00 0.00 0.00 0.00 10:37:39 10:34:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 10:35:01 lo 70.19 70.19 24.91 24.91 0.00 0.00 0.00 0.00 10:37:39 10:35:01 ens3 1.20 0.77 0.29 0.19 0.00 0.00 0.00 0.00 10:37:39 10:35:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 10:36:01 lo 57.71 57.71 20.11 20.11 0.00 0.00 0.00 0.00 10:37:39 10:36:01 ens3 0.50 0.37 0.08 0.07 0.00 0.00 0.00 0.00 10:37:39 10:36:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 10:37:01 lo 40.58 40.58 13.18 13.18 0.00 0.00 0.00 0.00 10:37:39 10:37:01 ens3 155.29 117.73 1954.08 14.54 0.00 0.00 0.00 0.00 10:37:39 10:37:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 Average: lo 19.46 19.46 8.87 8.87 0.00 0.00 0.00 0.00 10:37:39 Average: ens3 20.01 14.25 231.46 2.58 0.00 0.00 0.00 0.00 10:37:39 Average: docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10:37:39 10:37:39 10:37:39 ---> sar -P ALL: 10:37:39 Linux 5.4.0-190-generic (prd-ubuntu2004-docker-4c-16g-28093) 09/26/24 _x86_64_ (4 CPU) 10:37:39 10:37:39 09:04:10 LINUX RESTART (4 CPU) 10:37:39 10:37:39 09:05:01 CPU %user %nice %system %iowait %steal %idle 10:37:39 09:06:01 all 16.39 12.08 9.53 6.01 0.13 55.87 10:37:39 09:06:01 0 15.56 11.67 9.09 7.18 0.12 56.39 10:37:39 09:06:01 1 16.30 11.86 9.26 4.24 0.14 58.21 10:37:39 09:06:01 2 11.75 12.16 8.97 4.91 0.12 62.10 10:37:39 09:06:01 3 21.89 12.62 10.79 7.68 0.15 46.86 10:37:39 09:07:01 all 22.08 0.00 2.53 8.41 0.06 66.92 10:37:39 09:07:01 0 21.21 0.00 2.57 2.70 0.07 73.46 10:37:39 09:07:01 1 23.67 0.00 3.16 13.95 0.07 59.16 10:37:39 09:07:01 2 31.20 0.00 2.44 3.46 0.07 62.83 10:37:39 09:07:01 3 12.24 0.00 1.94 13.57 0.05 72.20 10:37:39 09:08:01 all 85.77 0.00 3.59 3.20 0.15 7.29 10:37:39 09:08:01 0 85.50 0.00 3.73 4.63 0.13 6.00 10:37:39 09:08:01 1 87.61 0.00 3.21 3.39 0.13 5.66 10:37:39 09:08:01 2 79.49 0.00 4.26 3.12 0.17 12.96 10:37:39 09:08:01 3 90.47 0.00 3.16 1.67 0.15 4.55 10:37:39 09:09:01 all 30.86 0.00 2.28 14.70 0.09 52.07 10:37:39 09:09:01 0 24.28 0.00 1.49 26.01 0.07 48.15 10:37:39 09:09:01 1 25.39 0.00 2.20 6.02 0.08 66.31 10:37:39 09:09:01 2 18.02 0.00 2.15 18.89 0.10 60.84 10:37:39 09:09:01 3 55.74 0.00 3.29 7.88 0.12 32.98 10:37:39 09:10:01 all 36.11 0.00 2.19 36.40 0.10 25.20 10:37:39 09:10:01 0 33.82 0.00 1.92 61.63 0.12 2.52 10:37:39 09:10:01 1 37.92 0.00 2.30 29.80 0.08 29.90 10:37:39 09:10:01 2 32.47 0.00 2.06 19.93 0.07 45.48 10:37:39 09:10:01 3 40.23 0.00 2.50 34.33 0.12 22.82 10:37:39 09:11:01 all 25.38 0.00 1.88 50.02 0.08 22.64 10:37:39 09:11:01 0 24.66 0.00 1.67 71.81 0.08 1.77 10:37:39 09:11:01 1 24.92 0.00 1.51 6.03 0.08 67.46 10:37:39 09:11:01 2 29.11 0.00 1.82 50.07 0.07 18.94 10:37:39 09:11:01 3 22.82 0.00 2.53 72.33 0.07 2.26 10:37:39 09:12:01 all 59.01 0.00 3.22 21.48 0.13 16.17 10:37:39 09:12:01 0 62.35 0.00 3.55 13.40 0.13 20.57 10:37:39 09:12:01 1 57.84 0.00 2.94 9.18 0.10 29.93 10:37:39 09:12:01 2 53.33 0.00 2.73 35.23 0.13 8.58 10:37:39 09:12:01 3 62.53 0.00 3.65 28.06 0.13 5.63 10:37:39 09:13:01 all 74.47 0.00 3.09 9.05 0.16 13.23 10:37:39 09:13:01 0 73.66 0.00 3.11 11.70 0.15 11.38 10:37:39 09:13:01 1 75.43 0.00 2.46 2.09 0.17 19.85 10:37:39 09:13:01 2 72.52 0.00 3.42 15.29 0.17 8.60 10:37:39 09:13:01 3 76.26 0.00 3.37 7.15 0.15 13.07 10:37:39 09:14:01 all 48.13 0.00 1.86 3.16 0.12 46.73 10:37:39 09:14:01 0 50.46 0.00 1.45 3.86 0.12 44.12 10:37:39 09:14:01 1 48.17 0.00 2.52 1.43 0.12 47.77 10:37:39 09:14:01 2 46.60 0.00 1.92 5.98 0.12 45.39 10:37:39 09:14:01 3 47.29 0.00 1.54 1.37 0.13 49.66 10:37:39 09:15:01 all 34.45 0.00 1.48 0.51 0.11 63.45 10:37:39 09:15:01 0 33.20 0.00 1.52 1.32 0.10 63.85 10:37:39 09:15:01 1 32.05 0.00 1.42 0.23 0.12 66.18 10:37:39 09:15:01 2 35.34 0.00 1.69 0.37 0.12 62.48 10:37:39 09:15:01 3 37.19 0.00 1.29 0.13 0.12 61.27 10:37:39 09:16:01 all 36.15 0.00 1.32 1.53 0.15 60.84 10:37:39 09:16:01 0 35.18 0.00 1.58 4.61 0.15 58.48 10:37:39 09:16:01 1 36.43 0.00 1.06 0.74 0.15 61.62 10:37:39 09:16:01 2 38.12 0.00 1.11 0.08 0.13 60.55 10:37:39 09:16:01 3 34.88 0.00 1.56 0.70 0.15 62.71 10:37:39 10:37:39 09:16:01 CPU %user %nice %system %iowait %steal %idle 10:37:39 09:17:01 all 37.38 0.00 1.71 3.89 0.12 56.91 10:37:39 09:17:01 0 38.50 0.00 1.32 13.98 0.10 46.09 10:37:39 09:17:01 1 31.76 0.00 1.80 0.10 0.12 66.22 10:37:39 09:17:01 2 42.84 0.00 2.28 0.87 0.13 53.88 10:37:39 09:17:01 3 36.39 0.00 1.43 0.57 0.12 61.49 10:37:39 09:18:01 all 2.80 0.00 0.38 1.63 0.08 95.11 10:37:39 09:18:01 0 2.40 0.00 0.42 0.10 0.07 97.02 10:37:39 09:18:01 1 2.50 0.00 0.32 5.94 0.08 91.15 10:37:39 09:18:01 2 2.46 0.00 0.44 0.10 0.08 96.92 10:37:39 09:18:01 3 3.82 0.00 0.35 0.37 0.10 95.35 10:37:39 09:19:01 all 1.01 0.00 0.34 0.04 0.09 98.52 10:37:39 09:19:01 0 0.97 0.00 0.37 0.00 0.08 98.58 10:37:39 09:19:01 1 0.86 0.00 0.29 0.00 0.08 98.78 10:37:39 09:19:01 2 0.94 0.00 0.45 0.13 0.12 98.35 10:37:39 09:19:01 3 1.26 0.00 0.27 0.03 0.08 98.36 10:37:39 09:20:01 all 1.06 0.00 0.33 0.13 0.08 98.39 10:37:39 09:20:01 0 0.87 0.00 0.35 0.00 0.08 98.69 10:37:39 09:20:01 1 1.13 0.00 0.24 0.02 0.08 98.54 10:37:39 09:20:01 2 1.31 0.00 0.42 0.27 0.10 97.90 10:37:39 09:20:01 3 0.94 0.00 0.30 0.25 0.07 98.45 10:37:39 09:21:01 all 2.74 0.00 0.42 0.03 0.07 96.74 10:37:39 09:21:01 0 3.98 0.00 0.43 0.00 0.05 95.54 10:37:39 09:21:01 1 2.23 0.00 0.23 0.03 0.07 97.44 10:37:39 09:21:01 2 2.61 0.00 0.45 0.03 0.07 96.84 10:37:39 09:21:01 3 2.16 0.00 0.57 0.03 0.08 97.15 10:37:39 09:22:01 all 36.33 0.00 1.66 0.05 0.11 61.85 10:37:39 09:22:01 0 40.36 0.00 1.87 0.03 0.12 57.62 10:37:39 09:22:01 1 35.17 0.00 1.54 0.03 0.10 63.16 10:37:39 09:22:01 2 31.33 0.00 1.68 0.07 0.10 66.82 10:37:39 09:22:01 3 38.45 0.00 1.56 0.07 0.12 59.81 10:37:39 09:23:01 all 40.91 0.00 1.37 0.36 0.12 57.24 10:37:39 09:23:01 0 41.96 0.00 1.17 0.00 0.13 56.73 10:37:39 09:23:01 1 39.16 0.00 1.32 1.40 0.10 58.02 10:37:39 09:23:01 2 39.71 0.00 1.79 0.00 0.13 58.37 10:37:39 09:23:01 3 42.82 0.00 1.20 0.03 0.10 55.84 10:37:39 09:24:01 all 8.58 0.00 0.58 0.07 0.08 90.69 10:37:39 09:24:01 0 8.40 0.00 0.65 0.00 0.08 90.86 10:37:39 09:24:01 1 8.95 0.00 0.57 0.08 0.08 90.32 10:37:39 09:24:01 2 8.48 0.00 0.63 0.00 0.07 90.82 10:37:39 09:24:01 3 8.48 0.00 0.47 0.20 0.08 90.76 10:37:39 09:25:01 all 3.53 0.00 0.45 0.05 0.05 95.91 10:37:39 09:25:01 0 3.51 0.00 0.45 0.00 0.05 95.99 10:37:39 09:25:01 1 3.50 0.00 0.42 0.07 0.05 95.96 10:37:39 09:25:01 2 3.62 0.00 0.34 0.12 0.07 95.86 10:37:39 09:25:01 3 3.51 0.00 0.59 0.03 0.05 95.82 10:37:39 09:26:01 all 3.12 0.00 0.50 0.10 0.07 96.22 10:37:39 09:26:01 0 3.28 0.00 0.50 0.07 0.07 96.08 10:37:39 09:26:01 1 2.93 0.00 0.59 0.25 0.08 96.15 10:37:39 09:26:01 2 2.89 0.00 0.33 0.02 0.05 96.70 10:37:39 09:26:01 3 3.36 0.00 0.57 0.07 0.07 95.94 10:37:39 09:27:01 all 61.20 0.00 2.30 0.06 0.13 36.32 10:37:39 09:27:01 0 62.31 0.00 2.49 0.12 0.13 34.95 10:37:39 09:27:01 1 59.74 0.00 2.57 0.08 0.12 37.49 10:37:39 09:27:01 2 58.12 0.00 2.48 0.03 0.13 39.24 10:37:39 09:27:01 3 64.63 0.00 1.66 0.00 0.12 33.59 10:37:39 10:37:39 09:27:01 CPU %user %nice %system %iowait %steal %idle 10:37:39 09:28:01 all 19.69 0.00 0.70 0.31 0.08 79.23 10:37:39 09:28:01 0 20.15 0.00 0.57 0.00 0.07 79.21 10:37:39 09:28:01 1 19.42 0.00 0.85 1.02 0.10 78.62 10:37:39 09:28:01 2 19.42 0.00 0.75 0.15 0.07 79.62 10:37:39 09:28:01 3 19.77 0.00 0.62 0.07 0.08 79.47 10:37:39 09:29:01 all 1.90 0.00 0.32 0.11 0.05 97.62 10:37:39 09:29:01 0 1.94 0.00 0.37 0.00 0.07 97.63 10:37:39 09:29:01 1 1.64 0.00 0.35 0.35 0.03 97.63 10:37:39 09:29:01 2 1.92 0.00 0.20 0.00 0.05 97.83 10:37:39 09:29:01 3 2.11 0.00 0.35 0.10 0.05 97.39 10:37:39 09:30:01 all 2.13 0.00 0.27 0.03 0.05 97.51 10:37:39 09:30:01 0 2.42 0.00 0.28 0.00 0.05 97.25 10:37:39 09:30:01 1 2.12 0.00 0.33 0.03 0.07 97.45 10:37:39 09:30:01 2 1.72 0.00 0.28 0.02 0.05 97.93 10:37:39 09:30:01 3 2.27 0.00 0.17 0.08 0.05 97.44 10:37:39 09:31:01 all 25.75 0.00 1.09 0.27 0.08 72.81 10:37:39 09:31:01 0 23.06 0.00 1.50 0.10 0.08 75.25 10:37:39 09:31:01 1 25.60 0.00 0.75 0.07 0.08 73.50 10:37:39 09:31:01 2 32.64 0.00 1.22 0.13 0.08 65.92 10:37:39 09:31:01 3 21.70 0.00 0.87 0.79 0.07 76.57 10:37:39 09:32:01 all 41.75 0.00 1.54 2.52 0.10 54.09 10:37:39 09:32:01 0 41.21 0.00 1.29 3.98 0.10 53.42 10:37:39 09:32:01 1 48.39 0.00 1.29 0.60 0.08 49.64 10:37:39 09:32:01 2 39.85 0.00 1.81 5.52 0.10 52.73 10:37:39 09:32:01 3 37.54 0.00 1.76 0.02 0.10 60.59 10:37:39 09:33:01 all 16.37 0.00 0.59 0.50 0.07 82.47 10:37:39 09:33:01 0 16.48 0.00 0.45 0.00 0.07 83.00 10:37:39 09:33:01 1 15.82 0.00 0.62 0.74 0.08 82.74 10:37:39 09:33:01 2 15.99 0.00 0.78 1.20 0.07 81.96 10:37:39 09:33:01 3 17.17 0.00 0.52 0.05 0.07 82.20 10:37:39 09:34:01 all 1.08 0.00 0.23 0.01 0.04 98.64 10:37:39 09:34:01 0 0.50 0.00 0.20 0.00 0.03 99.27 10:37:39 09:34:01 1 0.70 0.00 0.32 0.02 0.05 98.91 10:37:39 09:34:01 2 0.58 0.00 0.17 0.02 0.03 99.20 10:37:39 09:34:01 3 2.53 0.00 0.23 0.00 0.05 97.19 10:37:39 09:35:01 all 0.80 0.00 0.22 0.01 0.04 98.93 10:37:39 09:35:01 0 0.27 0.00 0.15 0.00 0.02 99.57 10:37:39 09:35:01 1 0.60 0.00 0.35 0.02 0.07 98.96 10:37:39 09:35:01 2 0.64 0.00 0.20 0.02 0.05 99.10 10:37:39 09:35:01 3 1.69 0.00 0.17 0.00 0.03 98.12 10:37:39 09:36:01 all 10.55 0.00 0.60 0.02 0.07 88.77 10:37:39 09:36:01 0 9.86 0.00 0.59 0.03 0.07 89.45 10:37:39 09:36:01 1 9.86 0.00 0.67 0.02 0.08 89.37 10:37:39 09:36:01 2 11.56 0.00 0.79 0.02 0.08 87.55 10:37:39 09:36:01 3 10.90 0.00 0.35 0.02 0.03 88.70 10:37:39 09:37:01 all 53.13 0.00 1.68 0.35 0.12 44.71 10:37:39 09:37:01 0 55.73 0.00 1.86 0.13 0.12 42.16 10:37:39 09:37:01 1 49.15 0.00 1.41 0.02 0.13 49.29 10:37:39 09:37:01 2 55.26 0.00 1.76 1.02 0.12 41.84 10:37:39 09:37:01 3 52.36 0.00 1.71 0.23 0.12 45.58 10:37:39 09:38:01 all 21.75 0.00 0.79 0.24 0.08 77.15 10:37:39 09:38:01 0 22.66 0.00 1.00 0.22 0.07 76.06 10:37:39 09:38:01 1 21.68 0.00 0.43 0.02 0.07 77.81 10:37:39 09:38:01 2 22.86 0.00 0.82 0.60 0.08 75.64 10:37:39 09:38:01 3 19.80 0.00 0.90 0.13 0.08 79.08 10:37:39 10:37:39 09:38:01 CPU %user %nice %system %iowait %steal %idle 10:37:39 09:39:01 all 9.20 0.00 0.65 0.04 0.06 90.04 10:37:39 09:39:01 0 9.00 0.00 0.58 0.07 0.05 90.30 10:37:39 09:39:01 1 8.91 0.00 0.64 0.07 0.07 90.32 10:37:39 09:39:01 2 9.21 0.00 0.70 0.02 0.05 90.03 10:37:39 09:39:01 3 9.70 0.00 0.70 0.02 0.07 89.52 10:37:39 09:40:01 all 30.10 0.00 1.21 0.29 0.08 68.32 10:37:39 09:40:01 0 29.08 0.00 1.55 0.02 0.08 69.27 10:37:39 09:40:01 1 32.00 0.00 1.32 0.43 0.08 66.17 10:37:39 09:40:01 2 29.20 0.00 1.15 0.68 0.10 68.87 10:37:39 09:40:01 3 30.13 0.00 0.82 0.02 0.07 68.97 10:37:39 09:41:01 all 25.79 0.00 0.77 0.26 0.09 73.08 10:37:39 09:41:01 0 23.90 0.00 0.60 0.02 0.08 75.40 10:37:39 09:41:01 1 27.55 0.00 0.97 0.00 0.08 71.39 10:37:39 09:41:01 2 25.65 0.00 0.70 0.71 0.08 72.86 10:37:39 09:41:01 3 26.07 0.00 0.82 0.32 0.12 72.68 10:37:39 09:42:01 all 12.42 0.00 0.65 0.05 0.07 86.80 10:37:39 09:42:01 0 11.99 0.00 0.87 0.02 0.07 87.06 10:37:39 09:42:01 1 10.44 0.00 0.55 0.03 0.05 88.93 10:37:39 09:42:01 2 13.94 0.00 0.61 0.15 0.07 85.23 10:37:39 09:42:01 3 13.31 0.00 0.57 0.02 0.08 86.02 10:37:39 09:43:01 all 56.99 0.00 1.75 0.46 0.14 40.65 10:37:39 09:43:01 0 55.88 0.00 1.70 0.45 0.13 41.83 10:37:39 09:43:01 1 53.71 0.00 1.67 0.70 0.13 43.78 10:37:39 09:43:01 2 60.38 0.00 1.79 0.38 0.13 37.31 10:37:39 09:43:01 3 57.99 0.00 1.85 0.32 0.15 39.69 10:37:39 09:44:02 all 6.93 0.00 0.35 0.01 0.05 92.66 10:37:39 09:44:02 0 8.24 0.00 0.45 0.00 0.05 91.26 10:37:39 09:44:02 1 6.68 0.00 0.28 0.03 0.05 92.95 10:37:39 09:44:02 2 6.39 0.00 0.33 0.00 0.05 93.22 10:37:39 09:44:02 3 6.38 0.00 0.34 0.00 0.05 93.23 10:37:39 09:45:01 all 38.37 0.00 1.16 0.24 0.10 60.13 10:37:39 09:45:01 0 33.93 0.00 1.26 0.25 0.10 64.45 10:37:39 09:45:01 1 40.21 0.00 0.83 0.59 0.10 58.26 10:37:39 09:45:01 2 41.29 0.00 1.02 0.09 0.10 57.50 10:37:39 09:45:01 3 38.09 0.00 1.51 0.02 0.10 60.28 10:37:39 09:46:01 all 28.85 0.00 1.18 0.01 0.09 69.87 10:37:39 09:46:01 0 29.76 0.00 1.55 0.00 0.10 68.59 10:37:39 09:46:01 1 29.12 0.00 1.00 0.03 0.08 69.76 10:37:39 09:46:01 2 28.55 0.00 0.98 0.00 0.08 70.39 10:37:39 09:46:01 3 27.99 0.00 1.17 0.02 0.08 70.74 10:37:39 09:47:01 all 29.98 0.00 0.79 0.27 0.08 68.88 10:37:39 09:47:01 0 30.66 0.00 1.21 0.00 0.07 68.06 10:37:39 09:47:01 1 29.12 0.00 0.67 0.67 0.08 69.46 10:37:39 09:47:01 2 30.54 0.00 0.54 0.00 0.08 68.84 10:37:39 09:47:01 3 29.59 0.00 0.76 0.40 0.07 69.18 10:37:39 09:48:01 all 5.09 0.00 0.30 0.01 0.05 94.55 10:37:39 09:48:01 0 5.33 0.00 0.33 0.00 0.07 94.27 10:37:39 09:48:01 1 5.05 0.00 0.35 0.03 0.05 94.52 10:37:39 09:48:01 2 5.48 0.00 0.20 0.00 0.03 94.28 10:37:39 09:48:01 3 4.49 0.00 0.32 0.00 0.05 95.14 10:37:39 09:49:01 all 23.18 0.00 0.91 0.03 0.06 75.82 10:37:39 09:49:01 0 23.28 0.00 0.82 0.02 0.05 75.83 10:37:39 09:49:01 1 22.19 0.00 0.89 0.05 0.07 76.79 10:37:39 09:49:01 2 22.92 0.00 1.07 0.02 0.07 75.93 10:37:39 09:49:01 3 24.30 0.00 0.87 0.02 0.07 74.74 10:37:39 10:37:39 09:49:01 CPU %user %nice %system %iowait %steal %idle 10:37:39 09:50:01 all 34.20 0.00 1.05 0.31 0.09 64.35 10:37:39 09:50:01 0 33.59 0.00 1.17 0.07 0.10 65.07 10:37:39 09:50:01 1 34.18 0.00 0.95 0.89 0.07 63.92 10:37:39 09:50:01 2 33.53 0.00 1.00 0.00 0.10 65.37 10:37:39 09:50:01 3 35.48 0.00 1.08 0.30 0.08 63.05 10:37:39 09:51:01 all 2.83 0.00 0.27 0.00 0.06 96.84 10:37:39 09:51:01 0 2.69 0.00 0.28 0.00 0.05 96.98 10:37:39 09:51:01 1 2.71 0.00 0.22 0.02 0.07 96.99 10:37:39 09:51:01 2 2.64 0.00 0.23 0.00 0.05 97.08 10:37:39 09:51:01 3 3.31 0.00 0.33 0.00 0.07 96.29 10:37:39 09:52:01 all 3.63 0.00 0.35 0.02 0.05 95.94 10:37:39 09:52:01 0 3.68 0.00 0.33 0.03 0.05 95.90 10:37:39 09:52:01 1 3.12 0.00 0.32 0.03 0.05 96.48 10:37:39 09:52:01 2 3.72 0.00 0.42 0.00 0.05 95.81 10:37:39 09:52:01 3 4.00 0.00 0.35 0.00 0.07 95.58 10:37:39 09:53:01 all 2.17 0.00 0.28 0.01 0.05 97.48 10:37:39 09:53:01 0 2.37 0.00 0.38 0.02 0.05 97.18 10:37:39 09:53:01 1 1.80 0.00 0.13 0.03 0.03 98.00 10:37:39 09:53:01 2 2.57 0.00 0.30 0.00 0.07 97.07 10:37:39 09:53:01 3 1.96 0.00 0.30 0.00 0.05 97.69 10:37:39 09:54:01 all 2.85 0.00 0.26 0.01 0.05 96.83 10:37:39 09:54:01 0 2.61 0.00 0.27 0.03 0.05 97.04 10:37:39 09:54:01 1 3.08 0.00 0.28 0.02 0.05 96.56 10:37:39 09:54:01 2 2.78 0.00 0.30 0.00 0.05 96.87 10:37:39 09:54:01 3 2.92 0.00 0.20 0.00 0.03 96.84 10:37:39 09:55:01 all 1.38 0.00 0.25 0.04 0.05 98.29 10:37:39 09:55:01 0 1.00 0.00 0.18 0.05 0.02 98.75 10:37:39 09:55:01 1 1.51 0.00 0.27 0.05 0.05 98.12 10:37:39 09:55:01 2 1.77 0.00 0.32 0.05 0.07 97.79 10:37:39 09:55:01 3 1.23 0.00 0.22 0.00 0.05 98.50 10:37:39 09:56:01 all 2.23 0.00 0.27 0.01 0.05 97.44 10:37:39 09:56:01 0 2.44 0.00 0.17 0.05 0.05 97.30 10:37:39 09:56:01 1 2.17 0.00 0.43 0.00 0.05 97.34 10:37:39 09:56:01 2 2.16 0.00 0.23 0.00 0.05 97.56 10:37:39 09:56:01 3 2.16 0.00 0.23 0.00 0.05 97.56 10:37:39 09:57:01 all 9.93 0.00 0.74 0.02 0.07 89.24 10:37:39 09:57:01 0 10.01 0.00 0.50 0.02 0.07 89.41 10:37:39 09:57:01 1 9.85 0.00 0.68 0.07 0.07 89.33 10:37:39 09:57:01 2 10.24 0.00 1.00 0.00 0.08 88.67 10:37:39 09:57:01 3 9.63 0.00 0.77 0.00 0.07 89.54 10:37:39 09:58:01 all 44.58 0.00 1.29 0.22 0.08 53.82 10:37:39 09:58:01 0 45.09 0.00 1.82 0.48 0.08 52.52 10:37:39 09:58:01 1 41.76 0.00 1.02 0.02 0.08 57.13 10:37:39 09:58:01 2 46.64 0.00 0.79 0.00 0.08 52.49 10:37:39 09:58:01 3 44.84 0.00 1.55 0.38 0.08 53.14 10:37:39 09:59:01 all 3.96 0.00 0.27 0.02 0.05 95.70 10:37:39 09:59:01 0 4.11 0.00 0.32 0.03 0.05 95.49 10:37:39 09:59:01 1 3.72 0.00 0.18 0.02 0.03 96.04 10:37:39 09:59:01 2 4.08 0.00 0.32 0.02 0.07 95.52 10:37:39 09:59:01 3 3.92 0.00 0.27 0.00 0.07 95.75 10:37:39 10:00:01 all 5.77 0.00 0.42 0.03 0.05 93.74 10:37:39 10:00:01 0 5.75 0.00 0.45 0.03 0.05 93.72 10:37:39 10:00:01 1 6.45 0.00 0.38 0.07 0.05 93.05 10:37:39 10:00:01 2 5.42 0.00 0.30 0.00 0.05 94.23 10:37:39 10:00:01 3 5.45 0.00 0.55 0.00 0.05 93.95 10:37:39 10:37:39 10:00:01 CPU %user %nice %system %iowait %steal %idle 10:37:39 10:01:01 all 3.01 0.00 0.27 0.01 0.05 96.67 10:37:39 10:01:01 0 2.83 0.00 0.22 0.02 0.03 96.90 10:37:39 10:01:01 1 2.48 0.00 0.42 0.02 0.07 97.02 10:37:39 10:01:01 2 3.63 0.00 0.25 0.00 0.05 96.07 10:37:39 10:01:01 3 3.07 0.00 0.22 0.00 0.03 96.68 10:37:39 10:02:01 all 2.77 0.00 0.33 0.02 0.05 96.83 10:37:39 10:02:01 0 2.74 0.00 0.27 0.05 0.05 96.90 10:37:39 10:02:01 1 2.50 0.00 0.33 0.02 0.03 97.11 10:37:39 10:02:01 2 2.62 0.00 0.35 0.00 0.05 96.98 10:37:39 10:02:01 3 3.21 0.00 0.38 0.00 0.07 96.34 10:37:39 10:03:01 all 2.95 0.00 0.34 0.01 0.05 96.66 10:37:39 10:03:01 0 4.08 0.00 0.35 0.02 0.05 95.51 10:37:39 10:03:01 1 2.59 0.00 0.25 0.02 0.05 97.10 10:37:39 10:03:01 2 2.57 0.00 0.42 0.00 0.05 96.96 10:37:39 10:03:01 3 2.56 0.00 0.33 0.00 0.03 97.07 10:37:39 10:04:01 all 4.72 0.00 0.39 0.02 0.06 94.82 10:37:39 10:04:01 0 4.84 0.00 0.38 0.00 0.05 94.73 10:37:39 10:04:01 1 4.37 0.00 0.52 0.05 0.07 94.99 10:37:39 10:04:01 2 4.25 0.00 0.38 0.02 0.05 95.30 10:37:39 10:04:01 3 5.40 0.00 0.28 0.00 0.07 94.25 10:37:39 10:05:01 all 42.33 0.00 1.77 0.03 0.10 55.76 10:37:39 10:05:01 0 37.91 0.00 1.56 0.05 0.10 60.38 10:37:39 10:05:01 1 44.28 0.00 2.08 0.05 0.10 53.49 10:37:39 10:05:01 2 43.83 0.00 1.32 0.03 0.08 54.73 10:37:39 10:05:01 3 43.30 0.00 2.13 0.00 0.10 54.48 10:37:39 10:06:01 all 22.78 0.00 0.80 0.28 0.08 76.05 10:37:39 10:06:01 0 21.73 0.00 0.47 0.00 0.07 77.74 10:37:39 10:06:01 1 22.45 0.00 0.87 0.48 0.07 76.13 10:37:39 10:06:01 2 22.72 0.00 1.27 0.63 0.08 75.29 10:37:39 10:06:01 3 24.23 0.00 0.60 0.02 0.10 75.05 10:37:39 10:07:01 all 8.77 0.00 0.43 0.01 0.05 90.73 10:37:39 10:07:01 0 8.06 0.00 0.47 0.00 0.05 91.42 10:37:39 10:07:01 1 9.53 0.00 0.45 0.02 0.07 89.93 10:37:39 10:07:01 2 8.79 0.00 0.45 0.02 0.05 90.69 10:37:39 10:07:01 3 8.68 0.00 0.37 0.02 0.05 90.89 10:37:39 10:08:01 all 3.86 0.00 0.35 0.01 0.05 95.72 10:37:39 10:08:01 0 4.15 0.00 0.28 0.00 0.03 95.53 10:37:39 10:08:01 1 3.74 0.00 0.40 0.02 0.07 95.78 10:37:39 10:08:01 2 3.32 0.00 0.32 0.02 0.05 96.30 10:37:39 10:08:01 3 4.24 0.00 0.42 0.00 0.07 95.28 10:37:39 10:09:01 all 4.94 0.00 0.37 0.01 0.06 94.62 10:37:39 10:09:01 0 5.30 0.00 0.23 0.00 0.07 94.40 10:37:39 10:09:01 1 4.62 0.00 0.45 0.02 0.05 94.86 10:37:39 10:09:01 2 5.07 0.00 0.42 0.02 0.07 94.43 10:37:39 10:09:01 3 4.79 0.00 0.37 0.00 0.05 94.79 10:37:39 10:10:01 all 3.14 0.00 0.36 0.02 0.06 96.42 10:37:39 10:10:01 0 2.95 0.00 0.39 0.00 0.05 96.62 10:37:39 10:10:01 1 3.37 0.00 0.28 0.00 0.07 96.28 10:37:39 10:10:01 2 2.87 0.00 0.32 0.08 0.07 96.66 10:37:39 10:10:01 3 3.37 0.00 0.47 0.00 0.05 96.11 10:37:39 10:11:01 all 2.11 0.00 0.34 0.02 0.04 97.49 10:37:39 10:11:01 0 2.57 0.00 0.43 0.00 0.07 96.93 10:37:39 10:11:01 1 1.72 0.00 0.22 0.03 0.02 98.01 10:37:39 10:11:01 2 2.18 0.00 0.27 0.05 0.03 97.47 10:37:39 10:11:01 3 1.98 0.00 0.43 0.00 0.05 97.53 10:37:39 10:37:39 10:11:01 CPU %user %nice %system %iowait %steal %idle 10:37:39 10:12:01 all 2.21 0.00 0.36 0.01 0.05 97.37 10:37:39 10:12:01 0 2.12 0.00 0.38 0.00 0.05 97.44 10:37:39 10:12:01 1 2.42 0.00 0.37 0.00 0.05 97.16 10:37:39 10:12:01 2 2.03 0.00 0.30 0.03 0.03 97.61 10:37:39 10:12:01 3 2.28 0.00 0.40 0.00 0.05 97.27 10:37:39 10:13:01 all 32.69 0.00 1.23 0.04 0.08 65.96 10:37:39 10:13:01 0 33.70 0.00 1.03 0.00 0.08 65.18 10:37:39 10:13:01 1 32.75 0.00 1.23 0.07 0.08 65.87 10:37:39 10:13:01 2 33.48 0.00 1.47 0.10 0.08 64.86 10:37:39 10:13:01 3 30.82 0.00 1.17 0.00 0.08 67.92 10:37:39 10:14:01 all 33.96 0.00 1.06 0.27 0.08 64.62 10:37:39 10:14:01 0 34.51 0.00 1.23 0.27 0.08 63.91 10:37:39 10:14:01 1 32.98 0.00 1.08 0.08 0.07 65.79 10:37:39 10:14:01 2 33.51 0.00 1.20 0.74 0.08 64.47 10:37:39 10:14:01 3 34.84 0.00 0.73 0.00 0.10 64.33 10:37:39 10:15:01 all 9.48 0.00 0.46 0.02 0.07 89.97 10:37:39 10:15:01 0 9.67 0.00 0.58 0.00 0.08 89.67 10:37:39 10:15:01 1 9.15 0.00 0.43 0.02 0.07 90.34 10:37:39 10:15:01 2 8.65 0.00 0.48 0.05 0.07 90.75 10:37:39 10:15:01 3 10.45 0.00 0.35 0.00 0.05 89.15 10:37:39 10:16:01 all 4.14 0.00 0.33 0.02 0.05 95.47 10:37:39 10:16:01 0 4.13 0.00 0.28 0.00 0.03 95.55 10:37:39 10:16:01 1 4.14 0.00 0.39 0.05 0.05 95.37 10:37:39 10:16:01 2 4.02 0.00 0.27 0.02 0.05 95.65 10:37:39 10:16:01 3 4.25 0.00 0.38 0.00 0.07 95.30 10:37:39 10:17:01 all 2.40 0.00 0.26 0.02 0.04 97.28 10:37:39 10:17:01 0 2.57 0.00 0.38 0.00 0.05 96.99 10:37:39 10:17:01 1 2.75 0.00 0.18 0.03 0.05 96.98 10:37:39 10:17:01 2 2.30 0.00 0.25 0.03 0.03 97.38 10:37:39 10:17:01 3 1.96 0.00 0.22 0.00 0.03 97.79 10:37:39 10:18:01 all 3.25 0.00 0.38 0.01 0.06 96.30 10:37:39 10:18:01 0 3.95 0.00 0.50 0.00 0.07 95.49 10:37:39 10:18:01 1 2.83 0.00 0.28 0.03 0.05 96.80 10:37:39 10:18:01 2 3.30 0.00 0.37 0.02 0.07 96.25 10:37:39 10:18:01 3 2.91 0.00 0.35 0.00 0.07 96.67 10:37:39 10:19:01 all 1.40 0.00 0.28 0.02 0.05 98.25 10:37:39 10:19:01 0 1.65 0.00 0.28 0.00 0.07 98.00 10:37:39 10:19:01 1 1.09 0.00 0.28 0.03 0.05 98.55 10:37:39 10:19:01 2 1.27 0.00 0.27 0.03 0.05 98.38 10:37:39 10:19:01 3 1.61 0.00 0.28 0.00 0.05 98.06 10:37:39 10:20:01 all 2.97 0.00 0.30 0.01 0.06 96.66 10:37:39 10:20:01 0 2.77 0.00 0.45 0.00 0.07 96.71 10:37:39 10:20:01 1 3.33 0.00 0.33 0.02 0.07 96.25 10:37:39 10:20:01 2 2.75 0.00 0.23 0.02 0.05 96.95 10:37:39 10:20:01 3 3.02 0.00 0.20 0.00 0.05 96.73 10:37:39 10:21:01 all 1.28 0.00 0.31 0.02 0.05 98.34 10:37:39 10:21:01 0 1.27 0.00 0.33 0.00 0.05 98.35 10:37:39 10:21:01 1 1.49 0.00 0.30 0.03 0.05 98.13 10:37:39 10:21:01 2 1.09 0.00 0.28 0.05 0.03 98.55 10:37:39 10:21:01 3 1.29 0.00 0.33 0.00 0.05 98.33 10:37:39 10:22:01 all 3.36 0.00 0.37 0.02 0.05 96.21 10:37:39 10:22:01 0 2.88 0.00 0.28 0.00 0.05 96.78 10:37:39 10:22:01 1 3.59 0.00 0.30 0.03 0.03 96.05 10:37:39 10:22:01 2 4.03 0.00 0.48 0.03 0.05 95.41 10:37:39 10:22:01 3 2.92 0.00 0.40 0.00 0.07 96.61 10:37:39 10:37:39 10:22:01 CPU %user %nice %system %iowait %steal %idle 10:37:39 10:23:01 all 29.35 0.00 1.43 0.13 0.09 69.01 10:37:39 10:23:01 0 28.02 0.00 1.66 0.08 0.08 70.15 10:37:39 10:23:01 1 34.51 0.00 1.40 0.10 0.10 63.88 10:37:39 10:23:01 2 24.22 0.00 1.44 0.10 0.08 74.15 10:37:39 10:23:01 3 30.63 0.00 1.20 0.22 0.08 67.87 10:37:39 10:24:01 all 33.54 0.00 1.03 0.40 0.08 64.95 10:37:39 10:24:01 0 35.57 0.00 1.42 0.00 0.07 62.94 10:37:39 10:24:01 1 33.90 0.00 0.84 0.28 0.08 64.89 10:37:39 10:24:01 2 29.32 0.00 1.05 0.99 0.08 68.56 10:37:39 10:24:01 3 35.36 0.00 0.82 0.32 0.08 63.42 10:37:39 10:25:01 all 4.90 0.00 0.27 0.01 0.05 94.77 10:37:39 10:25:01 0 4.96 0.00 0.20 0.00 0.05 94.79 10:37:39 10:25:01 1 4.95 0.00 0.28 0.02 0.05 94.69 10:37:39 10:25:01 2 4.72 0.00 0.29 0.02 0.05 94.93 10:37:39 10:25:01 3 4.95 0.00 0.32 0.02 0.05 94.66 10:37:39 10:26:01 all 49.44 0.00 1.42 0.28 0.12 48.74 10:37:39 10:26:01 0 52.06 0.00 1.84 0.43 0.12 45.55 10:37:39 10:26:01 1 50.46 0.00 1.29 0.02 0.12 48.12 10:37:39 10:26:01 2 50.49 0.00 1.41 0.25 0.12 47.74 10:37:39 10:26:01 3 44.77 0.00 1.14 0.42 0.12 53.56 10:37:39 10:27:01 all 6.67 0.00 0.24 0.01 0.06 93.02 10:37:39 10:27:01 0 6.73 0.00 0.34 0.00 0.07 92.87 10:37:39 10:27:01 1 6.73 0.00 0.18 0.02 0.07 93.00 10:37:39 10:27:01 2 7.05 0.00 0.28 0.02 0.05 92.60 10:37:39 10:27:01 3 6.18 0.00 0.15 0.00 0.05 93.62 10:37:39 10:28:01 all 2.52 0.00 0.13 0.01 0.05 97.28 10:37:39 10:28:01 0 2.89 0.00 0.12 0.00 0.05 96.94 10:37:39 10:28:01 1 2.72 0.00 0.15 0.00 0.05 97.08 10:37:39 10:28:01 2 2.24 0.00 0.18 0.03 0.07 97.48 10:37:39 10:28:01 3 2.25 0.00 0.08 0.00 0.05 97.62 10:37:39 10:29:01 all 2.99 0.00 0.21 0.01 0.05 96.75 10:37:39 10:29:01 0 2.84 0.00 0.25 0.00 0.07 96.84 10:37:39 10:29:01 1 3.26 0.00 0.17 0.02 0.03 96.52 10:37:39 10:29:01 2 2.79 0.00 0.20 0.02 0.05 96.94 10:37:39 10:29:01 3 3.07 0.00 0.20 0.00 0.05 96.68 10:37:39 10:30:01 all 1.52 0.00 0.16 0.01 0.05 98.27 10:37:39 10:30:01 0 1.49 0.00 0.15 0.00 0.05 98.31 10:37:39 10:30:01 1 1.53 0.00 0.20 0.02 0.07 98.18 10:37:39 10:30:01 2 1.46 0.00 0.13 0.03 0.03 98.34 10:37:39 10:30:01 3 1.59 0.00 0.13 0.00 0.05 98.23 10:37:39 10:31:01 all 3.97 0.00 0.23 0.01 0.05 95.73 10:37:39 10:31:01 0 4.16 0.00 0.27 0.00 0.05 95.52 10:37:39 10:31:01 1 3.94 0.00 0.29 0.03 0.05 95.69 10:37:39 10:31:01 2 3.85 0.00 0.18 0.02 0.05 95.90 10:37:39 10:31:01 3 3.94 0.00 0.20 0.00 0.07 95.80 10:37:39 10:32:01 all 2.45 0.00 0.19 0.01 0.06 97.29 10:37:39 10:32:01 0 2.53 0.00 0.17 0.00 0.07 97.23 10:37:39 10:32:01 1 2.26 0.00 0.12 0.02 0.05 97.55 10:37:39 10:32:01 2 2.69 0.00 0.24 0.02 0.08 96.97 10:37:39 10:32:01 3 2.32 0.00 0.23 0.00 0.05 97.39 10:37:39 10:33:01 all 43.05 0.00 1.64 0.02 0.09 55.19 10:37:39 10:33:01 0 45.49 0.00 1.74 0.00 0.08 52.69 10:37:39 10:33:01 1 43.57 0.00 1.79 0.00 0.10 54.54 10:37:39 10:33:01 2 39.39 0.00 1.66 0.07 0.10 58.78 10:37:39 10:33:01 3 43.74 0.00 1.39 0.02 0.08 54.77 10:37:39 10:37:39 10:33:01 CPU %user %nice %system %iowait %steal %idle 10:37:39 10:34:01 all 23.12 0.00 0.78 0.29 0.08 75.71 10:37:39 10:34:01 0 24.12 0.00 0.73 0.00 0.10 75.05 10:37:39 10:34:01 1 23.07 0.00 0.85 0.08 0.08 75.91 10:37:39 10:34:01 2 23.09 0.00 0.83 1.00 0.07 75.00 10:37:39 10:34:01 3 22.22 0.00 0.72 0.08 0.08 76.90 10:37:39 10:35:01 all 8.56 0.00 0.50 0.01 0.07 90.86 10:37:39 10:35:01 0 8.85 0.00 0.60 0.00 0.07 90.49 10:37:39 10:35:01 1 8.37 0.00 0.32 0.02 0.05 91.24 10:37:39 10:35:01 2 8.31 0.00 0.50 0.02 0.08 91.09 10:37:39 10:35:01 3 8.72 0.00 0.57 0.00 0.08 90.63 10:37:39 10:36:01 all 5.62 0.00 0.42 0.01 0.07 93.87 10:37:39 10:36:01 0 5.66 0.00 0.43 0.00 0.08 93.82 10:37:39 10:36:01 1 5.31 0.00 0.35 0.02 0.07 94.25 10:37:39 10:36:01 2 5.71 0.00 0.43 0.03 0.07 93.75 10:37:39 10:36:01 3 5.80 0.00 0.47 0.00 0.07 93.66 10:37:39 10:37:01 all 19.71 0.00 1.25 0.29 0.07 78.68 10:37:39 10:37:01 0 23.73 0.00 1.67 0.17 0.07 74.36 10:37:39 10:37:01 1 17.61 0.00 1.17 0.55 0.07 80.60 10:37:39 10:37:01 2 20.55 0.00 1.29 0.43 0.07 77.66 10:37:39 10:37:01 3 16.95 0.00 0.87 0.00 0.08 82.09 10:37:39 Average: all 18.23 0.13 0.95 1.84 0.07 78.78 10:37:39 Average: 0 18.25 0.13 0.97 2.50 0.07 78.09 10:37:39 Average: 1 18.08 0.13 0.91 1.02 0.07 79.79 10:37:39 Average: 2 18.00 0.13 0.96 1.90 0.08 78.94 10:37:39 Average: 3 18.58 0.14 0.95 1.96 0.08 78.30 10:37:39 10:37:39 10:37:39