Content
You are here:
Email Notifications Not Sending
Added by Mario Patov about 4 years ago
Hello,
I installed and configured OpenProject on CentOS8 and the problem I am facing is that email notifications are not working. I setup the "Email notifications" and when sending mail manually, I receive it. Not sure if I need to configure or change something about the delayed_job or the problem is completely different ?! Here are some checks and logs from my investigations:
- Checking the count of the delayed jobs:
[root@GVA-LIN-ITMS01 openproject]# openproject run console
Loading production environment (Rails 6.0.3.4)
irb(main):001:0>
irb(main):002:0> Delayed::Job.count
=> 5
irb(main):003:0>
- The error I receive when checking the status of the delayed_job
[openproject@GVA-LIN-ITMS01 bin]$ ./delayed_job restart
Traceback (most recent call last):
30: from ./delayed_job:3:in `<main>'
29: from /home/openproject/.rbenv/versions/2.7.1/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
28: from /home/openproject/.rbenv/versions/2.7.1/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
27: from /opt/openproject/config/environment.rb:31:in `<top (required)>'
26: from /opt/openproject/config/environment.rb:31:in `require_relative'
25: from /opt/openproject/config/application.rb:50:in `<top (required)>'
24: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:324:in `require'
23: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:291:in `load_dependency'
22: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:324:in `block in require'
21: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:324:in `require'
20: from /opt/openproject/lib/open_project/plugins.rb:29:in `<top (required)>'
19: from /opt/openproject/lib/open_project/plugins.rb:30:in `<module:OpenProject>'
18: from /opt/openproject/lib/open_project/plugins.rb:33:in `<module:Plugins>'
17: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:324:in `require'
16: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:291:in `load_dependency'
15: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:324:in `block in require'
14: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:324:in `require'
13: from /opt/openproject/lib/open_project/plugins/acts_as_op_engine.rb:30:in `<top (required)>'
12: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:280:in `require_dependency'
11: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:367:in `depend_on'
10: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:389:in `require_or_load'
9: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:40:in `load_interlock'
8: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies/interlock.rb:13:in `loading'
7: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/concurrency/share_lock.rb:151:in `exclusive'
6: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies/interlock.rb:14:in `block in loading'
5: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:40:in `block in load_interlock'
4: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:406:in `block in require_or_load'
3: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:509:in `load_file'
2: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:701:in `new_constants_in'
1: from /opt/openproject/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:510:in `block in load_file'
/opt/openproject/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:510:in `load': No such file to load -- config/constants/api_patch_registry.rb (LoadError)
Thank you in advance!!!
Mario
Replies (4)
Let me also share my smtp an configuration.yml files and the output of "openproject run check"
Thanks if someone can help on this! Trying to send a mail from the Web UI works just fine.
On Ubuntu 20.04 on a Digital Ocean droplet I also have this issue:
irb(main):002:0> Delayed::Job.count
It seems the packaged installer did not install any cron jobs.
I tried adding them manually but I got the error:
/bin/sh: 1: /opt/openproject/.rvm/gems/ruby-2.1.5/wrappers/rake: not found
And indeed I I could not find the .rvm directory
bundle exec rake jobs:workoff
gave Command 'bundle' not found, but can be installed
So I installed it using: apt install ruby-bundler
Now when I run bundle exec rake jobs:workoff
I get the error:
Your Ruby version is 2.7.0, but your Gemfile specified ~> 2.7.1
@Mario : the environment variable is supposed to be
SMTP_USERNAME
. Did you manually override your config in/etc/openproject/conf.d/smtp
?@Johnny: background jobs are not handled by cron jobs, but by a worker daemon. Can you check
service status openproject-worker-1
?Hi Cyril,
Yes indeed.. when installing OpenProject, I didn`t put the actual mail server settings and afterwards I tried to correct this manually from the
/etc/openproject/conf.d/smtp
file. Instead, I should have just runopenproject reconfigure
which I finally did and followed by restart it solved my problem.Thank you for your prompt reply!