Top Menu

Jump to content
Home
    Modules
      • Projects
      • Activity
      • Work packages
      • Gantt charts
      • Calendars
      • Team planners
      • Boards
      • News
    • Getting started
    • Introduction video
      Welcome to OpenProject Community
      Get a quick overview of project management and team collaboration with OpenProject. You can restart this video from the help menu.

    • Help and support
    • Upgrade to Enterprise edition
    • User guides
    • Videos
    • Shortcuts
    • Community forum
    • Enterprise support

    • Additional resources
    • Data privacy and security policy
    • Digital accessibility (DE)
    • OpenProject website
    • Security alerts / Newsletter
    • OpenProject blog
    • Release notes
    • Report a bug
    • Development roadmap
    • Add and edit translations
    • API documentation
  • Sign in
      Forgot your password?

      or sign in with your existing account

      Google

Side Menu

  • Overview
  • Activity
    Activity
  • Roadmap
  • Work packages
    Work packages
  • Gantt charts
    Gantt charts
  • Calendars
    Calendars
  • Team planners
    Team planners
  • Boards
    Boards
  • News
  • Forums

Content

Support Installation & Updates
  1. OpenProject
  2. Forums
  3. Support Installation & Updates
  4. Email Notifications Not Sending

Email Notifications Not Sending

Added by Mario Patov over 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)

RE: Email Notifications Not Sending - Added by Mario Patov over 4 years ago

Let me also share my smtp an configuration.yml files and the output of "openproject run check"

  • /etc/openproject/conf.d/smtp
export EMAIL_DELIVERY_METHOD="smtp"
export ADMIN_EMAIL="my.name@domain.net"
export SMTP_HOST="mail.my-domain.net"
export SMTP_ADDRESS="mail.my-domain.net"
export SMTP_PORT="587"
export SMTP_DOMAIN="my-domain.net"
export SMTP_AUTHENTICATION="plain"
export SMTP_USER_NAME="itms@my-domain.net"
export SMTP_PASSWORD="Yw:y834Wkf"
export SMTP_ENABLE_STARTTLS_AUTO="true"
  • /opt/openproject/config/configuration.yml
production:
  email_delivery_method: "smtp"
  smtp_enable_starttls_auto: true
  smtp_address: "mail.my-domain.net"
  smtp_port: 587
  smtp_domain: "mail.my-domain.net"
  smtp_authentication: :plain
  smtp_openssl_verify_mode: "none"
  smtp_user_name: itms@my-domain.net
  smtp_password: Yw:y834Wkf
  • openproject run check
[openproject@SERVER ~]$  openproject run check
[ok] MySQL configuration is working
[ok] Web server is running
[ok] openproject server is running
[ok] openproject background job worker is running
sending test email using SMTP...
Traceback (most recent call last):
        3: from /opt/openproject/packaging/scripts/send-test-email:39:in `<main>'
        2: from /opt/openproject/vendor/ruby-2.7.1/lib/ruby/2.7.0/net/smtp.rb:524:in `start'
        1: from /opt/openproject/vendor/ruby-2.7.1/lib/ruby/2.7.0/net/smtp.rb:546:in `do_start'
/opt/openproject/vendor/ruby-2.7.1/lib/ruby/2.7.0/net/smtp.rb:777:in `check_auth_args': SMTP-AUTH requested but missing user name (ArgumentError)
[ko] unable to send test email to my.name@domain.net

Thanks if someone can help on this! Trying to send a mail from the Web UI works just fine.

RE: Email Notifications Not Sending - Added by Johnny De Proost over 4 years ago

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

RE: Email Notifications Not Sending - Added by Cyril Rohr over 4 years ago

@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?

RE: Email Notifications Not Sending - Added by Mario Patov over 4 years ago

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 run openproject reconfigure which I finally did and followed by restart it solved my problem. 

Thank you for your prompt reply!

  • (1 - 4/4)
Loading...