Error connecting build-agent to ephemeral network

I’m trying to use the CircleCI CLI on Fedora 28 and I’ve been running into a number of problems.

First, there’s the problem with SELinux contexts which prevent the circleci container from reading the mounted configuration files, which I solved by simply sudo setenforce permissive.

But then I get a strange error:

Error: 
Unexpected environment preparation error: error connecting build-agent to ephemeral network: error connecting build-agent container to ephemeral network: Error response from daemon: No such container: docker-088c2eef254cff0647f8668e4b999b09766ae569a23da37495c2b169c550ac24.scope

My configuration file .circleci/config-local.yaml:

# Java Maven CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-java/ for more details
#
version: 2
jobs:
  build:
    docker:
      - image: circleci/openjdk:8-jdk
    working_directory: ~/repo
    environment:
      MAVEN_OPTS: -Xmx3200m
    steps:
      - checkout
      # Download and cache dependencies
      - restore_cache:
          keys:
          - v1-dependencies-{{ checksum "pom.xml" }}
          # fallback to using the latest cache if no exact match is found
          - v1-dependencies-
      - run: mvn dependency:go-offline
      - save_cache:
          paths:
            - ~/.m2
          key: v1-dependencies-{{ checksum "pom.xml" }}
      - run: mvn verify --batch-mode --fail-at-end
      - run:
          command: |
            for test in `find -name 'TEST-*.xml'`; do
              test_name=${test//+(*\/|.xml)}
              mkdir -p /tmp/test-results/$test_name
              cp $test /tmp/test-results/$test_name/results.xml
            done
          when: always

Then, running circleci local execute -c .circleci/config-local.yml --verbose yields:

Docker image digest: sha256:525c91e01875050fbf65cdb4bc83a45744c54f9027fa05f76f88713f3d37f4e3
INFO[2018-09-03T11:31:02Z] Using config: .circleci/config-local.yml     
DEBU[2018-09-03T11:31:02Z] local unix path configured                    path=/tmp/picard994584342/eventprocessor.sock
DEBU[2018-09-03T11:31:02Z] config received                               config_string="{\"TaskId\":\"localbuild-1535974262\",\"TaskInfo\":{\"BuildNum\":\"\",\"BuildURI\":\"\",\"NodeIndex\":0,\"NodeTotal\":1,\"RepositoryURI\":\"https://github.com/revapi/revapi.git\",\"Branch\":\"master\",\"Revision\":\"66e2da9e97cb9b08275160f49b3702d2bf840399\",\"CheckoutKey\":\"\",\"Job\":\"build\",\"SkipCheckout\":true,\"SkipCache\":false,\"SshKeys\":null,\"VcsKnownHostsEntry\":\"\",\"ResourceClassID\":\"\",\"Volumes\":null,\"Environment\":{},\"CircleEnvs\":{},\"Workflow\":{\"WorkflowID\":\"\",\"JobID\":\"\",\"WorkspaceID\":\"\",\"UpstreamJobIDs\":null,\"UpstreamConcurrencyMap\":null},\"Storage\":{\"ProjectRoot\":\"noop://\",\"AccessKey\":\"\",\"SecretKey\":\"\",\"SessionToken\":\"\"},\"TestResults\":null,\"Limits\":{\"StepTimeoutSecs\":21600,\"MaxNoOutputTimeoutSecs\":7200},\"MachineCreatorOpts\":{\"vmServiceUrl\":\"\",\"allocated_docker_socket\":\"/var/run/docker.sock\",\"approximate_docker_image\":\"\"},\"Flags\":{\"all-features-enabled\":true,\"local-build\":true},\"BuildToken\":\"default-token\"},\"PreAuthorizedSshKeys\":[],\"SshEnabled\":false,\"ConfigYml\":\"# Java Maven CircleCI 2.0 configuration file\\n#\\n# Check https://circleci.com/docs/2.0/language-java/ for more details\\n#\\nversion: 2\\njobs:\\n  build:\\n    docker:\\n      - image: circleci/openjdk:8-jdk\\n    working_directory: ~/repo\\n    environment:\\n      MAVEN_OPTS: -Xmx3200m\\n    steps:\\n      - checkout\\n      # Download and cache dependencies\\n      - restore_cache:\\n          keys:\\n          - v1-dependencies-{{ checksum \\\"pom.xml\\\" }}\\n          # fallback to using the latest cache if no exact match is found\\n          - v1-dependencies-\\n      - run: mvn dependency:go-offline\\n      - save_cache:\\n          paths:\\n            - ~/.m2\\n          key: v1-dependencies-{{ checksum \\\"pom.xml\\\" }}\\n      - run: mvn verify --batch-mode --fail-at-end\\n      - run:\\n          command: |\\n            for test in `find -name 'TEST-*.xml'`; do\\n              test_name=${test//+(*\\\\/|.xml)}\\n              mkdir -p /tmp/test-results/$test_name\\n              cp $test /tmp/test-results/$test_name/results.xml\\n            done\\n          when: always\\n\",\"AWSRegion\":\"\",\"AgentCgroupAsParent\":false,\"Debug\":false,\"LocalBuild\":true}"
INFO[2018-09-03T11:31:03Z] statsd metric                                 count=1 name=config.parsed tags="[result:succeeded]" type=counter
INFO[2018-09-03T11:31:03Z] task starting                                 allocation_id=localbuild-1535974262/4C4B1D59 build_num= build_uri= node_index=0 node_total=1 project="https://github.com/revapi/revapi.git" task_id=localbuild-1535974262
INFO[2018-09-03T11:31:03Z] config parsed                                 branch=master build_num= executor=docker job=build node_index=0 node_total=1 repo_url="https://github.com/revapi/revapi.git" revision=66e2da9e97cb9b08275160f49b3702d2bf840399 task_id=localbuild-1535974262
WARN[2018-09-03T11:31:03Z] Using dummy client for Machine               
INFO[2018-09-03T11:31:03Z] statsd metric                                 count=1 name=executor.started tags="[type:docker]" type=counter
INFO[2018-09-03T11:31:03Z] task started                                  properties="map[build_agent:0.0.7725-9681bc36 executor:docker]" task=localbuild-1535974262
DEBU[2018-09-03T11:31:03Z] Sending event to OutputProcessor              event="allocationId:\"localbuild-1535974262/4C4B1D59\" type:TaskStart properties:<key:\"build_agent\" value:\"0.0.7725-9681bc36\" > properties:<key:\"executor\" value:\"docker\" > timestamp:1535974263505 "
INFO[2018-09-03T11:31:03Z] task attributes are set                       properties="map[type:artifacts storage-root:noop:///localbuild-1535974262/artifacts/]" task=localbuild-1535974262
DEBU[2018-09-03T11:31:03Z] Sending event to OutputProcessor              event="allocationId:\"localbuild-1535974262/4C4B1D59\" type:TaskAddAttributes properties:<key:\"storage-root\" value:\"noop:///localbuild-1535974262/artifacts/\" > properties:<key:\"type\" value:\"artifacts\" > timestamp:1535974263515 "
INFO[2018-09-03T11:31:03Z] step started                                  properties="map[name:Spin up Environment type:spinup_environment tags:executor:docker]" step=0 task=localbuild-1535974262
DEBU[2018-09-03T11:31:03Z] Sending event to OutputProcessor              event="allocationId:\"localbuild-1535974262/4C4B1D59\" type:StepStart properties:<key:\"name\" value:\"Spin up Environment\" > properties:<key:\"tags\" value:\"executor:docker\" > properties:<key:\"type\" value:\"spinup_environment\" > timestamp:1535974263516 "
====>> Spin up Environment
DEBU[2018-09-03T11:31:03Z] Sending event to OutputProcessor              event="allocationId:\"localbuild-1535974262/4C4B1D59\" type:StepOutput message:\"Build-agent version 0.0.7725-9681bc36 (2018-08-09T15:10:50+0000)\\n\" timestamp:1535974263517 "
Build-agent version 0.0.7725-9681bc36 (2018-08-09T15:10:50+0000)
INFO[2018-09-03T11:31:03Z] docker api version is set                     docker_api_version=1.26
INFO[2018-09-03T11:31:03Z] Preparing Docker Executor                    
INFO[2018-09-03T11:31:03Z] checking task signals                        
DEBU[2018-09-03T11:31:03Z] EOF in ListTaskSignals stream                
DEBU[2018-09-03T11:31:03Z] computed default route before bridge          default_route="default via 172.17.0.1 dev eth0"
INFO[2018-09-03T11:31:03Z] creating ephemeral network for task           network_id=ZZZ_localbuild-1535974262/4C4B1D59
INFO[2018-09-03T11:31:03Z] statsd metric                                 duration=217.785599 name=executor.prepared tags="[result:failed type:docker]" type=timing
INFO[2018-09-03T11:31:03Z] statsd metric                                 count=1 name=executor.error tags="[type:preparation]" type=counter
ERRO[2018-09-03T11:31:03Z] preparation error                             error="error connecting build-agent to ephemeral network: error connecting build-agent container to ephemeral network: Error response from daemon: No such container: docker-088c2eef254cff0647f8668e4b999b09766ae569a23da37495c2b169c550ac24.scope"
DEBU[2018-09-03T11:31:03Z] Sending event to OutputProcessor              event="allocationId:\"localbuild-1535974262/4C4B1D59\" type:StepError message:\"\\nUnexpected environment preparation error: error connecting build-agent to ephemeral network: error connecting build-agent container to ephemeral network: Error response from daemon: No such container: docker-088c2eef254cff0647f8668e4b999b09766ae569a23da37495c2b169c550ac24.scope\\n\" timestamp:1535974263739 "
Error: 
Unexpected environment preparation error: error connecting build-agent to ephemeral network: error connecting build-agent container to ephemeral network: Error response from daemon: No such container: docker-088c2eef254cff0647f8668e4b999b09766ae569a23da37495c2b169c550ac24.scope

INFO[2018-09-03T11:31:03Z] step ended                                    properties="map[result:failed]" step=0 task=localbuild-1535974262
DEBU[2018-09-03T11:31:03Z] Sending event to OutputProcessor              event="allocationId:\"localbuild-1535974262/4C4B1D59\" type:StepEnd properties:<key:\"result\" value:\"failed\" > timestamp:1535974263740 "
Step failed
INFO[2018-09-03T11:31:03Z] task ended                                    properties="map[result:failed infrastructure-failure:true]" task=localbuild-1535974262
DEBU[2018-09-03T11:31:03Z] Sending event to OutputProcessor              event="allocationId:\"localbuild-1535974262/4C4B1D59\" type:TaskEnd properties:<key:\"infrastructure-failure\" value:\"true\" > properties:<key:\"result\" value:\"failed\" > timestamp:1535974263741 "
Task failed
INFO[2018-09-03T11:31:03Z] Cleaning up Outer                            
INFO[2018-09-03T11:31:03Z] Cleaning up Docker Executor                  
INFO[2018-09-03T11:31:03Z] task stats                                    build_uri= task_id=localbuild-1535974262 totals="map[StorageWriteSize:0 NetworkRxBytes:0 CPUUsage:0 StorageWriteCount:0 StorageReadCount:0 StorageReadSize:0 NetworkTxBytes:0 CPUUsageInUsermode:0 MemoryMaxUsage:0]"
ERRO[2018-09-03T11:31:03Z] error disconnecting container from network    containerID=docker-088c2eef254cff0647f8668e4b999b09766ae569a23da37495c2b169c550ac24.scope error="error disconnecting build-agent container to ephemeral network: Error response from daemon: endpoint docker-088c2eef254cff0647f8668e4b999b09766ae569a23da37495c2b169c550ac24.scope not found" networkID=5ef16cdff50db04b3b6a258dd960990508ebcee0b6bb455bb90ba0d022bd8699
INFO[2018-09-03T11:31:03Z] deleting ephemeral network for task           network_id=5ef16cdff50db04b3b6a258dd960990508ebcee0b6bb455bb90ba0d022bd8699
INFO[2018-09-03T11:31:03Z] statsd metric                                 duration=235.74857799999998 name=executor.cleanup tags="[result:succeeded type:docker]" type=timing
INFO[2018-09-03T11:31:03Z] statsd metric                                 count=1 name=executor.finished tags="[type:docker]" type=counter
INFO[2018-09-03T11:31:03Z] Closing EventProcessorClient connection      
INFO[2018-09-03T11:31:03Z] Stopping DMZ Services                        
ERRO[2018-09-03T11:31:03Z] unexpected error running task, maybe infrastructure failed  error="error connecting build-agent to ephemeral network: error connecting build-agent container to ephemeral network: Error response from daemon: No such container: docker-088c2eef254cff0647f8668e4b999b09766ae569a23da37495c2b169c550ac24.scope"
Error: error connecting build-agent to ephemeral network: error connecting build-agent container to ephemeral network: Error response from daemon: No such container: docker-088c2eef254cff0647f8668e4b999b09766ae569a23da37495c2b169c550ac24.scope

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.