Question

I'm having issues with Sentry running on my internal server. I walked through the docs to get this installed on a Centos machine. It seems to run, but none of the asynchronous javascript is working.

Can someone help me find my mistake?

This is what Chrome keeps complaining about:

XMLHttpRequest cannot load http://test.example.com/api/main-testproject/testproject/poll/. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://test.example.com:9000' is therefore not allowed access.

I'm new to Django, but I am comfortable with python web services. I figured there was surely a configuration I missed. I found something in the docs referring to a setting I should use; SENTRY_ALLOW_ORIGIN.

# You MUST configure the absolute URI root for Sentry:
SENTRY_URL_PREFIX = 'http://test.example.com'  # No trailing slash!
SENTRY_ALLOW_ORIGIN = "http://test.example.com"

I even tried various paths to my server by using the fully qualified domain name, as well as the IP. None of this seemed to help. As you can see from the chrome error, I was actively connected to the domain name that was throwing the error.

Was it helpful?

Solution

I found my issue. The XMLHttpRequest error is showing that port 9000 is used. This needs to be specified in the SENTRY_URL_PREFIX.

SENTRY_URL_PREFIX = 'http://test.example.com:9000'

edit: I even found this answer listed in the FAQ: https://docs.getsentry.com/on-premise/server/faq/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top