plane icon indicating copy to clipboard operation
plane copied to clipboard

How do I get error logs related to emails?

Open uSkizzik opened this issue 2 years ago β€’ 1 comments

Hi! So, I'm having some issues where inviting a person doesn't seem to send an email at all. I'm self-hosting my mail service and it works with my other tools. I've experienced issues with it in the past so I'm wondering where I can find the error logs for emails so I can debug the issue.

I have decided to open an issue instead of following #2867 because it seems like Discussions are not looked at by maintainers.

uSkizzik avatar Nov 24 '23 16:11 uSkizzik

Hello @uSkizzik, could you please update to the latest version and then enable DEBUG=1? If you continue to encounter any issues, let us know."

pablohashescobar avatar Dec 18 '23 18:12 pablohashescobar

i have the same problem - i've setup my postmark for plane and invitations are not going out. setting DEBUG=1 (i've even tried DEBUG=999) in ConfigMap and redeploying shows nothing related to SMTP in api and worker logs.

api:

Waiting for database...
Database available!
Operations to perform:
  Apply all migrations: auth, authtoken, contenttypes, db, django_celery_beat, license, sessions, token_blacklist
Running migrations:
  No migrations to apply.
Instance already registered
ENABLE_SIGNUP configuration already exists
ENABLE_EMAIL_PASSWORD configuration already exists
ENABLE_MAGIC_LINK_LOGIN configuration already exists
GOOGLE_CLIENT_ID configuration already exists
GITHUB_CLIENT_ID configuration already exists
GITHUB_CLIENT_SECRET configuration already exists
EMAIL_HOST configuration already exists
EMAIL_HOST_USER configuration already exists
EMAIL_HOST_PASSWORD configuration already exists
EMAIL_PORT configuration already exists
EMAIL_FROM configuration already exists
EMAIL_USE_TLS configuration already exists
OPENAI_API_KEY configuration already exists
GPT_ENGINE configuration already exists
UNSPLASH_ACCESS_KEY configuration already exists
Checking bucket...
Public read access policy set for bucket 'uploads'.
[2024-01-03 12:10:33 +0000] [1] [INFO] Starting gunicorn 21.2.0
[2024-01-03 12:10:33 +0000] [1] [INFO] Listening at: http://0.0.0.0:8000 (1)
[2024-01-03 12:10:33 +0000] [1] [INFO] Using worker: uvicorn.workers.UvicornWorker
[2024-01-03 12:10:33 +0000] [33] [INFO] Booting worker with pid: 33
[2024-01-03 12:10:35 +0000] [33] [INFO] Started server process [33]
[2024-01-03 12:10:35 +0000] [33] [INFO] Waiting for application startup.
[2024-01-03 12:10:35 +0000] [33] [INFO] ASGI 'lifespan' protocol appears unsupported.
[2024-01-03 12:10:35 +0000] [33] [INFO] Application startup complete.
GET - /api/users/me/ of Queries: 1
10.42.0.125:41760 - "GET /api/users/me/ HTTP/1.1" 200
GET - /api/workspaces/psuje/labels/ of Queries: 2
GET - /api/users/me/settings/ of Queries: 4
GET - /api/workspaces/psuje/users/notifications/unread/ of Queries: 4
10.42.0.125:41786 - "GET /api/workspaces/psuje/users/notifications/unread/ HTTP/1.1" 200
GET - /api/workspaces/psuje/workspace-members/me/ of Queries: 2
10.42.0.125:41800 - "GET /api/users/me/settings/ HTTP/1.1" 200
GET - /api/users/me/workspaces/ of Queries: 310.42.0.125:41840 - "GET /api/workspaces/psuje/labels/ HTTP/1.1" 200
10.42.0.125:41820 - "GET /api/workspaces/psuje/workspace-members/me/ HTTP/1.1" 200
GET - /api/workspaces/psuje/members/ of Queries: 4GET - /api/workspaces/psuje/invitations/ of Queries: 3

10.42.0.125:41850 - "GET /api/workspaces/psuje/members/ HTTP/1.1" 200

