Docker images in CircleCI 2.0 appear to be blocking outgoing connections to specific servers

It appears that the new docker images in CircleCI 2.0 are restricting certain network traffic that wouldn’t have been restricted in CircleCI 1.0. When I run my tests using my old 1.0 config file, they all pass as expected. When I run my tests using my new 2.0 config file, two tests fail. The tests that fail are ones that get data from the Facebook API.

Is there something wrong with my configuration? The actual codebases are exactly the same, which is why I’m so confused as to why certain tests pass under one version of CircleCI and fail under another. Is there something I can change in my CircleCI 2.0 configuration file to give me a better chance of my tests passing? Like, for example, should I be using a different OpenJDK8 image?

Below are my config files - the first is my old circle.yml file for 1.0 and the second is my new config.yml file for 2.0. I use CircleCI to test Scala programs via sbt.


        version: openjdk8
        SBT_VERSION: 0.13.11
        _JAVA_OPTIONS: "-Xms1024m -Xmx2048m -Xss2m"
        TZ: UTC

        - wget -q${SBT_VERSION}.deb
        - sudo dpkg -i sbt-${SBT_VERSION}.deb
        - sbt clean compile # compile here so that dependencies are cached
        - "~/.ivy2"
        - "~/.sbt"

        - >
            export DEBIAN_FRONTEND=noninteractive
            && sudo apt-get -y remove --purge mysql*
            && sudo apt-get -y autoremove
            && sudo apt-get -y autoclean
            && sudo rm -rf /etc/mysql /var/lib/mysql
            && sudo apt-add-repository -y 'deb precise main'
            && sudo apt-get update
            && sudo apt-get -y install software-properties-common
            && sudo apt-get -y install mysql-server-5.6
        - mysql --version
        - mysqladmin -u root password root
        - mysql -uroot -proot -e 'DROP DATABASE IF EXISTS test; CREATE DATABASE test;'

- sbt "test-only test.* -- exclude broken"


version: 2
      # The first image is the primary container where tests are run
      - image: circleci/openjdk:8-jdk-browsers
          SBT_VERSION: 0.13.11
          _JAVA_OPTIONS: "-Xms1024m -Xmx3072m -Xss2m"
          TZ: UTC
      - image: mysql:5.6
            - MYSQL_DATABASE: test
            - MYSQL_ROOT_PASSWORD: root

      - checkout

      - run:
          name: Install sbt
          command: |
            sudo apt install apt-transport-https
            echo "deb /" | sudo tee -a /etc/apt/sources.list.d/sbt.list
            sudo apt-key adv --keyserver hkp:// --recv 2EE0EA64E40A89B84B2DF73499E82A75642AC823
            sudo apt update
            sudo apt install sbt
      - restore_cache:
            - v1-sbt-{{ checksum "build.sbt" }}

      - run: sbt clean update
      - run: sbt compile
      - run: sbt test:compile

      - save_cache:
          key: v1-sbt-{{ checksum "build.sbt" }}
            - "~/.ivy2"
            - "~/.sbt"
      - run: sbt "test-only test.* -- exclude broken"

My initial thought is that is very unlikely, for outbound traffic. If anything, you may be on a new IP range, and you’re being blocked by Facebook. I wonder if you have triggered a rate limiter on their end?

Do you have some test failure logs or stack traces to show what went wrong with the tests?

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