Step after install sentry with clean database?

I install fresh sentry and postgresql.
Create user and database sentry in postgresql.
I start sentry run worker and get error on postgresql:

< 2020-05-02 17:02:14.182 UTC > ERROR:  relation "sentry_option" does not exist at character 114
< 2020-05-02 17:02:14.182 UTC > STATEMENT:  SELECT "sentry_option"."id", "sentry_option"."key", "sentry_option"."value", "sentry_option"."last_updated" FROM "sentry_option" WHERE "sentry_option"."key" = 'system.url-prefix' 

Full log here https://hastebin.com/balikamiyu.apache

Log worker:

May 02 17:06:31 sentry-apatsev1.novalocal sentry[13848]: ProgrammingError: ProgrammingError('relation "sentry_monitor" does not exist\nLINE 1: ...last_checkin", "sentry_monitor"."date_added" FROM "sentry_mo...\n                                                             ^\n',)
May 02 17:06:31 sentry-apatsev1.novalocal sentry[13848]: SQL: SELECT "sentry_monitor"."id", "sentry_monitor"."guid", "sentry_monitor"."organization_id", "sentry_monitor"."project_id", "sentry_monitor"."name", "sentry_monitor"."status", "sentry_monitor"."type", "sentry_monitor"."config", "sentry_monitor"."next_checkin", "sentry_monitor"."last_checkin", "sentry_monitor"."date_added" FROM "sentry_monitor" WHERE ("sentry_monitor"."next_checkin" < %s  AND "sentry_monitor"."type" IN (%s, %s) AND NOT ("sentry_monitor"."status" IN (%s, %s, %s))) LIMIT 10000
May 02 17:06:31 sentry-apatsev1.novalocal sentry[13848]: 17:06:31 [ERROR] celery.worker.job: Task sentry.tasks.check_monitors[a5db3261-39eb-494e-9852-d8362c6c99e5] raised unexpected: ProgrammingError(u'ProgrammingError(\'relation "sentry_monitor" does not exist\\nLINE 1: ...last_checkin", "sentry_monitor"."date_added" FROM "sentry_mo...\\n  

Full log here https://hastebin.com/urironucen.py

Seems like you didn’t run migrations. sentry upgrade

run migration! Greate.
But Migration failed:

sentry[18430]: > sentry:0471_global_saved_search_types
sentry[18430]: > sentry:0472_auto__add_field_sentryapp_author
sentry[18430]: Created internal Sentry project (slug=internal, id=1)
sentry[18430]: Would you like to create a user account now? [Y/n]: Aborted!
systemd[1]: sentry-worker.service: main process exited, code=exited, status=1/FAILURE
systemd[1]: Unit sentry-worker.service entered failed state.
systemd[1]: sentry-worker.service failed.

Can you run the script with the CI=1 environment variable set, and try again?

Hello! I have the same error when expanding postgres (
the migration job successfully worked, what else could be the reason?

2020-11-24 05:46:35.819 GMT [1126] ERROR:  relation "sentry_monitor" does not exist at character 328
    2020-11-24 05:46:35.819 GMT [1126] STATEMENT:  SELECT "sentry_monitor"."id", "sentry_monitor"."guid", "sentry_monitor"."organization_id", "sentry_monitor"."project_id", "sentry_monitor"."name", "sentry_monitor"."status", "sentry_monitor"."type", "sentry_monitor"."config", "sentry_monitor"."next_checkin", "sentry_monitor"."last_checkin", "sentry_monitor"."date_added" FROM "sentry_monitor" WHERE ("sentry_monitor"."next_checkin" < '2020-11-24T05:46:35.804370+00:00'::timestamptz AND "sentry_monitor"."type" IN (2, 3) AND NOT ("sentry_monitor"."status" IN (1, 2, 3))) LIMIT 10000
    2020-11-24 05:46:35.919 GMT [1127] ERROR:  relation "sentry_option" does not exist at character 8
    2020-11-24 05:46:35.919 GMT [1127] STATEMENT:  UPDATE "sentry_option" SET "last_updated" = '2020-11-24T05:46:35.903727+00:00'::timestamptz, "value" = 'gAJHQdfvJ4751DUu' WHERE "sentry_option"."key" = 'sentry:last_worker_ping'
    2020-11-24 05:46:35.929 GMT [1128] ERROR:  relation "sentry_authidentity" does not exist at character 288
    2020-11-24 05:46:35.929 GMT [1128] STATEMENT:  SELECT "sentry_authidentity"."id", "sentry_authidentity"."user_id", "sentry_authidentity"."auth_provider_id", "sentry_authidentity"."ident", "sentry_authidentity"."data", "sentry_authidentity"."last_verified", "sentry_authidentity"."last_synced", "sentry_authidentity"."date_added" FROM "sentry_authidentity" WHERE "sentry_authidentity"."last_synced" <= '2020-11-24T04:46:35.917970+00:00'::timestamptz
    2020-11-24 05:46:36.018 GMT [1129] ERROR:  relation "sentry_scheduledjob" does not exist at character 179
    2020-11-24 05:46:36.018 GMT [1129] STATEMENT:  SELECT "sentry_scheduledjob"."id", "sentry_scheduledjob"."name", "sentry_scheduledjob"."payload", "sentry_scheduledjob"."date_added", "sentry_scheduledjob"."date_scheduled" FROM "sentry_scheduledjob" WHERE "sentry_scheduledjob"."date_scheduled" <= '2020-11-24T05:46:36.008678+00:00'::timestamptz LIMIT 101
    2020-11-24 05:46:36.639 GMT [1130] ERROR:  relation "sentry_option" does not exist at character 114
    2020-11-24 05:46:36.639 GMT [1130] STATEMENT:  SELECT "sentry_option"."id", "sentry_option"."key", "sentry_option"."value", "sentry_option"."last_updated" FROM "sentry_option" WHERE "sentry_option"."last_updated" >= '2020-11-24T04:46:36.626556+00:00'::timestamptz

migrate job:
Finished running migrations
Finished running migrations

This table gets created in the very first migration and then never touched. Something is very wrong with your setup. Can you provide more logs?

helped to manually start the Sentry upgrade)

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.