Onpremise: banner : “There is 1 issue with your system configuration.”

Created on 22 Oct 2020  ·  10Comments  ·  Source: getsentry/onpremise

Version Information

Version:Sentry 20.10.17

Description

On some issues I observe the same issue as described under:
https://forum.sentry.io/t/system-configuration-issue-banner-onpremise-sentry-20-10-0-dev04cdf745/11361

I have no idea where to look for problems. I have migrated from v10,

Question

All 10 comments

You can look at the output of docker-compose logs web to see the configuration warnings.

I'm quite sure it is related to the updated GitHub settings: https://github.com/getsentry/onpremise/pull/697/files

I am seeing the same message on a virtually empty 20.10.1 installation which does not use GitHub integration.

docker-compose logs web shows some warnings, not sure if they are related:

web_1                          | 10:01:01 [WARNING] django.request: Not Found: /_static/1603618486/sentry/js/ads.js (status_code=404 request=<WSGIRequest: GET u'/_static/1603618486/sentry/js/ads.js'>)
web_1                          | 10:01:01 [WARNING] django.request: Not Found: /_static/1603618486/sentry/images/favicon.png (status_code=404 request=<WSGIRequest: GET u'/_static/1603618486/sentry/images/favicon.png'>)
web_1                          | 10:01:05 [WARNING] django.request: Not Found: /_static/1603618486/sentry/js/ads.js (status_code=404 request=<WSGIRequest: GET u'/_static/1603618486/sentry/js/ads.js'>)
web_1                          | 10:01:12 [WARNING] django.request: Not Found: /_static/1603618486/sentry/js/ads.js (status_code=404 request=<WSGIRequest: GET u'/_static/1603618486/sentry/js/ads.js'>)
web_1                          | 10:01:13 [WARNING] django.request: Not Found: /_static/1603618486/sentry/images/favicon.png (status_code=404 request=<WSGIRequest: GET u'/_static/1603618486/sentry/images/favicon.png'>)
web_1                          | 10:01:18 [WARNING] django.request: Not Found: /_static/1603618486/sentry/images/logos/default-organization-logo.png (status_code=404 request=<WSGIRequest: GET u'/_static/1603618486/sentry/images/logos/default-organization-logo.png'>)
web_1                          | 10:01:18 [WARNING] django.request: Not Found: /_static/1603618486/sentry/js/ads.js (status_code=404 request=<WSGIRequest: GET u'/_static/1603618486/sentry/js/ads.js'>)
web_1                          | 10:01:30 [WARNING] django.request: Not Found: /_static/1603618486/sentry/images/logos/default-organization-logo.png (status_code=404 request=<WSGIRequest: GET u'/_static/1603618486/sentry/images/logos/default-organization-logo.png'>)
web_1                          | 10:01:30 [WARNING] django.request: Not Found: /_static/1603618486/sentry/js/ads.js (status_code=404 request=<WSGIRequest: GET u'/_static/1603618486/sentry/js/ads.js'>)
web_1                          | /usr/local/lib/python2.7/site-packages/sentry/utils/auth.py:128: RemovedInDjango21Warning: The host argument is deprecated, use allowed_hosts instead.
web_1                          |   return is_safe_url(url, host=host)
web_1                          | 10:01:46 [WARNING] django.request: Not Found: /_static/1603618486/sentry/js/ads.js (status_code=404 request=<WSGIRequest: GET u'/_static/1603618486/sentry/js/ads.js'>)

These warnings are not related. If you can get some earlier logs, from when the container was first starting, that would help us see what might be the issue.

@BYK these are the logs from when web_1 was first starting:

/usr/local/lib/python2.7/site-packages/sentry/runner/initializer.py:197: DeprecatedSettingWarning: The GITHUB_EXTENDED_PERMISSIONS setting is deprecated. Please use SENTRY_OPTIONS['github-login.extended-permissions'] instead.
  warnings.warn(DeprecatedSettingWarning(options_mapper[k], "SENTRY_OPTIONS['%s']" % k))
