Unexpected preparation error: Internal Error - runner failed with exit code: 1

circle.yml

#1

Hello,

I have a CircleCI 2.0 build failing with this message:

Unexpected preparation error: Internal Error - runner failed with exit code: 1

As far as I can tell, the error started without any modification to my circle.yml.

version: 2
executorType: docker
containerInfo:
  - image: golang:1.7.5-alpine
    cmd: ["/bin/sh"]
  - image: memcached:1.4-alpine
  - image: mongo:3.0
    cmd: [mongod, --smallfiles]
stages:
  build:
    workdir: /go/src/
    environment:
      - PACKAGE_PATH: "bitbucket.org/ubeedev/ubiquitous_applications_server"
    steps:
    - type: shell
      command: |
        apk add --update git openssh bash make curl ca-certificates wget groff less python py-pip gettext tree
        update-ca-certificates
        pip install awscli
      shell: /bin/sh
    - type: shell
      command: env
    - type: checkout
      path: $PACKAGE_PATH
      pwd: /go/src/bitbucket.org/ubeedev/ubiquitous_applications_server
    - type: shell
      name: "Make golang get play nice with bitbucket repositories"
      command: make go/shim-bitbucket
      pwd: /go/src/bitbucket.org/ubeedev/ubiquitous_applications_server
    - type: shell
      name: "Install package deps"
      command: make go/deps
      pwd: /go/src/bitbucket.org/ubeedev/ubiquitous_applications_server
    - type: shell
      name: "Run project tests"
      command: go test ./...
      environment:
        - SERVER_PORT: "13132"
        - SERVER_ADDRESS: "localhost:13132"
        - DB_ADDRESS: "localhost"
        - DB_DATABASE: "asgard_development"
        - MEMCACHED_HOST: "localhost"
        - MEMCACHED_PORT: "11211"
      pwd: /go/src/bitbucket.org/ubeedev/ubiquitous_applications_server
    - type: shell
      name: "Build source code"
      command: make go/build
      environment:
      pwd: /go/src/bitbucket.org/ubeedev/ubiquitous_applications_server
    - type: shell
      name: Install Docker Client
      command: |
        echo "test"
        curl -L -o /tmp/docker.tgz https://get.docker.com/builds/Linux/x86_64/docker-1.12.6.tgz
        tar -xz -C /tmp -f /tmp/docker.tgz
        mv /tmp/docker/docker* /usr/bin/
    - type: setup-docker-engine
    - type: shell
      name: Verify Docker Works
      command: |
        docker --version
        docker run hello-world
    - type: shell
      name: "Build docker image with compiled source"
      command: make docker/build
      pwd: /go/src/bitbucket.org/ubeedev/ubiquitous_applications_server
    - type: shell
      name: "Docker registry login"
      command: docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASSWORD
      pwd: /go/src/bitbucket.org/ubeedev/ubiquitous_applications_server
    - type: shell
      name: "Push docker image to our registry"
      command: make docker/push
      pwd: /go/src/bitbucket.org/ubeedev/ubiquitous_applications_server
    - type: shell
      name: "Install kubectl to deploy the service to Kubernetes"
      command: make ci/kubectl
      pwd: /go/src/bitbucket.org/ubeedev/ubiquitous_applications_server
    - type: deploy
      name: "Deploy to Kubernetes"
      environment:
        KUBECONFIG: /go/src/bitbucket.org/ubeedev/ubiquitous_applications_server/manifests/kubeconfig
      command: |
        make k8s/credentials
        make k8s/manifests
        make k8s/apply
      pwd: /go/src/bitbucket.org/ubeedev/ubiquitous_applications_server
    - type: shell
      name: "Build benchmark tool"
      environment:
        - DOCKERFILE_PATH: docker/Dockerfile.benchmark
        - DOCKER_REPO: inlocomedia/ubiquitous_applications_server_benchmark
      command: |
        make benchmark/deps
        make benchmark/build
        make docker/build
        make docker/push
      pwd: /go/src/bitbucket.org/ubeedev/ubiquitous_applications_server

#2

Can you PM me your build link?


#3

just sent!


#4

Hey, any luck? =/


#5

Thanks for following up. I’ve filed a bug report about this and notified our engineers. We’ll post back here when we know more.


#9

@guiocavalcanti an engineer got back to me and the error is actually because of invalid syntax. On line 49 of build 244, you have:

      environment:
      pwd: ...

So environment is supposed to be a YAML key-value map, with an array as its value. Instead it parses to null. This is bad UX on our part and we’ll make it better, but you should have enough information to move past this error now.


#10

Thanks! It worked. :slight_smile:


#12