mimischi / dokku-sentry

Deploy your own instance of Sentry onto Dokku!
66 stars 14 forks source link

sentry.exceptions.InvalidConfiguration: int() argument must be a string or a number, not 'NoneType' #11

Closed StephanMeijer closed 4 years ago

StephanMeijer commented 5 years ago
Successfully built 96281f64f2c2
Successfully tagged dokku/sentry:latest
-----> Releasing sentry (dokku/sentry:latest)...
-----> Deploying sentry (dokku/sentry:latest)...
 !     Release command declared: 'sentry --config=sentry.conf.py upgrade --noinput'
       08:46:15 [WARNING] sentry.utils.geo: settings.GEOIP_PATH_MMDB not configured.
       08:47:41 [INFO] sentry.plugins.github: apps-not-configured
       Traceback (most recent call last):
         File "/usr/local/bin/sentry", line 10, in <module>
           sys.exit(main())
         File "/usr/local/lib/python2.7/site-packages/sentry/runner/__init__.py", line 162, in main
           cli(prog_name=get_prog(), obj={}, max_content_width=100)
         File "/usr/local/lib/python2.7/site-packages/click/core.py", line 722, in __call__
           return self.main(*args, **kwargs)
         File "/usr/local/lib/python2.7/site-packages/click/core.py", line 697, in main
           rv = self.invoke(ctx)
         File "/usr/local/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
           return _process_result(sub_ctx.command.invoke(sub_ctx))
         File "/usr/local/lib/python2.7/site-packages/click/core.py", line 895, in invoke
           return ctx.invoke(self.callback, **ctx.params)
         File "/usr/local/lib/python2.7/site-packages/click/core.py", line 535, in invoke
           return callback(*args, **kwargs)
         File "/usr/local/lib/python2.7/site-packages/click/decorators.py", line 17, in new_func
           return f(get_current_context(), *args, **kwargs)
         File "/usr/local/lib/python2.7/site-packages/sentry/runner/decorators.py", line 35, in inner
           configure()
         File "/usr/local/lib/python2.7/site-packages/sentry/runner/__init__.py", line 125, in configure
           configure(ctx, py, yaml, skip_service_validation)
         File "/usr/local/lib/python2.7/site-packages/sentry/runner/settings.py", line 156, in configure
           skip_service_validation=skip_service_validation
         File "/usr/local/lib/python2.7/site-packages/sentry/runner/initializer.py", line 329, in initialize_app
           setup_services(validate=not skip_service_validation)
         File "/usr/local/lib/python2.7/site-packages/sentry/runner/initializer.py", line 352, in setup_services
           service.validate()
         File "/usr/local/lib/python2.7/site-packages/sentry/utils/services.py", line 91, in <lambda>
           context[key] = (lambda f: lambda *a, **k: getattr(self, f)(*a, **k))(key)
         File "/usr/local/lib/python2.7/site-packages/sentry/buffer/redis.py", line 73, in validate
           raise InvalidConfiguration(six.text_type(e))
       sentry.exceptions.InvalidConfiguration: int() argument must be a string or a number, not 'NoneType'
remote: execution of 'sentry --config=sentry.conf.py upgrade --noinput' failed!
To staging.xyz.nl:sentry
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'dokku@staging.xyz.nl:sentry'
=====> sentry env vars
DATABASE_URL:            postgresql://sentry:xxxxx@sentry.xyz.nl/sentry
DOKKU_APP_TYPE:          dockerfile
DOKKU_DOCKERFILE_PORTS:  9000/tcp
DOKKU_PROXY_PORT_MAP:    http:80:9000
GIT_REV:                 d4288dce05babf881624a35c48f19df38dab8bf7
MEMCACHED_URL:           memcached://dokku-memcached-sentry-memcached:11211
REDIS_URL:               redis://sentry.xyz.nl/
SENTRY_SECRET_KEY: <base64 encoded string>
mimischi commented 5 years ago

The following line is weird. Are you trying to use Sentry with GeoIP?

08:46:15 [WARNING] sentry.utils.geo: settings.GEOIP_PATH_MMDB not configured.

StephanMeijer commented 5 years ago

I do not know GeoIP at all.

mimischi commented 5 years ago

Could you elaborate what you have been trying to do exactly? Did you follow the README step-by-step? Did you change anything (file contents or skipping steps)? Is this your first installation?

StephanMeijer commented 5 years ago

This is my first installation, I did not exactly follow the README becaus I want to have Redis and Postgres outside my Dokku installation. Can you point me to probable causes?

mimischi commented 5 years ago

Is this redis://sentry.xyz.nl/ your host for Redis assuming xyz is some domain name? Would you not need something along the lines of redis://RedisUser:RedisPassword:some.redis.host.nl:RedisPort?

StephanMeijer commented 5 years ago
administrator@xyz:~/apps/dokku-sentry$ redis-cli -h sentry.xyz.nl
sentry.xyz.nl:6379> select 123
(error) ERR DB index is out of range
sentry.xyz.nl:6379> select 1
OK
sentry.xyz.nl:6379[1]> SET foo "bar"
OK
sentry.xyz.nl:6379[1]> GET foo
"bar"
sentry.xyz.nl:6379[1]> exit
StephanMeijer commented 5 years ago

Doesn't seem to be any username/password on it by default.

mimischi commented 5 years ago

Could you adapt the following lines, commit and push to your Dokku server again?

Maybe remove the "password" and "port" key, because you are not specifying those in the REDIS_URL environment variable.

https://github.com/mimischi/dokku-sentry/blob/d4288dce05babf881624a35c48f19df38dab8bf7/sentry.conf.py#L76-L89

mimischi commented 5 years ago

@StephanMeijer have you figured out a solution to your problem?

StephanMeijer commented 5 years ago

Sorry, I don't have the time to test this solution unfortunately.

mimischi commented 4 years ago

I'm closing this issue for now. Feel free to re-open if necessary!