Content
Worker process issues in Docker install
Added by Dragan Espenschied over 4 years ago
Hello everyone,
I'm currently testing the Docker-based install of OpenProject and am pretty impressed. However, scheduled emails are not sent out, no project updates, user invitations, or password reset emails. The administrator test email works fine!
The only difference from the default docker-compose.yml I set up is that the project is connected to a Postgres database cluster on the host rather than one running in a container. The port to connect to that database is 5433 instead of the Postgres default 5432. I did account for that setting in docker-compose.yml and OpenProject's web interface definitely works without any issues.
I'd be happy for any hints what I could do to fix the email issue.
This is the error found in $ docker-compose logs worker
worker_1 | [Worker(host:1b6d7e7e7454 pid:1)] Job DeliverWorkPackageNotificationJob [ce710772-5355-4ec4-ad46-fb85366297ef] from DelayedJob(default) with arguments: [96, 4, 4] (id=35) (queue=default) FAILED (1 prior attempts) with Net::ReadTimeout: Net::ReadTimeout with #<TCPSocket:(closed)>
worker_1 | 2020-04-14T11:46:18+0000: [Worker(host:1b6d7e7e7454 pid:1)] Job DeliverWorkPackageNotificationJob [ce710772-5355-4ec4-ad46-fb85366297ef] from DelayedJob(default) with arguments: [96, 4, 4] (id=35) (queue=default) FAILED (1 prior attempts) with Net::ReadTimeout: Net::ReadTimeout with #<TCPSocket:(closed)>
worker_1 | [Worker(host:1b6d7e7e7454 pid:1)] Job DeliverWorkPackageNotificationJob [54bd6b14-b3e3-4f0a-8003-20f5e6fca668] from DelayedJob(default) with arguments: [93, 4, 4] (id=34) (queue=default) RUNNING
worker_1 | 2020-04-14T11:46:18+0000: [Worker(host:1b6d7e7e7454 pid:1)] Job DeliverWorkPackageNotificationJob [54bd6b14-b3e3-4f0a-8003-20f5e6fca668] from DelayedJob(default) with arguments: [93, 4, 4] (id=34) (queue=default) RUNNING
worker_1 | [ActiveJob] [DeliverWorkPackageNotificationJob] [54bd6b14-b3e3-4f0a-8003-20f5e6fca668] Performing DeliverWorkPackageNotificationJob (Job ID: 54bd6b14-b3e3-4f0a-8003-20f5e6fca668) from DelayedJob(default) enqueued at 2020-04-14T11:42:17Z with arguments: 93, 4, 4
worker_1 | [ActiveJob] [DeliverWorkPackageNotificationJob] [54bd6b14-b3e3-4f0a-8003-20f5e6fca668] Delivered mail openproject.aggregated_journal-4-93.20200414113713@pm.rhizome.org (60284.9ms)
worker_1 | [ActiveJob] [DeliverWorkPackageNotificationJob] [54bd6b14-b3e3-4f0a-8003-20f5e6fca668] Error performing DeliverWorkPackageNotificationJob (Job ID: 54bd6b14-b3e3-4f0a-8003-20f5e6fca668) from DelayedJob(default) in 60570.3ms: Net::ReadTimeout (Net::ReadTimeout with #<TCPSocket:(closed)>):
worker_1 | /usr/local/lib/ruby/2.6.0/net/protocol.rb:217:in `rbuf_fill'
Replies (4)
Hi Dragan,
the error is in the log file, the SMTP connection times out:
Net::ReadTimeout: Net::ReadTimeout with _#<TCPSocket:(closed)>_
This is likely a networking issue in your worker container
Best
Oliver
Thank you Oliver!
Is there a way I can see what action was attempted? The worker container is attached to the same network as the main web app container. The main container apparently does fine sending the test email. So I am wondering what network operation fails exactly.
I did set up the SMPT settings in the administrator interface. Do I need to set them for the worker container as well, via environment variables?
My best
Dragan
Hello,
You can at least inspect the configuration by doing the following:
docker-compose run web bundle exec rails c
and then enteringActionMailer::Base.smtp_settings
at the prompt. If everything seems right, can you do the same withdocker-compose run worker bundle exec rails c
and compare the outputs?Thanks,
Cyril
Thank you Cyril, this helped. I found the issue in my setup, which ultimately was a typo in my docker-compose.yml file. For anybody setting up email in a Docker setup, the details are here: https://docs.openproject.org/installation-and-operations/configuration/outbound-emails/