Sentry-relay "project state for key X is missing key id" when sentry-relay on separate subdomain

We’re routing client API requests through our ingress (Envoy) to sentry-relay through a separate subdomain (sentry-relay.abc.com instead of sentry.abc.com, where sentry is hosted). We’re running into the following error, which is flooding our logs:

Today 10:08:08 PM sentry-relay-8fd649ff8-c5nlj sentry-relay [ERROR] [relay_server::actors::events] ERROR: project state for key a277d62ff3c24a5fbb41c9343aeaf060 is missing key id
Today 10:08:09 PM sentry-relay-8fd649ff8-c5nlj sentry-relay [ERROR] [relay_server::actors::events] ERROR: project state for key a277d62ff3c24a5fbb41c9343aeaf060 is missing key id
Today 10:08:12 PM sentry-snuba-consumer-557967f4c8-hc4w2 sentry-snuba [Error] submitting packet, dropping the packet and closing the socket
Today 10:08:13 PM sentry-snuba-outcomes-consumer-5cd7dd4d89-hwbwd sentry-snuba [Error] submitting packet, dropping the packet and closing the socket

I suspect it might have something to do with a missing whitelist entry (given the separate subdomain), but I’m not sure. It’s also worth noting that events are being relayed/accepted and displayed in sentry-web without issue. Any ideas on how to silence this error?

A potentially relevant though likely unrelated error:

Feb 3 23:47:11 sentry-worker-6869d7c6f8-m28zj sentry-worker ERROR 06:47:11 [ERROR] celery.app.trace: Task sentry.tasks.email.send_email[28200cdb-1316-42f5-b3df-cadf53d54f62] raised unexpected: IndexError('string index out of range',) (data={'hostname': 'sentry-worker-6869d7c6f8-m28zj', 'id': '28200cdb-1316-42f5-b3df-cadf53d54f62', 'name': 'sentry.tasks.email.send_email', 'exc': "IndexError('string index out of range',)", 'traceback': 'Traceback (most recent call last):\n  File "/usr/local/lib/python3.6/site-packages/celery/app/trace.py", line 412, in trace_task\n    R = retval = fun(*args, **kwargs)\n  File "/usr/local/lib/python3.6/site-packages/celery/app/trace.py", line 704, in __protected_call__\n    return self.run(*args, **kwargs)\n  File "/usr/local/lib/python3.6/site-packages/sentry_sdk/integrations/celery.py", line 197, in _inner\n    reraise(*exc_info)\n  File "/usr/local/lib/python3.6/site-packages/sentry_sdk/_compat.py", line 54, in reraise\n    raise value\n  File "/usr/local/lib/python3.6/site-packages/sentry_sdk/integrations/celery.py", line 192, in _inner\n    return f(*args, **kwargs)\n  File "/usr/local/lib/python3.6/site-packages/sentry/tasks/base.py", line 48, in _wrapped\n    result = func(*args, **kwargs)\n  File "/usr/local/lib/python3.6/site-packages/sentry/tasks/email.py", line 76, in send_email\n    send_messages([message])\n  File "/usr/local/lib/python3.6/site-packages/sentry/utils/email.py", line 408, in send_messages\n    sent = connection.send_messages(messages)\n  File "/usr/local/lib/python3.6/site-packages/django/core/mail/backends/smtp.py", line 111, in send_messages\n    sent = self._send(message)\n  File "/usr/local/lib/python3.6/site-packages/django/core/mail/backends/smtp.py", line 123, in _send\n    from_email = sanitize_address(email_message.from_email, encoding)\n  File "/usr/local/lib/python3.6/site-packages/django/core/mail/message.py", line 161, in sanitize_address\n    address = Address(nm, addr_spec=addr)\n  File "/usr/local/lib/python3.6/email/headerregistry.py", line 42, in __init__\n    a_s, rest = parser.get_addr_spec(addr_spec)\n  File "/usr/local/lib/python3.6/email/_header_value_parser.py", line 1585, in get_addr_spec\n    token, value = get_local_part(value)\n  File "/usr/local/lib/python3.6/email/_header_value_parser.py", line 1395, in get_local_part\n    if value[0] in CFWS_LEADER:\nIndexError: string index out of range\n', 'args': '()', 'kwargs': "{'message': <django.core.mail.message.EmailMultiAlternatives object at 0x7f1ebc2d0710>}", 'description': 'raised unexpected', 'internal': False})

Ping @jauer

Following up here - any thoughts on what might be happening?

We have exactly the same issue as well. So also curious to hear if there is a fix or workaround for this. Thank you!

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