-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
24.8.0 When logging in for the first time, click Continue after completing the configuration. 400 error #3299
Comments
400 means there is a field that you haven't fill in yet. From the screenshot, I can see that you haven't check one of "Send my contact information along with usage statistics" and "Please keep my usage information anonymous". Can you confirm that you've filled every fields? |
I actually tried to check all the options, but the same error message still appeared. However, when I stayed on this page for a while without any operation, I could enter the main interface after refreshing. At this time, I needed to modify ADMIN--》settings--》Usage Statistics to make everything work properly. Otherwise, the error message would still appear when I logged in again next time. |
Self-Hosted Version Docker Version Docker Compose Version Steps to Reproduce /api/0/internal/options/?query=is:required 400 (Bad Request) Expected Result Same problem. |
Interesting, I'm not able to reproduce this issue on my side.. |
@jaydrogers I'm going to try to repro this during the weekend, but a quick question: How did you set things up? Is it just: git clone https://github.com/getsentry/self-hosted.git
cd self-hosted
sudo ./install.sh |
Thanks for checking it out. It's basically the steps that I followed other than configuring the sentry configs. I did put a Traefik container in front of it for automated SSL, but I didn't see any evidence that it was Traefik or CloudFlare causing the issue. Here is my services:
nginx:
ports: []
labels:
- "traefik.enable=true"
- "traefik.docker.network=sentry_onpremise_default"
- "traefik.http.routers.sentry.rule=Host(`myhost.example.com`)"
- "traefik.http.routers.sentry.entrypoints=websecure"
- "traefik.http.routers.sentry.tls=true"
- "traefik.http.routers.sentry.tls.certresolver=letsencryptresolver"
- "traefik.http.services.sentry.loadbalancer.server.port=80"
- "traefik.http.services.sentry.loadbalancer.server.scheme=http"
traefik:
image: traefik:v3.1
container_name: traefik
restart: always
networks:
- default
ports:
# Listen on port 80, default for HTTP, necessary to redirect to HTTPS
- target: 80
published: 80
mode: host
# Listen on port 443, default for HTTPS
- target: 443
published: 443
mode: host
logging:
driver: journald
options:
tag: traefik
volumes:
# Add Docker as a mounted volume, so that Traefik can read the labels of other services
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./traefik.yml:/traefik.yml:ro
- traefik-certificates:/certificates/
networks:
default:
volumes:
traefik-certificates: My traefik config was pretty basic other than some CloudFlare configs to restore original IP addresses: # Cloudflare TrustedIPs
x-trustedIps: &trustedIPs
- "173.245.48.0/20"
- "103.21.244.0/22"
- "103.22.200.0/22"
- "103.31.4.0/22"
- "141.101.64.0/18"
- "108.162.192.0/18"
- "190.93.240.0/20"
- "188.114.96.0/20"
- "197.234.240.0/22"
- "198.41.128.0/17"
- "162.158.0.0/15"
- "104.16.0.0/13"
- "104.24.0.0/14"
- "172.64.0.0/13"
- "131.0.72.0/22"
- "2400:cb00::/32"
- "2606:4700::/32"
- "2803:f800::/32"
- "2405:b500::/32"
- "2405:8100::/32"
- "2a06:98c0::/29"
- "2c0f:f248::/32"
serversTransport:
insecureSkipVerify: true
providers:
docker:
exposedByDefault: false
network: sentry_sentry-self-hosted_default
entryPoints:
web:
address: ":80"
http:
redirections:
entrypoint:
to: websecure
scheme: https
forwardedHeaders:
trustedIPs: *trustedIPs
proxyProtocol:
trustedIPs: *trustedIPs
websecure:
address: ":443"
forwardedHeaders:
trustedIPs: *trustedIPs
proxyProtocol:
trustedIPs: *trustedIPs
accessLog: {}
log:
level: ERROR
api:
dashboard: true
insecure: true
certificatesResolvers:
letsencryptresolver:
acme:
email: "[email protected]"
storage: "/certificates/acme.json"
httpChallenge:
entryPoint: web Just a heads upI did head a different direction than setting up a self-hosted Sentry, but I wanted to share the details of my experience in case it helped others 👍 |
I have the same problem UPD: |
@djooberlee Just to confirm, does the SMTP server you're using does not use any TLS protocol (no STARTTLS or anything, just plain text)? If that works, maybe we can update the config/documentation about this. |
@aldy505 this is how it looks now mail.backend: 'smtp'
mail.host: 'smtp.example.com'
mail.port: 587
mail.username: '[email protected]'
mail.password: 'PASSWORD'
mail.use-tls: True
#mail.use-ssl: false
mail.from: '[email protected]'
mail.enable-replies: False
mail.reply-hostname: '' |
Ah I see, I suppose |
It turned out, it is a mutually exclusive configuration: See Django's docs: https://docs.djangoproject.com/en/5.1/ref/settings/#std-setting-EMAIL_USE_TLS |
It is clear that I cannot set both parameters to TRUE: mail.use-tls: true
mail.use-ssl: true But I never did!!! And it is not clear to me from the documentation that it is not possible to explicitly set: mail.use-tls: true
mail.use-ssl: false or mail.use-tls: false
mail.use-ssl: true |
Yeah we need to document this better. |
Self-Hosted Version
24.8.0
CPU Architecture
x86_64
Docker Version
20.10.10
Docker Compose Version
2.29.2
Steps to Reproduce
When logging in for the first time, click Continue after completing the configuration. 400 error
/api/0/internal/options/?query=is:required 400 (Bad Request)
Expected Result
success login
Actual Result
[WARNING] django.request: Bad Request: /api/0/internal/options/ (status_code=400 request=<WSGIRequest: PUT '/api/0/internal/options/?query=is:required'>)
[WARNING] django.request: Bad Request: /api/0/internal/options/ (status_code=400 request=<WSGIRequest: PUT '/api/0/internal/options/?query=is:required'>)
Event ID
No response
The text was updated successfully, but these errors were encountered: