14:53:11 Started by timer 14:53:11 Running as SYSTEM 14:53:11 [EnvInject] - Loading node environment variables. 14:53:11 Building remotely on prd-ubuntu1804-docker-8c-8g-1701 (ubuntu1804-docker-8c-8g) in workspace /w/workspace/integration-netconf-pnp-simulator-docker-merge-master 14:53:11 [ssh-agent] Looking for ssh-agent implementation... 14:53:11 $ ssh-agent 14:53:11 SSH_AUTH_SOCK=/tmp/ssh-PCE159u35NXM/agent.2110 14:53:11 SSH_AGENT_PID=2112 14:53:11 [ssh-agent] Started. 14:53:11 Running ssh-add (command line suppressed) 14:53:11 Identity added: /w/workspace/integration-netconf-pnp-simulator-docker-merge-master@tmp/private_key_9305478265354163721.key (/w/workspace/integration-netconf-pnp-simulator-docker-merge-master@tmp/private_key_9305478265354163721.key) 14:53:11 [ssh-agent] Using credentials onap-jobbuiler (Gerrit user) 14:53:11 The recommended git tool is: NONE 14:53:13 using credential onap-jenkins-ssh 14:53:13 Wiping out workspace first. 14:53:13 Cloning the remote Git repository 14:53:13 Cloning repository git://cloud.onap.org/mirror/integration 14:53:13 > git init /w/workspace/integration-netconf-pnp-simulator-docker-merge-master # timeout=10 14:53:13 Fetching upstream changes from git://cloud.onap.org/mirror/integration 14:53:13 > git --version # timeout=10 14:53:13 > git --version # 'git version 2.17.1' 14:53:13 using GIT_SSH to set credentials Gerrit user 14:53:13 Verifying host key using manually-configured host key entries 14:53:13 > git fetch --tags --progress -- git://cloud.onap.org/mirror/integration +refs/heads/*:refs/remotes/origin/* # timeout=10 14:53:16 > git config remote.origin.url git://cloud.onap.org/mirror/integration # timeout=10 14:53:16 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10 14:53:17 Avoid second fetch 14:53:17 > git rev-parse refs/remotes/origin/master^{commit} # timeout=10 14:53:17 Checking out Revision 1b6b2af47270d637093330290479b71580554efe (refs/remotes/origin/master) 14:53:17 > git config core.sparsecheckout # timeout=10 14:53:17 > git checkout -f 1b6b2af47270d637093330290479b71580554efe # timeout=10 14:53:17 Commit message: "Bump lfreleng-actions/github2gerrit-action/.github/workflows/github2gerrit.yaml from 2.4.0 to 2.4.2" 14:53:17 > git rev-list --no-walk 1b6b2af47270d637093330290479b71580554efe # timeout=10 14:53:21 provisioning config files... 14:53:21 copy managed file [npmrc] to file:/home/jenkins/.npmrc 14:53:21 copy managed file [pipconf] to file:/home/jenkins/.config/pip/pip.conf 14:53:21 [integration-netconf-pnp-simulator-docker-merge-master] $ /bin/bash /tmp/jenkins5064390153822836287.sh 14:53:21 ---> python-tools-install.sh 14:53:21 Setup pyenv: 14:53:21 * system (set by /opt/pyenv/version) 14:53:21 * 3.8.13 (set by /opt/pyenv/version) 14:53:21 * 3.9.13 (set by /opt/pyenv/version) 14:53:21 * 3.10.6 (set by /opt/pyenv/version) 14:53:26 lf-activate-venv(): INFO: Creating python3 venv at /tmp/venv-gq3i 14:53:26 lf-activate-venv(): INFO: Save venv in file: /tmp/.os_lf_venv 14:53:26 lf-activate-venv(): INFO: Installing base packages (pip, setuptools, virtualenv) 14:53:31 lf-activate-venv(): INFO: Installing additional packages: lftools 14:54:03 lf-activate-venv(): INFO: Adding /tmp/venv-gq3i/bin to PATH 14:54:03 Generating Requirements File 14:54:31 ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. 14:54:31 httplib2 0.30.2 requires pyparsing<4,>=3.0.4, but you have pyparsing 2.4.7 which is incompatible. 14:54:32 Python 3.10.6 14:54:32 pip 26.2.1 from /tmp/venv-gq3i/lib/python3.10/site-packages/pip (python 3.10) 14:54:32 aiohappyeyeballs==2.7.1 14:54:32 aiohttp==3.14.5 14:54:32 aiosignal==1.4.0 14:54:32 appdirs==1.4.4 14:54:32 argcomplete==3.7.2 14:54:32 aspy.yaml==1.3.0 14:54:32 async-timeout==5.0.1 14:54:32 attrs==26.1.0 14:54:32 autopage==0.6.0 14:54:32 backports.strenum==1.3.1 14:54:32 beautifulsoup4==4.15.0 14:54:32 boto3==1.43.113 14:54:32 botocore==1.43.113 14:54:32 bs4==0.0.2 14:54:32 certifi==2026.7.22 14:54:32 cffi==2.1.1 14:54:32 cfgv==3.5.0 14:54:32 chardet==7.6.0 14:54:32 charset-normalizer==3.5.2 14:54:32 click==8.5.0 14:54:32 cliff==4.14.0 14:54:32 cmd2==3.5.1 14:54:32 cryptography==3.3.2 14:54:32 debtcollector==3.1.0 14:54:32 decorator==5.3.1 14:54:32 defusedxml==0.7.1 14:54:32 Deprecated==1.3.1 14:54:32 distlib==0.4.3 14:54:32 dnspython==2.8.0 14:54:32 docker==7.2.0 14:54:32 dogpile.cache==1.5.0 14:54:32 durationpy==0.11 14:54:32 email-validator==2.3.0 14:54:32 filelock==4.1.0 14:54:32 frozenlist==1.8.0 14:54:32 future==1.0.0 14:54:32 gitdb==4.0.12 14:54:32 GitPython==3.2.1 14:54:32 httplib2==0.30.2 14:54:32 identify==2.6.20 14:54:32 idna==3.20 14:54:32 importlib-resources==1.5.0 14:54:32 iso8601==2.1.0 14:54:32 Jinja2==3.1.6 14:54:32 jmespath==1.1.0 14:54:32 jsonpatch==1.35 14:54:32 jsonpointer==3.2.1 14:54:32 jsonschema==4.26.0 14:54:32 jsonschema-specifications==2025.9.1 14:54:32 keystoneauth1==5.14.0 14:54:32 kubernetes==36.0.3 14:54:32 lftools==0.37.24 14:54:32 lxml==6.1.3 14:54:32 markdown-it-py==4.2.0 14:54:32 MarkupSafe==3.0.4 14:54:32 mdurl==0.1.2 14:54:32 msgpack==1.2.3 14:54:32 multi_key_dict==2.0.3 14:54:32 multidict==7.1.0 14:54:32 munch==4.0.0 14:54:32 netaddr==1.3.0 14:54:32 niet==1.4.2 14:54:32 nodeenv==1.11.0 14:54:32 oauth2client==4.1.3 14:54:32 oauthlib==4.0.0 14:54:32 openstacksdk==4.13.0 14:54:32 os-service-types==1.8.2 14:54:32 osc-lib==4.6.0 14:54:32 oslo.config==10.4.0 14:54:32 oslo.context==6.4.0 14:54:32 oslo.i18n==6.8.0 14:54:32 oslo.log==8.2.0 14:54:32 oslo.serialization==5.10.0 14:54:32 oslo.utils==10.1.1 14:54:32 packaging==26.3 14:54:32 pbr==7.1.3 14:54:32 platformdirs==4.12.4 14:54:32 prettytable==3.18.0 14:54:32 propcache==0.5.4 14:54:32 psutil==7.2.2 14:54:32 pyasn1==0.6.4 14:54:32 pyasn1_modules==0.4.2 14:54:32 pycparser==3.11 14:54:32 pygerrit2==2.0.15 14:54:32 PyGithub==2.10.0 14:54:32 Pygments==2.21.0 14:54:32 PyJWT==2.15.1 14:54:32 PyNaCl==1.6.2 14:54:32 pyparsing==2.4.7 14:54:32 pyperclip==1.11.0 14:54:32 pyrsistent==0.20.0 14:54:32 python-cinderclient==9.9.0 14:54:32 python-dateutil==2.9.0.post0 14:54:32 python-discovery==1.6.2 14:54:32 python-heatclient==5.2.0 14:54:32 python-jenkins==1.8.3 14:54:32 python-keystoneclient==6.0.0 14:54:32 python-magnumclient==4.11.0 14:54:32 python-openstackclient==10.0.0 14:54:32 python-swiftclient==4.11.0 14:54:32 PyYAML==6.0.3 14:54:32 referencing==0.37.0 14:54:32 requests==2.34.2 14:54:32 requests-oauthlib==2.0.0 14:54:32 rfc3986==2.0.0 14:54:32 rich==15.0.0 14:54:32 rich-argparse==1.8.0 14:54:32 rpds-py==0.30.0 14:54:32 rsa==4.9.1 14:54:32 ruamel.yaml==0.19.1 14:54:32 ruamel.yaml.clib==0.2.15 14:54:32 s3transfer==0.19.2 14:54:32 simplejson==4.2.0 14:54:32 six==1.17.0 14:54:32 smmap==5.0.3 14:54:32 soupsieve==2.10 14:54:32 stevedore==5.8.0 14:54:32 tabulate==0.10.0 14:54:32 toml==0.10.2 14:54:32 tomlkit==0.15.1 14:54:32 tqdm==4.70.1 14:54:32 typing_extensions==4.16.0 14:54:32 urllib3==1.26.20 14:54:32 virtualenv==21.14.7 14:54:32 wcwidth==0.9.2 14:54:32 websocket-client==1.9.2 14:54:32 wrapt==2.5.1 14:54:32 xdg==6.0.0 14:54:32 xmltodict==1.0.4 14:54:32 yarl==1.25.1 14:54:32 yq==4.4.5 14:54:32 [integration-netconf-pnp-simulator-docker-merge-master] $ /bin/sh /tmp/jenkins16713521870005274715.sh 14:54:32 ---> uv-install.sh 14:54:32 Installing uv/uvx (latest) using shell installer 14:54:32 2026-10-14 14:54:32 URL:https://releases.astral.sh/installers/uv/latest/uv-installer.sh [71300/71300] -> "/tmp/uv-install-tSl0wr.sh" [1] 14:54:32 downloading uv 0.13.1 x86_64-unknown-linux-gnu 14:54:33 installing to /home/jenkins/.local/bin 14:54:33 uv 14:54:33 uvx 14:54:33 everything's installed! 14:54:33 14:54:33 To add $HOME/.local/bin to your PATH, either restart your shell or run: 14:54:33 14:54:33 source $HOME/.local/bin/env (sh, bash, zsh) 14:54:33 source $HOME/.local/bin/env.fish (fish) 14:54:33 Adding install location to PATH 14:54:33 ---> Validating uv/uvx install 14:54:33 uvx 0.13.1 (x86_64-unknown-linux-gnu) 14:54:33 provisioning config files... 14:54:33 copy managed file [global-settings] to file:/w/workspace/integration-netconf-pnp-simulator-docker-merge-master@tmp/config11587868334961140191tmp 14:54:33 copy managed file [integration-settings] to file:/w/workspace/integration-netconf-pnp-simulator-docker-merge-master@tmp/config18391846888299330373tmp 14:54:33 [integration-netconf-pnp-simulator-docker-merge-master] $ /bin/bash /tmp/jenkins15681278596606451360.sh 14:54:33 ---> docker-login.sh 14:54:33 nexus3.onap.org:10001 14:54:34 WARNING! Using --password via the CLI is insecure. Use --password-stdin. 14:54:34 WARNING! Your password will be stored unencrypted in /home/jenkins/.docker/config.json. 14:54:34 Configure a credential helper to remove this warning. See 14:54:34 https://docs.docker.com/engine/reference/commandline/login/#credentials-store 14:54:34 14:54:34 Login Succeeded 14:54:34 nexus3.onap.org:10002 14:54:35 WARNING! Using --password via the CLI is insecure. Use --password-stdin. 14:54:35 WARNING! Your password will be stored unencrypted in /home/jenkins/.docker/config.json. 14:54:35 Configure a credential helper to remove this warning. See 14:54:35 https://docs.docker.com/engine/reference/commandline/login/#credentials-store 14:54:35 14:54:35 Login Succeeded 14:54:35 nexus3.onap.org:10003 14:54:35 WARNING! Using --password via the CLI is insecure. Use --password-stdin. 14:54:35 WARNING! Your password will be stored unencrypted in /home/jenkins/.docker/config.json. 14:54:35 Configure a credential helper to remove this warning. See 14:54:35 https://docs.docker.com/engine/reference/commandline/login/#credentials-store 14:54:35 14:54:35 Login Succeeded 14:54:35 nexus3.onap.org:10004 14:54:35 WARNING! Using --password via the CLI is insecure. Use --password-stdin. 14:54:35 WARNING! Your password will be stored unencrypted in /home/jenkins/.docker/config.json. 14:54:35 Configure a credential helper to remove this warning. See 14:54:35 https://docs.docker.com/engine/reference/commandline/login/#credentials-store 14:54:35 14:54:35 Login Succeeded 14:54:35 docker.io 14:54:35 WARNING! Using --password via the CLI is insecure. Use --password-stdin. 14:54:35 WARNING! Your password will be stored unencrypted in /home/jenkins/.docker/config.json. 14:54:35 Configure a credential helper to remove this warning. See 14:54:35 https://docs.docker.com/engine/reference/commandline/login/#credentials-store 14:54:35 14:54:35 Login Succeeded 14:54:35 ---> docker-login.sh ends 14:54:35 [integration-netconf-pnp-simulator-docker-merge-master] $ /bin/bash /tmp/jenkins6896957073754496050.sh 14:54:35 [integration-netconf-pnp-simulator-docker-merge-master] $ /bin/sh -xe /tmp/jenkins7903307445039616569.sh 14:54:35 [EnvInject] - Injecting environment variables from a build step. 14:54:35 [EnvInject] - Injecting as environment variables the properties content 14:54:35 DOCKER_ROOT=test/mocks/netconf-pnp-simulator/engine 14:54:35 CONTAINER_TAG_YAML_DIR= 14:54:35 CONTAINER_TAG_METHOD=yaml-file 14:54:35 14:54:35 [EnvInject] - Variables injected successfully. 14:54:35 [integration-netconf-pnp-simulator-docker-merge-master] $ /bin/bash -l /tmp/jenkins219637843909295174.sh 14:54:35 ---> docker-get-container-tag.sh 14:54:35 Setup pyenv: 14:54:35 system 14:54:35 3.8.13 14:54:35 3.9.13 14:54:35 * 3.10.6 (set by /w/workspace/integration-netconf-pnp-simulator-docker-merge-master/.python-version) 14:54:36 lf-activate-venv(): INFO: Reuse venv:/tmp/venv-gq3i from file:/tmp/.os_lf_venv 14:54:36 lf-activate-venv(): INFO: Installing base packages (pip, setuptools, virtualenv) 14:54:37 lf-activate-venv(): INFO: Installing additional packages: yq 14:54:38 lf-activate-venv(): INFO: Adding /tmp/venv-gq3i/bin to PATH 14:54:38 ---> Docker image tag found: 2.8.6 14:54:38 [EnvInject] - Injecting environment variables from a build step. 14:54:38 [EnvInject] - Injecting as environment variables the properties file path 'env_docker_inject.txt' 14:54:38 [EnvInject] - Variables injected successfully. 14:54:38 [EnvInject] - Injecting environment variables from a build step. 14:54:38 [EnvInject] - Injecting as environment variables the properties content 14:54:38 DOCKER_ARGS= 14:54:38 DOCKER_ROOT=test/mocks/netconf-pnp-simulator/engine 14:54:38 CONTAINER_PULL_REGISTRY=nexus3.onap.org:10001 14:54:38 CONTAINER_PUSH_REGISTRY=nexus3.onap.org:10003 14:54:38 DOCKER_NAME=onap/integration/simulators/netconf-pnp-simulator 14:54:38 14:54:38 [EnvInject] - Variables injected successfully. 14:54:38 [integration-netconf-pnp-simulator-docker-merge-master] $ /bin/bash /tmp/jenkins14767773852861866128.sh 14:54:38 ---> docker-build.sh 14:54:38 Docker version 20.10.18, build b40c2f6 14:54:38 Building image: nexus3.onap.org:10003/onap/integration/simulators/netconf-pnp-simulator:2.8.6 14:54:38 docker build -t nexus3.onap.org:10003/onap/integration/simulators/netconf-pnp-simulator:2.8.6 . 14:54:39 Sending build context to Docker daemon 145.9kB 14:54:39 Step 1/47 : FROM python:3.7.7-alpine3.11 as build 14:54:40 3.7.7-alpine3.11: Pulling from library/python 14:54:40 cbdbe7a5bc2a: Pulling fs layer 14:54:40 26ebcd19a4e3: Pulling fs layer 14:54:40 8341bd19193b: Pulling fs layer 14:54:40 ecc595bd65e1: Pulling fs layer 14:54:40 4b1c9d8f69d2: Pulling fs layer 14:54:40 ecc595bd65e1: Waiting 14:54:40 cbdbe7a5bc2a: Verifying Checksum 14:54:40 cbdbe7a5bc2a: Download complete 14:54:40 26ebcd19a4e3: Verifying Checksum 14:54:40 26ebcd19a4e3: Download complete 14:54:40 ecc595bd65e1: Download complete 14:54:41 cbdbe7a5bc2a: Pull complete 14:54:41 8341bd19193b: Verifying Checksum 14:54:41 8341bd19193b: Download complete 14:54:41 4b1c9d8f69d2: Verifying Checksum 14:54:41 4b1c9d8f69d2: Download complete 14:54:41 26ebcd19a4e3: Pull complete 14:54:43 8341bd19193b: Pull complete 14:54:43 ecc595bd65e1: Pull complete 14:54:43 4b1c9d8f69d2: Pull complete 14:54:44 Digest: sha256:778802b5b9797279772814fb15a7c6ee494848ced17965bb57092a0b900c0e4f 14:54:44 Status: Downloaded newer image for python:3.7.7-alpine3.11 14:54:44 ---> e854017db514 14:54:44 Step 2/47 : ARG zlog_version=1.2.14 14:54:48 ---> Running in bc8986eee9c2 14:54:48 Removing intermediate container bc8986eee9c2 14:54:48 ---> 7dec03c14ecb 14:54:48 Step 3/47 : ARG libyang_version=v1.0-r5 14:54:48 ---> Running in 518f6be608cf 14:54:48 Removing intermediate container 518f6be608cf 14:54:48 ---> 80c838c3c2cd 14:54:48 Step 4/47 : ARG sysrepo_version=v0.7.9 14:54:48 ---> Running in 2d5e80dc89ab 14:54:49 Removing intermediate container 2d5e80dc89ab 14:54:49 ---> c891441ffe96 14:54:49 Step 5/47 : ARG libnetconf2_version=v0.12-r2 14:54:49 ---> Running in 194e4968fee4 14:54:49 Removing intermediate container 194e4968fee4 14:54:49 ---> 8fc845ab6b03 14:54:49 Step 6/47 : ARG netopeer2_version=v0.7-r2 14:54:49 ---> Running in cfbbab0babee 14:54:49 Removing intermediate container cfbbab0babee 14:54:49 ---> 90b0c01d7038 14:54:49 Step 7/47 : WORKDIR /usr/src 14:54:49 ---> Running in 134543589ea5 14:54:49 Removing intermediate container 134543589ea5 14:54:49 ---> 596b9de060d3 14:54:49 Step 8/47 : RUN set -eux && apk add autoconf bash build-base cmake curl-dev file git libev-dev libssh-dev openssh-keygen openssl openssl-dev pcre-dev pkgconfig protobuf-c-dev swig ctags the_silver_searcher vim 14:54:50 ---> Running in d5576e9fc9a2 14:54:50 + apk add autoconf bash build-base cmake curl-dev file git libev-dev libssh-dev openssh-keygen openssl openssl-dev pcre-dev pkgconfig protobuf-c-dev swig ctags the_silver_searcher vim 14:54:50 fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/main/x86_64/APKINDEX.tar.gz 14:54:50 fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/community/x86_64/APKINDEX.tar.gz 14:54:50 (1/72) Upgrading musl (1.1.24-r2 -> 1.1.24-r3) 14:54:51 (2/72) Upgrading libcrypto1.1 (1.1.1g-r0 -> 1.1.1l-r0) 14:54:51 (3/72) Upgrading libssl1.1 (1.1.1g-r0 -> 1.1.1l-r0) 14:54:51 (4/72) Upgrading zlib (1.2.11-r3 -> 1.2.11-r5) 14:54:51 (5/72) Installing m4 (1.4.18-r1) 14:54:51 (6/72) Installing perl (5.30.3-r0) 14:54:51 (7/72) Installing autoconf (2.69-r2) 14:54:51 (8/72) Installing bash (5.0.11-r1) 14:54:51 Executing bash-5.0.11-r1.post-install 14:54:51 (9/72) Installing libgcc (9.3.0-r0) 14:54:51 (10/72) Installing libstdc++ (9.3.0-r0) 14:54:51 (11/72) Installing binutils (2.33.1-r1) 14:54:51 (12/72) Installing libmagic (5.37-r1) 14:54:51 (13/72) Installing file (5.37-r1) 14:54:51 (14/72) Installing gmp (6.1.2-r1) 14:54:51 (15/72) Installing isl (0.18-r0) 14:54:51 (16/72) Installing libgomp (9.3.0-r0) 14:54:51 (17/72) Installing libatomic (9.3.0-r0) 14:54:51 (18/72) Installing mpfr4 (4.0.2-r1) 14:54:51 (19/72) Installing mpc1 (1.1.0-r1) 14:54:51 (20/72) Installing gcc (9.3.0-r0) 14:54:52 (21/72) Installing musl-dev (1.1.24-r3) 14:54:52 (22/72) Installing libc-dev (0.7.2-r0) 14:54:52 (23/72) Installing g++ (9.3.0-r0) 14:54:52 (24/72) Installing make (4.2.1-r2) 14:54:52 (25/72) Installing fortify-headers (1.1-r0) 14:54:52 (26/72) Installing build-base (0.5-r1) 14:54:52 (27/72) Installing libacl (2.2.53-r0) 14:54:52 (28/72) Installing lz4-libs (1.9.2-r0) 14:54:52 (29/72) Installing zstd-libs (1.4.9-r0) 14:54:53 (30/72) Installing libarchive (3.4.2-r0) 14:54:53 (31/72) Installing nghttp2-libs (1.40.0-r1) 14:54:53 (32/72) Installing libcurl (7.79.1-r0) 14:54:53 (33/72) Installing rhash-libs (1.3.9-r0) 14:54:53 (34/72) Installing libuv (1.34.0-r0) 14:54:53 (35/72) Installing cmake (3.15.5-r0) 14:54:53 (36/72) Installing cmake-bash-completion (3.15.5-r0) 14:54:53 (37/72) Installing ctags (0_git20191207-r1) 14:54:54 (38/72) Installing pkgconf (1.6.3-r0) 14:54:54 (39/72) Installing openssl-dev (1.1.1l-r0) 14:54:54 (40/72) Installing nghttp2-dev (1.40.0-r1) 14:54:54 (41/72) Installing zlib-dev (1.2.11-r5) 14:54:54 (42/72) Installing curl-dev (7.79.1-r0) 14:54:54 (43/72) Installing pcre2 (10.34-r1) 14:54:54 (44/72) Installing git (2.24.4-r0) 14:54:54 (45/72) Installing perl-error (0.17028-r0) 14:54:54 (46/72) Installing perl-git (2.24.4-r0) 14:54:54 (47/72) Installing git-perl (2.24.4-r0) 14:54:54 (48/72) Installing libev (4.27-r0) 14:54:54 (49/72) Installing libev-dev (4.27-r0) 14:54:55 (50/72) Installing libssh (0.9.4-r1) 14:54:55 (51/72) Installing libssh-dev (0.9.4-r1) 14:54:55 (52/72) Installing openssh-keygen (8.1_p1-r1) 14:54:55 (53/72) Installing openssl (1.1.1l-r0) 14:54:55 (54/72) Installing libpcre16 (8.43-r1) 14:54:55 (55/72) Installing libpcre32 (8.43-r1) 14:54:55 (56/72) Installing pcre (8.43-r1) 14:54:55 (57/72) Installing libpcrecpp (8.43-r1) 14:54:55 (58/72) Installing pcre-dev (8.43-r1) 14:54:55 (59/72) Installing libprotobuf (3.11.2-r1) 14:54:55 (60/72) Installing libprotoc (3.11.2-r1) 14:54:55 (61/72) Installing protobuf-c (1.3.2-r3) 14:54:56 (62/72) Installing protobuf-c-dev (1.3.2-r3) 14:54:56 (63/72) Installing gc (8.0.4-r0) 14:54:56 (64/72) Installing libltdl (2.4.6-r7) 14:54:56 (65/72) Installing libunistring (0.9.10-r0) 14:54:56 (66/72) Installing guile-libs (2.0.14-r0) 14:54:56 (67/72) Installing guile (2.0.14-r0) 14:54:56 (68/72) Installing swig (3.0.12-r4) 14:54:56 (69/72) Installing the_silver_searcher (2.2.0-r0) 14:54:56 (70/72) Installing xxd (8.2.3437-r0) 14:54:56 (71/72) Installing lua5.3-libs (5.3.5-r2) 14:54:56 (72/72) Installing vim (8.2.3437-r0) 14:54:57 Executing busybox-1.31.1-r9.trigger 14:54:57 Executing ca-certificates-20191127-r1.trigger 14:54:57 OK: 329 MiB in 102 packages 14:55:07 Removing intermediate container d5576e9fc9a2 14:55:07 ---> 6661f5c2aaee 14:55:07 Step 9/47 : RUN git config --global advice.detachedHead false 14:55:07 ---> Running in fe469955954a 14:55:08 Removing intermediate container fe469955954a 14:55:08 ---> 62e4d82b99fe 14:55:08 Step 10/47 : ENV PKG_CONFIG_PATH=/opt/lib64/pkgconfig 14:55:08 ---> Running in 5a9502acf79b 14:55:08 Removing intermediate container 5a9502acf79b 14:55:08 ---> 8b4a2f22d269 14:55:08 Step 11/47 : ENV LD_LIBRARY_PATH=/opt/lib:/opt/lib64 14:55:08 ---> Running in 422e7d3c92bc 14:55:08 Removing intermediate container 422e7d3c92bc 14:55:08 ---> 5ed16665ef52 14:55:08 Step 12/47 : COPY patches/libyang/ ./patches/libyang/ 14:55:09 ---> 56673fe20051 14:55:09 Step 13/47 : RUN set -eux && git clone --branch $libyang_version --depth 1 https://github.com/CESNET/libyang.git && cd libyang && for p in ../patches/libyang/*.patch; do patch -p1 -i $p; done && mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE:String="Release" -DENABLE_BUILD_TESTS=OFF -DCMAKE_INSTALL_PREFIX:PATH=/opt -DGEN_LANGUAGE_BINDINGS=OFF .. && make -j2 && make install 14:55:09 ---> Running in aa01ee12b1a4 14:55:09 + git clone --branch v1.0-r5 --depth 1 https://github.com/CESNET/libyang.git 14:55:09 Cloning into 'libyang'... 14:55:11 + cd libyang 14:55:11 + patch -p1 -i ../patches/libyang/01-configurable-PYTHON_MODULE_PATH.patch 14:55:11 patching file swig/python/CMakeLists.txt 14:55:11 + mkdir build 14:55:11 + cd build 14:55:11 + cmake '-DCMAKE_BUILD_TYPE:String=Release' '-DENABLE_BUILD_TESTS=OFF' '-DCMAKE_INSTALL_PREFIX:PATH=/opt' '-DGEN_LANGUAGE_BINDINGS=OFF' .. 14:55:11 -- The C compiler identification is GNU 9.3.0 14:55:11 -- Check for working C compiler: /usr/bin/cc 14:55:11 -- Check for working C compiler: /usr/bin/cc -- works 14:55:11 -- Detecting C compiler ABI info 14:55:11 -- Detecting C compiler ABI info - done 14:55:11 -- Detecting C compile features 14:55:11 -- Detecting C compile features - done 14:55:11 -- Could NOT find FLEX (missing: FLEX_EXECUTABLE) 14:55:11 -- Could NOT find BISON (missing: BISON_EXECUTABLE) 14:55:11 CMake Warning at CMakeLists.txt:115 (message): 14:55:11 Missing Bison. 14:55:11 14:55:11 You won't be able to generate source codes from changed flex/bison files. 14:55:11 14:55:11 Compiling libyang should still works fine. 14:55:11 14:55:11 14:55:11 CMake Warning at CMakeLists.txt:171 (message): 14:55:11 Missing tools (devscripts, debhelper package) for building deb package. 14:55:11 14:55:11 You won't be able to generate deb package from source code. 14:55:11 14:55:11 Compiling libyang should still works fine. 14:55:11 14:55:11 14:55:11 CMake Warning at CMakeLists.txt:182 (message): 14:55:11 Missing tools (rpm package) for building rpm package. 14:55:11 14:55:11 You won't be able to generate rpm package from source code. 14:55:11 14:55:11 Compiling libyang should still works fine. 14:55:11 14:55:11 14:55:11 -- Looking for vdprintf 14:55:11 -- Looking for vdprintf - found 14:55:11 -- Looking for pthread.h 14:55:11 -- Looking for pthread.h - found 14:55:11 -- Performing Test CMAKE_HAVE_LIBC_PTHREAD 14:55:11 -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success 14:55:11 -- Found Threads: TRUE 14:55:11 -- Found PCRE: /usr/lib/libpcre.so 14:55:11 -- Found PkgConfig: /usr/bin/pkg-config (found version "1.6.3") 14:55:11 -- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 14:55:11 -- Configuring done 14:55:12 -- Generating done 14:55:12 -- Build files have been written to: /usr/src/libyang/build 14:55:12 + make -j2 14:55:12 Scanning dependencies of target yangobj 14:55:12 Scanning dependencies of target yangobj_tests 14:55:12 [ 1%] Building C object CMakeFiles/yangobj.dir/src/common.c.o 14:55:12 [ 2%] Building C object CMakeFiles/yangobj_tests.dir/src/common.c.o 14:55:12 [ 3%] Building C object CMakeFiles/yangobj_tests.dir/src/context.c.o 14:55:12 [ 5%] Building C object CMakeFiles/yangobj.dir/src/context.c.o 14:55:13 [ 6%] Building C object CMakeFiles/yangobj_tests.dir/src/log.c.o 14:55:13 [ 7%] Building C object CMakeFiles/yangobj.dir/src/log.c.o 14:55:13 [ 8%] Building C object CMakeFiles/yangobj_tests.dir/src/hash_table.c.o 14:55:13 /usr/src/libyang/src/hash_table.c: In function 'lyht_dbgprint_ht': 14:55:13 /usr/src/libyang/src/hash_table.c:634:17: warning: variable 'i_len' set but not used [-Wunused-but-set-variable] 14:55:13 634 | uint32_t i, i_len; 14:55:13 | ^~~~~ 14:55:13 /usr/src/libyang/src/hash_table.c:631:53: warning: unused parameter 'info' [-Wunused-parameter] 14:55:13 631 | lyht_dbgprint_ht(struct hash_table *ht, const char *info) 14:55:13 | ~~~~~~~~~~~~^~~~ 14:55:13 /usr/src/libyang/src/hash_table.c: In function 'lyht_dbgprint_value': 14:55:13 /usr/src/libyang/src/hash_table.c:665:43: warning: unused parameter 'hash' [-Wunused-parameter] 14:55:13 665 | lyht_dbgprint_value(void *val_p, uint32_t hash, uint16_t rec_size, const char *operation) 14:55:13 | ~~~~~~~~~^~~~ 14:55:13 /usr/src/libyang/src/hash_table.c:665:80: warning: unused parameter 'operation' [-Wunused-parameter] 14:55:13 665 | lyht_dbgprint_value(void *val_p, uint32_t hash, uint16_t rec_size, const char *operation) 14:55:13 | ~~~~~~~~~~~~^~~~~~~~~ 14:55:13 [ 10%] Building C object CMakeFiles/yangobj.dir/src/hash_table.c.o 14:55:13 /usr/src/libyang/src/hash_table.c: In function 'lyht_dbgprint_ht': 14:55:13 /usr/src/libyang/src/hash_table.c:634:17: warning: variable 'i_len' set but not used [-Wunused-but-set-variable] 14:55:13 634 | uint32_t i, i_len; 14:55:13 | ^~~~~ 14:55:13 /usr/src/libyang/src/hash_table.c:631:53: warning: unused parameter 'info' [-Wunused-parameter] 14:55:13 631 | lyht_dbgprint_ht(struct hash_table *ht, const char *info) 14:55:13 | ~~~~~~~~~~~~^~~~ 14:55:13 /usr/src/libyang/src/hash_table.c: In function 'lyht_dbgprint_value': 14:55:13 /usr/src/libyang/src/hash_table.c:665:43: warning: unused parameter 'hash' [-Wunused-parameter] 14:55:13 665 | lyht_dbgprint_value(void *val_p, uint32_t hash, uint16_t rec_size, const char *operation) 14:55:13 | ~~~~~~~~~^~~~ 14:55:13 /usr/src/libyang/src/hash_table.c:665:80: warning: unused parameter 'operation' [-Wunused-parameter] 14:55:13 665 | lyht_dbgprint_value(void *val_p, uint32_t hash, uint16_t rec_size, const char *operation) 14:55:13 | ~~~~~~~~~~~~^~~~~~~~~ 14:55:13 [ 11%] Building C object CMakeFiles/yangobj_tests.dir/src/resolve.c.o 14:55:14 [ 12%] Building C object CMakeFiles/yangobj.dir/src/resolve.c.o 14:55:15 /usr/src/libyang/src/resolve.c: In function 'resolve_instid': 14:55:15 /usr/src/libyang/src/resolve.c:7869:9: warning: 'mod_len' may be used uninitialized in this function [-Wmaybe-uninitialized] 14:55:15 7869 | int mod_len, name_len, has_predicate; 14:55:15 | ^~~~~~~ 14:55:15 /usr/src/libyang/src/resolve.c: In function 'resolve_instid': 14:55:15 /usr/src/libyang/src/resolve.c:7869:9: warning: 'mod_len' may be used uninitialized in this function [-Wmaybe-uninitialized] 14:55:15 7869 | int mod_len, name_len, has_predicate; 14:55:15 | ^~~~~~~ 14:55:16 [ 13%] Building C object CMakeFiles/yangobj_tests.dir/src/validation.c.o 14:55:16 [ 15%] Building C object CMakeFiles/yangobj.dir/src/validation.c.o 14:55:16 [ 16%] Building C object CMakeFiles/yangobj_tests.dir/src/xml.c.o 14:55:16 [ 17%] Building C object CMakeFiles/yangobj.dir/src/xml.c.o 14:55:17 [ 18%] Building C object CMakeFiles/yangobj_tests.dir/src/parser.c.o 14:55:17 [ 20%] Building C object CMakeFiles/yangobj.dir/src/parser.c.o 14:55:18 [ 21%] Building C object CMakeFiles/yangobj_tests.dir/src/parser_yin.c.o 14:55:18 [ 22%] Building C object CMakeFiles/yangobj.dir/src/parser_yin.c.o 14:55:22 [ 23%] Building C object CMakeFiles/yangobj_tests.dir/src/parser_xml.c.o 14:55:22 [ 25%] Building C object CMakeFiles/yangobj.dir/src/parser_xml.c.o 14:55:22 [ 26%] Building C object CMakeFiles/yangobj_tests.dir/src/parser_json.c.o 14:55:22 [ 27%] Building C object CMakeFiles/yangobj.dir/src/parser_json.c.o 14:55:23 [ 28%] Building C object CMakeFiles/yangobj_tests.dir/src/parser_lyb.c.o 14:55:23 [ 30%] Building C object CMakeFiles/yangobj.dir/src/parser_lyb.c.o 14:55:23 [ 31%] Building C object CMakeFiles/yangobj_tests.dir/src/parser_yang_bis.c.o 14:55:23 [ 32%] Building C object CMakeFiles/yangobj.dir/src/parser_yang_bis.c.o 14:55:26 [ 33%] Building C object CMakeFiles/yangobj.dir/src/parser_yang_lex.c.o 14:55:27 [ 35%] Building C object CMakeFiles/yangobj_tests.dir/src/parser_yang_lex.c.o 14:55:27 [ 36%] Building C object CMakeFiles/yangobj.dir/src/parser_yang.c.o 14:55:27 [ 37%] Building C object CMakeFiles/yangobj_tests.dir/src/parser_yang.c.o 14:55:28 [ 38%] Building C object CMakeFiles/yangobj.dir/src/tree_schema.c.o 14:55:29 [ 40%] Building C object CMakeFiles/yangobj_tests.dir/src/tree_schema.c.o 14:55:30 [ 41%] Building C object CMakeFiles/yangobj.dir/src/tree_data.c.o 14:55:31 [ 42%] Building C object CMakeFiles/yangobj_tests.dir/src/tree_data.c.o 14:55:32 [ 43%] Building C object CMakeFiles/yangobj.dir/src/plugins.c.o 14:55:32 [ 45%] Building C object CMakeFiles/yangobj.dir/src/printer.c.o 14:55:33 [ 46%] Building C object CMakeFiles/yangobj_tests.dir/src/plugins.c.o 14:55:33 [ 47%] Building C object CMakeFiles/yangobj.dir/src/xpath.c.o 14:55:33 [ 48%] Building C object CMakeFiles/yangobj_tests.dir/src/printer.c.o 14:55:33 [ 50%] Building C object CMakeFiles/yangobj_tests.dir/src/xpath.c.o 14:55:35 /usr/src/libyang/src/xpath.c: In function 'eval_predicate': 14:55:35 /usr/src/libyang/src/xpath.c:958:28: warning: 'end' may be used uninitialized in this function [-Wmaybe-uninitialized] 14:55:35 958 | uint16_t i, orig_used, end; 14:55:35 | ^~~ 14:55:35 [ 51%] Building C object CMakeFiles/yangobj.dir/src/printer_yang.c.o 14:55:35 /usr/src/libyang/src/xpath.c: In function 'eval_predicate': 14:55:35 /usr/src/libyang/src/xpath.c:958:28: warning: 'end' may be used uninitialized in this function [-Wmaybe-uninitialized] 14:55:35 958 | uint16_t i, orig_used, end; 14:55:35 | ^~~ 14:55:36 [ 52%] Building C object CMakeFiles/yangobj_tests.dir/src/printer_yang.c.o 14:55:36 [ 53%] Building C object CMakeFiles/yangobj.dir/src/printer_yin.c.o 14:55:37 [ 55%] Building C object CMakeFiles/yangobj_tests.dir/src/printer_yin.c.o 14:55:38 [ 56%] Building C object CMakeFiles/yangobj.dir/src/printer_json_schema.c.o 14:55:38 [ 57%] Building C object CMakeFiles/yangobj_tests.dir/src/printer_json_schema.c.o 14:55:38 [ 58%] Building C object CMakeFiles/yangobj.dir/src/printer_xml.c.o 14:55:38 [ 60%] Building C object CMakeFiles/yangobj.dir/src/printer_tree.c.o 14:55:39 [ 61%] Building C object CMakeFiles/yangobj_tests.dir/src/printer_xml.c.o 14:55:39 [ 62%] Building C object CMakeFiles/yangobj.dir/src/printer_info.c.o 14:55:39 [ 63%] Building C object CMakeFiles/yangobj_tests.dir/src/printer_tree.c.o 14:55:39 [ 65%] Building C object CMakeFiles/yangobj_tests.dir/src/printer_info.c.o 14:55:39 [ 66%] Building C object CMakeFiles/yangobj.dir/src/printer_json.c.o 14:55:40 [ 67%] Building C object CMakeFiles/yangobj.dir/src/printer_lyb.c.o 14:55:40 [ 68%] Building C object CMakeFiles/yangobj_tests.dir/src/printer_json.c.o 14:55:40 [ 70%] Building C object CMakeFiles/yangobj.dir/src/yang_types.c.o 14:55:40 [ 71%] Building C object CMakeFiles/yangobj_tests.dir/src/printer_lyb.c.o 14:55:40 [ 71%] Built target yangobj 14:55:40 Scanning dependencies of target yang2yin 14:55:40 [ 72%] Building C object CMakeFiles/yang2yin.dir/tools/yang2yin/main.c.o 14:55:40 [ 73%] Building C object CMakeFiles/yangobj_tests.dir/src/yang_types.c.o 14:55:40 [ 73%] Built target yangobj_tests 14:55:40 Scanning dependencies of target yang 14:55:40 [ 75%] Linking C shared library libyang.so 14:55:40 [ 75%] Built target yang 14:55:40 Scanning dependencies of target yanglint 14:55:40 [ 76%] Building C object CMakeFiles/yanglint.dir/tools/lint/main.c.o 14:55:40 [ 77%] Building C object CMakeFiles/yanglint.dir/tools/lint/main_ni.c.o 14:55:40 [ 78%] Linking C executable yang2yin 14:55:41 [ 78%] Built target yang2yin 14:55:41 Scanning dependencies of target yangre 14:55:41 [ 80%] Building C object CMakeFiles/yangre.dir/tools/re/main.c.o 14:55:41 [ 81%] Linking C executable yangre 14:55:41 [ 81%] Built target yangre 14:55:41 Scanning dependencies of target metadata 14:55:41 [ 82%] Building C object src/extensions/CMakeFiles/metadata.dir/metadata.c.o 14:55:41 [ 83%] Linking C shared library metadata.so 14:55:41 [ 83%] Built target metadata 14:55:41 Scanning dependencies of target yangdata 14:55:41 [ 85%] Building C object src/extensions/CMakeFiles/yangdata.dir/yangdata.c.o 14:55:41 [ 86%] Linking C shared library yangdata.so 14:55:41 [ 86%] Built target yangdata 14:55:41 [ 88%] Building C object CMakeFiles/yanglint.dir/tools/lint/completion.c.o 14:55:41 [ 88%] Building C object CMakeFiles/yanglint.dir/tools/lint/commands.c.o 14:55:41 [ 90%] Building C object CMakeFiles/yanglint.dir/tools/lint/configuration.c.o 14:55:41 [ 91%] Building C object CMakeFiles/yanglint.dir/linenoise/linenoise.c.o 14:55:41 Scanning dependencies of target nacm 14:55:42 [ 92%] Building C object src/extensions/CMakeFiles/nacm.dir/nacm.c.o 14:55:42 [ 93%] Linking C shared library nacm.so 14:55:42 [ 95%] Linking C executable yanglint 14:55:42 [ 95%] Built target nacm 14:55:42 Scanning dependencies of target user_yang_types 14:55:42 [ 95%] Built target yanglint 14:55:42 [ 96%] Building C object src/user_types/CMakeFiles/user_yang_types.dir/user_yang_types.c.o 14:55:42 Scanning dependencies of target user_inet_types 14:55:42 [ 97%] Building C object src/user_types/CMakeFiles/user_inet_types.dir/user_inet_types.c.o 14:55:42 [ 98%] Linking C shared library user_yang_types.so 14:55:42 [100%] Linking C shared library user_inet_types.so 14:55:42 [100%] Built target user_yang_types 14:55:42 [100%] Built target user_inet_types 14:55:42 + make install 14:55:42 [ 36%] Built target yangobj_tests 14:55:42 [ 72%] Built target yangobj 14:55:42 [ 73%] Built target yang 14:55:42 [ 82%] Built target yanglint 14:55:42 [ 85%] Built target yangre 14:55:42 [ 87%] Built target yang2yin 14:55:42 [ 90%] Built target metadata 14:55:42 [ 92%] Built target yangdata 14:55:42 [ 95%] Built target nacm 14:55:42 [ 97%] Built target user_yang_types 14:55:42 [100%] Built target user_inet_types 14:55:42 Install the project... 14:55:42 -- Install configuration: "Release" 14:55:42 -- Installing: /opt/lib64/libyang.so.1.4.1 14:55:42 -- Installing: /opt/lib64/libyang.so.1 14:55:42 -- Installing: /opt/lib64/libyang.so 14:55:42 -- Installing: /opt/include/libyang/tree_schema.h 14:55:42 -- Installing: /opt/include/libyang/tree_data.h 14:55:42 -- Installing: /opt/include/libyang/extensions.h 14:55:42 -- Installing: /opt/include/libyang/user_types.h 14:55:42 -- Installing: /opt/include/libyang/xml.h 14:55:42 -- Installing: /opt/include/libyang/dict.h 14:55:42 -- Installing: /opt/include/libyang/libyang.h 14:55:42 -- Installing: /opt/lib64/pkgconfig/libyang.pc 14:55:42 -- Installing: /opt/bin/yanglint 14:55:42 -- Set runtime path of "/opt/bin/yanglint" to "" 14:55:42 -- Installing: /opt/share/man/man1/yanglint.1 14:55:42 -- Installing: /opt/bin/yangre 14:55:42 -- Set runtime path of "/opt/bin/yangre" to "" 14:55:42 -- Installing: /opt/share/man/man1/yangre.1 14:55:42 -- Installing: /opt/lib64/libyang/extensions/nacm.so 14:55:42 -- Set runtime path of "/opt/lib64/libyang/extensions/nacm.so" to "" 14:55:42 -- Installing: /opt/lib64/libyang/extensions/metadata.so 14:55:42 -- Set runtime path of "/opt/lib64/libyang/extensions/metadata.so" to "" 14:55:42 -- Installing: /opt/lib64/libyang/extensions/yangdata.so 14:55:42 -- Set runtime path of "/opt/lib64/libyang/extensions/yangdata.so" to "" 14:55:42 -- Installing: /opt/lib64/libyang/user_types/user_yang_types.so 14:55:42 -- Set runtime path of "/opt/lib64/libyang/user_types/user_yang_types.so" to "" 14:55:42 -- Installing: /opt/lib64/libyang/user_types/user_inet_types.so 14:55:42 -- Set runtime path of "/opt/lib64/libyang/user_types/user_inet_types.so" to "" 14:55:43 Removing intermediate container aa01ee12b1a4 14:55:43 ---> bbdbc9c14c58 14:55:43 Step 14/47 : RUN set -eux && git clone --depth 1 https://github.com/sysrepo/libredblack.git && cd libredblack && ./configure --prefix=/opt --without-rbgen && make && make install 14:55:44 ---> Running in e76417c06cdb 14:55:44 + git clone --depth 1 https://github.com/sysrepo/libredblack.git 14:55:44 Cloning into 'libredblack'... 14:55:45 + cd libredblack 14:55:45 + ./configure '--prefix=/opt' --without-rbgen 14:55:45 checking for a BSD-compatible install... /usr/bin/install -c 14:55:46 checking whether build environment is sane... yes 14:55:46 checking for gawk... no 14:55:46 checking for mawk... no 14:55:46 checking for nawk... no 14:55:46 checking for awk... awk 14:55:46 checking whether make sets $(MAKE)... yes 14:55:46 checking for gcc... gcc 14:55:46 checking for C compiler default output... a.out 14:55:46 checking whether the C compiler works... yes 14:55:46 checking whether we are cross compiling... no 14:55:46 checking for suffix of executables... 14:55:46 checking for suffix of object files... o 14:55:46 checking whether we are using the GNU C compiler... yes 14:55:46 checking whether gcc accepts -g... yes 14:55:46 checking for gcc option to accept ANSI C... none needed 14:55:46 checking for style of include used by make... GNU 14:55:47 checking dependency style of gcc... gcc3 14:55:47 checking for a BSD-compatible install... /usr/bin/install -c 14:55:47 checking build system type... x86_64-unknown-linux-gnu 14:55:47 checking host system type... x86_64-unknown-linux-gnu 14:55:47 checking for ld used by GCC... /usr/x86_64-alpine-linux-musl/bin/ld 14:55:47 checking if the linker (/usr/x86_64-alpine-linux-musl/bin/ld) is GNU ld... yes 14:55:47 checking for /usr/x86_64-alpine-linux-musl/bin/ld option to reload object files... -r 14:55:47 checking for BSD-compatible nm... /usr/bin/nm -B 14:55:47 checking for a sed that does not truncate output... /bin/sed 14:55:47 checking whether ln -s works... yes 14:55:47 checking how to recognise dependent libraries... pass_all 14:55:47 checking command to parse /usr/bin/nm -B output... ok 14:55:47 checking how to run the C preprocessor... gcc -E 14:55:47 checking for egrep... grep -E 14:55:47 checking for ANSI C header files... yes 14:55:47 checking for sys/types.h... yes 14:55:47 checking for sys/stat.h... yes 14:55:47 checking for stdlib.h... yes 14:55:47 checking for string.h... yes 14:55:47 checking for memory.h... yes 14:55:47 checking for strings.h... yes 14:55:47 checking for inttypes.h... yes 14:55:47 checking for stdint.h... yes 14:55:47 checking for unistd.h... yes 14:55:47 checking dlfcn.h usability... yes 14:55:47 checking dlfcn.h presence... yes 14:55:47 checking for dlfcn.h... yes 14:55:47 checking for ranlib... ranlib 14:55:47 checking for strip... strip 14:55:47 checking for objdir... .libs 14:55:47 checking for gcc option to produce PIC... -fPIC 14:55:47 checking if gcc PIC flag -fPIC works... yes 14:55:47 checking if gcc static flag -static works... yes 14:55:47 checking if gcc supports -c -o file.o... yes 14:55:48 checking if gcc supports -c -o file.lo... yes 14:55:48 checking if gcc supports -fno-rtti -fno-exceptions... yes 14:55:48 checking whether the linker (/usr/x86_64-alpine-linux-musl/bin/ld) supports shared libraries... yes 14:55:48 checking how to hardcode library paths into programs... immediate 14:55:48 checking whether stripping libraries is possible... yes 14:55:48 checking dynamic linker characteristics... GNU/Linux ld.so 14:55:48 checking if libtool supports shared libraries... yes 14:55:48 checking whether to build shared libraries... yes 14:55:48 checking whether to build static libraries... yes 14:55:48 checking whether -lc should be explicitly linked in... no 14:55:48 creating libtool 14:55:48 checking for ANSI C header files... (cached) yes 14:55:48 checking for an ANSI C-conforming const... yes 14:55:48 checking for strdup... yes 14:55:48 configure: creating ./config.status 14:55:48 config.status: creating Makefile 14:55:48 config.status: creating libredblack.spec 14:55:48 config.status: creating rbgen 14:55:48 config.status: creating config.h 14:55:48 config.status: executing depfiles commands 14:55:48 config.status: executing default commands 14:55:48 + make 14:55:48 cd . && /bin/sh /usr/src/libredblack/missing --run aclocal-1.6 14:55:48 /usr/src/libredblack/missing: line 46: aclocal-1.6: not found 14:55:48 WARNING: `aclocal-1.6' is missing on your system. You should only need it if 14:55:48 you modified `acinclude.m4' or `configure.in'. You might want 14:55:48 to install the `Automake' and `Perl' packages. Grab them from 14:55:48 any GNU archive site. 14:55:48 cd . && \ 14:55:48 /bin/sh /usr/src/libredblack/missing --run automake-1.6 --gnu Makefile 14:55:48 /usr/src/libredblack/missing: line 46: automake-1.6: not found 14:55:48 WARNING: `automake-1.6' is missing on your system. You should only need it if 14:55:48 you modified `Makefile.am', `acinclude.m4' or `configure.in'. 14:55:48 You might want to install the `Automake' and `Perl' packages. 14:55:48 Grab them from any GNU archive site. 14:55:48 cd . && /bin/sh /usr/src/libredblack/missing --run autoconf 14:55:49 /bin/sh ./config.status --recheck 14:55:49 running /bin/sh ./configure --prefix=/opt --without-rbgen --no-create --no-recursion 14:55:49 checking for a BSD-compatible install... /usr/bin/install -c 14:55:50 checking whether build environment is sane... yes 14:55:50 checking for gawk... no 14:55:50 checking for mawk... no 14:55:50 checking for nawk... no 14:55:50 checking for awk... awk 14:55:50 checking whether make sets $(MAKE)... yes 14:55:50 checking for gcc... gcc 14:55:50 checking whether the C compiler works... yes 14:55:50 checking for C compiler default output file name... a.out 14:55:50 checking for suffix of executables... 14:55:50 checking whether we are cross compiling... no 14:55:50 checking for suffix of object files... o 14:55:50 checking whether we are using the GNU C compiler... yes 14:55:50 checking whether gcc accepts -g... yes 14:55:50 checking for gcc option to accept ISO C89... none needed 14:55:50 checking for style of include used by make... GNU 14:55:50 checking dependency style of gcc... gcc3 14:55:50 checking build system type... x86_64-unknown-linux-gnu 14:55:50 checking host system type... x86_64-unknown-linux-gnu 14:55:50 checking for ld used by GCC... /usr/x86_64-alpine-linux-musl/bin/ld 14:55:50 checking if the linker (/usr/x86_64-alpine-linux-musl/bin/ld) is GNU ld... yes 14:55:50 checking for /usr/x86_64-alpine-linux-musl/bin/ld option to reload object files... -r 14:55:50 checking for BSD-compatible nm... /usr/bin/nm -B 14:55:50 checking for a sed that does not truncate output... /bin/sed 14:55:50 checking whether ln -s works... yes 14:55:50 checking how to recognise dependent libraries... pass_all 14:55:50 checking command to parse /usr/bin/nm -B output... ok 14:55:50 checking how to run the C preprocessor... gcc -E 14:55:50 checking for grep that handles long lines and -e... /bin/grep 14:55:50 checking for egrep... /bin/grep -E 14:55:50 checking for ANSI C header files... yes 14:55:51 checking for sys/types.h... yes 14:55:51 checking for sys/stat.h... yes 14:55:51 checking for stdlib.h... yes 14:55:51 checking for string.h... yes 14:55:51 checking for memory.h... yes 14:55:51 checking for strings.h... yes 14:55:51 checking for inttypes.h... yes 14:55:51 checking for stdint.h... yes 14:55:51 checking for unistd.h... yes 14:55:51 checking dlfcn.h usability... yes 14:55:51 checking dlfcn.h presence... yes 14:55:51 checking for dlfcn.h... yes 14:55:51 checking for ranlib... ranlib 14:55:51 checking for strip... strip 14:55:51 checking for objdir... .libs 14:55:51 checking for gcc option to produce PIC... -fPIC 14:55:51 checking if gcc PIC flag -fPIC works... yes 14:55:51 checking if gcc static flag -static works... yes 14:55:51 checking if gcc supports -c -o file.o... yes 14:55:51 checking if gcc supports -c -o file.lo... yes 14:55:51 checking if gcc supports -fno-rtti -fno-exceptions... no 14:55:51 checking whether the linker (/usr/x86_64-alpine-linux-musl/bin/ld) supports shared libraries... yes 14:55:51 checking how to hardcode library paths into programs... immediate 14:55:51 checking whether stripping libraries is possible... yes 14:55:51 checking dynamic linker characteristics... GNU/Linux ld.so 14:55:51 checking if libtool supports shared libraries... yes 14:55:51 checking whether to build shared libraries... yes 14:55:51 checking whether to build static libraries... yes 14:55:51 checking whether -lc should be explicitly linked in... no 14:55:51 creating libtool 14:55:51 checking for ANSI C header files... (cached) yes 14:55:51 checking for an ANSI C-conforming const... yes 14:55:51 checking for strdup... yes 14:55:51 configure: creating ./config.status 14:55:51 cd . && /bin/sh ./config.status Makefile depfiles 14:55:51 config.status: creating Makefile 14:55:51 config.status: WARNING: 'Makefile.in' seems to ignore the --datarootdir setting 14:55:51 config.status: executing depfiles commands 14:55:51 cd . && /bin/sh /usr/src/libredblack/missing --run autoheader 14:55:52 touch ./config.h.in 14:55:52 cd . && /bin/sh ./config.status config.h 14:55:52 config.status: creating config.h 14:55:52 make all-am 14:55:52 make[1]: Entering directory '/usr/src/libredblack' 14:55:52 source='redblack.c' object='redblack.lo' libtool=yes \ 14:55:52 depfile='.deps/redblack.Plo' tmpdepfile='.deps/redblack.TPlo' \ 14:55:52 depmode=gcc3 /bin/sh ./depcomp \ 14:55:52 /bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -Wall -c -o redblack.lo `test -f 'redblack.c' || echo './'`redblack.c 14:55:52 mkdir .libs 14:55:52 gcc -DHAVE_CONFIG_H -I. -I. -I. -Wall -c redblack.c -MT redblack.lo -MD -MP -MF .deps/redblack.TPlo -fPIC -DPIC -o .libs/redblack.lo 14:55:52 redblack.c: In function 'rbinit': 14:55:52 redblack.c:143:7: warning: variable 'c' set but not used [-Wunused-but-set-variable] 14:55:52 143 | char c; 14:55:52 | ^ 14:55:52 gcc -DHAVE_CONFIG_H -I. -I. -I. -Wall -c redblack.c -MT redblack.lo -MD -MP -MF .deps/redblack.TPlo -o redblack.o >/dev/null 2>&1 14:55:52 mv -f .libs/redblack.lo redblack.lo 14:55:52 /bin/sh ./libtool --mode=link gcc -Wall -o libredblack.la -rpath /opt/lib -version-info 2:3:2 redblack.lo 14:55:52 rm -fr .libs/libredblack.la .libs/libredblack.* .libs/libredblack.* 14:55:52 gcc -shared redblack.lo -Wl,-soname -Wl,libredblack.so.0 -o .libs/libredblack.so.0.2.3 14:55:52 (cd .libs && rm -f libredblack.so.0 && ln -s libredblack.so.0.2.3 libredblack.so.0) 14:55:52 (cd .libs && rm -f libredblack.so && ln -s libredblack.so.0.2.3 libredblack.so) 14:55:52 ar cru .libs/libredblack.a redblack.o 14:55:52 ar: `u' modifier ignored since `D' is the default (see `U') 14:55:52 ranlib .libs/libredblack.a 14:55:52 creating libredblack.la 14:55:52 (cd .libs && rm -f libredblack.la && ln -s ../libredblack.la libredblack.la) 14:55:52 source='example.c' object='example.o' libtool=no \ 14:55:52 depfile='.deps/example.Po' tmpdepfile='.deps/example.TPo' \ 14:55:52 depmode=gcc3 /bin/sh ./depcomp \ 14:55:52 gcc -DHAVE_CONFIG_H -I. -I. -I. -Wall -c `test -f 'example.c' || echo './'`example.c 14:55:52 /bin/sh ./libtool --mode=link gcc -Wall -o example example.o libredblack.la 14:55:52 gcc -Wall -o .libs/example example.o ./.libs/libredblack.so -Wl,--rpath -Wl,/opt/lib 14:55:52 creating example 14:55:52 source='example1.c' object='example1.o' libtool=no \ 14:55:52 depfile='.deps/example1.Po' tmpdepfile='.deps/example1.TPo' \ 14:55:52 depmode=gcc3 /bin/sh ./depcomp \ 14:55:52 gcc -DHAVE_CONFIG_H -I. -I. -I. -Wall -c `test -f 'example1.c' || echo './'`example1.c 14:55:52 /bin/sh ./libtool --mode=link gcc -Wall -o example1 example1.o libredblack.la 14:55:52 gcc -Wall -o .libs/example1 example1.o ./.libs/libredblack.so -Wl,--rpath -Wl,/opt/lib 14:55:52 creating example1 14:55:52 source='example2.c' object='example2.o' libtool=no \ 14:55:52 depfile='.deps/example2.Po' tmpdepfile='.deps/example2.TPo' \ 14:55:52 depmode=gcc3 /bin/sh ./depcomp \ 14:55:52 gcc -DHAVE_CONFIG_H -I. -I. -I. -Wall -c `test -f 'example2.c' || echo './'`example2.c 14:55:52 /bin/sh ./libtool --mode=link gcc -Wall -o example2 example2.o libredblack.la 14:55:52 gcc -Wall -o .libs/example2 example2.o ./.libs/libredblack.so -Wl,--rpath -Wl,/opt/lib 14:55:52 creating example2 14:55:52 source='example3.c' object='example3.o' libtool=no \ 14:55:52 depfile='.deps/example3.Po' tmpdepfile='.deps/example3.TPo' \ 14:55:52 depmode=gcc3 /bin/sh ./depcomp \ 14:55:52 gcc -DHAVE_CONFIG_H -I. -I. -I. -Wall -c `test -f 'example3.c' || echo './'`example3.c 14:55:52 /bin/sh ./libtool --mode=link gcc -Wall -o example3 example3.o libredblack.la 14:55:52 gcc -Wall -o .libs/example3 example3.o ./.libs/libredblack.so -Wl,--rpath -Wl,/opt/lib 14:55:52 creating example3 14:55:52 echo 'int main() { return(0); }' > example4.c 14:55:52 source='example4.c' object='example4.o' libtool=no \ 14:55:52 depfile='.deps/example4.Po' tmpdepfile='.deps/example4.TPo' \ 14:55:52 depmode=gcc3 /bin/sh ./depcomp \ 14:55:52 gcc -DHAVE_CONFIG_H -I. -I. -I. -Wall -c `test -f 'example4.c' || echo './'`example4.c 14:55:52 /bin/sh ./libtool --mode=link gcc -Wall -o example4 example4.o 14:55:52 gcc -Wall -o example4 example4.o 14:55:52 make[1]: Leaving directory '/usr/src/libredblack' 14:55:52 + make install 14:55:52 make[1]: Entering directory '/usr/src/libredblack' 14:55:52 /bin/sh ./mkinstalldirs /opt/bin 14:55:52 /bin/sh ./mkinstalldirs /opt/lib 14:55:52 mkdir -p -- /opt/lib 14:55:52 /bin/sh ./libtool --mode=install /usr/bin/install -c libredblack.la /opt/lib/libredblack.la 14:55:52 /usr/bin/install -c .libs/libredblack.so.0.2.3 /opt/lib/libredblack.so.0.2.3 14:55:52 (cd /opt/lib && rm -f libredblack.so.0 && ln -s libredblack.so.0.2.3 libredblack.so.0) 14:55:52 (cd /opt/lib && rm -f libredblack.so && ln -s libredblack.so.0.2.3 libredblack.so) 14:55:52 /usr/bin/install -c .libs/libredblack.lai /opt/lib/libredblack.la 14:55:52 /usr/bin/install -c .libs/libredblack.a /opt/lib/libredblack.a 14:55:52 ranlib /opt/lib/libredblack.a 14:55:52 chmod 644 /opt/lib/libredblack.a 14:55:52 PATH="$PATH:/sbin" ldconfig -n /opt/lib 14:55:52 ---------------------------------------------------------------------- 14:55:52 Libraries have been installed in: 14:55:52 /opt/lib 14:55:52 14:55:52 If you ever happen to want to link against installed libraries 14:55:52 in a given directory, LIBDIR, you must either use libtool, and 14:55:52 specify the full pathname of the library, or use the `-LLIBDIR' 14:55:52 flag during linking and do at least one of the following: 14:55:52 - add LIBDIR to the `LD_LIBRARY_PATH' environment variable 14:55:52 during execution 14:55:52 - add LIBDIR to the `LD_RUN_PATH' environment variable 14:55:52 during linking 14:55:52 - use the `-Wl,--rpath -Wl,LIBDIR' linker flag 14:55:52 14:55:52 See any operating system documentation about shared libraries for 14:55:52 more information, such as the ld(1) and ld.so(8) manual pages. 14:55:52 ---------------------------------------------------------------------- 14:55:52 /bin/sh ./mkinstalldirs /opt/include 14:55:52 /usr/bin/install -c -m 644 redblack.h /opt/include/redblack.h 14:55:52 /bin/sh ./mkinstalldirs /opt/share/man/man1 14:55:52 /usr/bin/install -c -m 644 ./rbgen.1 /opt/share/man/man1/rbgen.1 14:55:52 /bin/sh ./mkinstalldirs /opt/share/man/man3 14:55:52 mkdir -p -- /opt/share/man/man3 14:55:52 /usr/bin/install -c -m 644 ./rbdelete.3 /opt/share/man/man3/rbdelete.3 14:55:52 /usr/bin/install -c -m 644 ./rbdestroy.3 /opt/share/man/man3/rbdestroy.3 14:55:52 /usr/bin/install -c -m 644 ./rbfind.3 /opt/share/man/man3/rbfind.3 14:55:52 /usr/bin/install -c -m 644 ./rbinit.3 /opt/share/man/man3/rbinit.3 14:55:52 /usr/bin/install -c -m 644 ./rbsearch.3 /opt/share/man/man3/rbsearch.3 14:55:52 /usr/bin/install -c -m 644 ./rblookup.3 /opt/share/man/man3/rblookup.3 14:55:52 /usr/bin/install -c -m 644 ./rbwalk.3 /opt/share/man/man3/rbwalk.3 14:55:52 /usr/bin/install -c -m 644 ./rbopenlist.3 /opt/share/man/man3/rbopenlist.3 14:55:52 /usr/bin/install -c -m 644 ./rbreadlist.3 /opt/share/man/man3/rbreadlist.3 14:55:52 /usr/bin/install -c -m 644 ./rbcloselist.3 /opt/share/man/man3/rbcloselist.3 14:55:52 /bin/sh ./mkinstalldirs /opt/share/libredblack 14:55:52 mkdir -p -- /opt/share/libredblack 14:55:52 /usr/bin/install -c -m 644 redblack.c /opt/share/libredblack/redblack.c 14:55:52 /usr/bin/install -c -m 644 redblack.h /opt/share/libredblack/redblack.h 14:55:52 make[1]: Leaving directory '/usr/src/libredblack' 14:55:53 Removing intermediate container e76417c06cdb 14:55:53 ---> f6891a48edeb 14:55:53 Step 15/47 : RUN set -eux && git clone --branch $zlog_version --depth 1 https://github.com/HardySimpson/zlog && cd zlog/src && make PREFIX=/opt && make install PREFIX=/opt 14:55:53 ---> Running in eef81572a29e 14:55:53 + git clone --branch 1.2.14 --depth 1 https://github.com/HardySimpson/zlog 14:55:53 Cloning into 'zlog'... 14:55:54 + cd zlog/src 14:55:54 + make 'PREFIX=/opt' 14:55:54 cc -std=c99 -pedantic -c -O2 -fPIC -pthread -Wall -Wstrict-prototypes -fwrapv -g -ggdb buf.c 14:55:54 cc -std=c99 -pedantic -c -O2 -fPIC -pthread -Wall -Wstrict-prototypes -fwrapv -g -ggdb category.c 14:55:54 cc -std=c99 -pedantic -c -O2 -fPIC -pthread -Wall -Wstrict-prototypes -fwrapv -g -ggdb category_table.c 14:55:54 cc -std=c99 -pedantic -c -O2 -fPIC -pthread -Wall -Wstrict-prototypes -fwrapv -g -ggdb conf.c 14:55:55 cc -std=c99 -pedantic -c -O2 -fPIC -pthread -Wall -Wstrict-prototypes -fwrapv -g -ggdb event.c 14:55:55 event.c: In function 'zlog_event_new': 14:55:55 event.c:91:65: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] 14:55:55 91 | a_event->tid_hex_str_len = sprintf(a_event->tid_hex_str, "%x", (unsigned int)a_event->tid); 14:55:55 | ^ 14:55:55 cc -std=c99 -pedantic -c -O2 -fPIC -pthread -Wall -Wstrict-prototypes -fwrapv -g -ggdb format.c 14:55:55 cc -std=c99 -pedantic -c -O2 -fPIC -pthread -Wall -Wstrict-prototypes -fwrapv -g -ggdb level.c 14:55:55 cc -std=c99 -pedantic -c -O2 -fPIC -pthread -Wall -Wstrict-prototypes -fwrapv -g -ggdb level_list.c 14:55:55 cc -std=c99 -pedantic -c -O2 -fPIC -pthread -Wall -Wstrict-prototypes -fwrapv -g -ggdb mdc.c 14:55:55 cc -std=c99 -pedantic -c -O2 -fPIC -pthread -Wall -Wstrict-prototypes -fwrapv -g -ggdb record.c 14:55:55 cc -std=c99 -pedantic -c -O2 -fPIC -pthread -Wall -Wstrict-prototypes -fwrapv -g -ggdb record_table.c 14:55:55 cc -std=c99 -pedantic -c -O2 -fPIC -pthread -Wall -Wstrict-prototypes -fwrapv -g -ggdb rotater.c 14:55:55 cc -std=c99 -pedantic -c -O2 -fPIC -pthread -Wall -Wstrict-prototypes -fwrapv -g -ggdb rule.c 14:55:56 cc -std=c99 -pedantic -c -O2 -fPIC -pthread -Wall -Wstrict-prototypes -fwrapv -g -ggdb spec.c 14:55:56 cc -std=c99 -pedantic -c -O2 -fPIC -pthread -Wall -Wstrict-prototypes -fwrapv -g -ggdb thread.c 14:55:56 cc -std=c99 -pedantic -c -O2 -fPIC -pthread -Wall -Wstrict-prototypes -fwrapv -g -ggdb zc_arraylist.c 14:55:56 cc -std=c99 -pedantic -c -O2 -fPIC -pthread -Wall -Wstrict-prototypes -fwrapv -g -ggdb zc_hashtable.c 14:55:56 cc -std=c99 -pedantic -c -O2 -fPIC -pthread -Wall -Wstrict-prototypes -fwrapv -g -ggdb zc_profile.c 14:55:57 cc -std=c99 -pedantic -c -O2 -fPIC -pthread -Wall -Wstrict-prototypes -fwrapv -g -ggdb zc_util.c 14:55:57 cc -std=c99 -pedantic -c -O2 -fPIC -pthread -Wall -Wstrict-prototypes -fwrapv -g -ggdb zlog.c 14:55:57 cc -shared -Wl,-soname,libzlog.so.1.2 -o libzlog.so buf.o category.o category_table.o conf.o event.o format.o level.o level_list.o mdc.o record.o record_table.o rotater.o rule.o spec.o thread.o zc_arraylist.o zc_hashtable.o zc_profile.o zc_util.o zlog.o -pthread 14:55:57 # for use in test folder - linux and requirement for aix runtime 14:55:57 # resolving 14:55:57 cp -f libzlog.so libzlog.so.1 14:55:57 cp -f libzlog.so libzlog.so.1.2 14:55:57 cc -std=c99 -pedantic -c -O2 -fPIC -pthread -Wall -Wstrict-prototypes -fwrapv -g -ggdb zlog-chk-conf.c 14:55:57 ar rcs libzlog.a buf.o category.o category_table.o conf.o event.o format.o level.o level_list.o mdc.o record.o record_table.o rotater.o rule.o spec.o thread.o zc_arraylist.o zc_hashtable.o zc_profile.o zc_util.o zlog.o 14:55:57 cc -o zlog-chk-conf zlog-chk-conf.o -L. -lzlog -pthread 14:55:57 + make install 'PREFIX=/opt' 14:55:57 mkdir -p /opt/include /opt/lib /opt/bin 14:55:57 cp -a zlog.h /opt/include 14:55:57 cp -a zlog-chk-conf /opt/bin 14:55:57 cp -a libzlog.so /opt/lib/libzlog.so.1.2 14:55:57 cd /opt/lib && ln -sf libzlog.so.1.2 libzlog.so.1 14:55:57 cd /opt/lib && ln -sf libzlog.so.1 libzlog.so 14:55:57 cp -a libzlog.a /opt/lib 14:55:58 Removing intermediate container eef81572a29e 14:55:58 ---> 11ce469c116a 14:55:58 Step 16/47 : COPY patches/sysrepo/ ./patches/sysrepo/ 14:55:58 ---> 24683e6965d1 14:55:58 Step 17/47 : RUN set -eux && git clone --branch $sysrepo_version --depth 1 https://github.com/sysrepo/sysrepo.git && cd sysrepo && for p in ../patches/sysrepo/*.patch; do patch -p1 -i $p; done && mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE:String="Release" -DENABLE_TESTS=OFF -DREPOSITORY_LOC:PATH=/opt/etc/sysrepo -DCMAKE_INSTALL_PREFIX:PATH=/opt -DGEN_PYTHON_VERSION=3 -DPYTHON_MODULE_PATH:PATH=/opt/lib/python3.7/site-packages -DBUILD_EXAMPLES=0 -DBUILD_CPP_EXAMPLES=0 .. && make -j2 && make install 14:55:58 ---> Running in 1c52fa9c6af4 14:55:59 + git clone --branch v0.7.9 --depth 1 https://github.com/sysrepo/sysrepo.git 14:55:59 Cloning into 'sysrepo'... 14:55:59 + cd sysrepo 14:55:59 + patch -p1 -i ../patches/sysrepo/01-configurable-PYTHON_MODULE_PATH.patch 14:55:59 patching file swig/python/CMakeLists.txt 14:55:59 + patch -p1 -i ../patches/sysrepo/02-zlog.patch 14:55:59 patching file CMakeLists.txt 14:55:59 patching file src/CMakeLists.txt 14:55:59 patching file src/common/sr_logger.c 14:55:59 patching file src/common/sr_logger.h 14:55:59 patching file src/executables/sysrepocfg.c 14:55:59 patching file src/executables/sysrepoctl.c 14:55:59 patching file src/clientlib/client_library.c 14:55:59 + mkdir build 14:55:59 + cd build 14:55:59 + cmake '-DCMAKE_BUILD_TYPE:String=Release' '-DENABLE_TESTS=OFF' '-DREPOSITORY_LOC:PATH=/opt/etc/sysrepo' '-DCMAKE_INSTALL_PREFIX:PATH=/opt' '-DGEN_PYTHON_VERSION=3' '-DPYTHON_MODULE_PATH:PATH=/opt/lib/python3.7/site-packages' '-DBUILD_EXAMPLES=0' '-DBUILD_CPP_EXAMPLES=0' .. 14:55:59 -- The C compiler identification is GNU 9.3.0 14:56:00 -- The CXX compiler identification is GNU 9.3.0 14:56:00 -- Check for working C compiler: /usr/bin/cc 14:56:00 -- Check for working C compiler: /usr/bin/cc -- works 14:56:00 -- Detecting C compiler ABI info 14:56:00 -- Detecting C compiler ABI info - done 14:56:00 -- Detecting C compile features 14:56:00 -- Detecting C compile features - done 14:56:00 -- Check for working CXX compiler: /usr/bin/c++ 14:56:00 -- Check for working CXX compiler: /usr/bin/c++ -- works 14:56:00 -- Detecting CXX compiler ABI info 14:56:00 -- Detecting CXX compiler ABI info - done 14:56:00 -- Detecting CXX compile features 14:56:00 -- Detecting CXX compile features - done 14:56:00 -- Preparing systemwide build of sysrepo v. 0.7.8 14:56:00 -- sysrepo repository location: /opt/etc/sysrepo 14:56:00 -- Found ev: /usr/lib/libev.so 14:56:00 -- Found yang: /opt/lib64/libyang.so 14:56:00 -- Found protobuf-c: /usr/lib/libprotobuf-c.so 14:56:00 -- Could NOT find avl (missing: AVL_LIBRARY AVL_INCLUDE_DIR) 14:56:00 -- Found redblack: /opt/lib/libredblack.so 14:56:00 -- libredblack will be used for binary tree manipulations. 14:56:00 -- Looking for stdatomic.h 14:56:00 -- Looking for stdatomic.h - found 14:56:00 -- Looking for pthread_rwlockattr_setkind_np 14:56:00 -- Looking for pthread_rwlockattr_setkind_np - not found 14:56:00 -- Looking for getpeereid 14:56:00 -- Looking for getpeereid - not found 14:56:00 -- Looking for getpeerucred 14:56:00 -- Looking for getpeerucred - not found 14:56:00 -- Looking for include file ucred.h 14:56:00 -- Looking for include file ucred.h - not found 14:56:00 -- Looking for pthread_mutex_timedlock 14:56:01 -- Looking for pthread_mutex_timedlock - found 14:56:01 -- Looking for setfsuid 14:56:01 -- Looking for setfsuid - found 14:56:01 -- Looking for fsetxattr 14:56:01 -- Looking for fsetxattr - found 14:56:01 -- Looking for mkstemps 14:56:01 -- Looking for mkstemps - found 14:56:01 -- Performing Test HAVE_STAT_ST_MTIM 14:56:01 -- Performing Test HAVE_STAT_ST_MTIM - Success 14:56:01 -- Looking for F_OFD_SETLKW 14:56:01 -- Looking for F_OFD_SETLKW - found 14:56:01 -- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 14:56:01 -- Found SWIG: /usr/bin/swig (found suitable version "3.0.12", minimum required is "3.0.12") 14:56:01 -- Python version 3 was selected 14:56:01 -- Found PythonLibs: /usr/local/lib/libpython3.7m.so (found suitable version "3.7.7", minimum required is "3") 14:56:01 -- Found PythonInterp: /usr/local/bin/python3.7 (found version "3.7.7") 14:56:01 -- Found SWIG: /usr/bin/swig (found suitable version "3.0.12", minimum required is "3.0.5") 14:56:01 -- Configuring done 14:56:01 -- Generating done 14:56:01 -- Build files have been written to: /usr/src/sysrepo/build 14:56:01 + make -j2 14:56:01 [ 1%] Running C protocol buffer compiler on /usr/src/sysrepo/src/sysrepo.proto 14:56:01 Scanning dependencies of target sysrepo_swig_compilation 14:56:01 [ 3%] Swig compile sysrepo.i for python 14:56:01 Scanning dependencies of target COMMON 14:56:01 [ 5%] Building C object src/CMakeFiles/COMMON.dir/common/sysrepo.pb-c.c.o 14:56:02 [ 7%] Building C object src/CMakeFiles/COMMON.dir/common/sr_common.c.o 14:56:02 [ 9%] Building C object src/CMakeFiles/COMMON.dir/common/sr_utils.c.o 14:56:03 [ 9%] Built target sysrepo_swig_compilation 14:56:03 [ 11%] Building C object src/CMakeFiles/COMMON.dir/common/sr_data_structs.c.o 14:56:03 [ 13%] Building C object src/CMakeFiles/COMMON.dir/common/sr_logger.c.o 14:56:03 [ 15%] Building C object src/CMakeFiles/COMMON.dir/common/sr_protobuf.c.o 14:56:04 [ 17%] Building C object src/CMakeFiles/COMMON.dir/common/sr_mem_mgmt.c.o 14:56:04 [ 19%] Building C object src/CMakeFiles/COMMON.dir/utils/plugins.c.o 14:56:04 [ 21%] Building C object src/CMakeFiles/COMMON.dir/utils/trees.c.o 14:56:04 [ 23%] Building C object src/CMakeFiles/COMMON.dir/utils/values.c.o 14:56:04 [ 25%] Building C object src/CMakeFiles/COMMON.dir/utils/xpath.c.o 14:56:04 [ 25%] Built target COMMON 14:56:04 Scanning dependencies of target SR_SRC 14:56:04 Scanning dependencies of target SR_ENGINE 14:56:05 [ 27%] Building C object src/CMakeFiles/SR_SRC.dir/clientlib/client_library.c.o 14:56:05 [ 29%] Building C object src/CMakeFiles/SR_ENGINE.dir/access_control.c.o 14:56:05 [ 31%] Building C object src/CMakeFiles/SR_ENGINE.dir/connection_manager.c.o 14:56:05 [ 33%] Building C object src/CMakeFiles/SR_ENGINE.dir/cm_session_manager.c.o 14:56:06 [ 35%] Building C object src/CMakeFiles/SR_ENGINE.dir/request_processor.c.o 14:56:06 [ 37%] Building C object src/CMakeFiles/SR_SRC.dir/clientlib/cl_subscription_manager.c.o 14:56:06 [ 39%] Building C object src/CMakeFiles/SR_SRC.dir/clientlib/cl_common.c.o 14:56:07 [ 41%] Building C object src/CMakeFiles/SR_SRC.dir/clientlib/cl_trees.c.o 14:56:07 [ 41%] Built target SR_SRC 14:56:07 [ 43%] Building C object src/CMakeFiles/SR_ENGINE.dir/rp_dt_xpath.c.o 14:56:07 [ 45%] Building C object src/CMakeFiles/SR_ENGINE.dir/rp_dt_lookup.c.o 14:56:07 [ 47%] Building C object src/CMakeFiles/SR_ENGINE.dir/rp_dt_get.c.o 14:56:07 [ 49%] Building C object src/CMakeFiles/SR_ENGINE.dir/rp_dt_edit.c.o 14:56:08 [ 50%] Building C object src/CMakeFiles/SR_ENGINE.dir/rp_dt_filter.c.o 14:56:08 [ 52%] Building C object src/CMakeFiles/SR_ENGINE.dir/data_manager.c.o 14:56:08 [ 54%] Building C object src/CMakeFiles/SR_ENGINE.dir/notification_processor.c.o 14:56:09 [ 56%] Building C object src/CMakeFiles/SR_ENGINE.dir/persistence_manager.c.o 14:56:09 [ 58%] Building C object src/CMakeFiles/SR_ENGINE.dir/module_dependencies.c.o 14:56:10 [ 60%] Building C object src/CMakeFiles/SR_ENGINE.dir/nacm.c.o 14:56:11 [ 60%] Built target SR_ENGINE 14:56:11 Scanning dependencies of target sysrepo 14:56:11 Scanning dependencies of target sysrepo_a 14:56:11 [ 62%] Linking C shared library libsysrepo.so 14:56:11 [ 64%] Linking C static library libsysrepo.a 14:56:11 [ 64%] Built target sysrepo_a 14:56:11 [ 64%] Built target sysrepo 14:56:11 Scanning dependencies of target sysrepod 14:56:11 Scanning dependencies of target sysrepoctl 14:56:11 [ 66%] Building C object src/CMakeFiles/sysrepod.dir/executables/sysrepod.c.o 14:56:11 [ 68%] Building C object src/CMakeFiles/sysrepoctl.dir/executables/sysrepoctl.c.o 14:56:11 [ 70%] Linking C executable sysrepod 14:56:11 [ 70%] Built target sysrepod 14:56:11 Scanning dependencies of target sysrepo-plugind 14:56:12 [ 72%] Building C object src/CMakeFiles/sysrepo-plugind.dir/executables/sysrepo-plugind.c.o 14:56:12 [ 74%] Linking C executable sysrepo-plugind 14:56:12 [ 74%] Built target sysrepo-plugind 14:56:12 Scanning dependencies of target sysrepocfg 14:56:12 [ 76%] Building C object src/CMakeFiles/sysrepocfg.dir/executables/sysrepocfg.c.o 14:56:12 [ 78%] Linking C executable sysrepoctl 14:56:12 [ 78%] Built target sysrepoctl 14:56:12 Scanning dependencies of target Sysrepo-cpp 14:56:12 [ 80%] Building CXX object swig/CMakeFiles/Sysrepo-cpp.dir/cpp/src/Sysrepo.cpp.o 14:56:12 [ 82%] Building CXX object swig/CMakeFiles/Sysrepo-cpp.dir/cpp/src/Connection.cpp.o 14:56:12 [ 84%] Linking C executable sysrepocfg 14:56:12 [ 84%] Built target sysrepocfg 14:56:12 [ 86%] Building CXX object swig/CMakeFiles/Sysrepo-cpp.dir/cpp/src/Session.cpp.o 14:56:13 [ 88%] Building CXX object swig/CMakeFiles/Sysrepo-cpp.dir/cpp/src/Struct.cpp.o 14:56:14 [ 90%] Building CXX object swig/CMakeFiles/Sysrepo-cpp.dir/cpp/src/Xpath.cpp.o 14:56:14 [ 92%] Building CXX object swig/CMakeFiles/Sysrepo-cpp.dir/cpp/src/Tree.cpp.o 14:56:14 [ 94%] Building CXX object swig/CMakeFiles/Sysrepo-cpp.dir/cpp/src/Internal.cpp.o 14:56:15 [ 96%] Linking CXX shared library libSysrepo-cpp.so 14:56:15 [ 96%] Built target Sysrepo-cpp 14:56:15 Scanning dependencies of target _sysrepo 14:56:15 [ 98%] Building CXX object swig/python/CMakeFiles/_sysrepo.dir/sysrepoPYTHON_wrap.cxx.o 14:56:32 [100%] Linking CXX shared module _sysrepo.so 14:56:32 [100%] Built target _sysrepo 14:56:32 + make install 14:56:32 [ 23%] Built target COMMON 14:56:32 [ 50%] Built target SR_ENGINE 14:56:32 [ 58%] Built target SR_SRC 14:56:32 [ 60%] Built target sysrepo 14:56:32 [ 62%] Built target sysrepo_a 14:56:32 [ 66%] Built target sysrepoctl 14:56:32 [ 70%] Built target sysrepod 14:56:32 [ 74%] Built target sysrepo-plugind 14:56:32 [ 78%] Built target sysrepocfg 14:56:32 [ 94%] Built target Sysrepo-cpp 14:56:32 [ 96%] Built target sysrepo_swig_compilation 14:56:32 [100%] Built target _sysrepo 14:56:32 Install the project... 14:56:32 -- Install configuration: "Release" 14:56:32 -- Installing: /opt/etc/sysrepo 14:56:32 -- Installing: /opt/etc/sysrepo/yang/ 14:56:32 -- Installing: /opt/etc/sysrepo/data/ 14:56:32 -- Installing: /opt/etc/sysrepo/data/internal/ 14:56:32 -- Installing: /var/run/sysrepo-subscriptions 14:56:32 -- Installing: /opt/lib64/sysrepo/plugins 14:56:32 -- Installing: /opt/etc/sysrepo/yang/internal/sysrepo-persistent-data.yang 14:56:32 -- Installing: /opt/etc/sysrepo/yang/internal/sysrepo-module-dependencies.yang 14:56:32 -- Installing: /opt/etc/sysrepo/yang/internal/sysrepo-notification-store.yang 14:56:32 -- Installing: /opt/lib64/pkgconfig/libsysrepo.pc 14:56:32 -- Installing: /opt/share/man/man1/sysrepoctl.1 14:56:32 -- Installing: /opt/share/man/man1/sysrepocfg.1 14:56:32 -- Exec: /usr/src/sysrepo/build/src/sysrepoctl --install --yang=/usr/src/sysrepo/yang/ietf-netconf-notifications.yang --permissions=666 14:56:32 -- Exec: /usr/src/sysrepo/build/src/sysrepoctl --install --yang=/usr/src/sysrepo/yang/nc-notifications.yang --permissions=666 14:56:32 -- Exec: /usr/src/sysrepo/build/src/sysrepoctl --install --yang=/usr/src/sysrepo/yang/notifications.yang --permissions=666 14:56:32 -- Installing: /opt/lib64/libsysrepo.so.0.7.8 14:56:32 -- Installing: /opt/lib64/libsysrepo.so.0.7 14:56:32 -- Set runtime path of "/opt/lib64/libsysrepo.so.0.7.8" to "" 14:56:32 -- Installing: /opt/lib64/libsysrepo.so 14:56:32 -- Installing: /opt/lib64/libsysrepo.a 14:56:32 -- Installing: /opt/bin/sysrepod 14:56:32 -- Set runtime path of "/opt/bin/sysrepod" to "" 14:56:32 -- Installing: /opt/bin/sysrepo-plugind 14:56:32 -- Set runtime path of "/opt/bin/sysrepo-plugind" to "" 14:56:32 -- Installing: /opt/bin/sysrepoctl 14:56:32 -- Set runtime path of "/opt/bin/sysrepoctl" to "" 14:56:32 -- Installing: /opt/bin/sysrepocfg 14:56:32 -- Set runtime path of "/opt/bin/sysrepocfg" to "" 14:56:32 -- Up-to-date: /opt/include 14:56:32 -- Installing: /opt/include/sysrepo 14:56:32 -- Installing: /opt/include/sysrepo/values.h 14:56:32 -- Installing: /opt/include/sysrepo/trees.h 14:56:32 -- Installing: /opt/include/sysrepo/plugins.h 14:56:32 -- Installing: /opt/include/sysrepo/xpath.h 14:56:32 -- Installing: /opt/include/sysrepo.h 14:56:32 -- Installing: /opt/lib64/libSysrepo-cpp.so.0.7.8 14:56:32 -- Installing: /opt/lib64/libSysrepo-cpp.so.0.7 14:56:32 -- Set runtime path of "/opt/lib64/libSysrepo-cpp.so.0.7.8" to "" 14:56:32 -- Installing: /opt/lib64/libSysrepo-cpp.so 14:56:32 -- Installing: /opt/include/sysrepo-cpp/Sysrepo.hpp 14:56:32 -- Installing: /opt/include/sysrepo-cpp/Connection.hpp 14:56:32 -- Installing: /opt/include/sysrepo-cpp/Session.hpp 14:56:32 -- Installing: /opt/include/sysrepo-cpp/Struct.hpp 14:56:32 -- Installing: /opt/include/sysrepo-cpp/Xpath.hpp 14:56:32 -- Installing: /opt/include/sysrepo-cpp/Tree.hpp 14:56:32 -- Installing: /opt/include/sysrepo-cpp/Internal.hpp 14:56:32 -- Installing: /opt/lib64/pkgconfig/libSysrepo-cpp.pc 14:56:32 -- Installing: /opt/lib/python3.7/site-packages/_sysrepo.so 14:56:32 -- Installing: /opt/lib/python3.7/site-packages/sysrepo.py 14:56:33 Removing intermediate container 1c52fa9c6af4 14:56:33 ---> 0e50bba8875e 14:56:33 Step 18/47 : COPY patches/libnetconf2/ ./patches/libnetconf2/ 14:56:34 ---> 93083acdc3cc 14:56:34 Step 19/47 : RUN set -eux && git clone --branch $libnetconf2_version --depth 1 https://github.com/CESNET/libnetconf2.git && cd libnetconf2 && for p in ../patches/libnetconf2/*.patch; do patch -p1 -i $p; done && mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE:String="Release" -DENABLE_BUILD_TESTS=OFF -DCMAKE_INSTALL_PREFIX:PATH=/opt -DENABLE_PYTHON=OFF .. && make && make install 14:56:34 ---> Running in 4a4157cba271 14:56:34 + git clone --branch v0.12-r2 --depth 1 https://github.com/CESNET/libnetconf2.git 14:56:34 Cloning into 'libnetconf2'... 14:56:35 + cd libnetconf2 14:56:35 + patch -p1 -i ../patches/libnetconf2/01-configurable-PYTHON_MODULE_PATH.patch 14:56:35 patching file python/CMakeLists.txt 14:56:35 + patch -p1 -i ../patches/libnetconf2/02-fix-missing-include-dir.patch 14:56:35 patching file python/setup.py.in 14:56:35 + patch -p1 -i ../patches/libnetconf2/03-fix-missing-pthread_rwlockattr_setkind_np.patch 14:56:35 patching file src/session_server.c 14:56:35 + patch -p1 -i ../patches/libnetconf2/04-io-log.patch 14:56:35 patching file src/io.c 14:56:35 + mkdir build 14:56:35 + cd build 14:56:35 + cmake '-DCMAKE_BUILD_TYPE:String=Release' '-DENABLE_BUILD_TESTS=OFF' '-DCMAKE_INSTALL_PREFIX:PATH=/opt' '-DENABLE_PYTHON=OFF' .. 14:56:35 -- The C compiler identification is GNU 9.3.0 14:56:35 -- Check for working C compiler: /usr/bin/cc 14:56:35 -- Check for working C compiler: /usr/bin/cc -- works 14:56:35 -- Detecting C compiler ABI info 14:56:35 -- Detecting C compiler ABI info - done 14:56:35 -- Detecting C compile features 14:56:35 -- Detecting C compile features - done 14:56:35 CMake Warning at CMakeLists.txt:98 (message): 14:56:35 Missing tools (devscripts, debhelper package) for building deb package. 14:56:35 14:56:35 You won't be able to generate deb package from source code. 14:56:35 14:56:35 Compiling libnetconf2 should still works fine. 14:56:35 14:56:35 14:56:35 CMake Warning at CMakeLists.txt:109 (message): 14:56:35 Missing tools (rpm package) for building rpm package. 14:56:35 14:56:35 You won't be able to generate rpm package from source code. 14:56:35 14:56:35 Compiling libnetconf2 should still works fine. 14:56:35 14:56:35 14:56:35 -- Looking for pthread.h 14:56:35 -- Looking for pthread.h - found 14:56:35 -- Performing Test CMAKE_HAVE_LIBC_PTHREAD 14:56:35 -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success 14:56:35 -- Found Threads: TRUE 14:56:35 -- Looking for stdatomic.h 14:56:35 CMake Warning (dev) at /usr/share/cmake/Modules/CheckIncludeFile.cmake:80 (message): 14:56:35 Policy CMP0075 is not set: Include file check macros honor 14:56:35 CMAKE_REQUIRED_LIBRARIES. Run "cmake --help-policy CMP0075" for policy 14:56:35 details. Use the cmake_policy command to set the policy and suppress this 14:56:35 warning. 14:56:35 14:56:35 CMAKE_REQUIRED_LIBRARIES is set to: 14:56:35 14:56:35 pthread 14:56:35 14:56:35 For compatibility with CMake 3.11 and below this check is ignoring it. 14:56:35 Call Stack (most recent call first): 14:56:35 CMakeLists.txt:177 (check_include_file) 14:56:35 This warning is for project developers. Use -Wno-dev to suppress it. 14:56:35 14:56:36 -- Looking for stdatomic.h - found 14:56:36 -- Looking for pthread_mutex_timedlock 14:56:36 -- Looking for pthread_mutex_timedlock - found 14:56:36 -- Found OpenSSL: /usr/lib/libcrypto.so (found version "1.1.1l") 14:56:36 -- Found LibSSH: /usr/lib/ (Required is at least version "0.7.0") 14:56:36 -- Performing Test HAVE_LIBSSH_OPTIONS_PUBLICKEY_ACCEPTED_TYPES 14:56:36 -- Performing Test HAVE_LIBSSH_OPTIONS_PUBLICKEY_ACCEPTED_TYPES - Success 14:56:36 -- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 14:56:36 -- Found PkgConfig: /usr/bin/pkg-config (found version "1.6.3") 14:56:36 CMake Warning at CMakeLists.txt:267 (message): 14:56:36 pkg-config will not detect the new package after installation, adjust 14:56:36 PKG_CONFIG_PATH using "export 14:56:36 PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:lib64/pkgconfig". 14:56:36 14:56:36 14:56:36 -- Configuring done 14:56:36 -- Generating done 14:56:36 -- Build files have been written to: /usr/src/libnetconf2/build 14:56:36 + make 14:56:36 Scanning dependencies of target netconf2 14:56:36 [ 7%] Building C object CMakeFiles/netconf2.dir/src/io.c.o 14:56:36 [ 15%] Building C object CMakeFiles/netconf2.dir/src/log.c.o 14:56:37 [ 23%] Building C object CMakeFiles/netconf2.dir/src/messages_client.c.o 14:56:37 [ 30%] Building C object CMakeFiles/netconf2.dir/src/messages_server.c.o 14:56:37 [ 38%] Building C object CMakeFiles/netconf2.dir/src/session.c.o 14:56:37 /usr/src/libnetconf2/src/session.c:1368:1: warning: 'nc_ssh_destroy' defined but not used [-Wunused-function] 14:56:37 1368 | nc_ssh_destroy(void) 14:56:37 | ^~~~~~~~~~~~~~ 14:56:37 /usr/src/libnetconf2/src/session.c:1361:1: warning: 'nc_ssh_init' defined but not used [-Wunused-function] 14:56:37 1361 | nc_ssh_init(void) 14:56:37 | ^~~~~~~~~~~ 14:56:38 [ 46%] Building C object CMakeFiles/netconf2.dir/src/session_client.c.o 14:56:39 [ 53%] Building C object CMakeFiles/netconf2.dir/src/session_server.c.o 14:56:40 [ 61%] Building C object CMakeFiles/netconf2.dir/src/time.c.o 14:56:40 [ 69%] Building C object CMakeFiles/netconf2.dir/src/session_client_ssh.c.o 14:56:40 /usr/src/libnetconf2/src/session_client_ssh.c: In function 'sshauth_hostkey_check': 14:56:40 /usr/src/libnetconf2/src/session_client_ssh.c:284:5: warning: 'ssh_is_server_known' is deprecated [-Wdeprecated-declarations] 14:56:40 284 | state = ssh_is_server_known(session); 14:56:40 | ^~~~~ 14:56:40 In file included from /usr/src/libnetconf2/src/session_client_ssh.c:40: 14:56:40 /usr/include/libssh/libssh.h:561:31: note: declared here 14:56:40 561 | SSH_DEPRECATED LIBSSH_API int ssh_is_server_known(ssh_session session); 14:56:40 | ^~~~~~~~~~~~~~~~~~~ 14:56:40 /usr/src/libnetconf2/src/session_client_ssh.c:286:5: warning: 'ssh_get_publickey' is deprecated [-Wdeprecated-declarations] 14:56:40 286 | ret = ssh_get_publickey(session, &srv_pubkey); 14:56:40 | ^~~ 14:56:40 In file included from /usr/src/libnetconf2/src/session_client_ssh.c:40: 14:56:40 /usr/include/libssh/libssh.h:558:31: note: declared here 14:56:40 558 | SSH_DEPRECATED LIBSSH_API int ssh_get_publickey(ssh_session session, ssh_key *key); 14:56:40 | ^~~~~~~~~~~~~~~~~ 14:56:40 /usr/src/libnetconf2/src/session_client_ssh.c:388:17: warning: 'ssh_write_knownhost' is deprecated [-Wdeprecated-declarations] 14:56:40 388 | ret = ssh_write_knownhost(session); 14:56:40 | ^~~ 14:56:40 In file included from /usr/src/libnetconf2/src/session_client_ssh.c:40: 14:56:40 /usr/include/libssh/libssh.h:559:31: note: declared here 14:56:40 559 | SSH_DEPRECATED LIBSSH_API int ssh_write_knownhost(ssh_session session); 14:56:40 | ^~~~~~~~~~~~~~~~~~~ 14:56:40 [ 76%] Building C object CMakeFiles/netconf2.dir/src/session_server_ssh.c.o 14:56:41 [ 84%] Building C object CMakeFiles/netconf2.dir/src/session_client_tls.c.o 14:56:41 [ 92%] Building C object CMakeFiles/netconf2.dir/src/session_server_tls.c.o 14:56:42 [100%] Linking C shared library libnetconf2.so 14:56:42 [100%] Built target netconf2 14:56:42 + make install 14:56:42 [100%] Built target netconf2 14:56:42 Install the project... 14:56:42 -- Install configuration: "Release" 14:56:42 -- Installing: /opt/lib64/libnetconf2.so.0.12.55 14:56:42 -- Installing: /opt/lib64/libnetconf2.so.0.12 14:56:42 -- Set runtime path of "/opt/lib64/libnetconf2.so.0.12.55" to "" 14:56:42 -- Installing: /opt/lib64/libnetconf2.so 14:56:42 -- Installing: /opt/include/nc_client.h 14:56:42 -- Installing: /opt/include/nc_server.h 14:56:42 -- Installing: /opt/include/libnetconf2/log.h 14:56:42 -- Installing: /opt/include/libnetconf2/netconf.h 14:56:42 -- Installing: /opt/include/libnetconf2/session.h 14:56:42 -- Installing: /opt/include/libnetconf2/messages_client.h 14:56:42 -- Installing: /opt/include/libnetconf2/messages_server.h 14:56:42 -- Installing: /opt/include/libnetconf2/session_client.h 14:56:42 -- Installing: /opt/include/libnetconf2/session_client_ch.h 14:56:42 -- Installing: /opt/include/libnetconf2/session_server.h 14:56:42 -- Installing: /opt/include/libnetconf2/session_server_ch.h 14:56:42 -- Installing: /opt/share/libnetconf2/ietf-inet-types.yin 14:56:42 -- Installing: /opt/share/libnetconf2/ietf-netconf-acm.yin 14:56:42 -- Installing: /opt/share/libnetconf2/ietf-netconf-monitoring.yin 14:56:42 -- Installing: /opt/share/libnetconf2/ietf-netconf-notifications.yin 14:56:42 -- Installing: /opt/share/libnetconf2/ietf-netconf-with-defaults.yin 14:56:42 -- Installing: /opt/share/libnetconf2/ietf-netconf.yin 14:56:42 -- Installing: /opt/share/libnetconf2/nc-notifications.yin 14:56:42 -- Installing: /opt/share/libnetconf2/notifications.yin 14:56:42 -- Installing: /opt/lib64/pkgconfig/libnetconf2.pc 14:56:42 Removing intermediate container 4a4157cba271 14:56:42 ---> e69cfd7ceedb 14:56:42 Step 20/47 : COPY patches/Netopeer2/ ./patches/Netopeer2/ 14:56:43 ---> a0bce62edca3 14:56:43 Step 21/47 : RUN set -eux && git clone --branch $netopeer2_version --depth 1 https://github.com/CESNET/Netopeer2.git && cd Netopeer2 && for p in ../patches/Netopeer2/*.patch; do patch -p1 -i $p; done && cd keystored && mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE:String="Release" -DCMAKE_INSTALL_PREFIX:PATH=/opt -DMODEL_INSTALL=ON .. && make -j2 && make install 14:56:43 ---> Running in 11ca0f3d371f 14:56:43 + git clone --branch v0.7-r2 --depth 1 https://github.com/CESNET/Netopeer2.git 14:56:43 Cloning into 'Netopeer2'... 14:56:44 + cd Netopeer2 14:56:44 + patch -p1 -i ../patches/Netopeer2/01-fix-grep-count.patch 14:56:44 patching file keystored/scripts/model-install.sh 14:56:44 patching file server/scripts/model-install.sh.in 14:56:44 + patch -p1 -i ../patches/Netopeer2/02-zlog.patch 14:56:44 patching file server/CMakeLists.txt 14:56:44 patching file server/log.c 14:56:44 patching file server/main.c 14:56:44 + cd keystored 14:56:44 + mkdir build 14:56:44 + cd build 14:56:44 + cmake '-DCMAKE_BUILD_TYPE:String=Release' '-DCMAKE_INSTALL_PREFIX:PATH=/opt' '-DMODEL_INSTALL=ON' .. 14:56:44 -- The C compiler identification is GNU 9.3.0 14:56:44 -- Check for working C compiler: /usr/bin/cc 14:56:44 -- Check for working C compiler: /usr/bin/cc -- works 14:56:44 -- Detecting C compiler ABI info 14:56:44 -- Detecting C compiler ABI info - done 14:56:44 -- Detecting C compile features 14:56:44 -- Detecting C compile features - done 14:56:44 -- Found PkgConfig: /usr/bin/pkg-config (found version "1.6.3") 14:56:44 CMake Warning at CMakeLists.txt:58 (message): 14:56:44 keystored pkg-config file copied into a directory not searched by 14:56:44 pkg-config. 14:56:44 14:56:44 14:56:44 CMake Warning at CMakeLists.txt:59 (message): 14:56:44 For netopeer2-server configuration to work, pkg-config search path must 14:56:44 include "/opt/lib64/pkgconfig" or keystored keys directory will have to be 14:56:44 set manually to "/opt/etc/keystored/keys". 14:56:44 14:56:44 14:56:44 -- Found sysrepo: /opt/lib64/libsysrepo.so 14:56:44 -- Configuring done 14:56:44 -- Generating done 14:56:44 -- Build files have been written to: /usr/src/Netopeer2/keystored/build 14:56:44 + make -j2 14:56:44 Scanning dependencies of target keystored 14:56:44 [ 50%] Building C object CMakeFiles/keystored.dir/keystored.c.o 14:56:44 [100%] Linking C shared library libkeystored.so 14:56:44 [100%] Built target keystored 14:56:44 + make install 14:56:44 [100%] Built target keystored 14:56:44 Install the project... 14:56:45 -- Install configuration: "Release" 14:56:45 -- Installing: /opt/lib64/pkgconfig/keystored.pc 14:56:45 -- Installing: /opt/etc/keystored/keys 14:56:45 - Installing module ietf-x509-cert-to-name... 14:56:45 Installing a new module from file '/usr/src/Netopeer2/keystored/scripts/../../modules/ietf-x509-cert-to-name.yang'... 14:56:45 Installing the YANG file to '/opt/etc/sysrepo/yang/ietf-x509-cert-to-name@2014-12-10.yang'... 14:56:45 Skipping installation of data files for module 'ietf-x509-cert-to-name'... 14:56:45 Notifying sysrepo about the change... 14:56:45 Install operation completed successfully. 14:56:45 - Installing module ietf-keystore... 14:56:45 Installing a new module from file '/usr/src/Netopeer2/keystored/scripts/../../modules/ietf-keystore.yang'... 14:56:45 Installing the YANG file to '/opt/etc/sysrepo/yang/ietf-keystore@2016-10-31.yang'... 14:56:45 Installing data files for module 'ietf-keystore'... 14:56:45 Notifying sysrepo about the change... 14:56:45 Install operation completed successfully. 14:56:45 - SSH hostkey not found, generating a new one... 14:56:45 - Importing ietf-keystore stock key configuration... 14:56:45 The new configuration was successfully applied. 14:56:45 -- Installing: /opt/lib64/sysrepo/plugins/libkeystored.so 14:56:45 -- Set runtime path of "/opt/lib64/sysrepo/plugins/libkeystored.so" to "" 14:56:46 Removing intermediate container 11ca0f3d371f 14:56:46 ---> 0a869cf1748f 14:56:46 Step 22/47 : RUN set -eux && cd Netopeer2/server && mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE:String="Release" -DCMAKE_INSTALL_PREFIX:PATH=/opt .. && make -j2 && make install 14:56:46 ---> Running in a243383f1944 14:56:46 + cd Netopeer2/server 14:56:46 + mkdir build 14:56:46 + cd build 14:56:46 + cmake '-DCMAKE_BUILD_TYPE:String=Release' '-DCMAKE_INSTALL_PREFIX:PATH=/opt' .. 14:56:46 -- The C compiler identification is GNU 9.3.0 14:56:46 -- Check for working C compiler: /usr/bin/cc 14:56:46 -- Check for working C compiler: /usr/bin/cc -- works 14:56:46 -- Detecting C compiler ABI info 14:56:46 -- Detecting C compiler ABI info - done 14:56:46 -- Detecting C compile features 14:56:46 -- Detecting C compile features - done 14:56:47 -- Found CURL: /usr/lib/libcurl.so (found version "7.79.1") 14:56:47 -- Found PkgConfig: /usr/bin/pkg-config (found version "1.6.3") 14:56:47 -- keystored keys directory is "/opt/etc/keystored/keys". 14:56:47 -- Found libcurl 7.79.1 14:56:47 -- Enabling URL capability 14:56:47 -- libnetconf2 was compiled with support of up to 6 threads 14:56:47 -- Looking for pthread.h 14:56:47 -- Looking for pthread.h - found 14:56:47 -- Performing Test CMAKE_HAVE_LIBC_PTHREAD 14:56:47 -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success 14:56:47 -- Found Threads: TRUE 14:56:47 -- Looking for pthread_rwlockattr_setkind_np 14:56:47 -- Looking for pthread_rwlockattr_setkind_np - not found 14:56:47 -- Looking for stdatomic.h 14:56:47 -- Looking for stdatomic.h - found 14:56:47 -- Looking for NC_ENABLED_SSH 14:56:47 -- Looking for NC_ENABLED_SSH - found 14:56:47 -- Looking for NC_ENABLED_TLS 14:56:47 -- Looking for NC_ENABLED_TLS - found 14:56:47 -- Found sysrepo: /opt/lib64/libsysrepo.so 14:56:47 -- Configuring done 14:56:47 -- Generating done 14:56:47 -- Build files have been written to: /usr/src/Netopeer2/server/build 14:56:47 + make -j2 14:56:47 Scanning dependencies of target serverobj 14:56:47 [ 11%] Building C object CMakeFiles/serverobj.dir/ietf_netconf_server.c.o 14:56:47 [ 11%] Building C object CMakeFiles/serverobj.dir/ietf_system.c.o 14:56:48 [ 16%] Building C object CMakeFiles/serverobj.dir/ietf_keystore.c.o 14:56:48 [ 22%] Building C object CMakeFiles/serverobj.dir/netconf_monitoring.c.o 14:56:48 [ 27%] Building C object CMakeFiles/serverobj.dir/operations.c.o 14:56:48 [ 33%] Building C object CMakeFiles/serverobj.dir/op_get_config.c.o 14:56:48 [ 38%] Building C object CMakeFiles/serverobj.dir/op_editconfig.c.o 14:56:49 [ 44%] Building C object CMakeFiles/serverobj.dir/op_copyconfig.c.o 14:56:49 /usr/src/Netopeer2/server/op_copyconfig.c: In function 'op_copyconfig': 14:56:49 /usr/src/Netopeer2/server/op_copyconfig.c:477:13: warning: 'ly_wd' may be used uninitialized in this function [-Wmaybe-uninitialized] 14:56:49 477 | if (op_url_export(target_url, LYP_FORMAT | LYP_WITHSIBLINGS | opcopy_wd_nc2ly(nc_wd), root, &ereply) == 0) { 14:56:49 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 14:56:49 [ 50%] Building C object CMakeFiles/serverobj.dir/op_deleteconfig.c.o 14:56:49 [ 55%] Building C object CMakeFiles/serverobj.dir/op_candidate.c.o 14:56:49 [ 61%] Building C object CMakeFiles/serverobj.dir/op_validate.c.o 14:56:49 [ 66%] Building C object CMakeFiles/serverobj.dir/op_un_lock.c.o 14:56:49 [ 72%] Building C object CMakeFiles/serverobj.dir/op_generic.c.o 14:56:49 [ 77%] Building C object CMakeFiles/serverobj.dir/op_notifications.c.o 14:56:49 [ 83%] Building C object CMakeFiles/serverobj.dir/op_kill.c.o 14:56:49 [ 88%] Building C object CMakeFiles/serverobj.dir/log.c.o 14:56:50 [ 88%] Built target serverobj 14:56:50 Scanning dependencies of target netopeer2-server 14:56:50 [ 94%] Building C object CMakeFiles/netopeer2-server.dir/main.c.o 14:56:50 [100%] Linking C executable netopeer2-server 14:56:50 [100%] Built target netopeer2-server 14:56:50 + make install 14:56:50 [ 88%] Built target serverobj 14:56:50 [100%] Built target netopeer2-server 14:56:50 Install the project... 14:56:50 -- Install configuration: "Release" 14:56:50 -- Installing: /opt/bin/netopeer2-server 14:56:50 -- Set runtime path of "/opt/bin/netopeer2-server" to "" 14:56:50 - Installing module ietf-netconf... 14:56:50 Installing a new module from file '/usr/src/Netopeer2/server/../modules/ietf-netconf.yang'... 14:56:50 Installing the YANG file to '/opt/etc/sysrepo/yang/ietf-netconf@2011-06-01.yang'... 14:56:50 Resolving dependency: 'ietf-netconf' imports 'ietf-netconf-acm'... 14:56:50 Installing the YANG file to '/opt/etc/sysrepo/yang/ietf-netconf-acm@2018-02-14.yang'... 14:56:50 Installing data files for module 'ietf-netconf'... 14:56:50 Resolving dependency: 'ietf-netconf' imports 'ietf-netconf-acm'... 14:56:50 Skipping installation of data files for module 'ietf-netconf-acm'... 14:56:50 Notifying sysrepo about the change... 14:56:50 Install operation completed successfully. 14:56:50 - Enabling feature writable-running in ietf-netconf... 14:56:50 Enabling feature 'writable-running' in the module 'ietf-netconf'. 14:56:51 Operation completed successfully. 14:56:51 - Enabling feature candidate in ietf-netconf... 14:56:51 Enabling feature 'candidate' in the module 'ietf-netconf'. 14:56:51 Operation completed successfully. 14:56:51 - Enabling feature rollback-on-error in ietf-netconf... 14:56:51 Enabling feature 'rollback-on-error' in the module 'ietf-netconf'. 14:56:51 Operation completed successfully. 14:56:51 - Enabling feature validate in ietf-netconf... 14:56:51 Enabling feature 'validate' in the module 'ietf-netconf'. 14:56:51 Operation completed successfully. 14:56:51 - Enabling feature startup in ietf-netconf... 14:56:51 Enabling feature 'startup' in the module 'ietf-netconf'. 14:56:51 Operation completed successfully. 14:56:51 - Enabling feature xpath in ietf-netconf... 14:56:51 Enabling feature 'xpath' in the module 'ietf-netconf'. 14:56:51 Operation completed successfully. 14:56:51 - Enabling feature url in ietf-netconf... 14:56:51 Enabling feature 'url' in the module 'ietf-netconf'. 14:56:52 Operation completed successfully. 14:56:52 - Installing module ietf-netconf-with-defaults... 14:56:52 Installing a new module from file '/usr/src/Netopeer2/server/../modules/ietf-netconf-with-defaults.yang'... 14:56:52 Installing the YANG file to '/opt/etc/sysrepo/yang/ietf-netconf-with-defaults@2011-06-01.yang'... 14:56:52 Resolving dependency: 'ietf-netconf-with-defaults' imports 'ietf-netconf'... 14:56:52 Installing the YANG file to '/opt/etc/sysrepo/yang/ietf-netconf@2011-06-01.yang'... 14:56:52 Resolving dependency: 'ietf-netconf' imports 'ietf-netconf-acm'... 14:56:52 Installing the YANG file to '/opt/etc/sysrepo/yang/ietf-netconf-acm@2018-02-14.yang'... 14:56:52 Skipping installation of data files for module 'ietf-netconf-with-defaults'... 14:56:52 Resolving dependency: 'ietf-netconf-with-defaults' imports 'ietf-netconf'... 14:56:52 Installing data files for module 'ietf-netconf'... 14:56:52 Resolving dependency: 'ietf-netconf' imports 'ietf-netconf-acm'... 14:56:52 Skipping installation of data files for module 'ietf-netconf-acm'... 14:56:52 Notifying sysrepo about the change... 14:56:52 Install operation completed successfully. 14:56:52 - Installing module ietf-netconf-monitoring... 14:56:52 Installing a new module from file '/usr/src/Netopeer2/server/../modules/ietf-netconf-monitoring.yang'... 14:56:52 Installing the YANG file to '/opt/etc/sysrepo/yang/ietf-netconf-monitoring@2010-10-04.yang'... 14:56:52 Installing data files for module 'ietf-netconf-monitoring'... 14:56:52 Notifying sysrepo about the change... 14:56:52 Install operation completed successfully. 14:56:52 - Module notifications already installed. 14:56:52 - Module nc-notifications already installed. 14:56:52 - Module ietf-netconf-notifications already installed. 14:56:52 - Installing module ietf-yang-library... 14:56:52 Installing a new module from file '/usr/src/Netopeer2/server/../modules/ietf-yang-library.yang'... 14:56:52 Installing the YANG file to '/opt/etc/sysrepo/yang/ietf-yang-library@2018-01-17.yang'... 14:56:52 Resolving dependency: 'ietf-yang-library' imports 'ietf-datastores'... 14:56:52 Installing the YANG file to '/opt/etc/sysrepo/yang/ietf-datastores@2017-08-17.yang'... 14:56:52 Installing data files for module 'ietf-yang-library'... 14:56:52 Resolving dependency: 'ietf-yang-library' imports 'ietf-datastores'... 14:56:52 Skipping installation of data files for module 'ietf-datastores'... 14:56:52 Notifying sysrepo about the change... 14:56:52 Install operation completed successfully. 14:56:52 - Installing module ietf-netconf-server... 14:56:52 Installing a new module from file '/usr/src/Netopeer2/server/../modules/ietf-netconf-server.yang'... 14:56:52 Installing the YANG file to '/opt/etc/sysrepo/yang/ietf-netconf-server@2016-11-02.yang'... 14:56:52 Resolving dependency: 'ietf-netconf-server' imports 'ietf-x509-cert-to-name'... 14:56:52 Installing the YANG file to '/opt/etc/sysrepo/yang/ietf-x509-cert-to-name@2014-12-10.yang'... 14:56:52 Resolving dependency: 'ietf-netconf-server' imports 'ietf-ssh-server'... 14:56:52 Installing the YANG file to '/opt/etc/sysrepo/yang/ietf-ssh-server@2016-11-02.yang'... 14:56:52 Resolving dependency: 'ietf-ssh-server' imports 'ietf-keystore'... 14:56:52 Installing the YANG file to '/opt/etc/sysrepo/yang/ietf-keystore@2016-10-31.yang'... 14:56:52 Resolving dependency: 'ietf-netconf-server' imports 'ietf-tls-server'... 14:56:52 Installing the YANG file to '/opt/etc/sysrepo/yang/ietf-tls-server@2016-11-02.yang'... 14:56:52 Resolving dependency: 'ietf-tls-server' imports 'ietf-keystore'... 14:56:52 Installing the YANG file to '/opt/etc/sysrepo/yang/ietf-keystore@2016-10-31.yang'... 14:56:52 Installing data files for module 'ietf-netconf-server'... 14:56:52 Resolving dependency: 'ietf-netconf-server' imports 'ietf-x509-cert-to-name'... 14:56:52 Skipping installation of data files for module 'ietf-x509-cert-to-name'... 14:56:52 Resolving dependency: 'ietf-netconf-server' imports 'ietf-ssh-server'... 14:56:52 Skipping installation of data files for module 'ietf-ssh-server'... 14:56:52 Resolving dependency: 'ietf-ssh-server' imports 'ietf-keystore'... 14:56:52 Installing data files for module 'ietf-keystore'... 14:56:52 Resolving dependency: 'ietf-netconf-server' imports 'ietf-tls-server'... 14:56:52 Skipping installation of data files for module 'ietf-tls-server'... 14:56:52 Resolving dependency: 'ietf-tls-server' imports 'ietf-keystore'... 14:56:52 Installing data files for module 'ietf-keystore'... 14:56:52 Notifying sysrepo about the change... 14:56:52 Install operation completed successfully. 14:56:52 - Enabling feature listen in ietf-netconf-server... 14:56:52 Enabling feature 'listen' in the module 'ietf-netconf-server'. 14:56:52 Operation completed successfully. 14:56:52 - Enabling feature ssh-listen in ietf-netconf-server... 14:56:52 Enabling feature 'ssh-listen' in the module 'ietf-netconf-server'. 14:56:52 Operation completed successfully. 14:56:52 - Enabling feature tls-listen in ietf-netconf-server... 14:56:52 Enabling feature 'tls-listen' in the module 'ietf-netconf-server'. 14:56:52 Operation completed successfully. 14:56:52 - Enabling feature call-home in ietf-netconf-server... 14:56:52 Enabling feature 'call-home' in the module 'ietf-netconf-server'. 14:56:53 Operation completed successfully. 14:56:53 - Enabling feature ssh-call-home in ietf-netconf-server... 14:56:53 Enabling feature 'ssh-call-home' in the module 'ietf-netconf-server'. 14:56:53 Operation completed successfully. 14:56:53 - Enabling feature tls-call-home in ietf-netconf-server... 14:56:53 Enabling feature 'tls-call-home' in the module 'ietf-netconf-server'. 14:56:53 Operation completed successfully. 14:56:53 - Installing module ietf-system... 14:56:53 Installing a new module from file '/usr/src/Netopeer2/server/../modules/ietf-system.yang'... 14:56:53 Installing the YANG file to '/opt/etc/sysrepo/yang/ietf-system@2014-08-06.yang'... 14:56:53 Resolving dependency: 'ietf-system' imports 'ietf-netconf-acm'... 14:56:53 Installing the YANG file to '/opt/etc/sysrepo/yang/ietf-netconf-acm@2018-02-14.yang'... 14:56:53 Resolving dependency: 'ietf-system' imports 'iana-crypt-hash'... 14:56:53 Installing the YANG file to '/opt/etc/sysrepo/yang/iana-crypt-hash@2014-08-06.yang'... 14:56:53 Installing data files for module 'ietf-system'... 14:56:53 Resolving dependency: 'ietf-system' imports 'ietf-netconf-acm'... 14:56:53 Skipping installation of data files for module 'ietf-netconf-acm'... 14:56:53 Resolving dependency: 'ietf-system' imports 'iana-crypt-hash'... 14:56:53 Skipping installation of data files for module 'iana-crypt-hash'... 14:56:53 Notifying sysrepo about the change... 14:56:53 Install operation completed successfully. 14:56:53 - Enabling feature authentication in ietf-system... 14:56:53 Enabling feature 'authentication' in the module 'ietf-system'. 14:56:53 Operation completed successfully. 14:56:53 - Enabling feature local-users in ietf-system... 14:56:53 Enabling feature 'local-users' in the module 'ietf-system'. 14:56:54 Operation completed successfully. 14:56:54 The new configuration was successfully applied. 14:57:04 Removing intermediate container a243383f1944 14:57:04 ---> b653c79b6185 14:57:04 Step 23/47 : FROM python:3.7.7-alpine3.11 as stage0 14:57:04 ---> e854017db514 14:57:04 Step 24/47 : RUN apk upgrade --no-cache --available 14:57:06 ---> Running in e94e4f0a4bdf 14:57:09 fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/main/x86_64/APKINDEX.tar.gz 14:57:09 fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/community/x86_64/APKINDEX.tar.gz 14:57:09 Upgrading critical system libraries and apk-tools: 14:57:09 (1/1) Upgrading apk-tools (2.10.5-r0 -> 2.10.8-r0) 14:57:09 Executing busybox-1.31.1-r9.trigger 14:57:09 Continuing the upgrade transaction with new apk-tools: 14:57:09 fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/main/x86_64/APKINDEX.tar.gz 14:57:10 fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/community/x86_64/APKINDEX.tar.gz 14:57:10 (1/10) Upgrading musl (1.1.24-r2 -> 1.1.24-r3) 14:57:10 (2/10) Upgrading libcrypto1.1 (1.1.1g-r0 -> 1.1.1l-r0) 14:57:10 (3/10) Upgrading libssl1.1 (1.1.1g-r0 -> 1.1.1l-r0) 14:57:10 (4/10) Upgrading krb5-libs (1.17.1-r0 -> 1.17.2-r0) 14:57:10 (5/10) Upgrading zlib (1.2.11-r3 -> 1.2.11-r5) 14:57:10 (6/10) Upgrading busybox (1.31.1-r9 -> 1.31.1-r11) 14:57:10 Executing busybox-1.31.1-r11.post-upgrade 14:57:10 (7/10) Upgrading ca-certificates-cacert (20191127-r1 -> 20191127-r2) 14:57:10 (8/10) Upgrading ssl_client (1.31.1-r9 -> 1.31.1-r11) 14:57:10 (9/10) Upgrading ca-certificates (20191127-r1 -> 20191127-r2) 14:57:10 (10/10) Upgrading musl-utils (1.1.24-r2 -> 1.1.24-r3) 14:57:10 Executing busybox-1.31.1-r11.trigger 14:57:10 Executing ca-certificates-20191127-r2.trigger 14:57:10 OK: 11 MiB in 34 packages 14:57:21 Removing intermediate container e94e4f0a4bdf 14:57:21 ---> 9c6cf5defc18 14:57:21 Step 25/47 : FROM scratch 14:57:21 ---> 14:57:21 Step 26/47 : LABEL authors="eliezio.oliveira@est.tech" 14:57:24 ---> Running in b7d8b318983b 14:57:28 Removing intermediate container b7d8b318983b 14:57:28 ---> d61f917b9663 14:57:28 Step 27/47 : COPY --from=stage0 / / 14:57:38 ---> 9a2de38ce7df 14:57:38 Step 28/47 : RUN set -eux && apk add --no-cache coreutils libcurl libev libssh openssl pcre protobuf-c xmlstarlet 14:57:41 ---> Running in ecef0e5a9475 14:57:45 + apk add --no-cache coreutils libcurl libev libssh openssl pcre protobuf-c xmlstarlet 14:57:45 fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/main/x86_64/APKINDEX.tar.gz 14:57:45 fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/community/x86_64/APKINDEX.tar.gz 14:57:45 (1/19) Installing libacl (2.2.53-r0) 14:57:45 (2/19) Installing libattr (2.4.48-r0) 14:57:45 (3/19) Installing coreutils (8.31-r0) 14:57:45 (4/19) Installing nghttp2-libs (1.40.0-r1) 14:57:45 (5/19) Installing libcurl (7.79.1-r0) 14:57:45 (6/19) Installing libev (4.27-r0) 14:57:45 (7/19) Installing libssh (0.9.4-r1) 14:57:45 (8/19) Installing openssl (1.1.1l-r0) 14:57:45 (9/19) Installing pcre (8.43-r1) 14:57:46 (10/19) Installing libgcc (9.3.0-r0) 14:57:46 (11/19) Installing libstdc++ (9.3.0-r0) 14:57:46 (12/19) Installing libprotobuf (3.11.2-r1) 14:57:46 (13/19) Installing libprotoc (3.11.2-r1) 14:57:46 (14/19) Installing protobuf-c (1.3.2-r3) 14:57:46 (15/19) Installing libgpg-error (1.36-r2) 14:57:46 (16/19) Installing libgcrypt (1.8.8-r1) 14:57:46 (17/19) Installing libxml2 (2.9.12-r0) 14:57:46 (18/19) Installing libxslt (1.1.34-r0) 14:57:46 (19/19) Installing xmlstarlet (1.6.1-r0) 14:57:46 Executing busybox-1.31.1-r11.trigger 14:57:46 OK: 23 MiB in 53 packages 14:58:00 Removing intermediate container ecef0e5a9475 14:58:00 ---> c74d0a7df149 14:58:00 Step 29/47 : COPY --from=build /opt/ /opt/ 14:58:04 ---> e44ac9edc2ac 14:58:04 Step 30/47 : ENV LD_LIBRARY_PATH=/opt/lib:/opt/lib64 14:58:04 ---> Running in 9f5fc1791fad 14:58:04 Removing intermediate container 9f5fc1791fad 14:58:04 ---> b9f71762c945 14:58:04 Step 31/47 : ENV PYTHONPATH=/opt/lib/python3.7/site-packages 14:58:04 ---> Running in c5847d52854c 14:58:05 Removing intermediate container c5847d52854c 14:58:05 ---> 3b2b2bac66fa 14:58:05 Step 32/47 : COPY patches/supervisor/ /usr/src/patches/supervisor/ 14:58:05 ---> ee8e7b92db21 14:58:05 Step 33/47 : RUN set -eux && pip install --no-cache-dir loguru supervisor==4.1.0 virtualenv && cd /usr/local/lib/python3.7/site-packages && for p in /usr/src/patches/supervisor/*.patch; do patch -p1 -i $p; done 14:58:05 ---> Running in 7af777f71df9 14:58:05 + pip install --no-cache-dir loguru 'supervisor==4.1.0' virtualenv 14:58:07 Collecting loguru 14:58:07 Downloading loguru-0.7.3-py3-none-any.whl (61 kB) 14:58:07 Collecting supervisor==4.1.0 14:58:07 Downloading supervisor-4.1.0-py2.py3-none-any.whl (318 kB) 14:58:07 Collecting virtualenv 14:58:07 Downloading virtualenv-20.26.6-py3-none-any.whl (6.0 MB) 14:58:07 Collecting platformdirs<5,>=3.9.1 14:58:07 Downloading platformdirs-4.0.0-py3-none-any.whl (17 kB) 14:58:07 Collecting filelock<4,>=3.12.2 14:58:07 Downloading filelock-3.12.2-py3-none-any.whl (10 kB) 14:58:08 Collecting importlib-metadata>=6.6; python_version < "3.8" 14:58:08 Downloading importlib_metadata-6.7.0-py3-none-any.whl (22 kB) 14:58:08 Collecting distlib<1,>=0.3.7 14:58:08 Downloading distlib-0.4.3-py2.py3-none-any.whl (470 kB) 14:58:08 Collecting typing-extensions>=4.7.1; python_version < "3.8" 14:58:08 Downloading typing_extensions-4.7.1-py3-none-any.whl (33 kB) 14:58:08 Collecting zipp>=0.5 14:58:08 Downloading zipp-3.15.0-py3-none-any.whl (6.8 kB) 14:58:08 Installing collected packages: loguru, supervisor, typing-extensions, platformdirs, filelock, zipp, importlib-metadata, distlib, virtualenv 14:58:09 Successfully installed distlib-0.4.3 filelock-3.12.2 importlib-metadata-6.7.0 loguru-0.7.3 platformdirs-4.0.0 supervisor-4.1.0 typing-extensions-4.7.1 virtualenv-20.26.6 zipp-3.15.0 14:58:09 WARNING: You are using pip version 20.1.1; however, version 24.0 is available. 14:58:09 You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command. 14:58:09 + cd /usr/local/lib/python3.7/site-packages 14:58:09 + patch -p1 -i /usr/src/patches/supervisor/01-std-log-format.patch 14:58:09 patching file supervisor/loggers.py 14:58:09 patching file supervisor/options.py 14:58:10 Removing intermediate container 7af777f71df9 14:58:10 ---> 280bf2b4b5af 14:58:10 Step 34/47 : COPY config/ /config 14:58:11 ---> 5a89e230416f 14:58:11 Step 35/47 : VOLUME /config 14:58:11 ---> Running in 0d5f3382374d 14:58:11 Removing intermediate container 0d5f3382374d 14:58:11 ---> 157c18e7378a 14:58:11 Step 36/47 : COPY templates/ /templates 14:58:11 ---> 4d108cd664de 14:58:11 Step 37/47 : RUN adduser --system --disabled-password --gecos 'Netconf User' netconf 14:58:11 ---> Running in 5126f873fa6a 14:58:12 Removing intermediate container 5126f873fa6a 14:58:12 ---> b81248b440c4 14:58:12 Step 38/47 : HEALTHCHECK --interval=1s --start-period=2s --retries=10 CMD test -f /run/netopeer2-server.pid 14:58:12 ---> Running in a875662a6327 14:58:12 Removing intermediate container a875662a6327 14:58:12 ---> 4659fa4a9e0a 14:58:12 Step 39/47 : EXPOSE 830 14:58:13 ---> Running in 0b8204fc67e3 14:58:13 Removing intermediate container 0b8204fc67e3 14:58:13 ---> f6205b4d7647 14:58:13 Step 40/47 : EXPOSE 6513 14:58:13 ---> Running in 6cbac16b64d8 14:58:13 Removing intermediate container 6cbac16b64d8 14:58:13 ---> 245417ecc69d 14:58:13 Step 41/47 : COPY supervisord.conf /etc/supervisord.conf 14:58:13 ---> 05b046838689 14:58:13 Step 42/47 : RUN mkdir /etc/supervisord.d 14:58:13 ---> Running in bc86e26ec439 14:58:14 Removing intermediate container bc86e26ec439 14:58:14 ---> 66d9d3af4d37 14:58:14 Step 43/47 : COPY zlog.conf /opt/etc/ 14:58:15 ---> 2b6ff8730429 14:58:15 Step 44/47 : ENV LOGURU_FORMAT="{time:YYYY-DD-MM HH:mm:ss.SSS} {level: <5} [{module}] {message}" 14:58:15 ---> Running in 17c74d0d7a53 14:58:15 Removing intermediate container 17c74d0d7a53 14:58:15 ---> 08cfed1b3f7f 14:58:15 Step 45/47 : ENV LOGURU_COLORIZE=True 14:58:15 ---> Running in 3f14aa7a96c6 14:58:15 Removing intermediate container 3f14aa7a96c6 14:58:15 ---> 228527a401e1 14:58:15 Step 46/47 : COPY entrypoint.sh common.sh configure-*.sh reconfigure-*.sh generic_subscriber.py /opt/bin/ 14:58:16 ---> 771b2542b9f3 14:58:16 Step 47/47 : CMD /opt/bin/entrypoint.sh 14:58:16 ---> Running in 974b0311f822 14:58:16 Removing intermediate container 974b0311f822 14:58:16 ---> 942de7d6273c 14:58:16 Successfully built 942de7d6273c 14:58:16 Successfully tagged nexus3.onap.org:10003/onap/integration/simulators/netconf-pnp-simulator:2.8.6 14:58:16 ---> docker-build.sh ends 14:58:16 [integration-netconf-pnp-simulator-docker-merge-master] $ /bin/bash /tmp/jenkins9405477668402549887.sh 14:58:16 + cd test/mocks/netconf-pnp-simulator/engine 14:58:16 + docker tag nexus3.onap.org:10003/onap/integration/simulators/netconf-pnp-simulator:2.8.6 netconf-pnp-simulator:latest 14:58:16 + tox 14:58:17 No handlers could be found for logger "tox_pyenv" 14:58:17 .tox create: /w/workspace/integration-netconf-pnp-simulator-docker-merge-master/test/mocks/netconf-pnp-simulator/engine/.tox/.tox 14:58:18 .tox installdeps: tox-docker == 1.7.0, tox >= 3.26.0 14:58:27 py3 create: /w/workspace/integration-netconf-pnp-simulator-docker-merge-master/test/mocks/netconf-pnp-simulator/engine/.tox/py3 14:58:27 No handlers could be found for logger "filelock" 14:58:28 py3 installdeps: pytest == 6.2.2, docker == 4.4.4, lxml == 4.6.2, ncclient == 0.6.9 14:58:40 py3 installed: attrs==22.2.0,bcrypt==4.0.1,certifi==2025.4.26,cffi==1.15.1,charset-normalizer==2.0.12,cryptography==40.0.2,docker==4.4.4,idna==3.10,importlib-metadata==4.8.3,iniconfig==1.1.1,lxml==4.6.2,ncclient==0.6.9,packaging==21.3,paramiko==3.5.1,pluggy==0.13.1,py==1.11.0,pycparser==2.21,PyNaCl==1.5.0,pyparsing==3.1.4,pytest==6.2.2,requests==2.27.1,six==1.17.0,toml==0.10.2,typing_extensions==4.1.1,urllib3==1.26.20,websocket-client==1.3.1,zipp==3.6.0 14:58:40 py3 docker: run 'netconf-pnp-simulator:latest' 14:58:42 py3 docker: health check: u'netconf-pnp-simulator:latest' 14:58:44 py3 run-test-pre: PYTHONHASHSEED='4053256274' 14:58:44 py3 run-test: commands[0] | pytest -v 14:58:45 ============================= test session starts ============================== 14:58:45 platform linux -- Python 3.6.9, pytest-6.2.2, py-1.11.0, pluggy-0.13.1 -- /w/workspace/integration-netconf-pnp-simulator-docker-merge-master/test/mocks/netconf-pnp-simulator/engine/.tox/py3/bin/python 14:58:45 cachedir: .tox/py3/.pytest_cache 14:58:45 rootdir: /w/workspace/integration-netconf-pnp-simulator-docker-merge-master/test/mocks/netconf-pnp-simulator/engine, configfile: tox.ini 14:58:45 collecting ... collected 20 items 14:58:45 14:58:45 test_basic_operations.py::TestBasicOperations::test_capabilities PASSED [ 5%] 14:58:45 test_basic_operations.py::TestBasicOperations::test_get PASSED [ 10%] 14:58:46 test_basic_operations.py::TestBasicOperations::test_get_config_startup PASSED [ 15%] 14:58:46 test_basic_operations.py::TestBasicOperations::test_get_config_running PASSED [ 20%] 14:58:47 test_basic_operations.py::TestBasicOperations::test_copy_config PASSED [ 25%] 14:58:47 test_basic_operations.py::TestBasicOperations::test_neg_filter PASSED [ 30%] 14:58:48 test_basic_operations.py::TestBasicOperations::test_lock PASSED [ 35%] 14:58:48 test_tls.py::TestTLS::test_tls_connect FAILED [ 40%] 14:58:52 test_tls.py::TestTLS::test_tls_reconfiguration[round #1] FAILED [ 45%] 14:58:56 test_tls.py::TestTLS::test_tls_reconfiguration[round #2] FAILED [ 50%] 14:59:02 test_tls.py::TestTLS::test_tls_reconfiguration[round #3] FAILED [ 55%] 14:59:07 test_tls.py::TestTLS::test_tls_reconfiguration[round #4] FAILED [ 60%] 14:59:10 test_tls.py::TestTLS::test_tls_reconfiguration[round #5] FAILED [ 65%] 14:59:16 test_tls.py::TestTLS::test_tls_reconfiguration[round #6] FAILED [ 70%] 14:59:16 test_turing_machine.py::TestTuringMachine::test_get ERROR [ 75%] 14:59:16 test_turing_machine.py::TestTuringMachine::test_get_config_startup ERROR [ 80%] 14:59:16 test_turing_machine.py::TestTuringMachine::test_get_config_running ERROR [ 85%] 14:59:16 test_turing_machine.py::TestTuringMachine::test_get_subtree_filter ERROR [ 90%] 14:59:16 test_turing_machine.py::TestTuringMachine::test_get_xpath_filter ERROR [ 95%] 14:59:17 test_turing_machine.py::TestTuringMachine::test_edit_config ERROR [100%] 14:59:17 14:59:17 ==================================== ERRORS ==================================== 14:59:17 _________________ ERROR at setup of TestTuringMachine.test_get _________________ 14:59:17 14:59:17 self = 14:59:17 14:59:17 def _check_banner(self): 14:59:17 # this is slow, but we only have to do it once 14:59:17 for i in range(100): 14:59:17 # give them 15 seconds for the first line, then just 2 seconds 14:59:17 # each additional line. (some sites have very high latency.) 14:59:17 if i == 0: 14:59:17 timeout = self.banner_timeout 14:59:17 else: 14:59:17 timeout = 2 14:59:17 try: 14:59:17 > buf = self.packetizer.readline(timeout) 14:59:17 14:59:17 ../.tox/py3/lib/python3.6/site-packages/paramiko/transport.py:2369: 14:59:17 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 14:59:17 14:59:17 self = , timeout = 15 14:59:17 14:59:17 def readline(self, timeout): 14:59:17 """ 14:59:17 Read a line from the socket. We assume no data is pending after the 14:59:17 line, so it's okay to attempt large reads. 14:59:17 """ 14:59:17 buf = self.__remainder 14:59:17 while linefeed_byte not in buf: 14:59:17 > buf += self._read_timeout(timeout) 14:59:17 14:59:17 ../.tox/py3/lib/python3.6/site-packages/paramiko/packet.py:395: 14:59:17 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 14:59:17 14:59:17 self = , timeout = 15 14:59:17 14:59:17 def _read_timeout(self, timeout): 14:59:17 start = time.time() 14:59:17 while True: 14:59:17 try: 14:59:17 > x = self.__socket.recv(128) 14:59:17 E ConnectionResetError: [Errno 104] Connection reset by peer 14:59:17 14:59:17 ../.tox/py3/lib/python3.6/site-packages/paramiko/packet.py:663: ConnectionResetError 14:59:17 14:59:17 During handling of the above exception, another exception occurred: 14:59:17 14:59:17 self = , host = '127.0.0.1', port = 49154 14:59:17 timeout = None 14:59:17 unknown_host_cb = 14:59:17 username = 'netconf', password = None, key_filename = '../config/ssh/id_rsa' 14:59:17 allow_agent = False, hostkey_verify = False, hostkey_b64 = None 14:59:17 look_for_keys = False, ssh_config = None, sock_fd = None, bind_addr = None 14:59:17 14:59:17 def connect( 14:59:17 self, 14:59:17 host, 14:59:17 port = PORT_NETCONF_DEFAULT, 14:59:17 timeout = None, 14:59:17 unknown_host_cb = default_unknown_host_cb, 14:59:17 username = None, 14:59:17 password = None, 14:59:17 key_filename = None, 14:59:17 allow_agent = True, 14:59:17 hostkey_verify = True, 14:59:17 hostkey_b64 = None, 14:59:17 look_for_keys = True, 14:59:17 ssh_config = None, 14:59:17 sock_fd = None, 14:59:17 bind_addr = None): 14:59:17 14:59:17 """Connect via SSH and initialize the NETCONF session. First attempts the publickey authentication method and then password authentication. 14:59:17 14:59:17 To disable attempting publickey authentication altogether, call with *allow_agent* and *look_for_keys* as `False`. 14:59:17 14:59:17 *host* is the hostname or IP address to connect to 14:59:17 14:59:17 *port* is by default 830 (PORT_NETCONF_DEFAULT), but some devices use the default SSH port of 22 so this may need to be specified 14:59:17 14:59:17 *timeout* is an optional timeout for socket connect 14:59:17 14:59:17 *unknown_host_cb* is called when the server host key is not recognized. It takes two arguments, the hostname and the fingerprint (see the signature of :func:`default_unknown_host_cb`) 14:59:17 14:59:17 *username* is the username to use for SSH authentication 14:59:17 14:59:17 *password* is the password used if using password authentication, or the passphrase to use for unlocking keys that require it 14:59:17 14:59:17 *key_filename* is a filename where a the private key to be used can be found 14:59:17 14:59:17 *allow_agent* enables querying SSH agent (if found) for keys 14:59:17 14:59:17 *hostkey_verify* enables hostkey verification from ~/.ssh/known_hosts 14:59:17 14:59:17 *hostkey_b64* only connect when server presents a public hostkey matching this (obtain from server /etc/ssh/ssh_host_*pub or ssh-keyscan) 14:59:17 14:59:17 *look_for_keys* enables looking in the usual locations for ssh keys (e.g. :file:`~/.ssh/id_*`) 14:59:17 14:59:17 *ssh_config* enables parsing of an OpenSSH configuration file, if set to its path, e.g. :file:`~/.ssh/config` or to True (in this case, use :file:`~/.ssh/config`). 14:59:17 14:59:17 *sock_fd* is an already open socket which shall be used for this connection. Useful for NETCONF outbound ssh. Use host=None together with a valid sock_fd number 14:59:17 14:59:17 *bind_addr* is a (local) source IP address to use, must be reachable from the remote device. 14:59:17 """ 14:59:17 if not (host or sock_fd): 14:59:17 raise SSHError("Missing host or socket fd") 14:59:17 14:59:17 self._host = host 14:59:17 14:59:17 # Optionally, parse .ssh/config 14:59:17 config = {} 14:59:17 if ssh_config is True: 14:59:17 ssh_config = "~/.ssh/config" if sys.platform != "win32" else "~/ssh/config" 14:59:17 if ssh_config is not None: 14:59:17 config = paramiko.SSHConfig() 14:59:17 with open(os.path.expanduser(ssh_config)) as ssh_config_file_obj: 14:59:17 config.parse(ssh_config_file_obj) 14:59:17 14:59:17 # Save default Paramiko SSH port so it can be reverted 14:59:17 paramiko_default_ssh_port = paramiko.config.SSH_PORT 14:59:17 14:59:17 # Change the default SSH port to the port specified by the user so expand_variables 14:59:17 # replaces %p with the passed in port rather than 22 (the defauld paramiko.config.SSH_PORT) 14:59:17 14:59:17 paramiko.config.SSH_PORT = port 14:59:17 14:59:17 config = config.lookup(host) 14:59:17 14:59:17 # paramiko.config.SSHconfig::expand_variables is called by lookup so we can set the SSH port 14:59:17 # back to the default 14:59:17 paramiko.config.SSH_PORT = paramiko_default_ssh_port 14:59:17 14:59:17 host = config.get("hostname", host) 14:59:17 if username is None: 14:59:17 username = config.get("user") 14:59:17 if key_filename is None: 14:59:17 key_filename = config.get("identityfile") 14:59:17 if hostkey_verify: 14:59:17 userknownhostsfile = config.get("userknownhostsfile") 14:59:17 if userknownhostsfile: 14:59:17 self.load_known_hosts(os.path.expanduser(userknownhostsfile)) 14:59:17 if timeout is None: 14:59:17 timeout = config.get("connecttimeout") 14:59:17 if timeout: 14:59:17 timeout = int(timeout) 14:59:17 14:59:17 if username is None: 14:59:17 username = getpass.getuser() 14:59:17 14:59:17 if sock_fd is None: 14:59:17 proxycommand = config.get("proxycommand") 14:59:17 if proxycommand: 14:59:17 self.logger.debug("Configuring Proxy. %s", proxycommand) 14:59:17 if not isinstance(proxycommand, six.string_types): 14:59:17 proxycommand = [os.path.expanduser(elem) for elem in proxycommand] 14:59:17 else: 14:59:17 proxycommand = os.path.expanduser(proxycommand) 14:59:17 sock = paramiko.proxy.ProxyCommand(proxycommand) 14:59:17 else: 14:59:17 for res in socket.getaddrinfo(host, port, socket.AF_UNSPEC, socket.SOCK_STREAM): 14:59:17 af, socktype, proto, canonname, sa = res 14:59:17 try: 14:59:17 sock = socket.socket(af, socktype, proto) 14:59:17 sock.settimeout(timeout) 14:59:17 except socket.error: 14:59:17 continue 14:59:17 try: 14:59:17 if bind_addr: 14:59:17 sock.bind((bind_addr, 0)) 14:59:17 sock.connect(sa) 14:59:17 except socket.error: 14:59:17 sock.close() 14:59:17 continue 14:59:17 break 14:59:17 else: 14:59:17 raise SSHError("Could not open socket to %s:%s" % (host, port)) 14:59:17 else: 14:59:17 if sys.version_info[0] < 3: 14:59:17 s = socket.fromfd(int(sock_fd), socket.AF_INET, socket.SOCK_STREAM) 14:59:17 sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM, _sock=s) 14:59:17 else: 14:59:17 sock = socket.fromfd(int(sock_fd), socket.AF_INET, socket.SOCK_STREAM) 14:59:17 sock.settimeout(timeout) 14:59:17 14:59:17 self._transport = paramiko.Transport(sock) 14:59:17 self._transport.set_log_channel(logger.name) 14:59:17 if config.get("compression") == 'yes': 14:59:17 self._transport.use_compression() 14:59:17 14:59:17 if hostkey_b64: 14:59:17 # If we need to connect with a specific hostkey, negotiate for only its type 14:59:17 hostkey_obj = None 14:59:17 for key_cls in [paramiko.DSSKey, paramiko.Ed25519Key, paramiko.RSAKey, paramiko.ECDSAKey]: 14:59:17 try: 14:59:17 hostkey_obj = key_cls(data=base64.b64decode(hostkey_b64)) 14:59:17 except paramiko.SSHException: 14:59:17 # Not a key of this type - try the next 14:59:17 pass 14:59:17 if not hostkey_obj: 14:59:17 # We've tried all known host key types and haven't found a suitable one to use - bail 14:59:17 raise SSHError("Couldn't find suitable paramiko key class for host key %s" % hostkey_b64) 14:59:17 self._transport._preferred_keys = [hostkey_obj.get_name()] 14:59:17 elif self._host_keys: 14:59:17 # Else set preferred host keys to those we possess for the host 14:59:17 # (avoids situation where known_hosts contains a valid key for the host, but that key type is not selected during negotiation) 14:59:17 known_host_keys_for_this_host = self._host_keys.lookup(host) or {} 14:59:17 host_port = '[%s]:%s' % (host, port) 14:59:17 known_host_keys_for_this_host.update(self._host_keys.lookup(host_port) or {}) 14:59:17 if known_host_keys_for_this_host: 14:59:17 self._transport._preferred_keys = list(known_host_keys_for_this_host) 14:59:17 14:59:17 # Connect 14:59:17 try: 14:59:17 > self._transport.start_client() 14:59:17 14:59:17 ../.tox/py3/lib/python3.6/site-packages/ncclient/transport/ssh.py:329: 14:59:17 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 14:59:17 14:59:17 self = 14:59:17 event = , timeout = None 14:59:17 14:59:17 def start_client(self, event=None, timeout=None): 14:59:17 """ 14:59:17 Negotiate a new SSH2 session as a client. This is the first step after 14:59:17 creating a new `.Transport`. A separate thread is created for protocol 14:59:17 negotiation. 14:59:17 14:59:17 If an event is passed in, this method returns immediately. When 14:59:17 negotiation is done (successful or not), the given ``Event`` will 14:59:17 be triggered. On failure, `is_active` will return ``False``. 14:59:17 14:59:17 (Since 1.4) If ``event`` is ``None``, this method will not return until 14:59:17 negotiation is done. On success, the method returns normally. 14:59:17 Otherwise an SSHException is raised. 14:59:17 14:59:17 After a successful negotiation, you will usually want to authenticate, 14:59:17 calling `auth_password ` or 14:59:17 `auth_publickey `. 14:59:17 14:59:17 .. note:: `connect` is a simpler method for connecting as a client. 14:59:17 14:59:17 .. note:: 14:59:17 After calling this method (or `start_server` or `connect`), you 14:59:17 should no longer directly read from or write to the original socket 14:59:17 object. 14:59:17 14:59:17 :param .threading.Event event: 14:59:17 an event to trigger when negotiation is complete (optional) 14:59:17 14:59:17 :param float timeout: 14:59:17 a timeout, in seconds, for SSH2 session negotiation (optional) 14:59:17 14:59:17 :raises: 14:59:17 `.SSHException` -- if negotiation fails (and no ``event`` was 14:59:17 passed in) 14:59:17 """ 14:59:17 self.active = True 14:59:17 if event is not None: 14:59:17 # async, return immediately and let the app poll for completion 14:59:17 self.completion_event = event 14:59:17 self.start() 14:59:17 return 14:59:17 14:59:17 # synchronous, wait for a result 14:59:17 self.completion_event = event = threading.Event() 14:59:17 self.start() 14:59:17 max_time = time.time() + timeout if timeout is not None else None 14:59:17 while True: 14:59:17 event.wait(0.1) 14:59:17 if not self.active: 14:59:17 e = self.get_exception() 14:59:17 if e is not None: 14:59:17 > raise e 14:59:17 14:59:17 ../.tox/py3/lib/python3.6/site-packages/paramiko/transport.py:773: 14:59:17 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 14:59:17 14:59:17 self = 14:59:17 14:59:17 def run(self): 14:59:17 # (use the exposed "run" method, because if we specify a thread target 14:59:17 # of a private method, threading.Thread will keep a reference to it 14:59:17 # indefinitely, creating a GC cycle and not letting Transport ever be 14:59:17 # GC'd. it's a bug in Thread.) 14:59:17 14:59:17 # Hold reference to 'sys' so we can test sys.modules to detect 14:59:17 # interpreter shutdown. 14:59:17 self.sys = sys 14:59:17 14:59:17 # active=True occurs before the thread is launched, to avoid a race 14:59:17 _active_threads.append(self) 14:59:17 tid = hex(id(self) & xffffffff) 14:59:17 if self.server_mode: 14:59:17 self._log(DEBUG, "starting thread (server mode): {}".format(tid)) 14:59:17 else: 14:59:17 self._log(DEBUG, "starting thread (client mode): {}".format(tid)) 14:59:17 try: 14:59:17 try: 14:59:17 self.packetizer.write_all(b(self.local_version + "\r\n")) 14:59:17 self._log( 14:59:17 DEBUG, 14:59:17 "Local version/idstring: {}".format(self.local_version), 14:59:17 ) # noqa 14:59:17 > self._check_banner() 14:59:17 14:59:17 ../.tox/py3/lib/python3.6/site-packages/paramiko/transport.py:2185: 14:59:17 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 14:59:17 14:59:17 self = 14:59:17 14:59:17 def _check_banner(self): 14:59:17 # this is slow, but we only have to do it once 14:59:17 for i in range(100): 14:59:17 # give them 15 seconds for the first line, then just 2 seconds 14:59:17 # each additional line. (some sites have very high latency.) 14:59:17 if i == 0: 14:59:17 timeout = self.banner_timeout 14:59:17 else: 14:59:17 timeout = 2 14:59:17 try: 14:59:17 buf = self.packetizer.readline(timeout) 14:59:17 except ProxyCommandFailure: 14:59:17 raise 14:59:17 except Exception as e: 14:59:17 raise SSHException( 14:59:17 > "Error reading SSH protocol banner" + str(e) 14:59:17 ) 14:59:17 E paramiko.ssh_exception.SSHException: Error reading SSH protocol banner[Errno 104] Connection reset by peer 14:59:17 14:59:17 ../.tox/py3/lib/python3.6/site-packages/paramiko/transport.py:2374: SSHException 14:59:17 14:59:17 During handling of the above exception, another exception occurred: 14:59:17 14:59:17 self = 14:59:17 14:59:17 def setup(self): 14:59:17 self.nc = manager.connect( 14:59:17 host=settings.HOST, 14:59:17 port=settings.SSH_PORT, 14:59:17 username=settings.USERNAME, 14:59:17 key_filename=settings.SSH_KEY_FILENAME, 14:59:17 allow_agent=False, 14:59:17 look_for_keys=False, 14:59:17 > hostkey_verify=False) 14:59:17 14:59:17 nctest.py:46: 14:59:17 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 14:59:17 ../.tox/py3/lib/python3.6/site-packages/ncclient/manager.py:168: in connect 14:59:17 return connect_ssh(*args, **kwds) 14:59:17 ../.tox/py3/lib/python3.6/site-packages/ncclient/manager.py:135: in connect_ssh 14:59:17 session.connect(*args, **kwds) 14:59:17 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 14:59:17 14:59:17 self = , host = '127.0.0.1', port = 49154 14:59:17 timeout = None 14:59:17 unknown_host_cb = 14:59:17 username = 'netconf', password = None, key_filename = '../config/ssh/id_rsa' 14:59:17 allow_agent = False, hostkey_verify = False, hostkey_b64 = None 14:59:17 look_for_keys = False, ssh_config = None, sock_fd = None, bind_addr = None 14:59:17 14:59:17 def connect( 14:59:17 self, 14:59:17 host, 14:59:17 port = PORT_NETCONF_DEFAULT, 14:59:17 timeout = None, 14:59:17 unknown_host_cb = default_unknown_host_cb, 14:59:17 username = None, 14:59:17 password = None, 14:59:17 key_filename = None, 14:59:17 allow_agent = True, 14:59:17 hostkey_verify = True, 14:59:17 hostkey_b64 = None, 14:59:17 look_for_keys = True, 14:59:17 ssh_config = None, 14:59:17 sock_fd = None, 14:59:17 bind_addr = None): 14:59:17 14:59:17 """Connect via SSH and initialize the NETCONF session. First attempts the publickey authentication method and then password authentication. 14:59:17 14:59:17 To disable attempting publickey authentication altogether, call with *allow_agent* and *look_for_keys* as `False`. 14:59:17 14:59:17 *host* is the hostname or IP address to connect to 14:59:17 14:59:17 *port* is by default 830 (PORT_NETCONF_DEFAULT), but some devices use the default SSH port of 22 so this may need to be specified 14:59:17 14:59:17 *timeout* is an optional timeout for socket connect 14:59:17 14:59:17 *unknown_host_cb* is called when the server host key is not recognized. It takes two arguments, the hostname and the fingerprint (see the signature of :func:`default_unknown_host_cb`) 14:59:17 14:59:17 *username* is the username to use for SSH authentication 14:59:17 14:59:17 *password* is the password used if using password authentication, or the passphrase to use for unlocking keys that require it 14:59:17 14:59:17 *key_filename* is a filename where a the private key to be used can be found 14:59:17 14:59:17 *allow_agent* enables querying SSH agent (if found) for keys 14:59:17 14:59:17 *hostkey_verify* enables hostkey verification from ~/.ssh/known_hosts 14:59:17 14:59:17 *hostkey_b64* only connect when server presents a public hostkey matching this (obtain from server /etc/ssh/ssh_host_*pub or ssh-keyscan) 14:59:17 14:59:17 *look_for_keys* enables looking in the usual locations for ssh keys (e.g. :file:`~/.ssh/id_*`) 14:59:17 14:59:17 *ssh_config* enables parsing of an OpenSSH configuration file, if set to its path, e.g. :file:`~/.ssh/config` or to True (in this case, use :file:`~/.ssh/config`). 14:59:17 14:59:17 *sock_fd* is an already open socket which shall be used for this connection. Useful for NETCONF outbound ssh. Use host=None together with a valid sock_fd number 14:59:17 14:59:17 *bind_addr* is a (local) source IP address to use, must be reachable from the remote device. 14:59:17 """ 14:59:17 if not (host or sock_fd): 14:59:17 raise SSHError("Missing host or socket fd") 14:59:17 14:59:17 self._host = host 14:59:17 14:59:17 # Optionally, parse .ssh/config 14:59:17 config = {} 14:59:17 if ssh_config is True: 14:59:17 ssh_config = "~/.ssh/config" if sys.platform != "win32" else "~/ssh/config" 14:59:17 if ssh_config is not None: 14:59:17 config = paramiko.SSHConfig() 14:59:17 with open(os.path.expanduser(ssh_config)) as ssh_config_file_obj: 14:59:17 config.parse(ssh_config_file_obj) 14:59:17 14:59:17 # Save default Paramiko SSH port so it can be reverted 14:59:17 paramiko_default_ssh_port = paramiko.config.SSH_PORT 14:59:17 14:59:17 # Change the default SSH port to the port specified by the user so expand_variables 14:59:17 # replaces %p with the passed in port rather than 22 (the defauld paramiko.config.SSH_PORT) 14:59:17 14:59:17 paramiko.config.SSH_PORT = port 14:59:17 14:59:17 config = config.lookup(host) 14:59:17 14:59:17 # paramiko.config.SSHconfig::expand_variables is called by lookup so we can set the SSH port 14:59:17 # back to the default 14:59:17 paramiko.config.SSH_PORT = paramiko_default_ssh_port 14:59:17 14:59:17 host = config.get("hostname", host) 14:59:17 if username is None: 14:59:17 username = config.get("user") 14:59:17 if key_filename is None: 14:59:17 key_filename = config.get("identityfile") 14:59:17 if hostkey_verify: 14:59:17 userknownhostsfile = config.get("userknownhostsfile") 14:59:17 if userknownhostsfile: 14:59:17 self.load_known_hosts(os.path.expanduser(userknownhostsfile)) 14:59:17 if timeout is None: 14:59:17 timeout = config.get("connecttimeout") 14:59:17 if timeout: 14:59:17 timeout = int(timeout) 14:59:17 14:59:17 if username is None: 14:59:17 username = getpass.getuser() 14:59:17 14:59:17 if sock_fd is None: 14:59:17 proxycommand = config.get("proxycommand") 14:59:17 if proxycommand: 14:59:17 self.logger.debug("Configuring Proxy. %s", proxycommand) 14:59:17 if not isinstance(proxycommand, six.string_types): 14:59:17 proxycommand = [os.path.expanduser(elem) for elem in proxycommand] 14:59:17 else: 14:59:17 proxycommand = os.path.expanduser(proxycommand) 14:59:17 sock = paramiko.proxy.ProxyCommand(proxycommand) 14:59:17 else: 14:59:17 for res in socket.getaddrinfo(host, port, socket.AF_UNSPEC, socket.SOCK_STREAM): 14:59:17 af, socktype, proto, canonname, sa = res 14:59:17 try: 14:59:17 sock = socket.socket(af, socktype, proto) 14:59:17 sock.settimeout(timeout) 14:59:17 except socket.error: 14:59:17 continue 14:59:17 try: 14:59:17 if bind_addr: 14:59:17 sock.bind((bind_addr, 0)) 14:59:17 sock.connect(sa) 14:59:17 except socket.error: 14:59:17 sock.close() 14:59:17 continue 14:59:17 break 14:59:17 else: 14:59:17 raise SSHError("Could not open socket to %s:%s" % (host, port)) 14:59:17 else: 14:59:17 if sys.version_info[0] < 3: 14:59:17 s = socket.fromfd(int(sock_fd), socket.AF_INET, socket.SOCK_STREAM) 14:59:17 sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM, _sock=s) 14:59:17 else: 14:59:17 sock = socket.fromfd(int(sock_fd), socket.AF_INET, socket.SOCK_STREAM) 14:59:17 sock.settimeout(timeout) 14:59:17 14:59:17 self._transport = paramiko.Transport(sock) 14:59:17 self._transport.set_log_channel(logger.name) 14:59:17 if config.get("compression") == 'yes': 14:59:17 self._transport.use_compression() 14:59:17 14:59:17 if hostkey_b64: 14:59:17 # If we need to connect with a specific hostkey, negotiate for only its type 14:59:17 hostkey_obj = None 14:59:17 for key_cls in [paramiko.DSSKey, paramiko.Ed25519Key, paramiko.RSAKey, paramiko.ECDSAKey]: 14:59:17 try: 14:59:17 hostkey_obj = key_cls(data=base64.b64decode(hostkey_b64)) 14:59:17 except paramiko.SSHException: 14:59:17 # Not a key of this type - try the next 14:59:17 pass 14:59:17 if not hostkey_obj: 14:59:17 # We've tried all known host key types and haven't found a suitable one to use - bail 14:59:17 raise SSHError("Couldn't find suitable paramiko key class for host key %s" % hostkey_b64) 14:59:17 self._transport._preferred_keys = [hostkey_obj.get_name()] 14:59:17 elif self._host_keys: 14:59:17 # Else set preferred host keys to those we possess for the host 14:59:17 # (avoids situation where known_hosts contains a valid key for the host, but that key type is not selected during negotiation) 14:59:17 known_host_keys_for_this_host = self._host_keys.lookup(host) or {} 14:59:17 host_port = '[%s]:%s' % (host, port) 14:59:17 known_host_keys_for_this_host.update(self._host_keys.lookup(host_port) or {}) 14:59:17 if known_host_keys_for_this_host: 14:59:17 self._transport._preferred_keys = list(known_host_keys_for_this_host) 14:59:17 14:59:17 # Connect 14:59:17 try: 14:59:17 self._transport.start_client() 14:59:17 except paramiko.SSHException as e: 14:59:17 > raise SSHError('Negotiation failed: %s' % e) 14:59:17 E ncclient.transport.errors.SSHError: Negotiation failed: Error reading SSH protocol banner[Errno 104] Connection reset by peer 14:59:17 14:59:17 ../.tox/py3/lib/python3.6/site-packages/ncclient/transport/ssh.py:331: SSHError 14:59:17 ------------------------------ Captured log setup ------------------------------ 14:59:17 14:59:16.399 ERROR [ncclient.transport.ssh] Exception (client): Error reading SSH protocol banner[Errno 104] Connection reset by peer 14:59:17 14:59:16.401 ERROR [ncclient.transport.ssh] Traceback (most recent call last): 14:59:17 14:59:16.401 ERROR [ncclient.transport.ssh] File "/w/workspace/integration-netconf-pnp-simulator-docker-merge-master/test/mocks/netconf-pnp-simulator/engine/.tox/py3/lib/python3.6/site-packages/paramiko/transport.py", line 2369, in _check_banner 14:59:17 14:59:16.401 ERROR [ncclient.transport.ssh] buf = self.packetizer.readline(timeout) 14:59:17 14:59:16.401 ERROR [ncclient.transport.ssh] File "/w/workspace/integration-netconf-pnp-simulator-docker-merge-master/test/mocks/netconf-pnp-simulator/engine/.tox/py3/lib/python3.6/site-packages/paramiko/packet.py", line 395, in readline 14:59:17 14:59:16.401 ERROR [ncclient.transport.ssh] buf += self._read_timeout(timeout) 14:59:17 14:59:16.401 ERROR [ncclient.transport.ssh] File "/w/workspace/integration-netconf-pnp-simulator-docker-merge-master/test/mocks/netconf-pnp-simulator/engine/.tox/py3/lib/python3.6/site-packages/paramiko/packet.py", line 663, in _read_timeout 14:59:17 14:59:16.401 ERROR [ncclient.transport.ssh] x = self.__socket.recv(128) 14:59:17 14:59:16.401 ERROR [ncclient.transport.ssh] ConnectionResetError: [Errno 104] Connection reset by peer 14:59:17 14:59:16.401 ERROR [ncclient.transport.ssh] 14:59:17 14:59:16.401 ERROR [ncclient.transport.ssh] During handling of the above exception, another exception occurred: 14:59:17 14:59:16.401 ERROR [ncclient.transport.ssh] 14:59:17 14:59:16.401 ERROR [ncclient.transport.ssh] Traceback (most recent call last): 14:59:17 14:59:16.401 ERROR [ncclient.transport.ssh] File "/w/workspace/integration-netconf-pnp-simulator-docker-merge-master/test/mocks/netconf-pnp-simulator/engine/.tox/py3/lib/python3.6/site-packages/paramiko/transport.py", line 2185, in run 14:59:17 14:59:16.401 ERROR [ncclient.transport.ssh] self._check_banner() 14:59:17 14:59:16.401 ERROR [ncclient.transport.ssh] File "/w/workspace/integration-netconf-pnp-simulator-docker-merge-master/test/mocks/netconf-pnp-simulator/engine/.tox/py3/lib/python3.6/site-packages/paramiko/transport.py", line 2374, in _check_banner 14:59:17 14:59:16.401 ERROR [ncclient.transport.ssh] "Error reading SSH protocol banner" + str(e) 14:59:17 14:59:16.401 ERROR [ncclient.transport.ssh] paramiko.ssh_exception.SSHException: Error reading SSH protocol banner[Errno 104] Connection reset by peer 14:59:17 14:59:16.402 ERROR [ncclient.transport.ssh] 14:59:17 _________ ERROR at setup of TestTuringMachine.test_get_config_startup __________ 14:59:17 14:59:17 self = 14:59:17 14:59:17 def _check_banner(self): 14:59:17 # this is slow, but we only have to do it once 14:59:17 for i in range(100): 14:59:17 # give them 15 seconds for the first line, then just 2 seconds 14:59:17 # each additional line. (some sites have very high latency.) 14:59:17 if i == 0: 14:59:17 timeout = self.banner_timeout 14:59:17 else: 14:59:17 timeout = 2 14:59:17 try: 14:59:17 > buf = self.packetizer.readline(timeout) 14:59:17 14:59:17 ../.tox/py3/lib/python3.6/site-packages/paramiko/transport.py:2369: 14:59:17 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 14:59:17 14:59:17 self = , timeout = 15 14:59:17 14:59:17 def readline(self, timeout): 14:59:17 """ 14:59:17 Read a line from the socket. We assume no data is pending after the 14:59:17 line, so it's okay to attempt large reads. 14:59:17 """ 14:59:17 buf = self.__remainder 14:59:17 while linefeed_byte not in buf: 14:59:17 > buf += self._read_timeout(timeout) 14:59:17 14:59:17 ../.tox/py3/lib/python3.6/site-packages/paramiko/packet.py:395: 14:59:17 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 14:59:17 14:59:17 self = , timeout = 15 14:59:17 14:59:17 def _read_timeout(self, timeout): 14:59:17 start = time.time() 14:59:17 while True: 14:59:17 try: 14:59:17 x = self.__socket.recv(128) 14:59:17 if len(x) == 0: 14:59:17 > raise EOFError() 14:59:17 E EOFError 14:59:17 14:59:17 ../.tox/py3/lib/python3.6/site-packages/paramiko/packet.py:665: EOFError 14:59:17 14:59:17 During handling of the above exception, another exception occurred: 14:59:17 14:59:17 self = , host = '127.0.0.1', port = 49154 14:59:17 timeout = None 14:59:17 unknown_host_cb = 14:59:17 username = 'netconf', password = None, key_filename = '../config/ssh/id_rsa' 14:59:17 allow_agent = False, hostkey_verify = False, hostkey_b64 = None 14:59:17 look_for_keys = False, ssh_config = None, sock_fd = None, bind_addr = None 14:59:17 14:59:17 def connect( 14:59:17 self, 14:59:17 host, 14:59:17 port = PORT_NETCONF_DEFAULT, 14:59:17 timeout = None, 14:59:17 unknown_host_cb = default_unknown_host_cb, 14:59:17 username = None, 14:59:17 password = None, 14:59:17 key_filename = None, 14:59:17 allow_agent = True, 14:59:17 hostkey_verify = True, 14:59:17 hostkey_b64 = None, 14:59:17 look_for_keys = True, 14:59:17 ssh_config = None, 14:59:17 sock_fd = None, 14:59:17 bind_addr = None): 14:59:17 14:59:17 """Connect via SSH and initialize the NETCONF session. First attempts the publickey authentication method and then password authentication. 14:59:17 14:59:17 To disable attempting publickey authentication altogether, call with *allow_agent* and *look_for_keys* as `False`. 14:59:17 14:59:17 *host* is the hostname or IP address to connect to 14:59:17 14:59:17 *port* is by default 830 (PORT_NETCONF_DEFAULT), but some devices use the default SSH port of 22 so this may need to be specified 14:59:17 14:59:17 *timeout* is an optional timeout for socket connect 14:59:17 14:59:17 *unknown_host_cb* is called when the server host key is not recognized. It takes two arguments, the hostname and the fingerprint (see the signature of :func:`default_unknown_host_cb`) 14:59:17 14:59:17 *username* is the username to use for SSH authentication 14:59:17 14:59:17 *password* is the password used if using password authentication, or the passphrase to use for unlocking keys that require it 14:59:17 14:59:17 *key_filename* is a filename where a the private key to be used can be found 14:59:17 14:59:17 *allow_agent* enables querying SSH agent (if found) for keys 14:59:17 14:59:17 *hostkey_verify* enables hostkey verification from ~/.ssh/known_hosts 14:59:17 14:59:17 *hostkey_b64* only connect when server presents a public hostkey matching this (obtain from server /etc/ssh/ssh_host_*pub or ssh-keyscan) 14:59:17 14:59:17 *look_for_keys* enables looking in the usual locations for ssh keys (e.g. :file:`~/.ssh/id_*`) 14:59:17 14:59:17 *ssh_config* enables parsing of an OpenSSH configuration file, if set to its path, e.g. :file:`~/.ssh/config` or to True (in this case, use :file:`~/.ssh/config`). 14:59:17 14:59:17 *sock_fd* is an already open socket which shall be used for this connection. Useful for NETCONF outbound ssh. Use host=None together with a valid sock_fd number 14:59:17 14:59:17 *bind_addr* is a (local) source IP address to use, must be reachable from the remote device. 14:59:17 """ 14:59:17 if not (host or sock_fd): 14:59:17 raise SSHError("Missing host or socket fd") 14:59:17 14:59:17 self._host = host 14:59:17 14:59:17 # Optionally, parse .ssh/config 14:59:17 config = {} 14:59:17 if ssh_config is True: 14:59:17 ssh_config = "~/.ssh/config" if sys.platform != "win32" else "~/ssh/config" 14:59:17 if ssh_config is not None: 14:59:17 config = paramiko.SSHConfig() 14:59:17 with open(os.path.expanduser(ssh_config)) as ssh_config_file_obj: 14:59:17 config.parse(ssh_config_file_obj) 14:59:17 14:59:17 # Save default Paramiko SSH port so it can be reverted 14:59:17 paramiko_default_ssh_port = paramiko.config.SSH_PORT 14:59:17 14:59:17 # Change the default SSH port to the port specified by the user so expand_variables 14:59:17 # replaces %p with the passed in port rather than 22 (the defauld paramiko.config.SSH_PORT) 14:59:17 14:59:17 paramiko.config.SSH_PORT = port 14:59:17 14:59:17 config = config.lookup(host) 14:59:17 14:59:17 # paramiko.config.SSHconfig::expand_variables is called by lookup so we can set the SSH port 14:59:17 # back to the default 14:59:17 paramiko.config.SSH_PORT = paramiko_default_ssh_port 14:59:17 14:59:17 host = config.get("hostname", host) 14:59:17 if username is None: 14:59:17 username = config.get("user") 14:59:17 if key_filename is None: 14:59:17 key_filename = config.get("identityfile") 14:59:17 if hostkey_verify: 14:59:17 userknownhostsfile = config.get("userknownhostsfile") 14:59:17 if userknownhostsfile: 14:59:17 self.load_known_hosts(os.path.expanduser(userknownhostsfile)) 14:59:17 if timeout is None: 14:59:17 timeout = config.get("connecttimeout") 14:59:17 if timeout: 14:59:17 timeout = int(timeout) 14:59:17 14:59:17 if username is None: 14:59:17 username = getpass.getuser() 14:59:17 14:59:17 if sock_fd is None: 14:59:17 proxycommand = config.get("proxycommand") 14:59:17 if proxycommand: 14:59:17 self.logger.debug("Configuring Proxy. %s", proxycommand) 14:59:17 if not isinstance(proxycommand, six.string_types): 14:59:17 proxycommand = [os.path.expanduser(elem) for elem in proxycommand] 14:59:17 else: 14:59:17 proxycommand = os.path.expanduser(proxycommand) 14:59:17 sock = paramiko.proxy.ProxyCommand(proxycommand) 14:59:17 else: 14:59:17 for res in socket.getaddrinfo(host, port, socket.AF_UNSPEC, socket.SOCK_STREAM): 14:59:17 af, socktype, proto, canonname, sa = res 14:59:17 try: 14:59:17 sock = socket.socket(af, socktype, proto) 14:59:17 sock.settimeout(timeout) 14:59:17 except socket.error: 14:59:17 continue 14:59:17 try: 14:59:17 if bind_addr: 14:59:17 sock.bind((bind_addr, 0)) 14:59:17 sock.connect(sa) 14:59:17 except socket.error: 14:59:17 sock.close() 14:59:17 continue 14:59:17 break 14:59:17 else: 14:59:17 raise SSHError("Could not open socket to %s:%s" % (host, port)) 14:59:17 else: 14:59:17 if sys.version_info[0] < 3: 14:59:17 s = socket.fromfd(int(sock_fd), socket.AF_INET, socket.SOCK_STREAM) 14:59:17 sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM, _sock=s) 14:59:17 else: 14:59:17 sock = socket.fromfd(int(sock_fd), socket.AF_INET, socket.SOCK_STREAM) 14:59:17 sock.settimeout(timeout) 14:59:17 14:59:17 self._transport = paramiko.Transport(sock) 14:59:17 self._transport.set_log_channel(logger.name) 14:59:17 if config.get("compression") == 'yes': 14:59:17 self._transport.use_compression() 14:59:17 14:59:17 if hostkey_b64: 14:59:17 # If we need to connect with a specific hostkey, negotiate for only its type 14:59:17 hostkey_obj = None 14:59:17 for key_cls in [paramiko.DSSKey, paramiko.Ed25519Key, paramiko.RSAKey, paramiko.ECDSAKey]: 14:59:17 try: 14:59:17 hostkey_obj = key_cls(data=base64.b64decode(hostkey_b64)) 14:59:17 except paramiko.SSHException: 14:59:17 # Not a key of this type - try the next 14:59:17 pass 14:59:17 if not hostkey_obj: 14:59:17 # We've tried all known host key types and haven't found a suitable one to use - bail 14:59:17 raise SSHError("Couldn't find suitable paramiko key class for host key %s" % hostkey_b64) 14:59:17 self._transport._preferred_keys = [hostkey_obj.get_name()] 14:59:17 elif self._host_keys: 14:59:17 # Else set preferred host keys to those we possess for the host 14:59:17 # (avoids situation where known_hosts contains a valid key for the host, but that key type is not selected during negotiation) 14:59:17 known_host_keys_for_this_host = self._host_keys.lookup(host) or {} 14:59:17 host_port = '[%s]:%s' % (host, port) 14:59:17 known_host_keys_for_this_host.update(self._host_keys.lookup(host_port) or {}) 14:59:17 if known_host_keys_for_this_host: 14:59:17 self._transport._preferred_keys = list(known_host_keys_for_this_host) 14:59:17 14:59:17 # Connect 14:59:17 try: 14:59:17 > self._transport.start_client() 14:59:17 14:59:17 ../.tox/py3/lib/python3.6/site-packages/ncclient/transport/ssh.py:329: 14:59:17 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 14:59:17 14:59:17 self = 14:59:17 event = , timeout = None 14:59:17 14:59:17 def start_client(self, event=None, timeout=None): 14:59:17 """ 14:59:17 Negotiate a new SSH2 session as a client. This is the first step after 14:59:17 creating a new `.Transport`. A separate thread is created for protocol 14:59:17 negotiation. 14:59:17 14:59:17 If an event is passed in, this method returns immediately. When 14:59:17 negotiation is done (successful or not), the given ``Event`` will 14:59:17 be triggered. On failure, `is_active` will return ``False``. 14:59:17 14:59:17 (Since 1.4) If ``event`` is ``None``, this method will not return until 14:59:17 negotiation is done. On success, the method returns normally. 14:59:17 Otherwise an SSHException is raised. 14:59:17 14:59:17 After a successful negotiation, you will usually want to authenticate, 14:59:17 calling `auth_password ` or 14:59:17 `auth_publickey `. 14:59:17 14:59:17 .. note:: `connect` is a simpler method for connecting as a client. 14:59:17 14:59:17 .. note:: 14:59:17 After calling this method (or `start_server` or `connect`), you 14:59:17 should no longer directly read from or write to the original socket 14:59:17 object. 14:59:17 14:59:17 :param .threading.Event event: 14:59:17 an event to trigger when negotiation is complete (optional) 14:59:17 14:59:17 :param float timeout: 14:59:17 a timeout, in seconds, for SSH2 session negotiation (optional) 14:59:17 14:59:17 :raises: 14:59:17 `.SSHException` -- if negotiation fails (and no ``event`` was 14:59:17 passed in) 14:59:17 """ 14:59:17 self.active = True 14:59:17 if event is not None: 14:59:17 # async, return immediately and let the app poll for completion 14:59:17 self.completion_event = event 14:59:17 self.start() 14:59:17 return 14:59:17 14:59:17 # synchronous, wait for a result 14:59:17 self.completion_event = event = threading.Event() 14:59:17 self.start() 14:59:17 max_time = time.time() + timeout if timeout is not None else None 14:59:17 while True: 14:59:17 event.wait(0.1) 14:59:17 if not self.active: 14:59:17 e = self.get_exception() 14:59:17 if e is not None: 14:59:17 > raise e 14:59:17 14:59:17 ../.tox/py3/lib/python3.6/site-packages/paramiko/transport.py:773: 14:59:17 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 14:59:17 14:59:17 self = 14:59:17 14:59:17 def run(self): 14:59:17 # (use the exposed "run" method, because if we specify a thread target 14:59:17 # of a private method, threading.Thread will keep a reference to it 14:59:17 # indefinitely, creating a GC cycle and not letting Transport ever be 14:59:17 # GC'd. it's a bug in Thread.) 14:59:17 14:59:17 # Hold reference to 'sys' so we can test sys.modules to detect 14:59:17 # interpreter shutdown. 14:59:17 self.sys = sys 14:59:17 14:59:17 # active=True occurs before the thread is launched, to avoid a race 14:59:17 _active_threads.append(self) 14:59:17 tid = hex(id(self) & xffffffff) 14:59:17 if self.server_mode: 14:59:17 self._log(DEBUG, "starting thread (server mode): {}".format(tid)) 14:59:17 else: 14:59:17 self._log(DEBUG, "starting thread (client mode): {}".format(tid)) 14:59:17 try: 14:59:17 try: 14:59:17 self.packetizer.write_all(b(self.local_version + "\r\n")) 14:59:17 self._log( 14:59:17 DEBUG, 14:59:17 "Local version/idstring: {}".format(self.local_version), 14:59:17 ) # noqa 14:59:17 > self._check_banner() 14:59:17 14:59:17 ../.tox/py3/lib/python3.6/site-packages/paramiko/transport.py:2185: 14:59:17 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 14:59:17 14:59:17 self = 14:59:17 14:59:17 def _check_banner(self): 14:59:17 # this is slow, but we only have to do it once 14:59:17 for i in range(100): 14:59:17 # give them 15 seconds for the first line, then just 2 seconds 14:59:17 # each additional line. (some sites have very high latency.) 14:59:17 if i == 0: 14:59:17 timeout = self.banner_timeout 14:59:17 else: 14:59:17 timeout = 2 14:59:17 try: 14:59:17 buf = self.packetizer.readline(timeout) 14:59:17 except ProxyCommandFailure: 14:59:17 raise 14:59:17 except Exception as e: 14:59:17 raise SSHException( 14:59:17 > "Error reading SSH protocol banner" + str(e) 14:59:17 ) 14:59:17 E paramiko.ssh_exception.SSHException: Error reading SSH protocol banner 14:59:17 14:59:17 ../.tox/py3/lib/python3.6/site-packages/paramiko/transport.py:2374: SSHException 14:59:17 14:59:17 During handling of the above exception, another exception occurred: 14:59:17 14:59:17 self = 14:59:17 14:59:17 def setup(self): 14:59:17 self.nc = manager.connect( 14:59:17 host=settings.HOST, 14:59:17 port=settings.SSH_PORT, 14:59:17 username=settings.USERNAME, 14:59:17 key_filename=settings.SSH_KEY_FILENAME, 14:59:17 allow_agent=False, 14:59:17 look_for_keys=False, 14:59:17 > hostkey_verify=False) 14:59:17 14:59:17 nctest.py:46: 14:59:17 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 14:59:17 ../.tox/py3/lib/python3.6/site-packages/ncclient/manager.py:168: in connect 14:59:17 return connect_ssh(*args, **kwds) 14:59:17 ../.tox/py3/lib/python3.6/site-packages/ncclient/manager.py:135: in connect_ssh 14:59:17 session.connect(*args, **kwds) 14:59:17 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 14:59:17 14:59:17 self = , host = '127.0.0.1', port = 49154 14:59:17 timeout = None 14:59:17 unknown_host_cb = 14:59:17 username = 'netconf', password = None, key_filename = '../config/ssh/id_rsa' 14:59:17 allow_agent = False, hostkey_verify = False, hostkey_b64 = None 14:59:17 look_for_keys = False, ssh_config = None, sock_fd = None, bind_addr = None 14:59:17 14:59:17 def connect( 14:59:17 self, 14:59:17 host, 14:59:17 port = PORT_NETCONF_DEFAULT, 14:59:17 timeout = None, 14:59:17 unknown_host_cb = default_unknown_host_cb, 14:59:17 username = None, 14:59:17 password = None, 14:59:17 key_filename = None, 14:59:17 allow_agent = True, 14:59:17 hostkey_verify = True, 14:59:17 hostkey_b64 = None, 14:59:17 look_for_keys = True, 14:59:17 ssh_config = None, 14:59:17 sock_fd = None, 14:59:17 bind_addr = None): 14:59:17 14:59:17 """Connect via SSH and initialize the NETCONF session. First attempts the publickey authentication method and then password authentication. 14:59:17 14:59:17 To disable attempting publickey authentication altogether, call with *allow_agent* and *look_for_keys* as `False`. 14:59:17 14:59:17 *host* is the hostname or IP address to connect to 14:59:17 14:59:17 *port* is by default 830 (PORT_NETCONF_DEFAULT), but some devices use the default SSH port of 22 so this may need to be specified 14:59:17 14:59:17 *timeout* is an optional timeout for socket connect 14:59:17 14:59:17 *unknown_host_cb* is called when the server host key is not recognized. It takes two arguments, the hostname and the fingerprint (see the signature of :func:`default_unknown_host_cb`) 14:59:17 14:59:17 *username* is the username to use for SSH authentication 14:59:17 14:59:17 *password* is the password used if using password authentication, or the passphrase to use for unlocking keys that require it 14:59:17 14:59:17 *key_filename* is a filename where a the private key to be used can be found 14:59:17 14:59:17 *allow_agent* enables querying SSH agent (if found) for keys 14:59:17 14:59:17 *hostkey_verify* enables hostkey verification from ~/.ssh/known_hosts 14:59:17 14:59:17 *hostkey_b64* only connect when server presents a public hostkey matching this (obtain from server /etc/ssh/ssh_host_*pub or ssh-keyscan) 14:59:17 14:59:17 *look_for_keys* enables looking in the usual locations for ssh keys (e.g. :file:`~/.ssh/id_*`) 14:59:17 14:59:17 *ssh_config* enables parsing of an OpenSSH configuration file, if set to its path, e.g. :file:`~/.ssh/config` or to True (in this case, use :file:`~/.ssh/config`). 14:59:17 14:59:17 *sock_fd* is an already open socket which shall be used for this connection. Useful for NETCONF outbound ssh. Use host=None together with a valid sock_fd number 14:59:17 14:59:17 *bind_addr* is a (local) source IP address to use, must be reachable from the remote device. 14:59:17 """ 14:59:17 if not (host or sock_fd): 14:59:17 raise SSHError("Missing host or socket fd") 14:59:17 14:59:17 self._host = host 14:59:17 14:59:17 # Optionally, parse .ssh/config 14:59:17 config = {} 14:59:17 if ssh_config is True: 14:59:17 ssh_config = "~/.ssh/config" if sys.platform != "win32" else "~/ssh/config" 14:59:17 if ssh_config is not None: 14:59:17 config = paramiko.SSHConfig() 14:59:17 with open(os.path.expanduser(ssh_config)) as ssh_config_file_obj: 14:59:17 config.parse(ssh_config_file_obj) 14:59:17 14:59:17 # Save default Paramiko SSH port so it can be reverted 14:59:17 paramiko_default_ssh_port = paramiko.config.SSH_PORT 14:59:17 14:59:17 # Change the default SSH port to the port specified by the user so expand_variables 14:59:17 # replaces %p with the passed in port rather than 22 (the defauld paramiko.config.SSH_PORT) 14:59:17 14:59:17 paramiko.config.SSH_PORT = port 14:59:17 14:59:17 config = config.lookup(host) 14:59:17 14:59:17 # paramiko.config.SSHconfig::expand_variables is called by lookup so we can set the SSH port 14:59:17 # back to the default 14:59:17 paramiko.config.SSH_PORT = paramiko_default_ssh_port 14:59:17 14:59:17 host = config.get("hostname", host) 14:59:17 if username is None: 14:59:17 username = config.get("user") 14:59:17 if key_filename is None: 14:59:17 key_filename = config.get("identityfile") 14:59:17 if hostkey_verify: 14:59:17 userknownhostsfile = config.get("userknownhostsfile") 14:59:17 if userknownhostsfile: 14:59:17 self.load_known_hosts(os.path.expanduser(userknownhostsfile)) 14:59:17 if timeout is None: 14:59:17 timeout = config.get("connecttimeout") 14:59:17 if timeout: 14:59:17 timeout = int(timeout) 14:59:17 14:59:17 if username is None: 14:59:17 username = getpass.getuser() 14:59:17 14:59:17 if sock_fd is None: 14:59:17 proxycommand = config.get("proxycommand") 14:59:17 if proxycommand: 14:59:17 self.logger.debug("Configuring Proxy. %s", proxycommand) 14:59:17 if not isinstance(proxycommand, six.string_types): 14:59:17 proxycommand = [os.path.expanduser(elem) for elem in proxycommand] 14:59:17 else: 14:59:17 proxycommand = os.path.expanduser(proxycommand) 14:59:17 sock = paramiko.proxy.ProxyCommand(proxycommand) 14:59:17 else: 14:59:17 for res in socket.getaddrinfo(host, port, socket.AF_UNSPEC, socket.SOCK_STREAM): 14:59:17 af, socktype, proto, canonname, sa = res 14:59:17 try: 14:59:17 sock = socket.socket(af, socktype, proto) 14:59:17 sock.settimeout(timeout) 14:59:17 except socket.error: 14:59:17 continue 14:59:17 try: 14:59:17 if bind_addr: 14:59:17 sock.bind((bind_addr, 0)) 14:59:17 sock.connect(sa) 14:59:17 except socket.error: 14:59:17 sock.close() 14:59:17 continue 14:59:17 break 14:59:17 else: 14:59:17 raise SSHError("Could not open socket to %s:%s" % (host, port)) 14:59:17 else: 14:59:17 if sys.version_info[0] < 3: 14:59:17 s = socket.fromfd(int(sock_fd), socket.AF_INET, socket.SOCK_STREAM) 14:59:17 sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM, _sock=s) 14:59:17 else: 14:59:17 sock = socket.fromfd(int(sock_fd), socket.AF_INET, socket.SOCK_STREAM) 14:59:17 sock.settimeout(timeout) 14:59:17 14:59:17 self._transport = paramiko.Transport(sock) 14:59:17 self._transport.set_log_channel(logger.name) 14:59:17 if config.get("compression") == 'yes': 14:59:17 self._transport.use_compression() 14:59:17 14:59:17 if hostkey_b64: 14:59:17 # If we need to connect with a specific hostkey, negotiate for only its type 14:59:17 hostkey_obj = None 14:59:17 for key_cls in [paramiko.DSSKey, paramiko.Ed25519Key, paramiko.RSAKey, paramiko.ECDSAKey]: 14:59:17 try: 14:59:17 hostkey_obj = key_cls(data=base64.b64decode(hostkey_b64)) 14:59:17 except paramiko.SSHException: 14:59:17 # Not a key of this type - try the next 14:59:17 pass 14:59:17 if not hostkey_obj: 14:59:17 # We've tried all known host key types and haven't found a suitable one to use - bail 14:59:17 raise SSHError("Couldn't find suitable paramiko key class for host key %s" % hostkey_b64) 14:59:17 self._transport._preferred_keys = [hostkey_obj.get_name()] 14:59:17 elif self._host_keys: 14:59:17 # Else set preferred host keys to those we possess for the host 14:59:17 # (avoids situation where known_hosts contains a valid key for the host, but that key type is not selected during negotiation) 14:59:17 known_host_keys_for_this_host = self._host_keys.lookup(host) or {} 14:59:17 host_port = '[%s]:%s' % (host, port) 14:59:17 known_host_keys_for_this_host.update(self._host_keys.lookup(host_port) or {}) 14:59:17 if known_host_keys_for_this_host: 14:59:17 self._transport._preferred_keys = list(known_host_keys_for_this_host) 14:59:17 14:59:17 # Connect 14:59:17 try: 14:59:17 self._transport.start_client() 14:59:17 except paramiko.SSHException as e: 14:59:17 > raise SSHError('Negotiation failed: %s' % e) 14:59:17 E ncclient.transport.errors.SSHError: Negotiation failed: Error reading SSH protocol banner 14:59:17 14:59:17 ../.tox/py3/lib/python3.6/site-packages/ncclient/transport/ssh.py:331: SSHError 14:59:17 ------------------------------ Captured log setup ------------------------------ 14:59:17 14:59:16.522 ERROR [ncclient.transport.ssh] Exception (client): Error reading SSH protocol banner 14:59:17 14:59:16.523 ERROR [ncclient.transport.ssh] Traceback (most recent call last): 14:59:17 14:59:16.523 ERROR [ncclient.transport.ssh] File "/w/workspace/integration-netconf-pnp-simulator-docker-merge-master/test/mocks/netconf-pnp-simulator/engine/.tox/py3/lib/python3.6/site-packages/paramiko/transport.py", line 2369, in _check_banner 14:59:17 14:59:16.523 ERROR [ncclient.transport.ssh] buf = self.packetizer.readline(timeout) 14:59:17 14:59:16.523 ERROR [ncclient.transport.ssh] File "/w/workspace/integration-netconf-pnp-simulator-docker-merge-master/test/mocks/netconf-pnp-simulator/engine/.tox/py3/lib/python3.6/site-packages/paramiko/packet.py", line 395, in readline 14:59:17 14:59:16.523 ERROR [ncclient.transport.ssh] buf += self._read_timeout(timeout) 14:59:17 14:59:16.523 ERROR [ncclient.transport.ssh] File "/w/workspace/integration-netconf-pnp-simulator-docker-merge-master/test/mocks/netconf-pnp-simulator/engine/.tox/py3/lib/python3.6/site-packages/paramiko/packet.py", line 665, in _read_timeout 14:59:17 14:59:16.523 ERROR [ncclient.transport.ssh] raise EOFError() 14:59:17 14:59:16.523 ERROR [ncclient.transport.ssh] EOFError 14:59:17 14:59:16.524 ERROR [ncclient.transport.ssh] 14:59:17 14:59:16.524 ERROR [ncclient.transport.ssh] During handling of the above exception, another exception occurred: 14:59:17 14:59:16.524 ERROR [ncclient.transport.ssh] 14:59:17 14:59:16.524 ERROR [ncclient.transport.ssh] Traceback (most recent call last): 14:59:17 14:59:16.524 ERROR [ncclient.transport.ssh] File "/w/workspace/integration-netconf-pnp-simulator-docker-merge-master/test/mocks/netconf-pnp-simulator/engine/.tox/py3/lib/python3.6/site-packages/paramiko/transport.py", line 2185, in run 14:59:17 14:59:16.524 ERROR [ncclient.transport.ssh] self._check_banner() 14:59:17 14:59:16.524 ERROR [ncclient.transport.ssh] File "/w/workspace/integration-netconf-pnp-simulator-docker-merge-master/test/mocks/netconf-pnp-simulator/engine/.tox/py3/lib/python3.6/site-packages/paramiko/transport.py", line 2374, in _check_banner 14:59:17 14:59:16.524 ERROR [ncclient.transport.ssh] "Error reading SSH protocol banner" + str(e) 14:59:17 14:59:16.524 ERROR [ncclient.transport.ssh] paramiko.ssh_exception.SSHException: Error reading SSH protocol banner 14:59:17 14:59:16.524 ERROR [ncclient.transport.ssh] 14:59:17 _________ ERROR at setup of TestTuringMachine.test_get_config_running __________ 14:59:17 14:59:17 self = 14:59:17 14:59:17 def _check_banner(self): 14:59:17 # this is slow, but we only have to do it once 14:59:17 for i in range(100): 14:59:17 # give them 15 seconds for the first line, then just 2 seconds 14:59:17 # each additional line. (some sites have very high latency.) 14:59:17 if i == 0: 14:59:17 timeout = self.banner_timeout 14:59:17 else: 14:59:17 timeout = 2 14:59:17 try: 14:59:17 > buf = self.packetizer.readline(timeout) 14:59:17 14:59:17 ../.tox/py3/lib/python3.6/site-packages/paramiko/transport.py:2369: 14:59:17 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 14:59:17 14:59:17 self = , timeout = 15 14:59:17 14:59:17 def readline(self, timeout): 14:59:17 """ 14:59:17 Read a line from the socket. We assume no data is pending after the 14:59:17 line, so it's okay to attempt large reads. 14:59:17 """ 14:59:17 buf = self.__remainder 14:59:17 while linefeed_byte not in buf: 14:59:17 > buf += self._read_timeout(timeout) 14:59:17 14:59:17 ../.tox/py3/lib/python3.6/site-packages/paramiko/packet.py:395: 14:59:17 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 14:59:17 14:59:17 self = , timeout = 15 14:59:17 14:59:17 def _read_timeout(self, timeout): 14:59:17 start = time.time() 14:59:17 while True: 14:59:17 try: 14:59:17 x = self.__socket.recv(128) 14:59:17 if len(x) == 0: 14:59:17 > raise EOFError() 14:59:17 E EOFError 14:59:17 14:59:17 ../.tox/py3/lib/python3.6/site-packages/paramiko/packet.py:665: EOFError 14:59:17 14:59:17 During handling of the above exception, another exception occurred: 14:59:17 14:59:17 self = , host = '127.0.0.1', port = 49154 14:59:17 timeout = None 14:59:17 unknown_host_cb = 14:59:17 username = 'netconf', password = None, key_filename = '../config/ssh/id_rsa' 14:59:17 allow_agent = False, hostkey_verify = False, hostkey_b64 = None 14:59:17 look_for_keys = False, ssh_config = None, sock_fd = None, bind_addr = None 14:59:17 14:59:17 def connect( 14:59:17 self, 14:59:17 host, 14:59:17 port = PORT_NETCONF_DEFAULT, 14:59:17 timeout = None, 14:59:17 unknown_host_cb = default_unknown_host_cb, 14:59:17 username = None, 14:59:17 password = None, 14:59:17 key_filename = None, 14:59:17 allow_agent = True, 14:59:17 hostkey_verify = True, 14:59:17 hostkey_b64 = None, 14:59:17 look_for_keys = True, 14:59:17 ssh_config = None, 14:59:17 sock_fd = None, 14:59:17 bind_addr = None): 14:59:17 14:59:17 """Connect via SSH and initialize the NETCONF session. First attempts the publickey authentication method and then password authentication. 14:59:17 14:59:17 To disable attempting publickey authentication altogether, call with *allow_agent* and *look_for_keys* as `False`. 14:59:17 14:59:17 *host* is the hostname or IP address to connect to 14:59:17 14:59:17 *port* is by default 830 (PORT_NETCONF_DEFAULT), but some devices use the default SSH port of 22 so this may need to be specified 14:59:17 14:59:17 *timeout* is an optional timeout for socket connect 14:59:17 14:59:17 *unknown_host_cb* is called when the server host key is not recognized. It takes two arguments, the hostname and the fingerprint (see the signature of :func:`default_unknown_host_cb`) 14:59:17 14:59:17 *username* is the username to use for SSH authentication 14:59:17 14:59:17 *password* is the password used if using password authentication, or the passphrase to use for unlocking keys that require it 14:59:17 14:59:17 *key_filename* is a filename where a the private key to be used can be found 14:59:17 14:59:17 *allow_agent* enables querying SSH agent (if found) for keys 14:59:17 14:59:17 *hostkey_verify* enables hostkey verification from ~/.ssh/known_hosts 14:59:17 14:59:17 *hostkey_b64* only connect when server presents a public hostkey matching this (obtain from server /etc/ssh/ssh_host_*pub or ssh-keyscan) 14:59:17 14:59:17 *look_for_keys* enables looking in the usual locations for ssh keys (e.g. :file:`~/.ssh/id_*`) 14:59:17 14:59:17 *ssh_config* enables parsing of an OpenSSH configuration file, if set to its path, e.g. :file:`~/.ssh/config` or to True (in this case, use :file:`~/.ssh/config`). 14:59:17 14:59:17 *sock_fd* is an already open socket which shall be used for this connection. Useful for NETCONF outbound ssh. Use host=None together with a valid sock_fd number 14:59:17 14:59:17 *bind_addr* is a (local) source IP address to use, must be reachable from the remote device. 14:59:17 """ 14:59:17 if not (host or sock_fd): 14:59:17 raise SSHError("Missing host or socket fd") 14:59:17 14:59:17 self._host = host 14:59:17 14:59:17 # Optionally, parse .ssh/config 14:59:17 config = {} 14:59:17 if ssh_config is True: 14:59:17 ssh_config = "~/.ssh/config" if sys.platform != "win32" else "~/ssh/config" 14:59:17 if ssh_config is not None: 14:59:17 config = paramiko.SSHConfig() 14:59:17 with open(os.path.expanduser(ssh_config)) as ssh_config_file_obj: 14:59:17 config.parse(ssh_config_file_obj) 14:59:17 14:59:17 # Save default Paramiko SSH port so it can be reverted 14:59:17 paramiko_default_ssh_port = paramiko.config.SSH_PORT 14:59:17 14:59:17 # Change the default SSH port to the port specified by the user so expand_variables 14:59:17 # replaces %p with the passed in port rather than 22 (the defauld paramiko.config.SSH_PORT) 14:59:17 14:59:17 paramiko.config.SSH_PORT = port 14:59:17 14:59:17 config = config.lookup(host) 14:59:17 14:59:17 # paramiko.config.SSHconfig::expand_variables is called by lookup so we can set the SSH port 14:59:17 # back to the default 14:59:17 paramiko.config.SSH_PORT = paramiko_default_ssh_port 14:59:17 14:59:17 host = config.get("hostname", host) 14:59:17 if username is None: 14:59:17 username = config.get("user") 14:59:17 if key_filename is None: 14:59:17 key_filename = config.get("identityfile") 14:59:17 if hostkey_verify: 14:59:17 userknownhostsfile = config.get("userknownhostsfile") 14:59:17 if userknownhostsfile: 14:59:17 self.load_known_hosts(os.path.expanduser(userknownhostsfile)) 14:59:17 if timeout is None: 14:59:17 timeout = config.get("connecttimeout") 14:59:17 if timeout: 14:59:17 timeout = int(timeout) 14:59:17 14:59:17 if username is None: 14:59:17 username = getpass.getuser() 14:59:17 14:59:17 if sock_fd is None: 14:59:17 proxycommand = config.get("proxycommand") 14:59:17 if proxycommand: 14:59:17 self.logger.debug("Configuring Proxy. %s", proxycommand) 14:59:17 if not isinstance(proxycommand, six.string_types): 14:59:17 proxycommand = [os.path.expanduser(elem) for elem in proxycommand] 14:59:17 else: 14:59:17 proxycommand = os.path.expanduser(proxycommand) 14:59:17 sock = paramiko.proxy.ProxyCommand(proxycommand) 14:59:17 else: 14:59:17 for res in socket.getaddrinfo(host, port, socket.AF_UNSPEC, socket.SOCK_STREAM): 14:59:17 af, socktype, proto, canonname, sa = res 14:59:17 try: 14:59:17 sock = socket.socket(af, socktype, proto) 14:59:17 sock.settimeout(timeout) 14:59:17 except socket.error: 14:59:17 continue 14:59:17 try: 14:59:17 if bind_addr: 14:59:17 sock.bind((bind_addr, 0)) 14:59:17 sock.connect(sa) 14:59:17 except socket.error: 14:59:17 sock.close() 14:59:17 continue 14:59:17 break 14:59:17 else: 14:59:17 raise SSHError("Could not open socket to %s:%s" % (host, port)) 14:59:17 else: 14:59:17 if sys.version_info[0] < 3: 14:59:17 s = socket.fromfd(int(sock_fd), socket.AF_INET, socket.SOCK_STREAM) 14:59:17 sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM, _sock=s) 14:59:17 else: 14:59:17 sock = socket.fromfd(int(sock_fd), socket.AF_INET, socket.SOCK_STREAM) 14:59:17 sock.settimeout(timeout) 14:59:17 14:59:17 self._transport = paramiko.Transport(sock) 14:59:17 self._transport.set_log_channel(logger.name) 14:59:17 if config.get("compression") == 'yes': 14:59:17 self._transport.use_compression() 14:59:17 14:59:17 if hostkey_b64: 14:59:17 # If we need to connect with a specific hostkey, negotiate for only its type 14:59:17 hostkey_obj = None 14:59:17 for key_cls in [paramiko.DSSKey, paramiko.Ed25519Key, paramiko.RSAKey, paramiko.ECDSAKey]: 14:59:17 try: 14:59:17 hostkey_obj = key_cls(data=base64.b64decode(hostkey_b64)) 14:59:17 except paramiko.SSHException: 14:59:17 # Not a key of this type - try the next 14:59:17 pass 14:59:17 if not hostkey_obj: 14:59:17 # We've tried all known host key types and haven't found a suitable one to use - bail 14:59:17 raise SSHError("Couldn't find suitable paramiko key class for host key %s" % hostkey_b64) 14:59:17 self._transport._preferred_keys = [hostkey_obj.get_name()] 14:59:17 elif self._host_keys: 14:59:17 # Else set preferred host keys to those we possess for the host 14:59:17 # (avoids situation where known_hosts contains a valid key for the host, but that key type is not selected during negotiation) 14:59:17 known_host_keys_for_this_host = self._host_keys.lookup(host) or {} 14:59:17 host_port = '[%s]:%s' % (host, port) 14:59:17 known_host_keys_for_this_host.update(self._host_keys.lookup(host_port) or {}) 14:59:17 if known_host_keys_for_this_host: 14:59:17 self._transport._preferred_keys = list(known_host_keys_for_this_host) 14:59:17 14:59:17 # Connect 14:59:17 try: 14:59:17 > self._transport.start_client() 14:59:17 14:59:17 ../.tox/py3/lib/python3.6/site-packages/ncclient/transport/ssh.py:329: 14:59:17 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 14:59:17 14:59:17 self = 14:59:17 event = , timeout = None 14:59:17 14:59:17 def start_client(self, event=None, timeout=None): 14:59:17 """ 14:59:17 Negotiate a new SSH2 session as a client. This is the first step after 14:59:17 creating a new `.Transport`. A separate thread is created for protocol 14:59:17 negotiation. 14:59:17 14:59:17 If an event is passed in, this method returns immediately. When 14:59:17 negotiation is done (successful or not), the given ``Event`` will 14:59:17 be triggered. On failure, `is_active` will return ``False``. 14:59:17 14:59:17 (Since 1.4) If ``event`` is ``None``, this method will not return until 14:59:17 negotiation is done. On success, the method returns normally. 14:59:17 Otherwise an SSHException is raised. 14:59:17 14:59:17 After a successful negotiation, you will usually want to authenticate, 14:59:17 calling `auth_password ` or 14:59:17 `auth_publickey `. 14:59:17 14:59:17 .. note:: `connect` is a simpler method for connecting as a client. 14:59:17 14:59:17 .. note:: 14:59:17 After calling this method (or `start_server` or `connect`), you 14:59:17 should no longer directly read from or write to the original socket 14:59:17 object. 14:59:17 14:59:17 :param .threading.Event event: 14:59:17 an event to trigger when negotiation is complete (optional) 14:59:17 14:59:17 :param float timeout: 14:59:17 a timeout, in seconds, for SSH2 session negotiation (optional) 14:59:17 14:59:17 :raises: 14:59:17 `.SSHException` -- if negotiation fails (and no ``event`` was 14:59:17 passed in) 14:59:17 """ 14:59:17 self.active = True 14:59:17 if event is not None: 14:59:17 # async, return immediately and let the app poll for completion 14:59:17 self.completion_event = event 14:59:17 self.start() 14:59:17 return 14:59:17 14:59:17 # synchronous, wait for a result 14:59:17 self.completion_event = event = threading.Event() 14:59:17 self.start() 14:59:17 max_time = time.time() + timeout if timeout is not None else None 14:59:17 while True: 14:59:17 event.wait(0.1) 14:59:17 if not self.active: 14:59:17 e = self.get_exception() 14:59:17 if e is not None: 14:59:17 > raise e 14:59:17 14:59:17 ../.tox/py3/lib/python3.6/site-packages/paramiko/transport.py:773: 14:59:17 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 14:59:17 14:59:17 self = 14:59:17 14:59:17 def run(self): 14:59:17 # (use the exposed "run" method, because if we specify a thread target 14:59:17 # of a private method, threading.Thread will keep a reference to it 14:59:17 # indefinitely, creating a GC cycle and not letting Transport ever be 14:59:17 # GC'd. it's a bug in Thread.) 14:59:17 14:59:17 # Hold reference to 'sys' so we can test sys.modules to detect 14:59:17 # interpreter shutdown. 14:59:17 self.sys = sys 14:59:17 14:59:17 # active=True occurs before the thread is launched, to avoid a race 14:59:17 _active_threads.append(self) 14:59:17 tid = hex(id(self) & xffffffff) 14:59:17 if self.server_mode: 14:59:17 self._log(DEBUG, "starting thread (server mode): {}".format(tid)) 14:59:17 else: 14:59:17 self._log(DEBUG, "starting thread (client mode): {}".format(tid)) 14:59:17 try: 14:59:17 try: 14:59:17 self.packetizer.write_all(b(self.local_version + "\r\n")) 14:59:17 self._log( 14:59:17 DEBUG, 14:59:17 "Local version/idstring: {}".format(self.local_version), 14:59:17 ) # noqa 14:59:17 > self._check_banner() 14:59:17 14:59:17 ../.tox/py3/lib/python3.6/site-packages/paramiko/transport.py:2185: 14:59:17 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 14:59:17 14:59:17 self = 14:59:17 14:59:17 def _check_banner(self): 14:59:17 # this is slow, but we only have to do it once 14:59:17 for i in range(100): 14:59:17 # give them 15 seconds for the first line, then just 2 seconds 14:59:17 # each additional line. (some sites have very high latency.) 14:59:17 if i == 0: 14:59:17 timeout = self.banner_timeout 14:59:17 else: 14:59:17 timeout = 2 14:59:17 try: 14:59:17 buf = self.packetizer.readline(timeout) 14:59:17 except ProxyCommandFailure: 14:59:17 raise 14:59:17 except Exception as e: 14:59:17 raise SSHException( 14:59:17 > "Error reading SSH protocol banner" + str(e) 14:59:17 ) 14:59:17 E paramiko.ssh_exception.SSHException: Error reading SSH protocol banner 14:59:17 14:59:17 ../.tox/py3/lib/python3.6/site-packages/paramiko/transport.py:2374: SSHException 14:59:17 14:59:17 During handling of the above exception, another exception occurred: 14:59:17 14:59:17 self = 14:59:17 14:59:17 def setup(self): 14:59:17 self.nc = manager.connect( 14:59:17 host=settings.HOST, 14:59:17 port=settings.SSH_PORT, 14:59:17 username=settings.USERNAME, 14:59:17 key_filename=settings.SSH_KEY_FILENAME, 14:59:17 allow_agent=False, 14:59:17 look_for_keys=False, 14:59:17 > hostkey_verify=False) 14:59:17 14:59:17 nctest.py:46: 14:59:17 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 14:59:17 ../.tox/py3/lib/python3.6/site-packages/ncclient/manager.py:168: in connect 14:59:17 return connect_ssh(*args, **kwds) 14:59:17 ../.tox/py3/lib/python3.6/site-packages/ncclient/manager.py:135: in connect_ssh 14:59:17 session.connect(*args, **kwds) 14:59:17 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 14:59:17 14:59:17 self = , host = '127.0.0.1', port = 49154 14:59:17 timeout = None 14:59:17 unknown_host_cb = 14:59:17 username = 'netconf', password = None, key_filename = '../config/ssh/id_rsa' 14:59:17 allow_agent = False, hostkey_verify = False, hostkey_b64 = None 14:59:17 look_for_keys = False, ssh_config = None, sock_fd = None, bind_addr = None 14:59:17 14:59:17 def connect( 14:59:17 self, 14:59:17 host, 14:59:17 port = PORT_NETCONF_DEFAULT, 14:59:17 timeout = None, 14:59:17 unknown_host_cb = default_unknown_host_cb, 14:59:17 username = None, 14:59:17 password = None, 14:59:17 key_filename = None, 14:59:17 allow_agent = True, 14:59:17 hostkey_verify = True, 14:59:17 hostkey_b64 = None, 14:59:17 look_for_keys = True, 14:59:17 ssh_config = None, 14:59:17 sock_fd = None, 14:59:17 bind_addr = None): 14:59:17 14:59:17 """Connect via SSH and initialize the NETCONF session. First attempts the publickey authentication method and then password authentication. 14:59:17 14:59:17 To disable attempting publickey authentication altogether, call with *allow_agent* and *look_for_keys* as `False`. 14:59:17 14:59:17 *host* is the hostname or IP address to connect to 14:59:17 14:59:17 *port* is by default 830 (PORT_NETCONF_DEFAULT), but some devices use the default SSH port of 22 so this may need to be specified 14:59:17 14:59:17 *timeout* is an optional timeout for socket connect 14:59:17 14:59:17 *unknown_host_cb* is called when the server host key is not recognized. It takes two arguments, the hostname and the fingerprint (see the signature of :func:`default_unknown_host_cb`) 14:59:17 14:59:17 *username* is the username to use for SSH authentication 14:59:17 14:59:17 *password* is the password used if using password authentication, or the passphrase to use for unlocking keys that require it 14:59:17 14:59:17 *key_filename* is a filename where a the private key to be used can be found 14:59:17 14:59:17 *allow_agent* enables querying SSH agent (if found) for keys 14:59:17 14:59:17 *hostkey_verify* enables hostkey verification from ~/.ssh/known_hosts 14:59:17 14:59:17 *hostkey_b64* only connect when server presents a public hostkey matching this (obtain from server /etc/ssh/ssh_host_*pub or ssh-keyscan) 14:59:17 14:59:17 *look_for_keys* enables looking in the usual locations for ssh keys (e.g. :file:`~/.ssh/id_*`) 14:59:17 14:59:17 *ssh_config* enables parsing of an OpenSSH configuration file, if set to its path, e.g. :file:`~/.ssh/config` or to True (in this case, use :file:`~/.ssh/config`). 14:59:17 14:59:17 *sock_fd* is an already open socket which shall be used for this connection. Useful for NETCONF outbound ssh. Use host=None together with a valid sock_fd number 14:59:17 14:59:17 *bind_addr* is a (local) source IP address to use, must be reachable from the remote device. 14:59:17 """ 14:59:17 if not (host or sock_fd): 14:59:17 raise SSHError("Missing host or socket fd") 14:59:17 14:59:17 self._host = host 14:59:17 14:59:17 # Optionally, parse .ssh/config 14:59:17 config = {} 14:59:17 if ssh_config is True: 14:59:17 ssh_config = "~/.ssh/config" if sys.platform != "win32" else "~/ssh/config" 14:59:17 if ssh_config is not None: 14:59:17 config = paramiko.SSHConfig() 14:59:17 with open(os.path.expanduser(ssh_config)) as ssh_config_file_obj: 14:59:17 config.parse(ssh_config_file_obj) 14:59:17 14:59:17 # Save default Paramiko SSH port so it can be reverted 14:59:17 paramiko_default_ssh_port = paramiko.config.SSH_PORT 14:59:17 14:59:17 # Change the default SSH port to the port specified by the user so expand_variables 14:59:17 # replaces %p with the passed in port rather than 22 (the defauld paramiko.config.SSH_PORT) 14:59:17 14:59:17 paramiko.config.SSH_PORT = port 14:59:17 14:59:17 config = config.lookup(host) 14:59:17 14:59:17 # paramiko.config.SSHconfig::expand_variables is called by lookup so we can set the SSH port 14:59:17 # back to the default 14:59:17 paramiko.config.SSH_PORT = paramiko_default_ssh_port 14:59:17 14:59:17 host = config.get("hostname", host) 14:59:17 if username is None: 14:59:17 username = config.get("user") 14:59:17 if key_filename is None: 14:59:17 key_filename = config.get("identityfile") 14:59:17 if hostkey_verify: 14:59:17 userknownhostsfile = config.get("userknownhostsfile") 14:59:17 if userknownhostsfile: 14:59:17 self.load_known_hosts(os.path.expanduser(userknownhostsfile)) 14:59:17 if timeout is None: 14:59:17 timeout = config.get("connecttimeout") 14:59:17 if timeout: 14:59:17 timeout = int(timeout) 14:59:17 14:59:17 if username is None: 14:59:17 username = getpass.getuser() 14:59:17 14:59:17 if sock_fd is None: 14:59:17 proxycommand = config.get("proxycommand") 14:59:17 if proxycommand: 14:59:17 self.logger.debug("Configuring Proxy. %s", proxycommand) 14:59:17 if not isinstance(proxycommand, six.string_types): 14:59:17 proxycommand = [os.path.expanduser(elem) for elem in proxycommand] 14:59:17 else: 14:59:17 proxycommand = os.path.expanduser(proxycommand) 14:59:17 sock = paramiko.proxy.ProxyCommand(proxycommand) 14:59:17 else: 14:59:17 for res in socket.getaddrinfo(host, port, socket.AF_UNSPEC, socket.SOCK_STREAM): 14:59:17 af, socktype, proto, canonname, sa = res 14:59:17 try: 14:59:17 sock = socket.socket(af, socktype, proto) 14:59:17 sock.settimeout(timeout) 14:59:17 except socket.error: 14:59:17 continue 14:59:17 try: 14:59:17 if bind_addr: 14:59:17 sock.bind((bind_addr, 0)) 14:59:17 sock.connect(sa) 14:59:17 except socket.error: 14:59:17 sock.close() 14:59:17 continue 14:59:17 break 14:59:17 else: 14:59:17 raise SSHError("Could not open socket to %s:%s" % (host, port)) 14:59:17 else: 14:59:17 if sys.version_info[0] < 3: 14:59:17 s = socket.fromfd(int(sock_fd), socket.AF_INET, socket.SOCK_STREAM) 14:59:17 sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM, _sock=s) 14:59:17 else: 14:59:17 sock = socket.fromfd(int(sock_fd), socket.AF_INET, socket.SOCK_STREAM) 14:59:17 sock.settimeout(timeout) 14:59:17 14:59:17 self._transport = paramiko.Transport(sock) 14:59:17 self._transport.set_log_channel(logger.name) 14:59:17 if config.get("compression") == 'yes': 14:59:17 self._transport.use_compression() 14:59:17 14:59:17 if hostkey_b64: 14:59:17 # If we need to connect with a specific hostkey, negotiate for only its type 14:59:17 hostkey_obj = None 14:59:17 for key_cls in [paramiko.DSSKey, paramiko.Ed25519Key, paramiko.RSAKey, paramiko.ECDSAKey]: 14:59:17 try: 14:59:17 hostkey_obj = key_cls(data=base64.b64decode(hostkey_b64)) 14:59:17 except paramiko.SSHException: 14:59:17 # Not a key of this type - try the next 14:59:17 pass 14:59:17 if not hostkey_obj: 14:59:17 # We've tried all known host key types and haven't found a suitable one to use - bail 14:59:17 raise SSHError("Couldn't find suitable paramiko key class for host key %s" % hostkey_b64) 14:59:17 self._transport._preferred_keys = [hostkey_obj.get_name()] 14:59:17 elif self._host_keys: 14:59:17 # Else set preferred host keys to those we possess for the host 14:59:17 # (avoids situation where known_hosts contains a valid key for the host, but that key type is not selected during negotiation) 14:59:17 known_host_keys_for_this_host = self._host_keys.lookup(host) or {} 14:59:17 host_port = '[%s]:%s' % (host, port) 14:59:17 known_host_keys_for_this_host.update(self._host_keys.lookup(host_port) or {}) 14:59:17 if known_host_keys_for_this_host: 14:59:17 self._transport._preferred_keys = list(known_host_keys_for_this_host) 14:59:17 14:59:17 # Connect 14:59:17 try: 14:59:17 self._transport.start_client() 14:59:17 except paramiko.SSHException as e: 14:59:17 > raise SSHError('Negotiation failed: %s' % e) 14:59:17 E ncclient.transport.errors.SSHError: Negotiation failed: Error reading SSH protocol banner 14:59:17 14:59:17 ../.tox/py3/lib/python3.6/site-packages/ncclient/transport/ssh.py:331: SSHError 14:59:17 ------------------------------ Captured log setup ------------------------------ 14:59:17 14:59:16.632 ERROR [ncclient.transport.ssh] Exception (client): Error reading SSH protocol banner 14:59:17 14:59:16.633 ERROR [ncclient.transport.ssh] Traceback (most recent call last): 14:59:17 14:59:16.633 ERROR [ncclient.transport.ssh] File "/w/workspace/integration-netconf-pnp-simulator-docker-merge-master/test/mocks/netconf-pnp-simulator/engine/.tox/py3/lib/python3.6/site-packages/paramiko/transport.py", line 2369, in _check_banner 14:59:17 14:59:16.633 ERROR [ncclient.transport.ssh] buf = self.packetizer.readline(timeout) 14:59:17 14:59:16.633 ERROR [ncclient.transport.ssh] File "/w/workspace/integration-netconf-pnp-simulator-docker-merge-master/test/mocks/netconf-pnp-simulator/engine/.tox/py3/lib/python3.6/site-packages/paramiko/packet.py", line 395, in readline 14:59:17 14:59:16.633 ERROR [ncclient.transport.ssh] buf += self._read_timeout(timeout) 14:59:17 14:59:16.633 ERROR [ncclient.transport.ssh] File "/w/workspace/integration-netconf-pnp-simulator-docker-merge-master/test/mocks/netconf-pnp-simulator/engine/.tox/py3/lib/python3.6/site-packages/paramiko/packet.py", line 665, in _read_timeout 14:59:17 14:59:16.633 ERROR [ncclient.transport.ssh] raise EOFError() 14:59:17 14:59:16.633 ERROR [ncclient.transport.ssh] EOFError 14:59:17 14:59:16.634 ERROR [ncclient.transport.ssh] 14:59:17 14:59:16.634 ERROR [ncclient.transport.ssh] During handling of the above exception, another exception occurred: 14:59:17 14:59:16.634 ERROR [ncclient.transport.ssh] 14:59:17 14:59:16.634 ERROR [ncclient.transport.ssh] Traceback (most recent call last): 14:59:17 14:59:16.634 ERROR [ncclient.transport.ssh] File "/w/workspace/integration-netconf-pnp-simulator-docker-merge-master/test/mocks/netconf-pnp-simulator/engine/.tox/py3/lib/python3.6/site-packages/paramiko/transport.py", line 2185, in run 14:59:17 14:59:16.634 ERROR [ncclient.transport.ssh] self._check_banner() 14:59:17 14:59:16.634 ERROR [ncclient.transport.ssh] File "/w/workspace/integration-netconf-pnp-simulator-docker-merge-master/test/mocks/netconf-pnp-simulator/engine/.tox/py3/lib/python3.6/site-packages/paramiko/transport.py", line 2374, in _check_banner 14:59:17 14:59:16.634 ERROR [ncclient.transport.ssh] "Error reading SSH protocol banner" + str(e) 14:59:17 14:59:16.634 ERROR [ncclient.transport.ssh] paramiko.ssh_exception.SSHException: Error reading SSH protocol banner 14:59:17 14:59:16.634 ERROR [ncclient.transport.ssh] 14:59:17 _________ ERROR at setup of TestTuringMachine.test_get_subtree_filter __________ 14:59:17 14:59:17 self = 14:59:17 14:59:17 def _check_banner(self): 14:59:17 # this is slow, but we only have to do it once 14:59:17 for i in range(100): 14:59:17 # give them 15 seconds for the first line, then just 2 seconds 14:59:17 # each additional line. (some sites have very high latency.) 14:59:17 if i == 0: 14:59:17 timeout = self.banner_timeout 14:59:17 else: 14:59:17 timeout = 2 14:59:17 try: 14:59:17 > buf = self.packetizer.readline(timeout) 14:59:17 14:59:17 ../.tox/py3/lib/python3.6/site-packages/paramiko/transport.py:2369: 14:59:17 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 14:59:17 14:59:17 self = , timeout = 15 14:59:17 14:59:17 def readline(self, timeout): 14:59:17 """ 14:59:17 Read a line from the socket. We assume no data is pending after the 14:59:17 line, so it's okay to attempt large reads. 14:59:17 """ 14:59:17 buf = self.__remainder 14:59:17 while linefeed_byte not in buf: 14:59:17 > buf += self._read_timeout(timeout) 14:59:17 14:59:17 ../.tox/py3/lib/python3.6/site-packages/paramiko/packet.py:395: 14:59:17 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 14:59:17 14:59:17 self = , timeout = 15 14:59:17 14:59:17 def _read_timeout(self, timeout): 14:59:17 start = time.time() 14:59:17 while True: 14:59:17 try: 14:59:17 > x = self.__socket.recv(128) 14:59:17 E ConnectionResetError: [Errno 104] Connection reset by peer 14:59:17 14:59:17 ../.tox/py3/lib/python3.6/site-packages/paramiko/packet.py:663: ConnectionResetError 14:59:17 14:59:17 During handling of the above exception, another exception occurred: 14:59:17 14:59:17 self = , host = '127.0.0.1', port = 49154 14:59:17 timeout = None 14:59:17 unknown_host_cb = 14:59:17 username = 'netconf', password = None, key_filename = '../config/ssh/id_rsa' 14:59:17 allow_agent = False, hostkey_verify = False, hostkey_b64 = None 14:59:17 look_for_keys = False, ssh_config = None, sock_fd = None, bind_addr = None 14:59:17 14:59:17 def connect( 14:59:17 self, 14:59:17 host, 14:59:17 port = PORT_NETCONF_DEFAULT, 14:59:17 timeout = None, 14:59:17 unknown_host_cb = default_unknown_host_cb, 14:59:17 username = None, 14:59:17 password = None, 14:59:17 key_filename = None, 14:59:17 allow_agent = True, 14:59:17 hostkey_verify = True, 14:59:17 hostkey_b64 = None, 14:59:17 look_for_keys = True, 14:59:17 ssh_config = None, 14:59:17 sock_fd = None, 14:59:17 bind_addr = None): 14:59:17 14:59:17 """Connect via SSH and initialize the NETCONF session. First attempts the publickey authentication method and then password authentication. 14:59:17 14:59:17 To disable attempting publickey authentication altogether, call with *allow_agent* and *look_for_keys* as `False`. 14:59:17 14:59:17 *host* is the hostname or IP address to connect to 14:59:17 14:59:17 *port* is by default 830 (PORT_NETCONF_DEFAULT), but some devices use the default SSH port of 22 so this may need to be specified 14:59:17 14:59:17 *timeout* is an optional timeout for socket connect 14:59:17 14:59:17 *unknown_host_cb* is called when the server host key is not recognized. It takes two arguments, the hostname and the fingerprint (see the signature of :func:`default_unknown_host_cb`) 14:59:17 14:59:17 *username* is the username to use for SSH authentication 14:59:17 14:59:17 *password* is the password used if using password authentication, or the passphrase to use for unlocking keys that require it 14:59:17 14:59:17 *key_filename* is a filename where a the private key to be used can be found 14:59:17 14:59:17 *allow_agent* enables querying SSH agent (if found) for keys 14:59:17 14:59:17 *hostkey_verify* enables hostkey verification from ~/.ssh/known_hosts 14:59:17 14:59:17 *hostkey_b64* only connect when server presents a public hostkey matching this (obtain from server /etc/ssh/ssh_host_*pub or ssh-keyscan) 14:59:17 14:59:17 *look_for_keys* enables looking in the usual locations for ssh keys (e.g. :file:`~/.ssh/id_*`) 14:59:17 14:59:17 *ssh_config* enables parsing of an OpenSSH configuration file, if set to its path, e.g. :file:`~/.ssh/config` or to True (in this case, use :file:`~/.ssh/config`). 14:59:17 14:59:17 *sock_fd* is an already open socket which shall be used for this connection. Useful for NETCONF outbound ssh. Use host=None together with a valid sock_fd number 14:59:17 14:59:17 *bind_addr* is a (local) source IP address to use, must be reachable from the remote device. 14:59:17 """ 14:59:17 if not (host or sock_fd): 14:59:17 raise SSHError("Missing host or socket fd") 14:59:17 14:59:17 self._host = host 14:59:17 14:59:17 # Optionally, parse .ssh/config 14:59:17 config = {} 14:59:17 if ssh_config is True: 14:59:17 ssh_config = "~/.ssh/config" if sys.platform != "win32" else "~/ssh/config" 14:59:17 if ssh_config is not None: 14:59:17 config = paramiko.SSHConfig() 14:59:17 with open(os.path.expanduser(ssh_config)) as ssh_config_file_obj: 14:59:17 config.parse(ssh_config_file_obj) 14:59:17 14:59:17 # Save default Paramiko SSH port so it can be reverted 14:59:17 paramiko_default_ssh_port = paramiko.config.SSH_PORT 14:59:17 14:59:17 # Change the default SSH port to the port specified by the user so expand_variables 14:59:17 # replaces %p with the passed in port rather than 22 (the defauld paramiko.config.SSH_PORT) 14:59:17 14:59:17 paramiko.config.SSH_PORT = port 14:59:17 14:59:17 config = config.lookup(host) 14:59:17 14:59:17 # paramiko.config.SSHconfig::expand_variables is called by lookup so we can set the SSH port 14:59:17 # back to the default 14:59:17 paramiko.config.SSH_PORT = paramiko_default_ssh_port 14:59:17 14:59:17 host = config.get("hostname", host) 14:59:17 if username is None: 14:59:17 username = config.get("user") 14:59:17 if key_filename is None: 14:59:17 key_filename = config.get("identityfile") 14:59:17 if hostkey_verify: 14:59:17 userknownhostsfile = config.get("userknownhostsfile") 14:59:17 if userknownhostsfile: 14:59:17 self.load_known_hosts(os.path.expanduser(userknownhostsfile)) 14:59:17 if timeout is None: 14:59:17 timeout = config.get("connecttimeout") 14:59:17 if timeout: 14:59:17 timeout = int(timeout) 14:59:17 14:59:17 if username is None: 14:59:17 username = getpass.getuser() 14:59:17 14:59:17 if sock_fd is None: 14:59:17 proxycommand = config.get("proxycommand") 14:59:17 if proxycommand: 14:59:17 self.logger.debug("Configuring Proxy. %s", proxycommand) 14:59:17 if not isinstance(proxycommand, six.string_types): 14:59:17 proxycommand = [os.path.expanduser(elem) for elem in proxycommand] 14:59:17 else: 14:59:17 proxycommand = os.path.expanduser(proxycommand) 14:59:17 sock = paramiko.proxy.ProxyCommand(proxycommand) 14:59:17 else: 14:59:17 for res in socket.getaddrinfo(host, port, socket.AF_UNSPEC, socket.SOCK_STREAM): 14:59:17 af, socktype, proto, canonname, sa = res 14:59:17 try: 14:59:17 sock = socket.socket(af, socktype, proto) 14:59:17 sock.settimeout(timeout) 14:59:17 except socket.error: 14:59:17 continue 14:59:17 try: 14:59:17 if bind_addr: 14:59:17 sock.bind((bind_addr, 0)) 14:59:17 sock.connect(sa) 14:59:17 except socket.error: 14:59:17 sock.close() 14:59:17 continue 14:59:17 break 14:59:17 else: 14:59:17 raise SSHError("Could not open socket to %s:%s" % (host, port)) 14:59:17 else: 14:59:17 if sys.version_info[0] < 3: 14:59:17 s = socket.fromfd(int(sock_fd), socket.AF_INET, socket.SOCK_STREAM) 14:59:17 sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM, _sock=s) 14:59:17 else: 14:59:17 sock = socket.fromfd(int(sock_fd), socket.AF_INET, socket.SOCK_STREAM) 14:59:17 sock.settimeout(timeout) 14:59:17 14:59:17 self._transport = paramiko.Transport(sock) 14:59:17 self._transport.set_log_channel(logger.name) 14:59:17 if config.get("compression") == 'yes': 14:59:17 self._transport.use_compression() 14:59:17 14:59:17 if hostkey_b64: 14:59:17 # If we need to connect with a specific hostkey, negotiate for only its type 14:59:17 hostkey_obj = None 14:59:17 for key_cls in [paramiko.DSSKey, paramiko.Ed25519Key, paramiko.RSAKey, paramiko.ECDSAKey]: 14:59:17 try: 14:59:17 hostkey_obj = key_cls(data=base64.b64decode(hostkey_b64)) 14:59:17 except paramiko.SSHException: 14:59:17 # Not a key of this type - try the next 14:59:17 pass 14:59:17 if not hostkey_obj: 14:59:17 # We've tried all known host key types and haven't found a suitable one to use - bail 14:59:17 raise SSHError("Couldn't find suitable paramiko key class for host key %s" % hostkey_b64) 14:59:17 self._transport._preferred_keys = [hostkey_obj.get_name()] 14:59:17 elif self._host_keys: 14:59:17 # Else set preferred host keys to those we possess for the host 14:59:17 # (avoids situation where known_hosts contains a valid key for the host, but that key type is not selected during negotiation) 14:59:17 known_host_keys_for_this_host = self._host_keys.lookup(host) or {} 14:59:17 host_port = '[%s]:%s' % (host, port) 14:59:17 known_host_keys_for_this_host.update(self._host_keys.lookup(host_port) or {}) 14:59:17 if known_host_keys_for_this_host: 14:59:17 self._transport._preferred_keys = list(known_host_keys_for_this_host) 14:59:17 14:59:17 # Connect 14:59:17 try: 14:59:17 > self._transport.start_client() 14:59:17 14:59:17 ../.tox/py3/lib/python3.6/site-packages/ncclient/transport/ssh.py:329: 14:59:17 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 14:59:17 14:59:17 self = 14:59:17 event = , timeout = None 14:59:17 14:59:17 def start_client(self, event=None, timeout=None): 14:59:17 """ 14:59:17 Negotiate a new SSH2 session as a client. This is the first step after 14:59:17 creating a new `.Transport`. A separate thread is created for protocol 14:59:17 negotiation. 14:59:17 14:59:17 If an event is passed in, this method returns immediately. When 14:59:17 negotiation is done (successful or not), the given ``Event`` will 14:59:17 be triggered. On failure, `is_active` will return ``False``. 14:59:17 14:59:17 (Since 1.4) If ``event`` is ``None``, this method will not return until 14:59:17 negotiation is done. On success, the method returns normally. 14:59:17 Otherwise an SSHException is raised. 14:59:17 14:59:17 After a successful negotiation, you will usually want to authenticate, 14:59:17 calling `auth_password ` or 14:59:17 `auth_publickey `. 14:59:17 14:59:17 .. note:: `connect` is a simpler method for connecting as a client. 14:59:17 14:59:17 .. note:: 14:59:17 After calling this method (or `start_server` or `connect`), you 14:59:17 should no longer directly read from or write to the original socket 14:59:17 object. 14:59:17 14:59:17 :param .threading.Event event: 14:59:17 an event to trigger when negotiation is complete (optional) 14:59:17 14:59:17 :param float timeout: 14:59:17 a timeout, in seconds, for SSH2 session negotiation (optional) 14:59:17 14:59:17 :raises: 14:59:17 `.SSHException` -- if negotiation fails (and no ``event`` was 14:59:17 passed in) 14:59:17 """ 14:59:17 self.active = True 14:59:17 if event is not None: 14:59:17 # async, return immediately and let the app poll for completion 14:59:17 self.completion_event = event 14:59:17 self.start() 14:59:17 return 14:59:17 14:59:17 # synchronous, wait for a result 14:59:17 self.completion_event = event = threading.Event() 14:59:17 self.start() 14:59:17 max_time = time.time() + timeout if timeout is not None else None 14:59:17 while True: 14:59:17 event.wait(0.1) 14:59:17 if not self.active: 14:59:17 e = self.get_exception() 14:59:17 if e is not None: 14:59:17 > raise e 14:59:17 14:59:17 ../.tox/py3/lib/python3.6/site-packages/paramiko/transport.py:773: 14:59:17 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 14:59:17 14:59:17 self = 14:59:17 14:59:17 def run(self): 14:59:17 # (use the exposed "run" method, because if we specify a thread target 14:59:17 # of a private method, threading.Thread will keep a reference to it 14:59:17 # indefinitely, creating a GC cycle and not letting Transport ever be 14:59:17 # GC'd. it's a bug in Thread.) 14:59:17 14:59:17 # Hold reference to 'sys' so we can test sys.modules to detect 14:59:17 # interpreter shutdown. 14:59:17 self.sys = sys 14:59:17 14:59:17 # active=True occurs before the thread is launched, to avoid a race 14:59:17 _active_threads.append(self) 14:59:17 tid = hex(id(self) & xffffffff) 14:59:17 if self.server_mode: 14:59:17 self._log(DEBUG, "starting thread (server mode): {}".format(tid)) 14:59:17 else: 14:59:17 self._log(DEBUG, "starting thread (client mode): {}".format(tid)) 14:59:17 try: 14:59:17 try: 14:59:17 self.packetizer.write_all(b(self.local_version + "\r\n")) 14:59:17 self._log( 14:59:17 DEBUG, 14:59:17 "Local version/idstring: {}".format(self.local_version), 14:59:17 ) # noqa 14:59:17 > self._check_banner() 14:59:17 14:59:17 ../.tox/py3/lib/python3.6/site-packages/paramiko/transport.py:2185: 14:59:17 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 14:59:17 14:59:17 self = 14:59:17 14:59:17 def _check_banner(self): 14:59:17 # this is slow, but we only have to do it once 14:59:17 for i in range(100): 14:59:17 # give them 15 seconds for the first line, then just 2 seconds 14:59:17 # each additional line. (some sites have very high latency.) 14:59:17 if i == 0: 14:59:17 timeout = self.banner_timeout 14:59:17 else: 14:59:17 timeout = 2 14:59:17 try: 14:59:17 buf = self.packetizer.readline(timeout) 14:59:17 except ProxyCommandFailure: 14:59:17 raise 14:59:17 except Exception as e: 14:59:17 raise SSHException( 14:59:17 > "Error reading SSH protocol banner" + str(e) 14:59:17 ) 14:59:17 E paramiko.ssh_exception.SSHException: Error reading SSH protocol banner[Errno 104] Connection reset by peer 14:59:17 14:59:17 ../.tox/py3/lib/python3.6/site-packages/paramiko/transport.py:2374: SSHException 14:59:17 14:59:17 During handling of the above exception, another exception occurred: 14:59:17 14:59:17 self = 14:59:17 14:59:17 def setup(self): 14:59:17 self.nc = manager.connect( 14:59:17 host=settings.HOST, 14:59:17 port=settings.SSH_PORT, 14:59:17 username=settings.USERNAME, 14:59:17 key_filename=settings.SSH_KEY_FILENAME, 14:59:17 allow_agent=False, 14:59:17 look_for_keys=False, 14:59:17 > hostkey_verify=False) 14:59:17 14:59:17 nctest.py:46: 14:59:17 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 14:59:17 ../.tox/py3/lib/python3.6/site-packages/ncclient/manager.py:168: in connect 14:59:17 return connect_ssh(*args, **kwds) 14:59:17 ../.tox/py3/lib/python3.6/site-packages/ncclient/manager.py:135: in connect_ssh 14:59:17 session.connect(*args, **kwds) 14:59:17 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 14:59:17 14:59:17 self = , host = '127.0.0.1', port = 49154 14:59:17 timeout = None 14:59:17 unknown_host_cb = 14:59:17 username = 'netconf', password = None, key_filename = '../config/ssh/id_rsa' 14:59:17 allow_agent = False, hostkey_verify = False, hostkey_b64 = None 14:59:17 look_for_keys = False, ssh_config = None, sock_fd = None, bind_addr = None 14:59:17 14:59:17 def connect( 14:59:17 self, 14:59:17 host, 14:59:17 port = PORT_NETCONF_DEFAULT, 14:59:17 timeout = None, 14:59:17 unknown_host_cb = default_unknown_host_cb, 14:59:17 username = None, 14:59:17 password = None, 14:59:17 key_filename = None, 14:59:17 allow_agent = True, 14:59:17 hostkey_verify = True, 14:59:17 hostkey_b64 = None, 14:59:17 look_for_keys = True, 14:59:17 ssh_config = None, 14:59:17 sock_fd = None, 14:59:17 bind_addr = None): 14:59:17 14:59:17 """Connect via SSH and initialize the NETCONF session. First attempts the publickey authentication method and then password authentication. 14:59:17 14:59:17 To disable attempting publickey authentication altogether, call with *allow_agent* and *look_for_keys* as `False`. 14:59:17 14:59:17 *host* is the hostname or IP address to connect to 14:59:17 14:59:17 *port* is by default 830 (PORT_NETCONF_DEFAULT), but some devices use the default SSH port of 22 so this may need to be specified 14:59:17 14:59:17 *timeout* is an optional timeout for socket connect 14:59:17 14:59:17 *unknown_host_cb* is called when the server host key is not recognized. It takes two arguments, the hostname and the fingerprint (see the signature of :func:`default_unknown_host_cb`) 14:59:17 14:59:17 *username* is the username to use for SSH authentication 14:59:17 14:59:17 *password* is the password used if using password authentication, or the passphrase to use for unlocking keys that require it 14:59:17 14:59:17 *key_filename* is a filename where a the private key to be used can be found 14:59:17 14:59:17 *allow_agent* enables querying SSH agent (if found) for keys 14:59:17 14:59:17 *hostkey_verify* enables hostkey verification from ~/.ssh/known_hosts 14:59:17 14:59:17 *hostkey_b64* only connect when server presents a public hostkey matching this (obtain from server /etc/ssh/ssh_host_*pub or ssh-keyscan) 14:59:17 14:59:17 *look_for_keys* enables looking in the usual locations for ssh keys (e.g. :file:`~/.ssh/id_*`) 14:59:17 14:59:17 *ssh_config* enables parsing of an OpenSSH configuration file, if set to its path, e.g. :file:`~/.ssh/config` or to True (in this case, use :file:`~/.ssh/config`). 14:59:17 14:59:17 *sock_fd* is an already open socket which shall be used for this connection. Useful for NETCONF outbound ssh. Use host=None together with a valid sock_fd number 14:59:17 14:59:17 *bind_addr* is a (local) source IP address to use, must be reachable from the remote device. 14:59:17 """ 14:59:17 if not (host or sock_fd): 14:59:17 raise SSHError("Missing host or socket fd") 14:59:17 14:59:17 self._host = host 14:59:17 14:59:17 # Optionally, parse .ssh/config 14:59:17 config = {} 14:59:17 if ssh_config is True: 14:59:17 ssh_config = "~/.ssh/config" if sys.platform != "win32" else "~/ssh/config" 14:59:17 if ssh_config is not None: 14:59:17 config = paramiko.SSHConfig() 14:59:17 with open(os.path.expanduser(ssh_config)) as ssh_config_file_obj: 14:59:17 config.parse(ssh_config_file_obj) 14:59:17 14:59:17 # Save default Paramiko SSH port so it can be reverted 14:59:17 paramiko_default_ssh_port = paramiko.config.SSH_PORT 14:59:17 14:59:17 # Change the default SSH port to the port specified by the user so expand_variables 14:59:17 # replaces %p with the passed in port rather than 22 (the defauld paramiko.config.SSH_PORT) 14:59:17 14:59:17 paramiko.config.SSH_PORT = port 14:59:17 14:59:17 config = config.lookup(host) 14:59:17 14:59:17 # paramiko.config.SSHconfig::expand_variables is called by lookup so we can set the SSH port 14:59:17 # back to the default 14:59:17 paramiko.config.SSH_PORT = paramiko_default_ssh_port 14:59:17 14:59:17 host = config.get("hostname", host) 14:59:17 if username is None: 14:59:17 username = config.get("user") 14:59:17 if key_filename is None: 14:59:17 key_filename = config.get("identityfile") 14:59:17 if hostkey_verify: 14:59:17 userknownhostsfile = config.get("userknownhostsfile") 14:59:17 if userknownhostsfile: 14:59:17 self.load_known_hosts(os.path.expanduser(userknownhostsfile)) 14:59:17 if timeout is None: 14:59:17 timeout = config.get("connecttimeout") 14:59:17 if timeout: 14:59:17 timeout = int(timeout) 14:59:17 14:59:17 if username is None: 14:59:17 username = getpass.getuser() 14:59:17 14:59:17 if sock_fd is None: 14:59:17 proxycommand = config.get("proxycommand") 14:59:17 if proxycommand: 14:59:17 self.logger.debug("Configuring Proxy. %s", proxycommand) 14:59:17 if not isinstance(proxycommand, six.string_types): 14:59:17 proxycommand = [os.path.expanduser(elem) for elem in proxycommand] 14:59:17 else: 14:59:17 proxycommand = os.path.expanduser(proxycommand) 14:59:17 sock = paramiko.proxy.ProxyCommand(proxycommand) 14:59:17 else: 14:59:17 for res in socket.getaddrinfo(host, port, socket.AF_UNSPEC, socket.SOCK_STREAM): 14:59:17 af, socktype, proto, canonname, sa = res 14:59:17 try: 14:59:17 sock = socket.socket(af, socktype, proto) 14:59:17 sock.settimeout(timeout) 14:59:17 except socket.error: 14:59:17 continue 14:59:17 try: 14:59:17 if bind_addr: 14:59:17 sock.bind((bind_addr, 0)) 14:59:17 sock.connect(sa) 14:59:17 except socket.error: 14:59:17 sock.close() 14:59:17 continue 14:59:17 break 14:59:17 else: 14:59:17 raise SSHError("Could not open socket to %s:%s" % (host, port)) 14:59:17 else: 14:59:17 if sys.version_info[0] < 3: 14:59:17 s = socket.fromfd(int(sock_fd), socket.AF_INET, socket.SOCK_STREAM) 14:59:17 sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM, _sock=s) 14:59:17 else: 14:59:17 sock = socket.fromfd(int(sock_fd), socket.AF_INET, socket.SOCK_STREAM) 14:59:17 sock.settimeout(timeout) 14:59:17 14:59:17 self._transport = paramiko.Transport(sock) 14:59:17 self._transport.set_log_channel(logger.name) 14:59:17 if config.get("compression") == 'yes': 14:59:17 self._transport.use_compression() 14:59:17 14:59:17 if hostkey_b64: 14:59:17 # If we need to connect with a specific hostkey, negotiate for only its type 14:59:17 hostkey_obj = None 14:59:17 for key_cls in [paramiko.DSSKey, paramiko.Ed25519Key, paramiko.RSAKey, paramiko.ECDSAKey]: 14:59:17 try: 14:59:17 hostkey_obj = key_cls(data=base64.b64decode(hostkey_b64)) 14:59:17 except paramiko.SSHException: 14:59:17 # Not a key of this type - try the next 14:59:17 pass 14:59:17 if not hostkey_obj: 14:59:17 # We've tried all known host key types and haven't found a suitable one to use - bail 14:59:17 raise SSHError("Couldn't find suitable paramiko key class for host key %s" % hostkey_b64) 14:59:17 self._transport._preferred_keys = [hostkey_obj.get_name()] 14:59:17 elif self._host_keys: 14:59:17 # Else set preferred host keys to those we possess for the host 14:59:17 # (avoids situation where known_hosts contains a valid key for the host, but that key type is not selected during negotiation) 14:59:17 known_host_keys_for_this_host = self._host_keys.lookup(host) or {} 14:59:17 host_port = '[%s]:%s' % (host, port) 14:59:17 known_host_keys_for_this_host.update(self._host_keys.lookup(host_port) or {}) 14:59:17 if known_host_keys_for_this_host: 14:59:17 self._transport._preferred_keys = list(known_host_keys_for_this_host) 14:59:17 14:59:17 # Connect 14:59:17 try: 14:59:17 self._transport.start_client() 14:59:17 except paramiko.SSHException as e: 14:59:17 > raise SSHError('Negotiation failed: %s' % e) 14:59:17 E ncclient.transport.errors.SSHError: Negotiation failed: Error reading SSH protocol banner[Errno 104] Connection reset by peer 14:59:17 14:59:17 ../.tox/py3/lib/python3.6/site-packages/ncclient/transport/ssh.py:331: SSHError 14:59:17 ------------------------------ Captured log setup ------------------------------ 14:59:17 14:59:16.769 ERROR [ncclient.transport.ssh] Exception (client): Error reading SSH protocol banner[Errno 104] Connection reset by peer 14:59:17 14:59:16.769 ERROR [ncclient.transport.ssh] Traceback (most recent call last): 14:59:17 14:59:16.769 ERROR [ncclient.transport.ssh] File "/w/workspace/integration-netconf-pnp-simulator-docker-merge-master/test/mocks/netconf-pnp-simulator/engine/.tox/py3/lib/python3.6/site-packages/paramiko/transport.py", line 2369, in _check_banner 14:59:17 14:59:16.770 ERROR [ncclient.transport.ssh] buf = self.packetizer.readline(timeout) 14:59:17 14:59:16.770 ERROR [ncclient.transport.ssh] File "/w/workspace/integration-netconf-pnp-simulator-docker-merge-master/test/mocks/netconf-pnp-simulator/engine/.tox/py3/lib/python3.6/site-packages/paramiko/packet.py", line 395, in readline 14:59:17 14:59:16.770 ERROR [ncclient.transport.ssh] buf += self._read_timeout(timeout) 14:59:17 14:59:16.770 ERROR [ncclient.transport.ssh] File "/w/workspace/integration-netconf-pnp-simulator-docker-merge-master/test/mocks/netconf-pnp-simulator/engine/.tox/py3/lib/python3.6/site-packages/paramiko/packet.py", line 663, in _read_timeout 14:59:17 14:59:16.770 ERROR [ncclient.transport.ssh] x = self.__socket.recv(128) 14:59:17 14:59:16.770 ERROR [ncclient.transport.ssh] ConnectionResetError: [Errno 104] Connection reset by peer 14:59:17 14:59:16.770 ERROR [ncclient.transport.ssh] 14:59:17 14:59:16.770 ERROR [ncclient.transport.ssh] During handling of the above exception, another exception occurred: 14:59:17 14:59:16.770 ERROR [ncclient.transport.ssh] 14:59:17 14:59:16.770 ERROR [ncclient.transport.ssh] Traceback (most recent call last): 14:59:17 14:59:16.770 ERROR [ncclient.transport.ssh] File "/w/workspace/integration-netconf-pnp-simulator-docker-merge-master/test/mocks/netconf-pnp-simulator/engine/.tox/py3/lib/python3.6/site-packages/paramiko/transport.py", line 2185, in run 14:59:17 14:59:16.770 ERROR [ncclient.transport.ssh] self._check_banner() 14:59:17 14:59:16.770 ERROR [ncclient.transport.ssh] File "/w/workspace/integration-netconf-pnp-simulator-docker-merge-master/test/mocks/netconf-pnp-simulator/engine/.tox/py3/lib/python3.6/site-packages/paramiko/transport.py", line 2374, in _check_banner 14:59:17 14:59:16.771 ERROR [ncclient.transport.ssh] "Error reading SSH protocol banner" + str(e) 14:59:17 14:59:16.771 ERROR [ncclient.transport.ssh] paramiko.ssh_exception.SSHException: Error reading SSH protocol banner[Errno 104] Connection reset by peer 14:59:17 14:59:16.771 ERROR [ncclient.transport.ssh] 14:59:17 __________ ERROR at setup of TestTuringMachine.test_get_xpath_filter ___________ 14:59:17 14:59:17 self = 14:59:17 14:59:17 def _check_banner(self): 14:59:17 # this is slow, but we only have to do it once 14:59:17 for i in range(100): 14:59:17 # give them 15 seconds for the first line, then just 2 seconds 14:59:17 # each additional line. (some sites have very high latency.) 14:59:17 if i == 0: 14:59:17 timeout = self.banner_timeout 14:59:17 else: 14:59:17 timeout = 2 14:59:17 try: 14:59:17 > buf = self.packetizer.readline(timeout) 14:59:17 14:59:17 ../.tox/py3/lib/python3.6/site-packages/paramiko/transport.py:2369: 14:59:17 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 14:59:17 14:59:17 self = , timeout = 15 14:59:17 14:59:17 def readline(self, timeout): 14:59:17 """ 14:59:17 Read a line from the socket. We assume no data is pending after the 14:59:17 line, so it's okay to attempt large reads. 14:59:17 """ 14:59:17 buf = self.__remainder 14:59:17 while linefeed_byte not in buf: 14:59:17 > buf += self._read_timeout(timeout) 14:59:17 14:59:17 ../.tox/py3/lib/python3.6/site-packages/paramiko/packet.py:395: 14:59:17 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 14:59:17 14:59:17 self = , timeout = 15 14:59:17 14:59:17 def _read_timeout(self, timeout): 14:59:17 start = time.time() 14:59:17 while True: 14:59:17 try: 14:59:17 > x = self.__socket.recv(128) 14:59:17 E ConnectionResetError: [Errno 104] Connection reset by peer 14:59:17 14:59:17 ../.tox/py3/lib/python3.6/site-packages/paramiko/packet.py:663: ConnectionResetError 14:59:17 14:59:17 During handling of the above exception, another exception occurred: 14:59:17 14:59:17 self = , host = '127.0.0.1', port = 49154 14:59:17 timeout = None 14:59:17 unknown_host_cb = 14:59:17 username = 'netconf', password = None, key_filename = '../config/ssh/id_rsa' 14:59:17 allow_agent = False, hostkey_verify = False, hostkey_b64 = None 14:59:17 look_for_keys = False, ssh_config = None, sock_fd = None, bind_addr = None 14:59:17 14:59:17 def connect( 14:59:17 self, 14:59:17 host, 14:59:17 port = PORT_NETCONF_DEFAULT, 14:59:17 timeout = None, 14:59:17 unknown_host_cb = default_unknown_host_cb, 14:59:17 username = None, 14:59:17 password = None, 14:59:17 key_filename = None, 14:59:17 allow_agent = True, 14:59:17 hostkey_verify = True, 14:59:17 hostkey_b64 = None, 14:59:17 look_for_keys = True, 14:59:17 ssh_config = None, 14:59:17 sock_fd = None, 14:59:17 bind_addr = None): 14:59:17 14:59:17 """Connect via SSH and initialize the NETCONF session. First attempts the publickey authentication method and then password authentication. 14:59:17 14:59:17 To disable attempting publickey authentication altogether, call with *allow_agent* and *look_for_keys* as `False`. 14:59:17 14:59:17 *host* is the hostname or IP address to connect to 14:59:17 14:59:17 *port* is by default 830 (PORT_NETCONF_DEFAULT), but some devices use the default SSH port of 22 so this may need to be specified 14:59:17 14:59:17 *timeout* is an optional timeout for socket connect 14:59:17 14:59:17 *unknown_host_cb* is called when the server host key is not recognized. It takes two arguments, the hostname and the fingerprint (see the signature of :func:`default_unknown_host_cb`) 14:59:17 14:59:17 *username* is the username to use for SSH authentication 14:59:17 14:59:17 *password* is the password used if using password authentication, or the passphrase to use for unlocking keys that require it 14:59:17 14:59:17 *key_filename* is a filename where a the private key to be used can be found 14:59:17 14:59:17 *allow_agent* enables querying SSH agent (if found) for keys 14:59:17 14:59:17 *hostkey_verify* enables hostkey verification from ~/.ssh/known_hosts 14:59:17 14:59:17 *hostkey_b64* only connect when server presents a public hostkey matching this (obtain from server /etc/ssh/ssh_host_*pub or ssh-keyscan) 14:59:17 14:59:17 *look_for_keys* enables looking in the usual locations for ssh keys (e.g. :file:`~/.ssh/id_*`) 14:59:17 14:59:17 *ssh_config* enables parsing of an OpenSSH configuration file, if set to its path, e.g. :file:`~/.ssh/config` or to True (in this case, use :file:`~/.ssh/config`). 14:59:17 14:59:17 *sock_fd* is an already open socket which shall be used for this connection. Useful for NETCONF outbound ssh. Use host=None together with a valid sock_fd number 14:59:17 14:59:17 *bind_addr* is a (local) source IP address to use, must be reachable from the remote device. 14:59:17 """ 14:59:17 if not (host or sock_fd): 14:59:17 raise SSHError("Missing host or socket fd") 14:59:17 14:59:17 self._host = host 14:59:17 14:59:17 # Optionally, parse .ssh/config 14:59:17 config = {} 14:59:17 if ssh_config is True: 14:59:17 ssh_config = "~/.ssh/config" if sys.platform != "win32" else "~/ssh/config" 14:59:17 if ssh_config is not None: 14:59:17 config = paramiko.SSHConfig() 14:59:17 with open(os.path.expanduser(ssh_config)) as ssh_config_file_obj: 14:59:17 config.parse(ssh_config_file_obj) 14:59:17 14:59:17 # Save default Paramiko SSH port so it can be reverted 14:59:17 paramiko_default_ssh_port = paramiko.config.SSH_PORT 14:59:17 14:59:17 # Change the default SSH port to the port specified by the user so expand_variables 14:59:17 # replaces %p with the passed in port rather than 22 (the defauld paramiko.config.SSH_PORT) 14:59:17 14:59:17 paramiko.config.SSH_PORT = port 14:59:17 14:59:17 config = config.lookup(host) 14:59:17 14:59:17 # paramiko.config.SSHconfig::expand_variables is called by lookup so we can set the SSH port 14:59:17 # back to the default 14:59:17 paramiko.config.SSH_PORT = paramiko_default_ssh_port 14:59:17 14:59:17 host = config.get("hostname", host) 14:59:17 if username is None: 14:59:17 username = config.get("user") 14:59:17 if key_filename is None: 14:59:17 key_filename = config.get("identityfile") 14:59:17 if hostkey_verify: 14:59:17 userknownhostsfile = config.get("userknownhostsfile") 14:59:17 if userknownhostsfile: 14:59:17 self.load_known_hosts(os.path.expanduser(userknownhostsfile)) 14:59:17 if timeout is None: 14:59:17 timeout = config.get("connecttimeout") 14:59:17 if timeout: 14:59:17 timeout = int(timeout) 14:59:17 14:59:17 if username is None: 14:59:17 username = getpass.getuser() 14:59:17 14:59:17 if sock_fd is None: 14:59:17 proxycommand = config.get("proxycommand") 14:59:17 if proxycommand: 14:59:17 self.logger.debug("Configuring Proxy. %s", proxycommand) 14:59:17 if not isinstance(proxycommand, six.string_types): 14:59:17 proxycommand = [os.path.expanduser(elem) for elem in proxycommand] 14:59:17 else: 14:59:17 proxycommand = os.path.expanduser(proxycommand) 14:59:17 sock = paramiko.proxy.ProxyCommand(proxycommand) 14:59:17 else: 14:59:17 for res in socket.getaddrinfo(host, port, socket.AF_UNSPEC, socket.SOCK_STREAM): 14:59:17 af, socktype, proto, canonname, sa = res 14:59:17 try: 14:59:17 sock = socket.socket(af, socktype, proto) 14:59:17 sock.settimeout(timeout) 14:59:17 except socket.error: 14:59:17 continue 14:59:17 try: 14:59:17 if bind_addr: 14:59:17 sock.bind((bind_addr, 0)) 14:59:17 sock.connect(sa) 14:59:17 except socket.error: 14:59:17 sock.close() 14:59:17 continue 14:59:17 break 14:59:17 else: 14:59:17 raise SSHError("Could not open socket to %s:%s" % (host, port)) 14:59:17 else: 14:59:17 if sys.version_info[0] < 3: 14:59:17 s = socket.fromfd(int(sock_fd), socket.AF_INET, socket.SOCK_STREAM) 14:59:17 sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM, _sock=s) 14:59:17 else: 14:59:17 sock = socket.fromfd(int(sock_fd), socket.AF_INET, socket.SOCK_STREAM) 14:59:17 sock.settimeout(timeout) 14:59:17 14:59:17 self._transport = paramiko.Transport(sock) 14:59:17 self._transport.set_log_channel(logger.name) 14:59:17 if config.get("compression") == 'yes': 14:59:17 self._transport.use_compression() 14:59:17 14:59:17 if hostkey_b64: 14:59:17 # If we need to connect with a specific hostkey, negotiate for only its type 14:59:17 hostkey_obj = None 14:59:17 for key_cls in [paramiko.DSSKey, paramiko.Ed25519Key, paramiko.RSAKey, paramiko.ECDSAKey]: 14:59:17 try: 14:59:17 hostkey_obj = key_cls(data=base64.b64decode(hostkey_b64)) 14:59:17 except paramiko.SSHException: 14:59:17 # Not a key of this type - try the next 14:59:17 pass 14:59:17 if not hostkey_obj: 14:59:17 # We've tried all known host key types and haven't found a suitable one to use - bail 14:59:17 raise SSHError("Couldn't find suitable paramiko key class for host key %s" % hostkey_b64) 14:59:17 self._transport._preferred_keys = [hostkey_obj.get_name()] 14:59:17 elif self._host_keys: 14:59:17 # Else set preferred host keys to those we possess for the host 14:59:17 # (avoids situation where known_hosts contains a valid key for the host, but that key type is not selected during negotiation) 14:59:17 known_host_keys_for_this_host = self._host_keys.lookup(host) or {} 14:59:17 host_port = '[%s]:%s' % (host, port) 14:59:17 known_host_keys_for_this_host.update(self._host_keys.lookup(host_port) or {}) 14:59:17 if known_host_keys_for_this_host: 14:59:17 self._transport._preferred_keys = list(known_host_keys_for_this_host) 14:59:17 14:59:17 # Connect 14:59:17 try: 14:59:17 > self._transport.start_client() 14:59:17 14:59:17 ../.tox/py3/lib/python3.6/site-packages/ncclient/transport/ssh.py:329: 14:59:17 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 14:59:17 14:59:17 self = 14:59:17 event = , timeout = None 14:59:17 14:59:17 def start_client(self, event=None, timeout=None): 14:59:17 """ 14:59:17 Negotiate a new SSH2 session as a client. This is the first step after 14:59:17 creating a new `.Transport`. A separate thread is created for protocol 14:59:17 negotiation. 14:59:17 14:59:17 If an event is passed in, this method returns immediately. When 14:59:17 negotiation is done (successful or not), the given ``Event`` will 14:59:17 be triggered. On failure, `is_active` will return ``False``. 14:59:17 14:59:17 (Since 1.4) If ``event`` is ``None``, this method will not return until 14:59:17 negotiation is done. On success, the method returns normally. 14:59:17 Otherwise an SSHException is raised. 14:59:17 14:59:17 After a successful negotiation, you will usually want to authenticate, 14:59:17 calling `auth_password ` or 14:59:17 `auth_publickey `. 14:59:17 14:59:17 .. note:: `connect` is a simpler method for connecting as a client. 14:59:17 14:59:17 .. note:: 14:59:17 After calling this method (or `start_server` or `connect`), you 14:59:17 should no longer directly read from or write to the original socket 14:59:17 object. 14:59:17 14:59:17 :param .threading.Event event: 14:59:17 an event to trigger when negotiation is complete (optional) 14:59:17 14:59:17 :param float timeout: 14:59:17 a timeout, in seconds, for SSH2 session negotiation (optional) 14:59:17 14:59:17 :raises: 14:59:17 `.SSHException` -- if negotiation fails (and no ``event`` was 14:59:17 passed in) 14:59:17 """ 14:59:17 self.active = True 14:59:17 if event is not None: 14:59:17 # async, return immediately and let the app poll for completion 14:59:17 self.completion_event = event 14:59:17 self.start() 14:59:17 return 14:59:17 14:59:17 # synchronous, wait for a result 14:59:17 self.completion_event = event = threading.Event() 14:59:17 self.start() 14:59:17 max_time = time.time() + timeout if timeout is not None else None 14:59:17 while True: 14:59:17 event.wait(0.1) 14:59:17 if not self.active: 14:59:17 e = self.get_exception() 14:59:17 if e is not None: 14:59:17 > raise e 14:59:17 14:59:17 ../.tox/py3/lib/python3.6/site-packages/paramiko/transport.py:773: 14:59:17 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 14:59:17 14:59:17 self = 14:59:17 14:59:17 def run(self): 14:59:17 # (use the exposed "run" method, because if we specify a thread target 14:59:17 # of a private method, threading.Thread will keep a reference to it 14:59:17 # indefinitely, creating a GC cycle and not letting Transport ever be 14:59:17 # GC'd. it's a bug in Thread.) 14:59:17 14:59:17 # Hold reference to 'sys' so we can test sys.modules to detect 14:59:17 # interpreter shutdown. 14:59:17 self.sys = sys 14:59:17 14:59:17 # active=True occurs before the thread is launched, to avoid a race 14:59:17 _active_threads.append(self) 14:59:17 tid = hex(id(self) & xffffffff) 14:59:17 if self.server_mode: 14:59:17 self._log(DEBUG, "starting thread (server mode): {}".format(tid)) 14:59:17 else: 14:59:17 self._log(DEBUG, "starting thread (client mode): {}".format(tid)) 14:59:17 try: 14:59:17 try: 14:59:17 self.packetizer.write_all(b(self.local_version + "\r\n")) 14:59:17 self._log( 14:59:17 DEBUG, 14:59:17 "Local version/idstring: {}".format(self.local_version), 14:59:17 ) # noqa 14:59:17 > self._check_banner() 14:59:17 14:59:17 ../.tox/py3/lib/python3.6/site-packages/paramiko/transport.py:2185: 14:59:17 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 14:59:17 14:59:17 self = 14:59:17 14:59:17 def _check_banner(self): 14:59:17 # this is slow, but we only have to do it once 14:59:17 for i in range(100): 14:59:17 # give them 15 seconds for the first line, then just 2 seconds 14:59:17 # each additional line. (some sites have very high latency.) 14:59:17 if i == 0: 14:59:17 timeout = self.banner_timeout 14:59:17 else: 14:59:17 timeout = 2 14:59:17 try: 14:59:17 buf = self.packetizer.readline(timeout) 14:59:17 except ProxyCommandFailure: 14:59:17 raise 14:59:17 except Exception as e: 14:59:17 raise SSHException( 14:59:17 > "Error reading SSH protocol banner" + str(e) 14:59:17 ) 14:59:17 E paramiko.ssh_exception.SSHException: Error reading SSH protocol banner[Errno 104] Connection reset by peer 14:59:17 14:59:17 ../.tox/py3/lib/python3.6/site-packages/paramiko/transport.py:2374: SSHException 14:59:17 14:59:17 During handling of the above exception, another exception occurred: 14:59:17 14:59:17 self = 14:59:17 14:59:17 def setup(self): 14:59:17 self.nc = manager.connect( 14:59:17 host=settings.HOST, 14:59:17 port=settings.SSH_PORT, 14:59:17 username=settings.USERNAME, 14:59:17 key_filename=settings.SSH_KEY_FILENAME, 14:59:17 allow_agent=False, 14:59:17 look_for_keys=False, 14:59:17 > hostkey_verify=False) 14:59:17 14:59:17 nctest.py:46: 14:59:17 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 14:59:17 ../.tox/py3/lib/python3.6/site-packages/ncclient/manager.py:168: in connect 14:59:17 return connect_ssh(*args, **kwds) 14:59:17 ../.tox/py3/lib/python3.6/site-packages/ncclient/manager.py:135: in connect_ssh 14:59:17 session.connect(*args, **kwds) 14:59:17 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 14:59:17 14:59:17 self = , host = '127.0.0.1', port = 49154 14:59:17 timeout = None 14:59:17 unknown_host_cb = 14:59:17 username = 'netconf', password = None, key_filename = '../config/ssh/id_rsa' 14:59:17 allow_agent = False, hostkey_verify = False, hostkey_b64 = None 14:59:17 look_for_keys = False, ssh_config = None, sock_fd = None, bind_addr = None 14:59:17 14:59:17 def connect( 14:59:17 self, 14:59:17 host, 14:59:17 port = PORT_NETCONF_DEFAULT, 14:59:17 timeout = None, 14:59:17 unknown_host_cb = default_unknown_host_cb, 14:59:17 username = None, 14:59:17 password = None, 14:59:17 key_filename = None, 14:59:17 allow_agent = True, 14:59:17 hostkey_verify = True, 14:59:17 hostkey_b64 = None, 14:59:17 look_for_keys = True, 14:59:17 ssh_config = None, 14:59:17 sock_fd = None, 14:59:17 bind_addr = None): 14:59:17 14:59:17 """Connect via SSH and initialize the NETCONF session. First attempts the publickey authentication method and then password authentication. 14:59:17 14:59:17 To disable attempting publickey authentication altogether, call with *allow_agent* and *look_for_keys* as `False`. 14:59:17 14:59:17 *host* is the hostname or IP address to connect to 14:59:17 14:59:17 *port* is by default 830 (PORT_NETCONF_DEFAULT), but some devices use the default SSH port of 22 so this may need to be specified 14:59:17 14:59:17 *timeout* is an optional timeout for socket connect 14:59:17 14:59:17 *unknown_host_cb* is called when the server host key is not recognized. It takes two arguments, the hostname and the fingerprint (see the signature of :func:`default_unknown_host_cb`) 14:59:17 14:59:17 *username* is the username to use for SSH authentication 14:59:17 14:59:17 *password* is the password used if using password authentication, or the passphrase to use for unlocking keys that require it 14:59:17 14:59:17 *key_filename* is a filename where a the private key to be used can be found 14:59:17 14:59:17 *allow_agent* enables querying SSH agent (if found) for keys 14:59:17 14:59:17 *hostkey_verify* enables hostkey verification from ~/.ssh/known_hosts 14:59:17 14:59:17 *hostkey_b64* only connect when server presents a public hostkey matching this (obtain from server /etc/ssh/ssh_host_*pub or ssh-keyscan) 14:59:17 14:59:17 *look_for_keys* enables looking in the usual locations for ssh keys (e.g. :file:`~/.ssh/id_*`) 14:59:17 14:59:17 *ssh_config* enables parsing of an OpenSSH configuration file, if set to its path, e.g. :file:`~/.ssh/config` or to True (in this case, use :file:`~/.ssh/config`). 14:59:17 14:59:17 *sock_fd* is an already open socket which shall be used for this connection. Useful for NETCONF outbound ssh. Use host=None together with a valid sock_fd number 14:59:17 14:59:17 *bind_addr* is a (local) source IP address to use, must be reachable from the remote device. 14:59:17 """ 14:59:17 if not (host or sock_fd): 14:59:17 raise SSHError("Missing host or socket fd") 14:59:17 14:59:17 self._host = host 14:59:17 14:59:17 # Optionally, parse .ssh/config 14:59:17 config = {} 14:59:17 if ssh_config is True: 14:59:17 ssh_config = "~/.ssh/config" if sys.platform != "win32" else "~/ssh/config" 14:59:17 if ssh_config is not None: 14:59:17 config = paramiko.SSHConfig() 14:59:17 with open(os.path.expanduser(ssh_config)) as ssh_config_file_obj: 14:59:17 config.parse(ssh_config_file_obj) 14:59:17 14:59:17 # Save default Paramiko SSH port so it can be reverted 14:59:17 paramiko_default_ssh_port = paramiko.config.SSH_PORT 14:59:17 14:59:17 # Change the default SSH port to the port specified by the user so expand_variables 14:59:17 # replaces %p with the passed in port rather than 22 (the defauld paramiko.config.SSH_PORT) 14:59:17 14:59:17 paramiko.config.SSH_PORT = port 14:59:17 14:59:17 config = config.lookup(host) 14:59:17 14:59:17 # paramiko.config.SSHconfig::expand_variables is called by lookup so we can set the SSH port 14:59:17 # back to the default 14:59:17 paramiko.config.SSH_PORT = paramiko_default_ssh_port 14:59:17 14:59:17 host = config.get("hostname", host) 14:59:17 if username is None: 14:59:17 username = config.get("user") 14:59:17 if key_filename is None: 14:59:17 key_filename = config.get("identityfile") 14:59:17 if hostkey_verify: 14:59:17 userknownhostsfile = config.get("userknownhostsfile") 14:59:17 if userknownhostsfile: 14:59:17 self.load_known_hosts(os.path.expanduser(userknownhostsfile)) 14:59:17 if timeout is None: 14:59:17 timeout = config.get("connecttimeout") 14:59:17 if timeout: 14:59:17 timeout = int(timeout) 14:59:17 14:59:17 if username is None: 14:59:17 username = getpass.getuser() 14:59:17 14:59:17 if sock_fd is None: 14:59:17 proxycommand = config.get("proxycommand") 14:59:17 if proxycommand: 14:59:17 self.logger.debug("Configuring Proxy. %s", proxycommand) 14:59:17 if not isinstance(proxycommand, six.string_types): 14:59:17 proxycommand = [os.path.expanduser(elem) for elem in proxycommand] 14:59:17 else: 14:59:17 proxycommand = os.path.expanduser(proxycommand) 14:59:17 sock = paramiko.proxy.ProxyCommand(proxycommand) 14:59:17 else: 14:59:17 for res in socket.getaddrinfo(host, port, socket.AF_UNSPEC, socket.SOCK_STREAM): 14:59:17 af, socktype, proto, canonname, sa = res 14:59:17 try: 14:59:17 sock = socket.socket(af, socktype, proto) 14:59:17 sock.settimeout(timeout) 14:59:17 except socket.error: 14:59:17 continue 14:59:17 try: 14:59:17 if bind_addr: 14:59:17 sock.bind((bind_addr, 0)) 14:59:17 sock.connect(sa) 14:59:17 except socket.error: 14:59:17 sock.close() 14:59:17 continue 14:59:17 break 14:59:17 else: 14:59:17 raise SSHError("Could not open socket to %s:%s" % (host, port)) 14:59:17 else: 14:59:17 if sys.version_info[0] < 3: 14:59:17 s = socket.fromfd(int(sock_fd), socket.AF_INET, socket.SOCK_STREAM) 14:59:17 sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM, _sock=s) 14:59:17 else: 14:59:17 sock = socket.fromfd(int(sock_fd), socket.AF_INET, socket.SOCK_STREAM) 14:59:17 sock.settimeout(timeout) 14:59:17 14:59:17 self._transport = paramiko.Transport(sock) 14:59:17 self._transport.set_log_channel(logger.name) 14:59:17 if config.get("compression") == 'yes': 14:59:17 self._transport.use_compression() 14:59:17 14:59:17 if hostkey_b64: 14:59:17 # If we need to connect with a specific hostkey, negotiate for only its type 14:59:17 hostkey_obj = None 14:59:17 for key_cls in [paramiko.DSSKey, paramiko.Ed25519Key, paramiko.RSAKey, paramiko.ECDSAKey]: 14:59:17 try: 14:59:17 hostkey_obj = key_cls(data=base64.b64decode(hostkey_b64)) 14:59:17 except paramiko.SSHException: 14:59:17 # Not a key of this type - try the next 14:59:17 pass 14:59:17 if not hostkey_obj: 14:59:17 # We've tried all known host key types and haven't found a suitable one to use - bail 14:59:17 raise SSHError("Couldn't find suitable paramiko key class for host key %s" % hostkey_b64) 14:59:17 self._transport._preferred_keys = [hostkey_obj.get_name()] 14:59:17 elif self._host_keys: 14:59:17 # Else set preferred host keys to those we possess for the host 14:59:17 # (avoids situation where known_hosts contains a valid key for the host, but that key type is not selected during negotiation) 14:59:17 known_host_keys_for_this_host = self._host_keys.lookup(host) or {} 14:59:17 host_port = '[%s]:%s' % (host, port) 14:59:17 known_host_keys_for_this_host.update(self._host_keys.lookup(host_port) or {}) 14:59:17 if known_host_keys_for_this_host: 14:59:17 self._transport._preferred_keys = list(known_host_keys_for_this_host) 14:59:17 14:59:17 # Connect 14:59:17 try: 14:59:17 self._transport.start_client() 14:59:17 except paramiko.SSHException as e: 14:59:17 > raise SSHError('Negotiation failed: %s' % e) 14:59:17 E ncclient.transport.errors.SSHError: Negotiation failed: Error reading SSH protocol banner[Errno 104] Connection reset by peer 14:59:17 14:59:17 ../.tox/py3/lib/python3.6/site-packages/ncclient/transport/ssh.py:331: SSHError 14:59:17 ------------------------------ Captured log setup ------------------------------ 14:59:17 14:59:16.881 ERROR [ncclient.transport.ssh] Exception (client): Error reading SSH protocol banner[Errno 104] Connection reset by peer 14:59:17 14:59:16.884 ERROR [ncclient.transport.ssh] Traceback (most recent call last): 14:59:17 14:59:16.884 ERROR [ncclient.transport.ssh] File "/w/workspace/integration-netconf-pnp-simulator-docker-merge-master/test/mocks/netconf-pnp-simulator/engine/.tox/py3/lib/python3.6/site-packages/paramiko/transport.py", line 2369, in _check_banner 14:59:17 14:59:16.884 ERROR [ncclient.transport.ssh] buf = self.packetizer.readline(timeout) 14:59:17 14:59:16.884 ERROR [ncclient.transport.ssh] File "/w/workspace/integration-netconf-pnp-simulator-docker-merge-master/test/mocks/netconf-pnp-simulator/engine/.tox/py3/lib/python3.6/site-packages/paramiko/packet.py", line 395, in readline 14:59:17 14:59:16.884 ERROR [ncclient.transport.ssh] buf += self._read_timeout(timeout) 14:59:17 14:59:16.884 ERROR [ncclient.transport.ssh] File "/w/workspace/integration-netconf-pnp-simulator-docker-merge-master/test/mocks/netconf-pnp-simulator/engine/.tox/py3/lib/python3.6/site-packages/paramiko/packet.py", line 663, in _read_timeout 14:59:17 14:59:16.884 ERROR [ncclient.transport.ssh] x = self.__socket.recv(128) 14:59:17 14:59:16.884 ERROR [ncclient.transport.ssh] ConnectionResetError: [Errno 104] Connection reset by peer 14:59:17 14:59:16.884 ERROR [ncclient.transport.ssh] 14:59:17 14:59:16.884 ERROR [ncclient.transport.ssh] During handling of the above exception, another exception occurred: 14:59:17 14:59:16.884 ERROR [ncclient.transport.ssh] 14:59:17 14:59:16.885 ERROR [ncclient.transport.ssh] Traceback (most recent call last): 14:59:17 14:59:16.885 ERROR [ncclient.transport.ssh] File "/w/workspace/integration-netconf-pnp-simulator-docker-merge-master/test/mocks/netconf-pnp-simulator/engine/.tox/py3/lib/python3.6/site-packages/paramiko/transport.py", line 2185, in run 14:59:17 14:59:16.885 ERROR [ncclient.transport.ssh] self._check_banner() 14:59:17 14:59:16.885 ERROR [ncclient.transport.ssh] File "/w/workspace/integration-netconf-pnp-simulator-docker-merge-master/test/mocks/netconf-pnp-simulator/engine/.tox/py3/lib/python3.6/site-packages/paramiko/transport.py", line 2374, in _check_banner 14:59:17 14:59:16.885 ERROR [ncclient.transport.ssh] "Error reading SSH protocol banner" + str(e) 14:59:17 14:59:16.885 ERROR [ncclient.transport.ssh] paramiko.ssh_exception.SSHException: Error reading SSH protocol banner[Errno 104] Connection reset by peer 14:59:17 14:59:16.885 ERROR [ncclient.transport.ssh] 14:59:17 _____________ ERROR at setup of TestTuringMachine.test_edit_config _____________ 14:59:17 14:59:17 self = 14:59:17 14:59:17 def _check_banner(self): 14:59:17 # this is slow, but we only have to do it once 14:59:17 for i in range(100): 14:59:17 # give them 15 seconds for the first line, then just 2 seconds 14:59:17 # each additional line. (some sites have very high latency.) 14:59:17 if i == 0: 14:59:17 timeout = self.banner_timeout 14:59:17 else: 14:59:17 timeout = 2 14:59:17 try: 14:59:17 > buf = self.packetizer.readline(timeout) 14:59:17 14:59:17 ../.tox/py3/lib/python3.6/site-packages/paramiko/transport.py:2369: 14:59:17 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 14:59:17 14:59:17 self = , timeout = 15 14:59:17 14:59:17 def readline(self, timeout): 14:59:17 """ 14:59:17 Read a line from the socket. We assume no data is pending after the 14:59:17 line, so it's okay to attempt large reads. 14:59:17 """ 14:59:17 buf = self.__remainder 14:59:17 while linefeed_byte not in buf: 14:59:17 > buf += self._read_timeout(timeout) 14:59:17 14:59:17 ../.tox/py3/lib/python3.6/site-packages/paramiko/packet.py:395: 14:59:17 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 14:59:17 14:59:17 self = , timeout = 15 14:59:17 14:59:17 def _read_timeout(self, timeout): 14:59:17 start = time.time() 14:59:17 while True: 14:59:17 try: 14:59:17 x = self.__socket.recv(128) 14:59:17 if len(x) == 0: 14:59:17 > raise EOFError() 14:59:17 E EOFError 14:59:17 14:59:17 ../.tox/py3/lib/python3.6/site-packages/paramiko/packet.py:665: EOFError 14:59:17 14:59:17 During handling of the above exception, another exception occurred: 14:59:17 14:59:17 self = , host = '127.0.0.1', port = 49154 14:59:17 timeout = None 14:59:17 unknown_host_cb = 14:59:17 username = 'netconf', password = None, key_filename = '../config/ssh/id_rsa' 14:59:17 allow_agent = False, hostkey_verify = False, hostkey_b64 = None 14:59:17 look_for_keys = False, ssh_config = None, sock_fd = None, bind_addr = None 14:59:17 14:59:17 def connect( 14:59:17 self, 14:59:17 host, 14:59:17 port = PORT_NETCONF_DEFAULT, 14:59:17 timeout = None, 14:59:17 unknown_host_cb = default_unknown_host_cb, 14:59:17 username = None, 14:59:17 password = None, 14:59:17 key_filename = None, 14:59:17 allow_agent = True, 14:59:17 hostkey_verify = True, 14:59:17 hostkey_b64 = None, 14:59:17 look_for_keys = True, 14:59:17 ssh_config = None, 14:59:17 sock_fd = None, 14:59:17 bind_addr = None): 14:59:17 14:59:17 """Connect via SSH and initialize the NETCONF session. First attempts the publickey authentication method and then password authentication. 14:59:17 14:59:17 To disable attempting publickey authentication altogether, call with *allow_agent* and *look_for_keys* as `False`. 14:59:17 14:59:17 *host* is the hostname or IP address to connect to 14:59:17 14:59:17 *port* is by default 830 (PORT_NETCONF_DEFAULT), but some devices use the default SSH port of 22 so this may need to be specified 14:59:17 14:59:17 *timeout* is an optional timeout for socket connect 14:59:17 14:59:17 *unknown_host_cb* is called when the server host key is not recognized. It takes two arguments, the hostname and the fingerprint (see the signature of :func:`default_unknown_host_cb`) 14:59:17 14:59:17 *username* is the username to use for SSH authentication 14:59:17 14:59:17 *password* is the password used if using password authentication, or the passphrase to use for unlocking keys that require it 14:59:17 14:59:17 *key_filename* is a filename where a the private key to be used can be found 14:59:17 14:59:17 *allow_agent* enables querying SSH agent (if found) for keys 14:59:17 14:59:17 *hostkey_verify* enables hostkey verification from ~/.ssh/known_hosts 14:59:17 14:59:17 *hostkey_b64* only connect when server presents a public hostkey matching this (obtain from server /etc/ssh/ssh_host_*pub or ssh-keyscan) 14:59:17 14:59:17 *look_for_keys* enables looking in the usual locations for ssh keys (e.g. :file:`~/.ssh/id_*`) 14:59:17 14:59:17 *ssh_config* enables parsing of an OpenSSH configuration file, if set to its path, e.g. :file:`~/.ssh/config` or to True (in this case, use :file:`~/.ssh/config`). 14:59:17 14:59:17 *sock_fd* is an already open socket which shall be used for this connection. Useful for NETCONF outbound ssh. Use host=None together with a valid sock_fd number 14:59:17 14:59:17 *bind_addr* is a (local) source IP address to use, must be reachable from the remote device. 14:59:17 """ 14:59:17 if not (host or sock_fd): 14:59:17 raise SSHError("Missing host or socket fd") 14:59:17 14:59:17 self._host = host 14:59:17 14:59:17 # Optionally, parse .ssh/config 14:59:17 config = {} 14:59:17 if ssh_config is True: 14:59:17 ssh_config = "~/.ssh/config" if sys.platform != "win32" else "~/ssh/config" 14:59:17 if ssh_config is not None: 14:59:17 config = paramiko.SSHConfig() 14:59:17 with open(os.path.expanduser(ssh_config)) as ssh_config_file_obj: 14:59:17 config.parse(ssh_config_file_obj) 14:59:17 14:59:17 # Save default Paramiko SSH port so it can be reverted 14:59:17 paramiko_default_ssh_port = paramiko.config.SSH_PORT 14:59:17 14:59:17 # Change the default SSH port to the port specified by the user so expand_variables 14:59:17 # replaces %p with the passed in port rather than 22 (the defauld paramiko.config.SSH_PORT) 14:59:17 14:59:17 paramiko.config.SSH_PORT = port 14:59:17 14:59:17 config = config.lookup(host) 14:59:17 14:59:17 # paramiko.config.SSHconfig::expand_variables is called by lookup so we can set the SSH port 14:59:17 # back to the default 14:59:17 paramiko.config.SSH_PORT = paramiko_default_ssh_port 14:59:17 14:59:17 host = config.get("hostname", host) 14:59:17 if username is None: 14:59:17 username = config.get("user") 14:59:17 if key_filename is None: 14:59:17 key_filename = config.get("identityfile") 14:59:17 if hostkey_verify: 14:59:17 userknownhostsfile = config.get("userknownhostsfile") 14:59:17 if userknownhostsfile: 14:59:17 self.load_known_hosts(os.path.expanduser(userknownhostsfile)) 14:59:17 if timeout is None: 14:59:17 timeout = config.get("connecttimeout") 14:59:17 if timeout: 14:59:17 timeout = int(timeout) 14:59:17 14:59:17 if username is None: 14:59:17 username = getpass.getuser() 14:59:17 14:59:17 if sock_fd is None: 14:59:17 proxycommand = config.get("proxycommand") 14:59:17 if proxycommand: 14:59:17 self.logger.debug("Configuring Proxy. %s", proxycommand) 14:59:17 if not isinstance(proxycommand, six.string_types): 14:59:17 proxycommand = [os.path.expanduser(elem) for elem in proxycommand] 14:59:17 else: 14:59:17 proxycommand = os.path.expanduser(proxycommand) 14:59:17 sock = paramiko.proxy.ProxyCommand(proxycommand) 14:59:17 else: 14:59:17 for res in socket.getaddrinfo(host, port, socket.AF_UNSPEC, socket.SOCK_STREAM): 14:59:17 af, socktype, proto, canonname, sa = res 14:59:17 try: 14:59:17 sock = socket.socket(af, socktype, proto) 14:59:17 sock.settimeout(timeout) 14:59:17 except socket.error: 14:59:17 continue 14:59:17 try: 14:59:17 if bind_addr: 14:59:17 sock.bind((bind_addr, 0)) 14:59:17 sock.connect(sa) 14:59:17 except socket.error: 14:59:17 sock.close() 14:59:17 continue 14:59:17 break 14:59:17 else: 14:59:17 raise SSHError("Could not open socket to %s:%s" % (host, port)) 14:59:17 else: 14:59:17 if sys.version_info[0] < 3: 14:59:17 s = socket.fromfd(int(sock_fd), socket.AF_INET, socket.SOCK_STREAM) 14:59:17 sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM, _sock=s) 14:59:17 else: 14:59:17 sock = socket.fromfd(int(sock_fd), socket.AF_INET, socket.SOCK_STREAM) 14:59:17 sock.settimeout(timeout) 14:59:17 14:59:17 self._transport = paramiko.Transport(sock) 14:59:17 self._transport.set_log_channel(logger.name) 14:59:17 if config.get("compression") == 'yes': 14:59:17 self._transport.use_compression() 14:59:17 14:59:17 if hostkey_b64: 14:59:17 # If we need to connect with a specific hostkey, negotiate for only its type 14:59:17 hostkey_obj = None 14:59:17 for key_cls in [paramiko.DSSKey, paramiko.Ed25519Key, paramiko.RSAKey, paramiko.ECDSAKey]: 14:59:17 try: 14:59:17 hostkey_obj = key_cls(data=base64.b64decode(hostkey_b64)) 14:59:17 except paramiko.SSHException: 14:59:17 # Not a key of this type - try the next 14:59:17 pass 14:59:17 if not hostkey_obj: 14:59:17 # We've tried all known host key types and haven't found a suitable one to use - bail 14:59:17 raise SSHError("Couldn't find suitable paramiko key class for host key %s" % hostkey_b64) 14:59:17 self._transport._preferred_keys = [hostkey_obj.get_name()] 14:59:17 elif self._host_keys: 14:59:17 # Else set preferred host keys to those we possess for the host 14:59:17 # (avoids situation where known_hosts contains a valid key for the host, but that key type is not selected during negotiation) 14:59:17 known_host_keys_for_this_host = self._host_keys.lookup(host) or {} 14:59:17 host_port = '[%s]:%s' % (host, port) 14:59:17 known_host_keys_for_this_host.update(self._host_keys.lookup(host_port) or {}) 14:59:17 if known_host_keys_for_this_host: 14:59:17 self._transport._preferred_keys = list(known_host_keys_for_this_host) 14:59:17 14:59:17 # Connect 14:59:17 try: 14:59:17 > self._transport.start_client() 14:59:17 14:59:17 ../.tox/py3/lib/python3.6/site-packages/ncclient/transport/ssh.py:329: 14:59:17 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 14:59:17 14:59:17 self = 14:59:17 event = , timeout = None 14:59:17 14:59:17 def start_client(self, event=None, timeout=None): 14:59:17 """ 14:59:17 Negotiate a new SSH2 session as a client. This is the first step after 14:59:17 creating a new `.Transport`. A separate thread is created for protocol 14:59:17 negotiation. 14:59:17 14:59:17 If an event is passed in, this method returns immediately. When 14:59:17 negotiation is done (successful or not), the given ``Event`` will 14:59:17 be triggered. On failure, `is_active` will return ``False``. 14:59:17 14:59:17 (Since 1.4) If ``event`` is ``None``, this method will not return until 14:59:17 negotiation is done. On success, the method returns normally. 14:59:17 Otherwise an SSHException is raised. 14:59:17 14:59:17 After a successful negotiation, you will usually want to authenticate, 14:59:17 calling `auth_password ` or 14:59:17 `auth_publickey `. 14:59:17 14:59:17 .. note:: `connect` is a simpler method for connecting as a client. 14:59:17 14:59:17 .. note:: 14:59:17 After calling this method (or `start_server` or `connect`), you 14:59:17 should no longer directly read from or write to the original socket 14:59:17 object. 14:59:17 14:59:17 :param .threading.Event event: 14:59:17 an event to trigger when negotiation is complete (optional) 14:59:17 14:59:17 :param float timeout: 14:59:17 a timeout, in seconds, for SSH2 session negotiation (optional) 14:59:17 14:59:17 :raises: 14:59:17 `.SSHException` -- if negotiation fails (and no ``event`` was 14:59:17 passed in) 14:59:17 """ 14:59:17 self.active = True 14:59:17 if event is not None: 14:59:17 # async, return immediately and let the app poll for completion 14:59:17 self.completion_event = event 14:59:17 self.start() 14:59:17 return 14:59:17 14:59:17 # synchronous, wait for a result 14:59:17 self.completion_event = event = threading.Event() 14:59:17 self.start() 14:59:17 max_time = time.time() + timeout if timeout is not None else None 14:59:17 while True: 14:59:17 event.wait(0.1) 14:59:17 if not self.active: 14:59:17 e = self.get_exception() 14:59:17 if e is not None: 14:59:17 > raise e 14:59:17 14:59:17 ../.tox/py3/lib/python3.6/site-packages/paramiko/transport.py:773: 14:59:17 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 14:59:17 14:59:17 self = 14:59:17 14:59:17 def run(self): 14:59:17 # (use the exposed "run" method, because if we specify a thread target 14:59:17 # of a private method, threading.Thread will keep a reference to it 14:59:17 # indefinitely, creating a GC cycle and not letting Transport ever be 14:59:17 # GC'd. it's a bug in Thread.) 14:59:17 14:59:17 # Hold reference to 'sys' so we can test sys.modules to detect 14:59:17 # interpreter shutdown. 14:59:17 self.sys = sys 14:59:17 14:59:17 # active=True occurs before the thread is launched, to avoid a race 14:59:17 _active_threads.append(self) 14:59:17 tid = hex(id(self) & xffffffff) 14:59:17 if self.server_mode: 14:59:17 self._log(DEBUG, "starting thread (server mode): {}".format(tid)) 14:59:17 else: 14:59:17 self._log(DEBUG, "starting thread (client mode): {}".format(tid)) 14:59:17 try: 14:59:17 try: 14:59:17 self.packetizer.write_all(b(self.local_version + "\r\n")) 14:59:17 self._log( 14:59:17 DEBUG, 14:59:17 "Local version/idstring: {}".format(self.local_version), 14:59:17 ) # noqa 14:59:17 > self._check_banner() 14:59:17 14:59:17 ../.tox/py3/lib/python3.6/site-packages/paramiko/transport.py:2185: 14:59:17 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 14:59:17 14:59:17 self = 14:59:17 14:59:17 def _check_banner(self): 14:59:17 # this is slow, but we only have to do it once 14:59:17 for i in range(100): 14:59:17 # give them 15 seconds for the first line, then just 2 seconds 14:59:17 # each additional line. (some sites have very high latency.) 14:59:17 if i == 0: 14:59:17 timeout = self.banner_timeout 14:59:17 else: 14:59:17 timeout = 2 14:59:17 try: 14:59:17 buf = self.packetizer.readline(timeout) 14:59:17 except ProxyCommandFailure: 14:59:17 raise 14:59:17 except Exception as e: 14:59:17 raise SSHException( 14:59:17 > "Error reading SSH protocol banner" + str(e) 14:59:17 ) 14:59:17 E paramiko.ssh_exception.SSHException: Error reading SSH protocol banner 14:59:17 14:59:17 ../.tox/py3/lib/python3.6/site-packages/paramiko/transport.py:2374: SSHException 14:59:17 14:59:17 During handling of the above exception, another exception occurred: 14:59:17 14:59:17 self = 14:59:17 14:59:17 def setup(self): 14:59:17 self.nc = manager.connect( 14:59:17 host=settings.HOST, 14:59:17 port=settings.SSH_PORT, 14:59:17 username=settings.USERNAME, 14:59:17 key_filename=settings.SSH_KEY_FILENAME, 14:59:17 allow_agent=False, 14:59:17 look_for_keys=False, 14:59:17 > hostkey_verify=False) 14:59:17 14:59:17 nctest.py:46: 14:59:17 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 14:59:17 ../.tox/py3/lib/python3.6/site-packages/ncclient/manager.py:168: in connect 14:59:17 return connect_ssh(*args, **kwds) 14:59:17 ../.tox/py3/lib/python3.6/site-packages/ncclient/manager.py:135: in connect_ssh 14:59:17 session.connect(*args, **kwds) 14:59:17 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 14:59:17 14:59:17 self = , host = '127.0.0.1', port = 49154 14:59:17 timeout = None 14:59:17 unknown_host_cb = 14:59:17 username = 'netconf', password = None, key_filename = '../config/ssh/id_rsa' 14:59:17 allow_agent = False, hostkey_verify = False, hostkey_b64 = None 14:59:17 look_for_keys = False, ssh_config = None, sock_fd = None, bind_addr = None 14:59:17 14:59:17 def connect( 14:59:17 self, 14:59:17 host, 14:59:17 port = PORT_NETCONF_DEFAULT, 14:59:17 timeout = None, 14:59:17 unknown_host_cb = default_unknown_host_cb, 14:59:17 username = None, 14:59:17 password = None, 14:59:17 key_filename = None, 14:59:17 allow_agent = True, 14:59:17 hostkey_verify = True, 14:59:17 hostkey_b64 = None, 14:59:17 look_for_keys = True, 14:59:17 ssh_config = None, 14:59:17 sock_fd = None, 14:59:17 bind_addr = None): 14:59:17 14:59:17 """Connect via SSH and initialize the NETCONF session. First attempts the publickey authentication method and then password authentication. 14:59:17 14:59:17 To disable attempting publickey authentication altogether, call with *allow_agent* and *look_for_keys* as `False`. 14:59:17 14:59:17 *host* is the hostname or IP address to connect to 14:59:17 14:59:17 *port* is by default 830 (PORT_NETCONF_DEFAULT), but some devices use the default SSH port of 22 so this may need to be specified 14:59:17 14:59:17 *timeout* is an optional timeout for socket connect 14:59:17 14:59:17 *unknown_host_cb* is called when the server host key is not recognized. It takes two arguments, the hostname and the fingerprint (see the signature of :func:`default_unknown_host_cb`) 14:59:17 14:59:17 *username* is the username to use for SSH authentication 14:59:17 14:59:17 *password* is the password used if using password authentication, or the passphrase to use for unlocking keys that require it 14:59:17 14:59:17 *key_filename* is a filename where a the private key to be used can be found 14:59:17 14:59:17 *allow_agent* enables querying SSH agent (if found) for keys 14:59:17 14:59:17 *hostkey_verify* enables hostkey verification from ~/.ssh/known_hosts 14:59:17 14:59:17 *hostkey_b64* only connect when server presents a public hostkey matching this (obtain from server /etc/ssh/ssh_host_*pub or ssh-keyscan) 14:59:17 14:59:17 *look_for_keys* enables looking in the usual locations for ssh keys (e.g. :file:`~/.ssh/id_*`) 14:59:17 14:59:17 *ssh_config* enables parsing of an OpenSSH configuration file, if set to its path, e.g. :file:`~/.ssh/config` or to True (in this case, use :file:`~/.ssh/config`). 14:59:17 14:59:17 *sock_fd* is an already open socket which shall be used for this connection. Useful for NETCONF outbound ssh. Use host=None together with a valid sock_fd number 14:59:17 14:59:17 *bind_addr* is a (local) source IP address to use, must be reachable from the remote device. 14:59:17 """ 14:59:17 if not (host or sock_fd): 14:59:17 raise SSHError("Missing host or socket fd") 14:59:17 14:59:17 self._host = host 14:59:17 14:59:17 # Optionally, parse .ssh/config 14:59:17 config = {} 14:59:17 if ssh_config is True: 14:59:17 ssh_config = "~/.ssh/config" if sys.platform != "win32" else "~/ssh/config" 14:59:17 if ssh_config is not None: 14:59:17 config = paramiko.SSHConfig() 14:59:17 with open(os.path.expanduser(ssh_config)) as ssh_config_file_obj: 14:59:17 config.parse(ssh_config_file_obj) 14:59:17 14:59:17 # Save default Paramiko SSH port so it can be reverted 14:59:17 paramiko_default_ssh_port = paramiko.config.SSH_PORT 14:59:17 14:59:17 # Change the default SSH port to the port specified by the user so expand_variables 14:59:17 # replaces %p with the passed in port rather than 22 (the defauld paramiko.config.SSH_PORT) 14:59:17 14:59:17 paramiko.config.SSH_PORT = port 14:59:17 14:59:17 config = config.lookup(host) 14:59:17 14:59:17 # paramiko.config.SSHconfig::expand_variables is called by lookup so we can set the SSH port 14:59:17 # back to the default 14:59:17 paramiko.config.SSH_PORT = paramiko_default_ssh_port 14:59:17 14:59:17 host = config.get("hostname", host) 14:59:17 if username is None: 14:59:17 username = config.get("user") 14:59:17 if key_filename is None: 14:59:17 key_filename = config.get("identityfile") 14:59:17 if hostkey_verify: 14:59:17 userknownhostsfile = config.get("userknownhostsfile") 14:59:17 if userknownhostsfile: 14:59:17 self.load_known_hosts(os.path.expanduser(userknownhostsfile)) 14:59:17 if timeout is None: 14:59:17 timeout = config.get("connecttimeout") 14:59:17 if timeout: 14:59:17 timeout = int(timeout) 14:59:17 14:59:17 if username is None: 14:59:17 username = getpass.getuser() 14:59:17 14:59:17 if sock_fd is None: 14:59:17 proxycommand = config.get("proxycommand") 14:59:17 if proxycommand: 14:59:17 self.logger.debug("Configuring Proxy. %s", proxycommand) 14:59:17 if not isinstance(proxycommand, six.string_types): 14:59:17 proxycommand = [os.path.expanduser(elem) for elem in proxycommand] 14:59:17 else: 14:59:17 proxycommand = os.path.expanduser(proxycommand) 14:59:17 sock = paramiko.proxy.ProxyCommand(proxycommand) 14:59:17 else: 14:59:17 for res in socket.getaddrinfo(host, port, socket.AF_UNSPEC, socket.SOCK_STREAM): 14:59:17 af, socktype, proto, canonname, sa = res 14:59:17 try: 14:59:17 sock = socket.socket(af, socktype, proto) 14:59:17 sock.settimeout(timeout) 14:59:17 except socket.error: 14:59:17 continue 14:59:17 try: 14:59:17 if bind_addr: 14:59:17 sock.bind((bind_addr, 0)) 14:59:17 sock.connect(sa) 14:59:17 except socket.error: 14:59:17 sock.close() 14:59:17 continue 14:59:17 break 14:59:17 else: 14:59:17 raise SSHError("Could not open socket to %s:%s" % (host, port)) 14:59:17 else: 14:59:17 if sys.version_info[0] < 3: 14:59:17 s = socket.fromfd(int(sock_fd), socket.AF_INET, socket.SOCK_STREAM) 14:59:17 sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM, _sock=s) 14:59:17 else: 14:59:17 sock = socket.fromfd(int(sock_fd), socket.AF_INET, socket.SOCK_STREAM) 14:59:17 sock.settimeout(timeout) 14:59:17 14:59:17 self._transport = paramiko.Transport(sock) 14:59:17 self._transport.set_log_channel(logger.name) 14:59:17 if config.get("compression") == 'yes': 14:59:17 self._transport.use_compression() 14:59:17 14:59:17 if hostkey_b64: 14:59:17 # If we need to connect with a specific hostkey, negotiate for only its type 14:59:17 hostkey_obj = None 14:59:17 for key_cls in [paramiko.DSSKey, paramiko.Ed25519Key, paramiko.RSAKey, paramiko.ECDSAKey]: 14:59:17 try: 14:59:17 hostkey_obj = key_cls(data=base64.b64decode(hostkey_b64)) 14:59:17 except paramiko.SSHException: 14:59:17 # Not a key of this type - try the next 14:59:17 pass 14:59:17 if not hostkey_obj: 14:59:17 # We've tried all known host key types and haven't found a suitable one to use - bail 14:59:17 raise SSHError("Couldn't find suitable paramiko key class for host key %s" % hostkey_b64) 14:59:17 self._transport._preferred_keys = [hostkey_obj.get_name()] 14:59:17 elif self._host_keys: 14:59:17 # Else set preferred host keys to those we possess for the host 14:59:17 # (avoids situation where known_hosts contains a valid key for the host, but that key type is not selected during negotiation) 14:59:17 known_host_keys_for_this_host = self._host_keys.lookup(host) or {} 14:59:17 host_port = '[%s]:%s' % (host, port) 14:59:17 known_host_keys_for_this_host.update(self._host_keys.lookup(host_port) or {}) 14:59:17 if known_host_keys_for_this_host: 14:59:17 self._transport._preferred_keys = list(known_host_keys_for_this_host) 14:59:17 14:59:17 # Connect 14:59:17 try: 14:59:17 self._transport.start_client() 14:59:17 except paramiko.SSHException as e: 14:59:17 > raise SSHError('Negotiation failed: %s' % e) 14:59:17 E ncclient.transport.errors.SSHError: Negotiation failed: Error reading SSH protocol banner 14:59:17 14:59:17 ../.tox/py3/lib/python3.6/site-packages/ncclient/transport/ssh.py:331: SSHError 14:59:17 ------------------------------ Captured log setup ------------------------------ 14:59:17 14:59:16.991 ERROR [ncclient.transport.ssh] Exception (client): Error reading SSH protocol banner 14:59:17 14:59:16.992 ERROR [ncclient.transport.ssh] Traceback (most recent call last): 14:59:17 14:59:16.992 ERROR [ncclient.transport.ssh] File "/w/workspace/integration-netconf-pnp-simulator-docker-merge-master/test/mocks/netconf-pnp-simulator/engine/.tox/py3/lib/python3.6/site-packages/paramiko/transport.py", line 2369, in _check_banner 14:59:17 14:59:16.992 ERROR [ncclient.transport.ssh] buf = self.packetizer.readline(timeout) 14:59:17 14:59:16.992 ERROR [ncclient.transport.ssh] File "/w/workspace/integration-netconf-pnp-simulator-docker-merge-master/test/mocks/netconf-pnp-simulator/engine/.tox/py3/lib/python3.6/site-packages/paramiko/packet.py", line 395, in readline 14:59:17 14:59:16.992 ERROR [ncclient.transport.ssh] buf += self._read_timeout(timeout) 14:59:17 14:59:16.992 ERROR [ncclient.transport.ssh] File "/w/workspace/integration-netconf-pnp-simulator-docker-merge-master/test/mocks/netconf-pnp-simulator/engine/.tox/py3/lib/python3.6/site-packages/paramiko/packet.py", line 665, in _read_timeout 14:59:17 14:59:16.992 ERROR [ncclient.transport.ssh] raise EOFError() 14:59:17 14:59:16.992 ERROR [ncclient.transport.ssh] EOFError 14:59:17 14:59:16.992 ERROR [ncclient.transport.ssh] 14:59:17 14:59:16.993 ERROR [ncclient.transport.ssh] During handling of the above exception, another exception occurred: 14:59:17 14:59:16.993 ERROR [ncclient.transport.ssh] 14:59:17 14:59:16.993 ERROR [ncclient.transport.ssh] Traceback (most recent call last): 14:59:17 14:59:16.993 ERROR [ncclient.transport.ssh] File "/w/workspace/integration-netconf-pnp-simulator-docker-merge-master/test/mocks/netconf-pnp-simulator/engine/.tox/py3/lib/python3.6/site-packages/paramiko/transport.py", line 2185, in run 14:59:17 14:59:16.993 ERROR [ncclient.transport.ssh] self._check_banner() 14:59:17 14:59:16.993 ERROR [ncclient.transport.ssh] File "/w/workspace/integration-netconf-pnp-simulator-docker-merge-master/test/mocks/netconf-pnp-simulator/engine/.tox/py3/lib/python3.6/site-packages/paramiko/transport.py", line 2374, in _check_banner 14:59:17 14:59:16.993 ERROR [ncclient.transport.ssh] "Error reading SSH protocol banner" + str(e) 14:59:17 14:59:16.993 ERROR [ncclient.transport.ssh] paramiko.ssh_exception.SSHException: Error reading SSH protocol banner 14:59:17 14:59:16.993 ERROR [ncclient.transport.ssh] 14:59:17 =================================== FAILURES =================================== 14:59:17 ___________________________ TestTLS.test_tls_connect ___________________________ 14:59:17 14:59:17 self = 14:59:17 14:59:17 def test_tls_connect(self): 14:59:17 > nc_connect(INITIAL_CONFIG_DIR) 14:59:17 14:59:17 test_tls.py:41: 14:59:17 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 14:59:17 test_tls.py:93: in nc_connect 14:59:17 conn.connect((settings.HOST, settings.TLS_PORT)) 14:59:17 /usr/lib/python3.6/ssl.py:1109: in connect 14:59:17 self._real_connect(addr, False) 14:59:17 /usr/lib/python3.6/ssl.py:1100: in _real_connect 14:59:17 self.do_handshake() 14:59:17 /usr/lib/python3.6/ssl.py:1077: in do_handshake 14:59:17 self._sslobj.do_handshake() 14:59:17 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 14:59:17 14:59:17 self = 14:59:17 14:59:17 def do_handshake(self): 14:59:17 """Start the SSL/TLS handshake.""" 14:59:17 > self._sslobj.do_handshake() 14:59:17 E ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852) 14:59:17 14:59:17 /usr/lib/python3.6/ssl.py:689: SSLError 14:59:17 __________________ TestTLS.test_tls_reconfiguration[round #1] __________________ 14:59:17 14:59:17 self = , round_id = 'round #1' 14:59:17 14:59:17 @pytest.mark.parametrize("round_id", [f"round #{i + 1}" for i in range(6)]) 14:59:17 def test_tls_reconfiguration(self, round_id): 14:59:17 # pylint: disable=W0613 14:59:17 > self.reconfigure_and_check(NEW_CONFIG_DIR, INITIAL_CONFIG_DIR) 14:59:17 14:59:17 test_tls.py:46: 14:59:17 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 14:59:17 test_tls.py:60: in reconfigure_and_check 14:59:17 nc_connect(good_config_dir) 14:59:17 test_tls.py:93: in nc_connect 14:59:17 conn.connect((settings.HOST, settings.TLS_PORT)) 14:59:17 /usr/lib/python3.6/ssl.py:1109: in connect 14:59:17 self._real_connect(addr, False) 14:59:17 /usr/lib/python3.6/ssl.py:1100: in _real_connect 14:59:17 self.do_handshake() 14:59:17 /usr/lib/python3.6/ssl.py:1077: in do_handshake 14:59:17 self._sslobj.do_handshake() 14:59:17 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 14:59:17 14:59:17 self = 14:59:17 14:59:17 def do_handshake(self): 14:59:17 """Start the SSL/TLS handshake.""" 14:59:17 > self._sslobj.do_handshake() 14:59:17 E ConnectionResetError: [Errno 104] Connection reset by peer 14:59:17 14:59:17 /usr/lib/python3.6/ssl.py:689: ConnectionResetError 14:59:17 __________________ TestTLS.test_tls_reconfiguration[round #2] __________________ 14:59:17 14:59:17 self = , round_id = 'round #2' 14:59:17 14:59:17 @pytest.mark.parametrize("round_id", [f"round #{i + 1}" for i in range(6)]) 14:59:17 def test_tls_reconfiguration(self, round_id): 14:59:17 # pylint: disable=W0613 14:59:17 > self.reconfigure_and_check(NEW_CONFIG_DIR, INITIAL_CONFIG_DIR) 14:59:17 14:59:17 test_tls.py:46: 14:59:17 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 14:59:17 test_tls.py:60: in reconfigure_and_check 14:59:17 nc_connect(good_config_dir) 14:59:17 test_tls.py:93: in nc_connect 14:59:17 conn.connect((settings.HOST, settings.TLS_PORT)) 14:59:17 /usr/lib/python3.6/ssl.py:1109: in connect 14:59:17 self._real_connect(addr, False) 14:59:17 /usr/lib/python3.6/ssl.py:1100: in _real_connect 14:59:17 self.do_handshake() 14:59:17 /usr/lib/python3.6/ssl.py:1077: in do_handshake 14:59:17 self._sslobj.do_handshake() 14:59:17 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 14:59:17 14:59:17 self = 14:59:17 14:59:17 def do_handshake(self): 14:59:17 """Start the SSL/TLS handshake.""" 14:59:17 > self._sslobj.do_handshake() 14:59:17 E ConnectionResetError: [Errno 104] Connection reset by peer 14:59:17 14:59:17 /usr/lib/python3.6/ssl.py:689: ConnectionResetError 14:59:17 __________________ TestTLS.test_tls_reconfiguration[round #3] __________________ 14:59:17 14:59:17 self = , round_id = 'round #3' 14:59:17 14:59:17 @pytest.mark.parametrize("round_id", [f"round #{i + 1}" for i in range(6)]) 14:59:17 def test_tls_reconfiguration(self, round_id): 14:59:17 # pylint: disable=W0613 14:59:17 > self.reconfigure_and_check(NEW_CONFIG_DIR, INITIAL_CONFIG_DIR) 14:59:17 14:59:17 test_tls.py:46: 14:59:17 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 14:59:17 test_tls.py:60: in reconfigure_and_check 14:59:17 nc_connect(good_config_dir) 14:59:17 test_tls.py:93: in nc_connect 14:59:17 conn.connect((settings.HOST, settings.TLS_PORT)) 14:59:17 /usr/lib/python3.6/ssl.py:1109: in connect 14:59:17 self._real_connect(addr, False) 14:59:17 /usr/lib/python3.6/ssl.py:1100: in _real_connect 14:59:17 self.do_handshake() 14:59:17 /usr/lib/python3.6/ssl.py:1077: in do_handshake 14:59:17 self._sslobj.do_handshake() 14:59:17 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 14:59:17 14:59:17 self = 14:59:17 14:59:17 def do_handshake(self): 14:59:17 """Start the SSL/TLS handshake.""" 14:59:17 > self._sslobj.do_handshake() 14:59:17 E ConnectionResetError: [Errno 104] Connection reset by peer 14:59:17 14:59:17 /usr/lib/python3.6/ssl.py:689: ConnectionResetError 14:59:17 __________________ TestTLS.test_tls_reconfiguration[round #4] __________________ 14:59:17 14:59:17 self = , round_id = 'round #4' 14:59:17 14:59:17 @pytest.mark.parametrize("round_id", [f"round #{i + 1}" for i in range(6)]) 14:59:17 def test_tls_reconfiguration(self, round_id): 14:59:17 # pylint: disable=W0613 14:59:17 > self.reconfigure_and_check(NEW_CONFIG_DIR, INITIAL_CONFIG_DIR) 14:59:17 14:59:17 test_tls.py:46: 14:59:17 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 14:59:17 test_tls.py:60: in reconfigure_and_check 14:59:17 nc_connect(good_config_dir) 14:59:17 test_tls.py:93: in nc_connect 14:59:17 conn.connect((settings.HOST, settings.TLS_PORT)) 14:59:17 /usr/lib/python3.6/ssl.py:1109: in connect 14:59:17 self._real_connect(addr, False) 14:59:17 /usr/lib/python3.6/ssl.py:1100: in _real_connect 14:59:17 self.do_handshake() 14:59:17 /usr/lib/python3.6/ssl.py:1077: in do_handshake 14:59:17 self._sslobj.do_handshake() 14:59:17 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 14:59:17 14:59:17 self = 14:59:17 14:59:17 def do_handshake(self): 14:59:17 """Start the SSL/TLS handshake.""" 14:59:17 > self._sslobj.do_handshake() 14:59:17 E ConnectionResetError: [Errno 104] Connection reset by peer 14:59:17 14:59:17 /usr/lib/python3.6/ssl.py:689: ConnectionResetError 14:59:17 __________________ TestTLS.test_tls_reconfiguration[round #5] __________________ 14:59:17 14:59:17 self = , round_id = 'round #5' 14:59:17 14:59:17 @pytest.mark.parametrize("round_id", [f"round #{i + 1}" for i in range(6)]) 14:59:17 def test_tls_reconfiguration(self, round_id): 14:59:17 # pylint: disable=W0613 14:59:17 > self.reconfigure_and_check(NEW_CONFIG_DIR, INITIAL_CONFIG_DIR) 14:59:17 14:59:17 test_tls.py:46: 14:59:17 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 14:59:17 test_tls.py:60: in reconfigure_and_check 14:59:17 nc_connect(good_config_dir) 14:59:17 test_tls.py:93: in nc_connect 14:59:17 conn.connect((settings.HOST, settings.TLS_PORT)) 14:59:17 /usr/lib/python3.6/ssl.py:1109: in connect 14:59:17 self._real_connect(addr, False) 14:59:17 /usr/lib/python3.6/ssl.py:1100: in _real_connect 14:59:17 self.do_handshake() 14:59:17 /usr/lib/python3.6/ssl.py:1077: in do_handshake 14:59:17 self._sslobj.do_handshake() 14:59:17 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 14:59:17 14:59:17 self = 14:59:17 14:59:17 def do_handshake(self): 14:59:17 """Start the SSL/TLS handshake.""" 14:59:17 > self._sslobj.do_handshake() 14:59:17 E ConnectionResetError: [Errno 104] Connection reset by peer 14:59:17 14:59:17 /usr/lib/python3.6/ssl.py:689: ConnectionResetError 14:59:17 __________________ TestTLS.test_tls_reconfiguration[round #6] __________________ 14:59:17 14:59:17 self = , round_id = 'round #6' 14:59:17 14:59:17 @pytest.mark.parametrize("round_id", [f"round #{i + 1}" for i in range(6)]) 14:59:17 def test_tls_reconfiguration(self, round_id): 14:59:17 # pylint: disable=W0613 14:59:17 > self.reconfigure_and_check(NEW_CONFIG_DIR, INITIAL_CONFIG_DIR) 14:59:17 14:59:17 test_tls.py:46: 14:59:17 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 14:59:17 test_tls.py:60: in reconfigure_and_check 14:59:17 nc_connect(good_config_dir) 14:59:17 test_tls.py:93: in nc_connect 14:59:17 conn.connect((settings.HOST, settings.TLS_PORT)) 14:59:17 /usr/lib/python3.6/ssl.py:1109: in connect 14:59:17 self._real_connect(addr, False) 14:59:17 /usr/lib/python3.6/ssl.py:1100: in _real_connect 14:59:17 self.do_handshake() 14:59:17 /usr/lib/python3.6/ssl.py:1077: in do_handshake 14:59:17 self._sslobj.do_handshake() 14:59:17 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 14:59:17 14:59:17 self = 14:59:17 14:59:17 def do_handshake(self): 14:59:17 """Start the SSL/TLS handshake.""" 14:59:17 > self._sslobj.do_handshake() 14:59:17 E ConnectionResetError: [Errno 104] Connection reset by peer 14:59:17 14:59:17 /usr/lib/python3.6/ssl.py:689: ConnectionResetError 14:59:17 =============================== warnings summary =============================== 14:59:17 ../.tox/py3/lib/python3.6/site-packages/paramiko/transport.py:32 14:59:17 /w/workspace/integration-netconf-pnp-simulator-docker-merge-master/test/mocks/netconf-pnp-simulator/engine/.tox/py3/lib/python3.6/site-packages/paramiko/transport.py:32: CryptographyDeprecationWarning: Python 3.6 is no longer supported by the Python core team. Therefore, support for it is deprecated in cryptography. The next release of cryptography will remove support for Python 3.6. 14:59:17 from cryptography.hazmat.backends import default_backend 14:59:17 14:59:17 -- Docs: https://docs.pytest.org/en/stable/warnings.html 14:59:17 =========================== short test summary info ============================ 14:59:17 FAILED test_tls.py::TestTLS::test_tls_connect - ssl.SSLError: [SSL: CERTIFICA... 14:59:17 FAILED test_tls.py::TestTLS::test_tls_reconfiguration[round #1] - ConnectionR... 14:59:17 FAILED test_tls.py::TestTLS::test_tls_reconfiguration[round #2] - ConnectionR... 14:59:17 FAILED test_tls.py::TestTLS::test_tls_reconfiguration[round #3] - ConnectionR... 14:59:17 FAILED test_tls.py::TestTLS::test_tls_reconfiguration[round #4] - ConnectionR... 14:59:17 FAILED test_tls.py::TestTLS::test_tls_reconfiguration[round #5] - ConnectionR... 14:59:17 FAILED test_tls.py::TestTLS::test_tls_reconfiguration[round #6] - ConnectionR... 14:59:17 ERROR test_turing_machine.py::TestTuringMachine::test_get - ncclient.transpor... 14:59:17 ERROR test_turing_machine.py::TestTuringMachine::test_get_config_startup - nc... 14:59:17 ERROR test_turing_machine.py::TestTuringMachine::test_get_config_running - nc... 14:59:17 ERROR test_turing_machine.py::TestTuringMachine::test_get_subtree_filter - nc... 14:59:17 ERROR test_turing_machine.py::TestTuringMachine::test_get_xpath_filter - nccl... 14:59:17 ERROR test_turing_machine.py::TestTuringMachine::test_edit_config - ncclient.... 14:59:17 ============== 7 failed, 7 passed, 1 warning, 6 errors in 32.01s =============== 14:59:17 ERROR: InvocationError for command /w/workspace/integration-netconf-pnp-simulator-docker-merge-master/test/mocks/netconf-pnp-simulator/engine/.tox/py3/bin/pytest -v (exited with code 1) 14:59:17 py3 docker: remove 'b0c5933253' (forced) 14:59:21 ___________________________________ summary ____________________________________ 14:59:21 ERROR: py3: commands failed 14:59:21 Build step 'Execute shell' marked build as failure 14:59:21 $ ssh-agent -k 14:59:21 unset SSH_AUTH_SOCK; 14:59:21 unset SSH_AGENT_PID; 14:59:21 echo Agent pid 2112 killed; 14:59:21 [ssh-agent] Stopped. 14:59:21 [PostBuildScript] - [INFO] Executing post build scripts. 14:59:21 [integration-netconf-pnp-simulator-docker-merge-master] $ /bin/bash /tmp/jenkins3769186877869902900.sh 14:59:21 ---> sysstat.sh 14:59:22 [integration-netconf-pnp-simulator-docker-merge-master] $ /bin/bash /tmp/jenkins5512283266989281918.sh 14:59:22 ---> package-listing.sh 14:59:22 ++ facter osfamily 14:59:22 ++ tr '[:upper:]' '[:lower:]' 14:59:22 + OS_FAMILY=debian 14:59:22 + workspace=/w/workspace/integration-netconf-pnp-simulator-docker-merge-master 14:59:22 + START_PACKAGES=/tmp/packages_start.txt 14:59:22 + END_PACKAGES=/tmp/packages_end.txt 14:59:22 + DIFF_PACKAGES=/tmp/packages_diff.txt 14:59:22 + PACKAGES=/tmp/packages_start.txt 14:59:22 + '[' /w/workspace/integration-netconf-pnp-simulator-docker-merge-master ']' 14:59:22 + PACKAGES=/tmp/packages_end.txt 14:59:22 + case "${OS_FAMILY}" in 14:59:22 + dpkg -l 14:59:22 + grep '^ii' 14:59:22 + '[' -f /tmp/packages_start.txt ']' 14:59:22 + '[' -f /tmp/packages_end.txt ']' 14:59:22 + diff /tmp/packages_start.txt /tmp/packages_end.txt 14:59:22 + '[' /w/workspace/integration-netconf-pnp-simulator-docker-merge-master ']' 14:59:22 + mkdir -p /w/workspace/integration-netconf-pnp-simulator-docker-merge-master/archives/ 14:59:22 + cp -f /tmp/packages_diff.txt /tmp/packages_end.txt /tmp/packages_start.txt /w/workspace/integration-netconf-pnp-simulator-docker-merge-master/archives/ 14:59:22 [integration-netconf-pnp-simulator-docker-merge-master] $ /bin/bash /tmp/jenkins12728133764222552743.sh 14:59:22 ---> capture-instance-metadata.sh 14:59:22 Setup pyenv: 14:59:22 system 14:59:22 3.8.13 14:59:22 3.9.13 14:59:22 * 3.10.6 (set by /w/workspace/integration-netconf-pnp-simulator-docker-merge-master/.python-version) 14:59:23 lf-activate-venv(): INFO: Reuse venv:/tmp/venv-gq3i from file:/tmp/.os_lf_venv 14:59:23 lf-activate-venv(): INFO: Installing base packages (pip, setuptools, virtualenv) 14:59:24 lf-activate-venv(): INFO: Installing additional packages: lftools 14:59:31 lf-activate-venv(): INFO: Adding /tmp/venv-gq3i/bin to PATH 14:59:31 INFO: Running in OpenStack, capturing instance metadata 14:59:31 [integration-netconf-pnp-simulator-docker-merge-master] $ /bin/bash /tmp/jenkins10257785777795875990.sh 14:59:31 provisioning config files... 14:59:31 copy managed file [jenkins-log-archives-settings] to file:/w/workspace/integration-netconf-pnp-simulator-docker-merge-master@tmp/config5004618570943141130tmp 14:59:31 Regular expression run condition: Expression=[^.*logs-s3.*], Label=[] 14:59:31 Run condition [Regular expression match] preventing perform for step [Provide Configuration files] 14:59:31 [EnvInject] - Injecting environment variables from a build step. 14:59:31 [EnvInject] - Injecting as environment variables the properties content 14:59:31 SERVER_ID=logs 14:59:31 14:59:31 [EnvInject] - Variables injected successfully. 14:59:31 [integration-netconf-pnp-simulator-docker-merge-master] $ /bin/bash /tmp/jenkins16399767022457061699.sh 14:59:31 ---> create-netrc.sh 14:59:31 [integration-netconf-pnp-simulator-docker-merge-master] $ /bin/bash /tmp/jenkins16086577942000238704.sh 14:59:31 ---> python-tools-install.sh 14:59:31 Setup pyenv: 14:59:31 system 14:59:31 3.8.13 14:59:31 3.9.13 14:59:31 * 3.10.6 (set by /w/workspace/integration-netconf-pnp-simulator-docker-merge-master/.python-version) 14:59:31 lf-activate-venv(): INFO: Reuse venv:/tmp/venv-gq3i from file:/tmp/.os_lf_venv 14:59:31 lf-activate-venv(): INFO: Installing base packages (pip, setuptools, virtualenv) 14:59:33 lf-activate-venv(): INFO: Installing additional packages: lftools 14:59:39 lf-activate-venv(): INFO: Adding /tmp/venv-gq3i/bin to PATH 14:59:40 [integration-netconf-pnp-simulator-docker-merge-master] $ /bin/sh /tmp/jenkins11522923492823168223.sh 14:59:40 ---> uv-install.sh 14:59:40 uv 0.13.1 is already installed 14:59:40 uvx 0.13.1 (x86_64-unknown-linux-gnu) 14:59:40 [integration-netconf-pnp-simulator-docker-merge-master] $ /bin/bash /tmp/jenkins9729082308111916455.sh 14:59:40 ---> sudo-logs.sh 14:59:40 Archiving 'sudo' log.. 14:59:40 [integration-netconf-pnp-simulator-docker-merge-master] $ /bin/bash /tmp/jenkins5789456750002359610.sh 14:59:40 ---> job-cost.sh 14:59:40 INFO: Activating Python virtual environment... 14:59:40 Setup pyenv: 14:59:40 system 14:59:40 3.8.13 14:59:40 3.9.13 14:59:40 * 3.10.6 (set by /w/workspace/integration-netconf-pnp-simulator-docker-merge-master/.python-version) 14:59:40 lf-activate-venv(): INFO: Reuse venv:/tmp/venv-gq3i from file:/tmp/.os_lf_venv 14:59:40 lf-activate-venv(): INFO: Installing base packages (pip, setuptools, virtualenv) 14:59:42 lf-activate-venv(): INFO: Installing additional packages: zipp==1.1.0 python-openstackclient urllib3~=1.26.15 14:59:46 lf-activate-venv(): INFO: Adding /tmp/venv-gq3i/bin to PATH 14:59:46 INFO: No stack-cost file found 14:59:46 INFO: Instance uptime: 442s 14:59:46 INFO: Fetching instance metadata (attempt 1 of 3)... 14:59:46 DEBUG: URL: http://169.254.169.254/latest/meta-data/instance-type 14:59:46 INFO: Successfully fetched instance metadata 14:59:46 INFO: Instance type: v3-standard-8 14:59:46 INFO: Retrieving pricing info for: v3-standard-8 14:59:46 INFO: Fetching Vexxhost pricing API (attempt 1 of 3)... 14:59:46 DEBUG: URL: https://pricing.vexxhost.net/v1/pricing/v3-standard-8/cost?seconds=442 14:59:47 INFO: Successfully fetched Vexxhost pricing API 14:59:47 INFO: Retrieved cost: 0.22 14:59:47 INFO: Retrieved resource: v3-standard-8 14:59:47 INFO: Creating archive directory: /w/workspace/integration-netconf-pnp-simulator-docker-merge-master/archives/cost 14:59:47 INFO: Archiving costs to: /w/workspace/integration-netconf-pnp-simulator-docker-merge-master/archives/cost.csv 14:59:47 INFO: Successfully archived job cost data 14:59:47 DEBUG: Cost data: integration-netconf-pnp-simulator-docker-merge-master,356,2026-10-14 14:59:47,v3-standard-8,442,0.22,0.00,FAILURE 14:59:47 [integration-netconf-pnp-simulator-docker-merge-master] $ /bin/bash -l /tmp/jenkins7282786842412236197.sh 14:59:47 ---> logs-deploy.sh 14:59:47 Setup pyenv: 14:59:47 system 14:59:47 3.8.13 14:59:47 3.9.13 14:59:47 * 3.10.6 (set by /w/workspace/integration-netconf-pnp-simulator-docker-merge-master/.python-version) 14:59:47 lf-activate-venv(): INFO: Reuse venv:/tmp/venv-gq3i from file:/tmp/.os_lf_venv 14:59:47 lf-activate-venv(): INFO: Installing base packages (pip, setuptools, virtualenv) 14:59:49 lf-activate-venv(): INFO: Installing additional packages: lftools urllib3~=1.26.15 14:59:55 lf-activate-venv(): INFO: Adding /tmp/venv-gq3i/bin to PATH 14:59:55 INFO: Nexus URL https://nexus.onap.org path production/vex-yul-ecomp-jenkins-1/integration-netconf-pnp-simulator-docker-merge-master/356 14:59:55 INFO: archiving workspace using pattern(s): 14:59:56 Archives upload complete. 14:59:57 INFO: archiving logs to Nexus 14:59:57 ---> uname -a: 14:59:57 Linux prd-ubuntu1804-docker-8c-8g-1701 4.15.0-192-generic #203-Ubuntu SMP Wed Aug 10 17:40:03 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux 14:59:57 14:59:57 14:59:57 ---> lscpu: 14:59:57 Architecture: x86_64 14:59:57 CPU op-mode(s): 32-bit, 64-bit 14:59:57 Byte Order: Little Endian 14:59:57 CPU(s): 8 14:59:57 On-line CPU(s) list: 0-7 14:59:57 Thread(s) per core: 1 14:59:57 Core(s) per socket: 1 14:59:57 Socket(s): 8 14:59:57 NUMA node(s): 1 14:59:57 Vendor ID: AuthenticAMD 14:59:57 CPU family: 23 14:59:57 Model: 49 14:59:57 Model name: AMD EPYC-Rome Processor 14:59:57 Stepping: 0 14:59:57 CPU MHz: 2800.000 14:59:57 BogoMIPS: 5600.00 14:59:57 Virtualization: AMD-V 14:59:57 Hypervisor vendor: KVM 14:59:57 Virtualization type: full 14:59:57 L1d cache: 32K 14:59:57 L1i cache: 32K 14:59:57 L2 cache: 512K 14:59:57 L3 cache: 16384K 14:59:57 NUMA node0 CPU(s): 0-7 14:59:57 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 xtopology 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 xsaves clzero xsaveerptr arat npt lbrv nrip_save tsc_scale vmcb_clean flushbyasid pausefilter pfthreshold v_vmsave_vmload vgif umip rdpid arch_capabilities 14:59:57 14:59:57 14:59:57 ---> nproc: 14:59:57 8 14:59:57 14:59:57 14:59:57 ---> df -h: 14:59:57 Filesystem Size Used Avail Use% Mounted on 14:59:57 udev 16G 0 16G 0% /dev 14:59:57 tmpfs 3.2G 712K 3.2G 1% /run 14:59:57 /dev/vda1 155G 11G 145G 7% / 14:59:57 tmpfs 16G 0 16G 0% /dev/shm 14:59:57 tmpfs 5.0M 0 5.0M 0% /run/lock 14:59:57 tmpfs 16G 0 16G 0% /sys/fs/cgroup 14:59:57 /dev/vda15 105M 4.4M 100M 5% /boot/efi 14:59:57 tmpfs 3.2G 0 3.2G 0% /run/user/1001 14:59:57 14:59:57 14:59:57 ---> free -m: 14:59:57 total used free shared buff/cache available 14:59:57 Mem: 32167 829 28143 0 3194 30882 14:59:57 Swap: 1023 0 1023 14:59:57 14:59:57 14:59:57 ---> ip addr: 14:59:57 1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 14:59:57 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 14:59:57 inet 127.0.0.1/8 scope host lo 14:59:57 valid_lft forever preferred_lft forever 14:59:57 inet6 ::1/128 scope host 14:59:57 valid_lft forever preferred_lft forever 14:59:57 2: ens3: mtu 1458 qdisc mq state UP group default qlen 1000 14:59:57 link/ether fa:16:3e:13:c9:30 brd ff:ff:ff:ff:ff:ff 14:59:57 inet 10.30.107.137/23 brd 10.30.107.255 scope global dynamic ens3 14:59:57 valid_lft 85957sec preferred_lft 85957sec 14:59:57 inet6 fe80::f816:3eff:fe13:c930/64 scope link 14:59:57 valid_lft forever preferred_lft forever 14:59:57 3: docker0: mtu 1500 qdisc noqueue state DOWN group default 14:59:57 link/ether 02:42:0b:8e:a0:84 brd ff:ff:ff:ff:ff:ff 14:59:57 inet 10.250.0.254/24 brd 10.250.0.255 scope global docker0 14:59:57 valid_lft forever preferred_lft forever 14:59:57 inet6 fe80::42:bff:fe8e:a084/64 scope link 14:59:57 valid_lft forever preferred_lft forever 14:59:57 14:59:57 14:59:57 ---> sar -b -r -n DEV: 14:59:57 Linux 4.15.0-192-generic (prd-ubuntu1804-docker-8c-8g-1701) 10/14/26 _x86_64_ (8 CPU) 14:59:57 14:59:57 14:52:38 LINUX RESTART (8 CPU) 14:59:57 14:59:57 14:53:02 tps rtps wtps bread/s bwrtn/s 14:59:57 14:54:01 193.19 66.53 126.66 4321.17 57380.11 14:59:57 14:55:01 194.68 9.48 185.20 1702.92 54893.65 14:59:57 14:56:01 101.75 0.13 101.62 18.93 41658.92 14:59:57 14:57:01 73.49 0.08 73.40 9.60 29079.82 14:59:57 14:58:01 43.95 0.07 43.89 8.66 16831.72 14:59:57 14:59:01 180.47 33.34 147.13 1501.95 34301.15 14:59:57 Average: 131.09 18.14 112.95 1252.01 38971.97 14:59:57 14:59:57 14:53:02 kbmemfree kbavail kbmemused %memused kbbuffers kbcached kbcommit %commit kbactive kbinact kbdirty 14:59:57 14:54:01 30035380 31682928 2903840 8.82 65640 1892816 1459624 4.29 908208 1708276 204108 14:59:57 14:55:01 29300564 31708504 3638656 11.05 88460 2599180 1665624 4.90 967628 2314248 68236 14:59:57 14:56:01 29308656 31703504 3630564 11.02 94724 2576680 1584680 4.66 986080 2276816 9564 14:59:57 14:57:01 29277452 31711688 3661768 11.12 96268 2611340 1522568 4.48 990728 2297100 1184 14:59:57 14:58:01 29152656 31704048 3786564 11.50 100960 2719604 1497344 4.41 1079956 2323492 17040 14:59:57 14:59:01 28787984 31582540 4151236 12.60 114136 2924908 1955832 5.75 1246448 2482224 2924 14:59:57 Average: 29310449 31682202 3628771 11.02 93365 2554088 1614279 4.75 1029841 2233693 50509 14:59:57 14:59:57 14:53:02 IFACE rxpck/s txpck/s rxkB/s txkB/s rxcmp/s txcmp/s rxmcst/s %ifutil 14:59:57 14:54:01 lo 1.22 1.22 0.14 0.14 0.00 0.00 0.00 0.00 14:59:57 14:54:01 ens3 345.62 250.65 2368.65 62.38 0.00 0.00 0.00 0.00 14:59:57 14:54:01 docker0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 14:59:57 14:55:01 lo 3.20 3.20 0.37 0.37 0.00 0.00 0.00 0.00 14:59:57 14:55:01 ens3 243.48 130.04 2893.63 15.20 0.00 0.00 0.00 0.00 14:59:57 14:55:01 docker0 51.07 103.17 2.75 1751.57 0.00 0.00 0.00 0.00 14:59:57 14:56:01 veth7fbba54 3.17 5.37 0.23 64.36 0.00 0.00 0.00 0.01 14:59:57 14:56:01 lo 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 14:59:57 14:56:01 ens3 42.58 34.23 108.36 5.94 0.00 0.00 0.00 0.00 14:59:57 14:56:01 docker0 14.53 21.38 0.84 102.94 0.00 0.00 0.00 0.00 14:59:57 14:57:01 lo 0.20 0.20 0.01 0.01 0.00 0.00 0.00 0.00 14:59:57 14:57:01 ens3 18.53 17.13 22.13 3.94 0.00 0.00 0.00 0.00 14:59:57 14:57:01 docker0 2.90 3.73 0.20 18.81 0.00 0.00 0.00 0.00 14:59:57 14:58:01 lo 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 14:59:57 14:58:01 ens3 20.23 10.13 214.90 1.25 0.00 0.00 0.00 0.00 14:59:57 14:58:01 docker0 8.03 18.19 0.48 214.42 0.00 0.00 0.00 0.00 14:59:57 14:59:01 lo 8.14 8.14 2.48 2.48 0.00 0.00 0.00 0.00 14:59:57 14:59:01 ens3 40.05 32.81 559.68 4.75 0.00 0.00 0.00 0.00 14:59:57 14:59:01 veth12c4726 4.35 4.18 1.75 0.78 0.00 0.00 0.00 0.00 14:59:57 14:59:01 docker0 9.34 10.12 2.15 118.54 0.00 0.00 0.00 0.00 14:59:57 Average: lo 2.13 2.13 0.50 0.50 0.00 0.00 0.00 0.00 14:59:57 Average: ens3 117.77 78.68 1024.08 15.44 0.00 0.00 0.00 0.00 14:59:57 Average: veth12c4726 0.73 0.70 0.29 0.13 0.00 0.00 0.00 0.00 14:59:57 Average: docker0 14.35 26.17 1.07 368.71 0.00 0.00 0.00 0.00 14:59:57 14:59:57 14:59:57 ---> sar -P ALL: 14:59:57 Linux 4.15.0-192-generic (prd-ubuntu1804-docker-8c-8g-1701) 10/14/26 _x86_64_ (8 CPU) 14:59:57 14:59:57 14:52:38 LINUX RESTART (8 CPU) 14:59:57 14:59:57 14:53:02 CPU %user %nice %system %iowait %steal %idle 14:59:57 14:54:01 all 9.41 0.00 0.99 4.44 0.05 85.11 14:59:57 14:54:01 0 14.27 0.00 0.95 1.37 0.05 83.36 14:59:57 14:54:01 1 10.88 0.00 1.29 2.54 0.07 85.22 14:59:57 14:54:01 2 1.85 0.00 0.34 5.68 0.03 92.09 14:59:57 14:54:01 3 17.70 0.00 2.21 15.43 0.07 64.59 14:59:57 14:54:01 4 5.28 0.00 0.76 2.68 0.05 91.22 14:59:57 14:54:01 5 4.90 0.00 0.46 1.07 0.03 93.54 14:59:57 14:54:01 6 9.55 0.00 0.78 1.30 0.03 88.34 14:59:57 14:54:01 7 10.90 0.00 1.19 5.44 0.05 82.42 14:59:57 14:55:01 all 6.79 0.00 1.21 4.47 0.04 87.49 14:59:57 14:55:01 0 25.90 0.00 2.05 2.53 0.05 69.47 14:59:57 14:55:01 1 4.43 0.00 0.78 0.27 0.02 94.51 14:59:57 14:55:01 2 0.80 0.00 0.69 8.54 0.03 89.94 14:59:57 14:55:01 3 4.06 0.00 0.92 7.29 0.05 87.67 14:59:57 14:55:01 4 2.50 0.00 0.67 0.60 0.03 96.20 14:59:57 14:55:01 5 1.09 0.00 1.09 5.25 0.03 92.54 14:59:57 14:55:01 6 7.10 0.00 2.23 10.15 0.05 80.47 14:59:57 14:55:01 7 8.37 0.00 1.27 1.16 0.05 89.15 14:59:57 14:56:01 all 15.22 0.00 2.04 1.76 0.05 80.93 14:59:57 14:56:01 0 10.30 0.00 2.75 0.95 0.05 85.95 14:59:57 14:56:01 1 19.81 0.00 1.70 0.08 0.07 78.33 14:59:57 14:56:01 2 10.19 0.00 1.96 2.08 0.02 85.75 14:59:57 14:56:01 3 18.16 0.00 2.42 5.81 0.03 73.57 14:59:57 14:56:01 4 14.36 0.00 1.52 0.13 0.03 83.95 14:59:57 14:56:01 5 20.65 0.00 2.21 0.20 0.05 76.90 14:59:57 14:56:01 6 8.24 0.00 1.54 4.61 0.05 85.56 14:59:57 14:56:01 7 20.01 0.00 2.19 0.22 0.05 77.53 14:59:57 14:57:01 all 12.44 0.00 1.31 2.93 0.04 83.29 14:59:57 14:57:01 0 8.67 0.00 1.32 0.15 0.05 89.81 14:59:57 14:57:01 1 33.44 0.00 1.49 5.69 0.05 59.34 14:59:57 14:57:01 2 3.93 0.00 0.84 8.17 0.03 87.03 14:59:57 14:57:01 3 15.49 0.00 1.24 0.12 0.03 83.12 14:59:57 14:57:01 4 10.48 0.00 1.47 2.04 0.03 85.98 14:59:57 14:57:01 5 8.73 0.00 1.42 0.28 0.03 89.53 14:59:57 14:57:01 6 10.28 0.00 1.32 6.46 0.03 81.91 14:59:57 14:57:01 7 8.44 0.00 1.40 0.53 0.03 89.59 14:59:57 14:58:01 all 0.82 0.00 0.50 17.76 0.01 80.91 14:59:57 14:58:01 0 1.88 0.00 0.67 9.09 0.00 88.36 14:59:57 14:58:01 1 0.52 0.00 0.43 20.75 0.02 78.28 14:59:57 14:58:01 2 0.70 0.00 0.55 25.17 0.02 73.55 14:59:57 14:58:01 3 0.60 0.00 0.42 18.40 0.00 80.58 14:59:57 14:58:01 4 1.10 0.00 0.65 40.53 0.02 57.69 14:59:57 14:58:01 5 0.58 0.00 0.45 3.14 0.00 95.83 14:59:57 14:58:01 6 0.57 0.00 0.52 18.40 0.00 80.52 14:59:57 14:58:01 7 0.58 0.00 0.32 6.71 0.02 92.37 14:59:57 14:59:01 all 7.40 0.00 1.46 5.42 0.06 85.66 14:59:57 14:59:01 0 2.67 0.00 1.37 1.77 0.07 94.12 14:59:57 14:59:01 1 1.91 0.00 1.07 0.62 0.05 96.36 14:59:57 14:59:01 2 3.11 0.00 1.20 2.48 0.07 93.14 14:59:57 14:59:01 3 3.59 0.00 1.42 1.80 0.07 93.12 14:59:57 14:59:01 4 26.65 0.00 2.33 1.10 0.07 69.86 14:59:57 14:59:01 5 7.18 0.00 1.18 0.75 0.05 90.84 14:59:57 14:59:01 6 2.65 0.00 1.34 30.85 0.05 65.11 14:59:57 14:59:01 7 11.45 0.00 1.77 4.00 0.07 82.72 14:59:57 Average: all 8.68 0.00 1.25 6.14 0.04 83.90 14:59:57 Average: 0 10.61 0.00 1.52 2.65 0.04 85.18 14:59:57 Average: 1 11.84 0.00 1.13 5.00 0.04 81.99 14:59:57 Average: 2 3.43 0.00 0.93 8.69 0.03 86.91 14:59:57 Average: 3 9.91 0.00 1.44 8.12 0.04 80.49 14:59:57 Average: 4 10.07 0.00 1.23 7.86 0.04 80.79 14:59:57 Average: 5 7.19 0.00 1.14 1.78 0.03 89.86 14:59:57 Average: 6 6.39 0.00 1.29 11.99 0.04 80.30 14:59:57 Average: 7 9.95 0.00 1.36 3.00 0.04 85.64 14:59:57 14:59:57 14:59:57