10.42.0.125:41772 - "GET /api/users/me/workspaces/ HTTP/1.1" 200
10.42.0.125:41804 - "GET /api/workspaces/psuje/invitations/ HTTP/1.1" 200
GET - /api/users/me/workspaces/psuje/project-roles/ of Queries: 3
10.42.0.125:41856 - "GET /api/users/me/workspaces/psuje/project-roles/ HTTP/1.1" 200
GET - /api/workspaces/psuje/projects/ of Queries: 4
10.42.0.125:41828 - "GET /api/workspaces/psuje/projects/ HTTP/1.1" 200
DELETE - /api/workspaces/psuje/invitations/7ace35aa-eb54-44a8-a6ae-51f7844db97e/ of Queries: 4
10.42.0.125:44974 - "DELETE /api/workspaces/psuje/invitations/7ace35aa-eb54-44a8-a6ae-51f7844db97e/ HTTP/1.1" 204
GET - /api/workspaces/psuje/invitations/ of Queries: 3
10.42.0.125:44974 - "GET /api/workspaces/psuje/invitations/ HTTP/1.1" 200
POST - /api/workspaces/psuje/invitations/ of Queries: 8
10.42.0.125:45018 - "POST /api/workspaces/psuje/invitations/ HTTP/1.1" 200
GET - /api/workspaces/psuje/invitations/ of Queries: 3
10.42.0.125:45018 - "GET /api/workspaces/psuje/invitations/ HTTP/1.1" 200
GET - /api/users/me/ of Queries: 1
10.42.0.125:43550 - "GET /api/users/me/ HTTP/1.1" 200
GET - /api/workspaces/psuje/users/notifications/unread/ of Queries: 4
10.42.0.125:43576 - "GET /api/workspaces/psuje/users/notifications/unread/ HTTP/1.1" 200
GET - /api/workspaces/psuje/labels/ of Queries: 2
GET - /api/users/me/workspaces/ of Queries: 3
GET - /api/workspaces/psuje/invitations/ of Queries: 3
10.42.0.125:43604 - "GET /api/workspaces/psuje/labels/ HTTP/1.1" 200
10.42.0.125:43564 - "GET /api/users/me/workspaces/ HTTP/1.1" 200
GET - /api/users/me/workspaces/psuje/project-roles/ of Queries: 3
10.42.0.125:43588 - "GET /api/workspaces/psuje/invitations/ HTTP/1.1" 200
GET - /api/workspaces/psuje/members/ of Queries: 410.42.0.125:43610 - "GET /api/users/me/workspaces/psuje/project-roles/ HTTP/1.1" 200

GET - /api/users/me/settings/ of Queries: 4
10.42.0.125:43552 - "GET /api/users/me/settings/ HTTP/1.1" 200
10.42.0.125:43594 - "GET /api/workspaces/psuje/members/ HTTP/1.1" 200
GET - /api/workspaces/psuje/workspace-members/me/ of Queries: 2
10.42.0.125:43570 - "GET /api/workspaces/psuje/workspace-members/me/ HTTP/1.1" 200
GET - /api/workspaces/psuje/projects/ of Queries: 4
10.42.0.125:43592 - "GET /api/workspaces/psuje/projects/ HTTP/1.1" 200
DELETE - /api/workspaces/psuje/invitations/a275a732-f547-405f-bd05-677588e47ce0/ of Queries: 4
10.42.0.125:43626 - "DELETE /api/workspaces/psuje/invitations/a275a732-f547-405f-bd05-677588e47ce0/ HTTP/1.1" 204
GET - /api/workspaces/psuje/invitations/ of Queries: 3
10.42.0.125:43626 - "GET /api/workspaces/psuje/invitations/ HTTP/1.1" 200
DELETE - /api/workspaces/psuje/invitations/06c50bc5-ebeb-44d1-8f01-7e7ccacadae7/ of Queries: 4
10.42.0.125:43626 - "DELETE /api/workspaces/psuje/invitations/06c50bc5-ebeb-44d1-8f01-7e7ccacadae7/ HTTP/1.1" 204
GET - /api/workspaces/psuje/invitations/ of Queries: 3
10.42.0.125:43626 - "GET /api/workspaces/psuje/invitations/ HTTP/1.1" 200
POST - /api/workspaces/psuje/invitations/ of Queries: 8
10.42.0.125:35404 - "POST /api/workspaces/psuje/invitations/ HTTP/1.1" 200
GET - /api/workspaces/psuje/invitations/ of Queries: 3
10.42.0.125:35404 - "GET /api/workspaces/psuje/invitations/ HTTP/1.1" 200

worker:

Waiting for database...
Database available!
 
 -------------- celery@plane-helm-worker-wl-748d8c555f-g5c2p v5.3.4 (emerald-rush)