09:34:43 [WARNING] sentry.utils.geo: settings.GEOIP_PATH_MMDB not configured.
/usr/local/lib/python2.7/site-packages/OpenSSL/crypto.py:12: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in a future release.
  from cryptography import x509
09:34:45 [INFO] sentry.plugins.github: apps-not-configured
*** Starting uWSGI 2.0.19.1 (64bit) on [Sun Oct 25 09:34:45 2020] ***
(...)

/usr/local/lib/python2.7/site-packages/sentry/runner/initializer.py:197: DeprecatedSettingWarning: The GITHUB_EXTENDED_PERMISSIONS setting is deprecated. Please use SENTRY_OPTIONS['github-login.extended-permissions'] instead.
warnings.warn(DeprecatedSettingWarning(options_mapper[k], "SENTRY_OPTIONS['%s']" % k))

There's your issue.

You need to remove GITHUB_EXTENDED_PERMISSIONS from your sentry.conf.py. This settings was put there automatically regardless of your usage of GitHub or not. You can set github-login.extended-permissions in your config.yml` file if you are going to use the GitHub integration.

Thanks @BYK. This appears to be a result from updating from 20.9.0 to 20.10.1.

I assumed the sentry.conf.py would be updated automatically since I have made no alternations at all. I guess I also have to update the following lines to align with the default config?

--- sentry.conf.py  2020-09-28 12:11:28.696775502 +0200
+++ sentry.conf.example.py  2020-10-22 11:44:27.443697492 +0200
@@ -14,5 +14,5 @@

-    iface = "eth0"
+    iface = b"eth0"
     sockfd = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
-    ifreq = struct.pack("16sH14s", iface, socket.AF_INET, b"\x00" * 14)
+    ifreq = struct.pack(b"16sH14s", iface, socket.AF_INET, b"\x00" * 14)

@@ -20,6 +20,6 @@
         ip = struct.unpack(
-            "!I", struct.unpack("16sH2x4s8x", fcntl.ioctl(sockfd, 0x8915, ifreq))[2]
+            b"!I", struct.unpack(b"16sH2x4s8x", fcntl.ioctl(sockfd, 0x8915, ifreq))[2]
         )[0]
         netmask = socket.ntohl(
-            struct.unpack("16sH2xI8x", fcntl.ioctl(sockfd, 0x891B, ifreq))[2]
+            struct.unpack(b"16sH2xI8x", fcntl.ioctl(sockfd, 0x891B, ifreq))[2]
         )
@@ -27,8 +27,8 @@
         return ()
-    base = socket.inet_ntoa(struct.pack("!I", ip & netmask))
+    base = socket.inet_ntoa(struct.pack(b"!I", ip & netmask))
     netmask_bits = 32 - int(round(math.log(ctypes.c_uint32(~netmask).value + 1, 2), 1))
-    return ("{0:s}/{1:d}".format(base, netmask_bits),)
+    return "{0:s}/{1:d}".format(base, netmask_bits)


-INTERNAL_SYSTEM_IPS = get_internal_network()
+INTERNAL_SYSTEM_IPS = (get_internal_network(),)

@@ -259,8 +259,2 @@

-######################
-# GitHub Integration #
-######################
-
-GITHUB_EXTENDED_PERMISSIONS = ["repo"]
-
 #########################

@prupert - yup, that's correct. Auto-updating configs is something we want to do eventually but figuring out a clean way, especially when people modify their configurations, is not easy.

Thanks, you have really helped me! I will make note of this in my update procedure for sentry-onpremise.

Auto-updating config files _cleanly_ would be next to impossible, unless you strictly seperate default config and user config.

Auto-updating config files cleanly would be next to impossible, unless you strictly seperate default config and user config.

We may just do that as we already have a default config for Docker images which is not being used properly right now. Thanks a lot for the suggestion!

Closing as this should be clarified (and also lack of response from the OP @voltcode)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

multinerd picture multinerd  ·  5Comments

SteveEdson picture SteveEdson  ·  3Comments

rmisyurev picture rmisyurev  ·  4Comments

TheRatG picture TheRatG  ·  4Comments

6qiongtao picture 6qiongtao  ·  4Comments