Have an on premise setup for sentry done.
Setup
- OpenShift, using the standard sentry on premise docker image. Sentry version 9.0.0
- 1 pod, with 3 containers. One for sentry web, one for sentry cron, one for sentry worker.
- The pod is volume mounted with a persistent volume, at /var/lib/sentry/files
- Client apps are all nodejs applications, instrumented with raven-node.
What’s not working in bold below
- I created a nodejs application, using TypeScript as a language.
- I followed this guide to instrument my typescript app. https://medium.com/engineering-on-the-incline/using-sentry-with-nodejs-and-typescript-bfe4483c1b5d
- I compiled the source files to a
dist
folder, and uploaded all contents of that (*.map.js, and *.js) to sentry using sentry-cli. I got 201 success code. - I run my application with release X, triggered an error and saw it in sentry dashboard
- In the specific issue, I see red messages saying it cannot find the source code for my file "server.js"
- I proceeded to checkout the artifacts of release X, saw the names of my uploaded artifacts.
- I click the icon to download the artifact, and I get a 500 error on the browser.
On the server, errors appear to happen on these events:
When the event was first triggered and processed on server side
09:29:29 [ERROR] sentry.lang.javascript.processor: [Errno 2] No such file or directory: u'/var/lib/sentry/files/17788/11076/c62d048f5b27435c95fba523a2a19a42'
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/sentry/lang/javascript/processor.py", line 248, in fetch_release_file
with releasefile.file.getfile() as fp:
File "/usr/local/lib/python2.7/site-packages/sentry/models/file.py", line 208, in getfile
impl = self._get_chunked_blob(mode, prefetch)
File "/usr/local/lib/python2.7/site-packages/sentry/models/file.py", line 194, in _get_chunked_blob
delete=delete
File "/usr/local/lib/python2.7/site-packages/sentry/models/file.py", line 339, in __init__
self.open()
File "/usr/local/lib/python2.7/site-packages/sentry/models/file.py", line 376, in open
self.seek(0)
File "/usr/local/lib/python2.7/site-packages/sentry/models/file.py", line 430, in seek
self._nextidx()
File "/usr/local/lib/python2.7/site-packages/sentry/models/file.py", line 362, in _nextidx
self._curfile = self._curidx.blob.getfile()
File "/usr/local/lib/python2.7/site-packages/sentry/models/file.py", line 160, in getfile
return storage.open(self.path)
File "/usr/local/lib/python2.7/site-packages/django/core/files/storage.py", line 33, in open
return self._open(name, mode)
File "/usr/local/lib/python2.7/site-packages/django/core/files/storage.py", line 159, in _open
return File(open(self.path(name), mode))
IOError: [Errno 2] No such file or directory: u'/var/lib/sentry/files/17788/11076/c62d048f5b27435c95fba523a2a19a42'
09:29:29 [ERROR] sentry.lang.javascript.processor: [Errno 2] No such file or directory: u'/var/lib/sentry/files/17788/11076/c62d048f5b27435c95fba523a2a19a42'
When I attempt to download an artifact from my dashboard
09:11:42 [INFO] sentry.superuser: superuser.request (user_id=1 url=u'https://<sentry_url>/api/0/projects/<org>/<proj>/releases/v0.1.2/files/964/?download=1' method=u'GET' ip_address=u'<ip>')
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/sentry/api/base.py", line 87, in handle_exception
response = super(Endpoint, self).handle_exception(exc)
File "/usr/local/lib/python2.7/site-packages/sentry/api/base.py", line 170, in dispatch
response = handler(request, *args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/sentry/api/endpoints/project_release_file_details.py", line 123, in get
return self.download(releasefile)
File "/usr/local/lib/python2.7/site-packages/sentry/api/endpoints/project_release_file_details.py", line 75, in download
fp = file.getfile()
File "/usr/local/lib/python2.7/site-packages/sentry/models/file.py", line 208, in getfile
impl = self._get_chunked_blob(mode, prefetch)
File "/usr/local/lib/python2.7/site-packages/sentry/models/file.py", line 194, in _get_chunked_blob
delete=delete
File "/usr/local/lib/python2.7/site-packages/sentry/models/file.py", line 339, in __init__
self.open()
File "/usr/local/lib/python2.7/site-packages/sentry/models/file.py", line 376, in open
self.seek(0)
File "/usr/local/lib/python2.7/site-packages/sentry/models/file.py", line 430, in seek
self._nextidx()
File "/usr/local/lib/python2.7/site-packages/sentry/models/file.py", line 362, in _nextidx
self._curfile = self._curidx.blob.getfile()
File "/usr/local/lib/python2.7/site-packages/sentry/models/file.py", line 160, in getfile
return storage.open(self.path)
File "/usr/local/lib/python2.7/site-packages/django/core/files/storage.py", line 33, in open
return self._open(name, mode)
File "/usr/local/lib/python2.7/site-packages/django/core/files/storage.py", line 159, in _open
return File(open(self.path(name), mode))
IOError: [Errno 2] No such file or directory: u'/var/lib/sentry/files/17788/11077/5502870858b24a1e851ca11f2e7ec2fd'
I was puzzled by this problem as I had mounted the volume correctly on /var/lib/sentry/files.
Source files also appear to be uploaded to sentry server since I got 201 success codes when I uploaded them.
Not too sure where to look. Any ideas?