Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aws-xray-daemon:3.3.2 starts logging Error level message while stopping x-ray daemon container #144

Open
atakidev opened this issue Jun 9, 2021 · 2 comments · Fixed by #145
Labels

Comments

@atakidev
Copy link

atakidev commented Jun 9, 2021

Issue Description:

public.ecr.aws/xray/aws-xray-daemon:3.3.2 starts logging the following "Error" ( [Error] unable to start the server: http: Server closed ) message while stopping the daemon container.

2021-06-09T12:25:40Z [Info] Starting proxy http server on 0.0.0.0:2000
2021-06-09T12:26:34Z [Info] Got shutdown signal: terminated
2021-06-09T12:26:34Z [Error] unable to start the server: http: Server closed

On the other hand, I couldn't see Error message when I tested with public.ecr.aws/xray/aws-xray-daemon:3.3.1 .
aws-xray-daemon:3.3.1 only show like the following message when I set log level to info .

2021-06-09T12:35:10Z [Info] Starting proxy http server on 127.0.0.1:2000
2021-06-09T12:36:37Z [Info] Got shutdown signal: terminated

How to reproduce this issue:

  1. Start x-ray daemon container.
  $ docker pull public.ecr.aws/xray/aws-xray-daemon:3.3.2
  $ docker run -d public.ecr.aws/xray/aws-xray-daemon:3.3.2
  1. Check container is started successfully.
  $ docker ps
  1. Stop x-ray container after 20-30 seconds.
  $ docker stop <container-id>
  1. Check log from the container.
  $ docker logs <container-id>

You will see "[Error] unable to start the server: http: Server closed" in the output of the container.

I tested the above step with public.ecr.aws/xray/aws-xray-daemon:3.3.1 . However, I couldn't reproduce this issue.
Note: When I start aws-xray-daemon:3.3.1, I used the following command to set log level.

  $ docker run -d public.ecr.aws/xray/aws-xray-daemon:3.3.1 -l info

Investigation:

From the error message, I guess this issue is the side effect of the following change because the following code added "log.Errorf("unable to start the server: %v", err)" in pkg/proxy/server.go to show err variable.

Based on the above change, I think we can ignore the message. However, the [Error] level message looks to mislead anybody who use the container. So, I think the message should not have Error level log.

Could you please consider to improve the log message?

Please let me know if you need additional information.

@willarmiros
Copy link
Contributor

Hi @atakidev,

Thanks for raising this. I've opened #145 to address the log message. Please let me know if you think that is satisfactory.

@stale
Copy link

stale bot commented Jan 8, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs in next 7 days. Thank you for your contributions.

@stale stale bot added the stale label Jan 8, 2022
@NathanielRN NathanielRN linked a pull request Jan 11, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants