Skip to content

SDK failed to fetch X-Ray tcp address #25

@z-zhenbin

Description

@z-zhenbin

We have a rails application and run in docker.

There is our docker-compose file content.

  web:
    image: xxx
    container_name: xxx
    command: ["bundle", "exec", "rails", "server", "-b", "0.0.0.0"]
    environment:
      AWS_XRAY_TRACING_NAME: xxxx
      AWS_XRAY_DAEMON_ADDRESS: x-ray:2000
      AWS_XRAY_CONTEXT_MISSING: LOG_ERROR
    ports:
      - 80:3000
  x-ray:
    image: amazon/aws-xray-daemon
    container_name: x-ray
    command: ['-t', '0.0.0.0:2000', '-o', '--log-level','dev']
    environment:
      AWS_REGION: ap-northeast-1
      AWS_ACCESS_KEY_ID: xxxx
      AWS_SECRET_ACCESS_KEY: xxxx
    ports:
      - 2000:2000/udp

Now, we can see the trace information at aws x-ray console. but the sdk always output warn log like this:

W, [2019-05-11T05:06:21.583099 #45]  WARN -- : No effective centralized sampling rule match. Fallback to local rules.

and this

W, [2019-05-11T05:06:21.611366 #54]  WARN -- : failed to fetch X-Ray sampling rules due to Failed to open TCP connection to 127.0.0.1:2000 (Connection refused - connect(2) for "127.0.0.1" port 2000)

Why SDK try to fetch x-ray sampling rule, but use the default address 127.0.0.1:2000? I have pass the x-ray daemon address by AWS_XRAY_DAEMON_ADDRESS, and the SDK also success to send trace information.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions