Waiting for events… Our error robot is waiting to devour receive your first event

I have installed sentry with docker in my aliyun server, and it can receiver email. but it cant receiver the error test. Anyone can help me?

I got the logs from docker logs worker:

ProgrammingError: ProgrammingError(‘function sentry_increment_project_counter(integer, integer) does not exist\nLINE 2: select sentry_increment_project_counter(1, 1…\n ^\nHINT: No function matches the given name and argument types. You might need to add explicit type casts.\n’,)
SQL:
select sentry_increment_project_counter(%s, %s)

11:31:20 [ERROR] celery.worker.job: Task sentry.tasks.store.save_event[6d58ba3f-0d48-40e0-b4a1-38b8bfe0292e] raised unexpected: ProgrammingError("ProgrammingError(‘function sentry_increment_project_counter(integer, integer) does not exist\nLINE 2: select sentry_increment_project_counter(1, 1…\n ^\nHINT: No function matches the given name and argument types. You might need to add explicit type casts.\n’,)\nSQL: \n select sentry_increment_project_counter(%s, %s)\n ",) (data={u’hostname’: ‘celery@0cbe655e887a’, u’name’: ‘sentry.tasks.store.save_event’, u’args’: ‘[]’, u’internal’: False, u’kwargs’: “{‘event_id’: u’d64bef0acb164093bf058e04396bd6e2’, ‘cache_key’: ‘e:d64bef0acb164093bf058e04396bd6e2:1’, ‘start_time’: 1533123080.208265, ‘project_id’: 1, ‘data’: None}”, u’id’: ‘6d58ba3f-0d48-40e0-b4a1-38b8bfe0292e’})
worker: Warm shutdown (MainProcess)
Traceback (most recent call last):
File “/usr/local/lib/python2.7/site-packages/sentry/utils/metrics.py”, line 64, in worker
tsdb.incr(tsdb.models.internal, full_key, count=amount)
File “/usr/local/lib/python2.7/site-packages/sentry/utils/services.py”, line 91, in
context[key] = (lambda f: lambda *a, **k: getattr(self, f)(*a, **k))(key)
File “/usr/local/lib/python2.7/site-packages/sentry/tsdb/redis.py”, line 214, in incr
self.incr_multi([(model, key)], timestamp, count, environment_id)
File “/usr/local/lib/python2.7/site-packages/sentry/tsdb/redis.py”, line 239, in incr_multi
client.hincrby(hash_key, hash_field, count)
File “/usr/local/lib/python2.7/site-packages/redis/client.py”, line 1865, in hincrby
return self.execute_command(‘HINCRBY’, name, key, amount)
File “/usr/local/lib/python2.7/site-packages/rb/clients.py”, line 333, in execute_command
buf = self._get_command_buffer(host_id, args[0])
File “/usr/local/lib/python2.7/site-packages/rb/clients.py”, line 351, in _get_command_buffer
buf = CommandBuffer(host_id, connect, self.auto_batch)
File “/usr/local/lib/python2.7/site-packages/rb/clients.py”, line 90, in init
self.connect()
File “/usr/local/lib/python2.7/site-packages/rb/clients.py”, line 109, in connect
self.connection.connect()
File “/usr/local/lib/python2.7/site-packages/redis/connection.py”, line 442, in connect
raise ConnectionError(self._error_message(e))

1 Like

Well, I fixed this problem, it is not easy.

  1. run this command and get in the postgres docker
    docker exec -it onpremise_postgres_1 bash

  2. get in the postgre database
    psql -h 127.0.0.1 -d postgres -U postgres

  3. run this part program:
    create or replace function sentry_increment_project_counter( project bigint, delta int) returns int as $$ declare new_val int; begin loop update sentry_projectcounter set value = value + delta where project_id = project returning value into new_val; if found then return new_val; end if; begin insert into sentry_projectcounter(project_id, value) values (project, delta) returning value into new_val; return new_val; exception when unique_violation then end; end loop; end $$ language plpgsql;

Then it works,

Thanks

3 Likes

It works for me, thank you!