--- ***** ----- 
-- ******* ---- Linux-5.15.0-58-generic-x86_64-with 2024-01-03 12:11:59
- *** --- * --- 
- ** ---------- [config]
- ** ---------- .> app:         plane:0x7f937e5d0c50
- ** ---------- .> transport:   redis://plane-helm-redis.plane.svc.cluster.local:6379//
- ** ---------- .> results:     redis://plane-helm-redis.plane.svc.cluster.local:6379/
- *** --- * --- .> concurrency: 8 (prefork)
-- ******* ---- .> task events: OFF (enable -E to monitor tasks in this worker)
--- ***** ----- 
 -------------- [queues]
                .> celery           exchange=celery(direct) key=celery
                

[tasks]
  . plane.bgtasks.analytic_plot_export.analytic_export_task
  . plane.bgtasks.event_tracking_task.auth_events
  . plane.bgtasks.event_tracking_task.workspace_invite_event
  . plane.bgtasks.export_task.issue_export_task
  . plane.bgtasks.exporter_expired_task.delete_old_s3_link
  . plane.bgtasks.file_asset_task.delete_file_asset
  . plane.bgtasks.forgot_password_task.forgot_password
  . plane.bgtasks.importer_task.service_importer
  . plane.bgtasks.issue_activites_task.issue_activity
  . plane.bgtasks.issue_automation_task.archive_and_close_old_issues
  . plane.bgtasks.magic_link_code_task.magic_link
  . plane.bgtasks.notification_task.notifications
  . plane.bgtasks.project_invitation_task.project_invitation
  . plane.bgtasks.user_welcome_task.send_welcome_slack
  . plane.bgtasks.webhook_task.send_webhook
  . plane.bgtasks.webhook_task.webhook_task
  . plane.bgtasks.workspace_invitation_task.workspace_invitation

[2024-01-03 12:12:00,147: WARNING/MainProcess] /usr/local/lib/python3.11/site-packages/celery/worker/consumer/consumer.py:507: CPendingDeprecationWarning: The broker_connection_retry configuration setting will no longer determine
whether broker connection retries are made during startup in Celery 6.0 and above.
If you wish to retain the existing behavior for retrying connections on startup,
you should set broker_connection_retry_on_startup to True.
  warnings.warn(

[2024-01-03 12:12:00,156: INFO/MainProcess] Connected to redis://plane-helm-redis.plane.svc.cluster.local:6379//
[2024-01-03 12:12:00,157: WARNING/MainProcess] /usr/local/lib/python3.11/site-packages/celery/worker/consumer/consumer.py:507: CPendingDeprecationWarning: The broker_connection_retry configuration setting will no longer determine
whether broker connection retries are made during startup in Celery 6.0 and above.
If you wish to retain the existing behavior for retrying connections on startup,
you should set broker_connection_retry_on_startup to True.
  warnings.warn(

[2024-01-03 12:12:00,159: INFO/MainProcess] mingle: searching for neighbors
[2024-01-03 12:12:01,170: INFO/MainProcess] mingle: sync with 1 nodes
[2024-01-03 12:12:01,170: INFO/MainProcess] mingle: sync complete
[2024-01-03 12:12:01,186: INFO/MainProcess] celery@plane-helm-worker-wl-748d8c555f-g5c2p ready.
[2024-01-03 12:12:26,178: INFO/MainProcess] missed heartbeat from celery@plane-helm-worker-wl-7b5b8b8ff-rtvkg
[2024-01-03 12:12:28,425: INFO/MainProcess] Task plane.bgtasks.workspace_invitation_task.workspace_invitation[2e1815fc-802f-4388-95cf-7f1d3a14ae2e] received
[2024-01-03 12:12:29,197: INFO/ForkPoolWorker-8] Task plane.bgtasks.workspace_invitation_task.workspace_invitation[2e1815fc-802f-4388-95cf-7f1d3a14ae2e] succeeded in 0.7709096074104309s: None

I've finally found this error in postmark dashboard, but still - SMTP error 400 should be reported in logs.

asquelt avatar Jan 03 '24 12:01 asquelt

I'm going to close this as resolved because I've resolved my issues long ago. I don't remember my solution but I do remember upgrading my Plane version to 0.14.

This is an amazing piece of software and we're now using it internally. I wish the team behind it great success.

uSkizzik avatar Jan 17 '24 16:01 uSkizzik