Comments (14)
@lyducka I think you get 400 because 192.168.0.28 is not in ALLOWED_HOSTS. Try this:
docker run \
-it \
--rm \
--name=healthchecks \
-p 8000:8000 \
-e ALLOWED_HOSTS=192.168.0.28 \
-e DEBUG=False \
-e DB=sqlite \
-e DB_NAME=/tmp/hc.sqlite \
-e SITE_ROOT=http://192.168.0.28:8000 \
healthchecks/healthchecks:latest
from healthchecks.
I re-visited my .env file, updated localhost addresses to my actual internal IP assigned to the host, and it is now working.
from healthchecks.
What URL is returning 400?
from healthchecks.
I am accessing via the internal IP.
from healthchecks.
Is the URL you are accessing "/"?
What is your configuration?
from healthchecks.
Excuse me, where can find the. env, I had the same question. thanks!
from healthchecks.
@lyducka you have to create it. See the first step in the "Getting Started" section here: https://github.com/healthchecks/healthchecks/tree/master/docker
from healthchecks.
@cuu508 Thank you for getting back to me. I appreciate your response.
I attempted to use Docker Hub at 'https://hub.docker.com/r/healthchecks/healthchecks', but I encountered a 400 Bad Request error with the web GUI. I followed the instructions provided in this GitHub repository 'https://github.com/healthchecks/healthchecks/tree/master/docker', but unfortunately, I encountered the same error.
I have already utilized the Docker CLI and docker-compose on Docker Hub. The operating system of my container is CentOS 7, and the Docker version I'm using is 24.0.2.
If you have some time, I would greatly appreciate your assistance with this issue.
Below is the logs
from healthchecks.
@lyducka can you please try the following command as-is:
docker run \
-it \
--rm \
--name=healthchecks \
-p 8000:8000 \
-e ALLOWED_HOSTS=localhost \
-e APPRISE_ENABLED=False \
-e DB=sqlite \
-e DB_CONN_MAX_AGE=0 \
-e DB_HOST= \
-e DB_NAME=/tmp/hc.sqlite \
-e DB_PASSWORD= \
-e DB_PORT= \
-e DB_SSLMODE= \
-e DB_TARGET_SESSION_ATTRS= \
-e DB_USER= \
-e DEBUG=False \
-e [email protected] \
-e DISCORD_CLIENT_ID= \
-e DISCORD_CLIENT_SECRET= \
-e EMAIL_HOST= \
-e EMAIL_HOST_PASSWORD= \
-e EMAIL_HOST_USER= \
-e EMAIL_PORT=587 \
-e EMAIL_USE_TLS=True \
-e EMAIL_USE_VERIFICATION=True \
-e INTEGRATIONS_ALLOW_PRIVATE_IPS=False \
-e LINENOTIFY_CLIENT_ID= \
-e LINENOTIFY_CLIENT_SECRET= \
-e MASTER_BADGE_LABEL=Mychecks \
-e MATRIX_ACCESS_TOKEN= \
-e MATRIX_HOMESERVER= \
-e MATRIX_USER_ID= \
-e MATTERMOST_ENABLED=True \
-e MSTEAMS_ENABLED=True \
-e OPSGENIE_ENABLED=True \
-e PAGERTREE_ENABLED=True \
-e PD_APP_ID= \
-e PD_ENABLED=True \
-e PING_BODY_LIMIT=10000 \
-e PING_EMAIL_DOMAIN=localhost \
-e PING_ENDPOINT=http://localhost:8000/ping/ \
-e PROMETHEUS_ENABLED=True \
-e PUSHBULLET_CLIENT_ID= \
-e PUSHBULLET_CLIENT_SECRET= \
-e PUSHOVER_API_TOKEN= \
-e PUSHOVER_EMERGENCY_EXPIRATION=86400 \
-e PUSHOVER_EMERGENCY_RETRY_DELAY=300 \
-e PUSHOVER_SUBSCRIPTION_URL= \
-e REGISTRATION_OPEN=True \
-e REMOTE_USER_HEADER= \
-e RP_ID= \
-e S3_ACCESS_KEY= \
-e S3_BUCKET= \
-e S3_ENDPOINT= \
-e S3_REGION= \
-e S3_SECRET_KEY= \
-e S3_TIMEOUT=60 \
-e SECRET_KEY=---123 \
-e SHELL_ENABLED=False \
-e SIGNAL_CLI_SOCKET= \
-e SITE_LOGO_URL= \
-e SITE_NAME=Mychecks \
-e SITE_ROOT=http://localhost:8000 \
-e SLACK_CLIENT_ID= \
-e SLACK_CLIENT_SECRET= \
-e SLACK_ENABLED=True \
-e SPIKE_ENABLED=True \
-e TELEGRAM_BOT_NAME=ExampleBot \
-e TELEGRAM_TOKEN= \
-e TRELLO_APP_KEY= \
-e TWILIO_ACCOUNT= \
-e TWILIO_AUTH= \
-e TWILIO_FROM= \
-e TWILIO_USE_WHATSAPP=False \
-e USE_PAYMENTS=False \
-e VICTOROPS_ENABLED=True \
-e WEBHOOKS_ENABLED=True \
-e ZULIP_ENABLED=True \
healthchecks/healthchecks:latest
Does it work? i.e., does the container start, and do you see any errors when opening http://localhost:8000 in the browser?
from healthchecks.
@lyducka can you please try the following command as-is:
docker run \ -it \ --rm \ --name=healthchecks \ -p 8000:8000 \ -e ALLOWED_HOSTS=localhost \ -e APPRISE_ENABLED=False \ -e DB=sqlite \ -e DB_CONN_MAX_AGE=0 \ -e DB_HOST= \ -e DB_NAME=/tmp/hc.sqlite \ -e DB_PASSWORD= \ -e DB_PORT= \ -e DB_SSLMODE= \ -e DB_TARGET_SESSION_ATTRS= \ -e DB_USER= \ -e DEBUG=False \ -e [email protected] \ -e DISCORD_CLIENT_ID= \ -e DISCORD_CLIENT_SECRET= \ -e EMAIL_HOST= \ -e EMAIL_HOST_PASSWORD= \ -e EMAIL_HOST_USER= \ -e EMAIL_PORT=587 \ -e EMAIL_USE_TLS=True \ -e EMAIL_USE_VERIFICATION=True \ -e INTEGRATIONS_ALLOW_PRIVATE_IPS=False \ -e LINENOTIFY_CLIENT_ID= \ -e LINENOTIFY_CLIENT_SECRET= \ -e MASTER_BADGE_LABEL=Mychecks \ -e MATRIX_ACCESS_TOKEN= \ -e MATRIX_HOMESERVER= \ -e MATRIX_USER_ID= \ -e MATTERMOST_ENABLED=True \ -e MSTEAMS_ENABLED=True \ -e OPSGENIE_ENABLED=True \ -e PAGERTREE_ENABLED=True \ -e PD_APP_ID= \ -e PD_ENABLED=True \ -e PING_BODY_LIMIT=10000 \ -e PING_EMAIL_DOMAIN=localhost \ -e PING_ENDPOINT=http://localhost:8000/ping/ \ -e PROMETHEUS_ENABLED=True \ -e PUSHBULLET_CLIENT_ID= \ -e PUSHBULLET_CLIENT_SECRET= \ -e PUSHOVER_API_TOKEN= \ -e PUSHOVER_EMERGENCY_EXPIRATION=86400 \ -e PUSHOVER_EMERGENCY_RETRY_DELAY=300 \ -e PUSHOVER_SUBSCRIPTION_URL= \ -e REGISTRATION_OPEN=True \ -e REMOTE_USER_HEADER= \ -e RP_ID= \ -e S3_ACCESS_KEY= \ -e S3_BUCKET= \ -e S3_ENDPOINT= \ -e S3_REGION= \ -e S3_SECRET_KEY= \ -e S3_TIMEOUT=60 \ -e SECRET_KEY=---123 \ -e SHELL_ENABLED=False \ -e SIGNAL_CLI_SOCKET= \ -e SITE_LOGO_URL= \ -e SITE_NAME=Mychecks \ -e SITE_ROOT=http://localhost:8000 \ -e SLACK_CLIENT_ID= \ -e SLACK_CLIENT_SECRET= \ -e SLACK_ENABLED=True \ -e SPIKE_ENABLED=True \ -e TELEGRAM_BOT_NAME=ExampleBot \ -e TELEGRAM_TOKEN= \ -e TRELLO_APP_KEY= \ -e TWILIO_ACCOUNT= \ -e TWILIO_AUTH= \ -e TWILIO_FROM= \ -e TWILIO_USE_WHATSAPP=False \ -e USE_PAYMENTS=False \ -e VICTOROPS_ENABLED=True \ -e WEBHOOKS_ENABLED=True \ -e ZULIP_ENABLED=True \ healthchecks/healthchecks:latest
Does it work? i.e., does the container start, and do you see any errors when opening http://localhost:8000 in the browser?
Hi @cuu508, thanks for your reply. Yes, I use this run a healthchecks service on my Ubuntu, I attempted to access http://192.168.0.28:8000/ on my computer using Chrome, as the Ubuntu server at 192.168.0.28 doesn't have a browser. However, I'm facing an issue where the page isn't loading. I even tried modifying the 'ALLOWED_HOSTS' setting to '0.0.0.0', but unfortunately, the error persists.
Below is the screenshot of the error.
from healthchecks.
@cuu508 Wow, thank you very much! Extremely helpful! it works.
I mistakenly thought that ALLOWED_HOSTS was a limitation of the client.
Thank you again!
from healthchecks.
If you use nginx proxy to healthchecks, please set 'ALLOWED_HOSTS=*' 'SITE_ROOT=http://you-domain-name.com' 'PING_ENDPOINT=http://you-domain-name.com/ping/ ' when you use docker run you healthchecks service.
from healthchecks.
PING_ENDPOINT
's default value is SITE_ROOT
+ /ping/
, so you should not need to set it explicitly.
Instead of setting ALLOWED_HOSTS=*
(which disables Host header validation), you can set it to ALLOWED_HOSTS=you-domain-name.com
.
from healthchecks.
Very helpful, thank you!
PING_ENDPOINT
's default value isSITE_ROOT
+/ping/
, so you should not need to set it explicitly.Instead of setting
ALLOWED_HOSTS=*
(which disables Host header validation), you can set it toALLOWED_HOSTS=you-domain-name.com
.
from healthchecks.
Related Issues (20)
- Slack integration - default integration name to channel name HOT 1
- Unexpected "down" after sending ping HOT 2
- Read only user can create project, can we have "true" read only users ? HOT 3
- Discord Webhook integration HOT 6
- Return UUID in "List Existing Checks" response HOT 4
- check display
- Allow use of slugs for E-Mail pings
- Notifications not working? HOT 1
- Cron not interpreted correctly HOT 1
- [Docker] replace pip with apt HOT 1
- Feature request: High-Availability HOT 2
- Alert gets sent even though check is OK HOT 2
- SITE_ROOT in local_settings.py HOT 2
- New type of API key: read-only, but returns check and channel UUIDs HOT 3
- gotify integration should allow to set priorities
- Slack legacy webhook integration HOT 2
- Mute all checks while updating HOT 3
- Get informed if job run time is too short HOT 2
- Hi, how to fix this error ,please help me, whenever user register it gives: SMTPAuthenticationError at /accounts/register/ (535, b'Incorrect authentication data')
- [docker] .env includes DEBUG=False yet banner still states "Running in debug mode, do not use in production." HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from healthchecks.