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

Docker Healthcheck fails on latest Minio release Docker image #5010

Closed
nitisht opened this issue Oct 4, 2017 · 17 comments · Fixed by #5011
Closed

Docker Healthcheck fails on latest Minio release Docker image #5010

nitisht opened this issue Oct 4, 2017 · 17 comments · Fixed by #5011

Comments

@nitisht
Copy link
Contributor

nitisht commented Oct 4, 2017

Expected Behavior

Docker should report the status of Minio container as healthy

Current Behavior

Docker reports the status as unhealthy

CONTAINER ID        IMAGE                                      COMMAND                  CREATED             STATUS                      PORTS               NAMES
e8ce5a03d72a        minio/minio:RELEASE.2017-09-29T19-16-56Z   "/usr/bin/docker-e..."   11 minutes ago      Up 11 minutes (unhealthy)                       zen_turing

Possible Solution

Fix healthcheck.sh

Steps to Reproduce (for bugs)

  1. Launch latest release Docker Minio image
sudo docker run -p 9000:9000 --net=host minio/minio:RELEASE.2017-09-29T19-16-56Z server /tmp/test
  1. After sometime, check the status using docker ps.

Context

Your Environment

  • Version used (minio version):
  • Environment name and version (e.g. nginx 1.9.1):
  • Server type and version:
  • Operating System and version (uname -a):
  • Link to your project:
harshavardhana added a commit to harshavardhana/minio that referenced this issue Oct 4, 2017
@dswd
Copy link

dswd commented Oct 4, 2017

Same problem here. However the "fix" will not work for me as the health check is performed by an external tool. I guess this will hit a lot of people using external tools like Nagios.

@harshavardhana
Copy link
Member

Do not understand what you are talking about here @dswd

harshavardhana added a commit to harshavardhana/minio that referenced this issue Oct 4, 2017
@harshavardhana
Copy link
Member

Same problem here. However the "fix" will not work for me as the health check is performed by an external tool. I guess this will hit a lot of people using external tools like Nagios.

This fix has nothing to do with nagios, for nagios monitoring you should write your own plugin using admin REST API. In this fix healthcheck is a concept of docker containers which happily accepts external tools, one such example scripts used https://github.com/docker-library/healthcheck

@dswd
Copy link

dswd commented Oct 4, 2017

Ok to clarify: I need a simple unauthorized URL that can be used for a health check by an external tool.
Before the current release I used /minio/login for this but the current release changed the behavior so that now it depends on the user agent. If this functionality is possible using the REST API, I am fine with that (please tell me the path to use).

@deekoder deekoder added this to the Next Release milestone Oct 4, 2017
@deekoder deekoder assigned harshavardhana and unassigned nitisht Oct 4, 2017
@harshavardhana
Copy link
Member

Ok to clarify: I need a simple unauthorized URL that can be used for a health check by an external tool.
Before the current release I used /minio/login for this but the current release changed the behavior so that now it depends on the user agent. If this functionality is possible using the REST API, I am fine with that (please tell me the path to use).

If you require unauthorized, then you can add a User-Agent since you are already using an external tool. There are no unauthorized endpoints on Minio other than browser.

@dswd
Copy link

dswd commented Oct 4, 2017

Exactly that is my problem. The external tool has no support for adding a fake user-agent to the request. Could you consider restoring the original behavior of minio?

@harshavardhana
Copy link
Member

Exactly that is my problem. The external tool has no support for adding a fake user-agent to the request. Could you consider restoring the original behavior of minio?

Original behavior was wrong its the same reason why our docker healthscript stopped working. @dswd what is the external tool that is being used which cannot take a user-agent?

@dswd
Copy link

dswd commented Oct 4, 2017

The external tool I am talking about is the integrated health check of Cloudron.io. I am maintaining the Minio app on that platform.

@harshavardhana
Copy link
Member

The external tool I am talking about is the integrated health check of Cloudron.io. I am maintaining the Minio app on that platform.

Do you have the code for this App that we can take a look? @dswd

@dswd
Copy link

dswd commented Oct 4, 2017

Ich already sent a PR to that project but that will take some weeks. Until then the current minio will not be available.

harshavardhana added a commit to harshavardhana/minio that referenced this issue Oct 4, 2017
@dreh23
Copy link

dreh23 commented Oct 9, 2017

Same Problem here. Hashicorp's nomad health check needs an unauthorized http request with a 2xx ranged reply. See here: https://www.nomadproject.io/docs/job-specification/service.html#check-parameters. I believe an unauthorized dedicated /health endpoint would be useful.

@Gmentsik
Copy link

Gmentsik commented Nov 2, 2017

We are using minio on Rancher, which also needs any kind of 2xx response from an unauthorized endpoint.

@metametadata
Copy link

+1 for simple /health endpoint. Would make writing Kubernetes readiness/live probes much easier.

@yebo29
Copy link

yebo29 commented Sep 4, 2018

The docker state still shows unhealthy, however. Should I just manually change healthcheck.sh until it gets fixed? No rush in my case, it's just aesthetic for me as I'm not monitoring (it's for a personal project). Many thanks.

@yebo29
Copy link

yebo29 commented Sep 4, 2018

Nevermind. I see it's being handled in #6365

@fergbrain
Copy link

@yebo29 The issue has been fixed in RELEASE.2018-09-01T00-38-25Z: https://github.com/minio/minio/tree/RELEASE.2018-09-01T00-38-25Z

@lock
Copy link

lock bot commented Apr 25, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Apr 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants