Empty Reply Server 502 - Kinesis Scala Collector

Hi,

I’m setting up the snowplow-scala-collector-kinesis docker / ECS app. I’m using ENV keys for setup and I run command

docker run --rm -v $PWD/config.hocon:/snowplow/config.hocon  -p 8080:8080 --env-file .env snowplow/scala-stream-collector-kinesis:2.7.0 --config /snowplow/config.hocon

Everything spins up and I can connect to Kinesis streams and I don’t get error messages. However when I ping http://localhost:8080/health I get the response curl: (52) Empty reply from server

I have followed the same config from Terraform Module - terraform-aws-collector-kinesis-ec2/config.hocon.tmpl at main · snowplow-devops/terraform-aws-collector-kinesis-ec2 · GitHub

Can someone please share some ideas why I’m getting empty reply from server?

My config:

collector {
  interface = "0.0.0.0"
  port = 80
  ssl {
    enable = false
    redirect = false
    port = 8443
  }
  paths {}
  p3p {
    policyRef = "/w3c/p3p.xml"
    CP = "NOI DSP COR NID PSA OUR IND COM NAV STA"
  }
  crossDomain {
    enabled = false
    domains = [ "*" ]
    secure = true
  }
  cookie {
    enabled = true
    expiration = "365 days"
    name = sp
    domains = []
    fallbackDomain = "${cookie_domain}"
    secure = true
    httpOnly = false
    sameSite = "None"
  }
  doNotTrackCookie {
    enabled = false
    name = ""
    value = ""
  }
  cookieBounce {
    enabled = false
    name = "n3pc"
    fallbackNetworkUserId = "00000000-0000-4000-A000-000000000000"
    forwardedProtocolHeader = "X-Forwarded-Proto"
  }
  enableDefaultRedirect = false
  redirectMacro {
    enabled = false
    placeholder = "[TOKEN]"
  }
  rootResponse {
    enabled = false
    statusCode = 302
    headers = {}
    body = "302, redirecting"
  }
  cors {
    accessControlMaxAge = "5 seconds"
  }
  prometheusMetrics {
    enabled = false
  }
  streams {
    good = "snowplow-collector-stream"
    bad = "snowplow-collector-error-stream"
    useIpAddressAsPartitionKey = false
    sink {
      enabled = kinesis
      region = "eu-west-2"
      threadPoolSize = 10
      aws {
        accessKey = env
        secretKey = env
      }
      backoffPolicy {
        minBackoff = 3000
        maxBackoff = 10000
      }
    }
    buffer {
      byteLimit = 3145728
      recordLimit = 500
      timeLimit = 5000
    }
  }
  telemetry {
     disable = false
     interval = 60 minutes
     # Connection properties for the receiving pipeline
     method = POST
     url = telemetry-g.snowplowanalytics.com
     port = 443
     secure = true
  }
}
akka {
  loglevel = WARNING
  loggers = ["akka.event.slf4j.Slf4jLogger"]
  http.server {
    remote-address-header = on
    raw-request-uri-header = on
    parsing {
      max-uri-length = 32768
      uri-parsing-mode = relaxed
    }
    max-connections = 2048
  }
}

Hi @sFrampton, this looks like a case of mismatching port numbers. In your config file you have port=80 but in you docker command you are binding port 8080.

So I suggest either:

  • Change the config file to port = 8080 and then use the same docker command
  • Or change the docker command to -port 8080:80 and use the same config file.

Either should work, and your health endpoint will then be accessible on localhost:8080/health.

@istreeter Thanks!