Top Menu

Jump to content
Home
    • Projects
    • Work packages
    • 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
    • User guides
    • Videos
    • Shortcuts
    • Community forum
    • Professional 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?
      Create a new account

      or sign in with your existing account

      Google

Side Menu

  • Overview
  • Activity
  • Roadmap
  • Work packages
  • Calendars
  • Team planners
  • Boards
  • Forums
  • Wiki
    • Table of contents
      • Expanded. Click to collapseCollapsed. Click to showDeveloper
        • Hierarchy leafAccessibility Checklist
        • Hierarchy leafCode Review Guidelines
        • Expanded. Click to collapseCollapsed. Click to showContribution
          • Hierarchy leafGit Workflow
          • Hierarchy leafTranslations
        • Expanded. Click to collapseCollapsed. Click to showDeveloping Plugins
          • Hierarchy leafDeveloping an OmniAuth Authentication Plugin
        • Hierarchy leafRelease Process
        • Hierarchy leafReport a bug
        • Hierarchy leafSecurity
        • Hierarchy leafSetting up an OpenLDAP server for testing
        • Hierarchy leafTheme Features
      • Hierarchy leafDownload
      • Expanded. Click to collapseCollapsed. Click to showFeature tour
        • Hierarchy leafRelease Notes OpenProject 30
        • Expanded. Click to collapseCollapsed. Click to showRelease Notes OpenProject 30 - Overview
          • Hierarchy leafGlossary
          • Hierarchy leafRelease Notes - Accessibility
          • Hierarchy leafRelease Notes - Accessibility changes
          • Hierarchy leafRelease Notes - Add work package queries as menu items to sidebar
          • Hierarchy leafRelease Notes - Copy projects based on Templates
          • Hierarchy leafRelease Notes - Design changes
          • Hierarchy leafRelease Notes - Fixed Bugs
          • Hierarchy leafRelease Notes - Keyboard Shortcuts
          • Hierarchy leafRelease Notes - Project settings
          • Hierarchy leafRelease Notes - Ruby&Rails Update
          • Hierarchy leafRelease Notes - Security
          • Hierarchy leafRelease Notes - Timelines
          • Hierarchy leafRelease Notes - Work packages
      • Hierarchy leafHowto create animated gifs
      • Hierarchy leafMigration Squashing
      • Hierarchy leafMod security
      • Hierarchy leafNew work package page
      • Hierarchy leafOP3 to OP4 Debian upgrade
      • Hierarchy leafOP4 Ubuntu1404 Stable with MySQL in production
      • Hierarchy leafOpenProject 40 Development Setup
      • Expanded. Click to collapseCollapsed. Click to showOpenProject Foundation
        • Hierarchy leafBoards
        • Hierarchy leafMembers
        • Hierarchy leafOPF-Meetings
        • Hierarchy leafStatutes
      • Expanded. Click to collapseCollapsed. Click to showRelease Notes
        • Hierarchy leafOpenProject released on Bitnami
      • Expanded. Click to collapseCollapsed. Click to showRelease Notes OpenProject 40 - Overview
        • Hierarchy leafRelease Notes OpenProject 40 - Accessibility improvements
        • Hierarchy leafRelease Notes OpenProject 40 - Column header functions in work package table
        • Hierarchy leafRelease Notes OpenProject 40 - Improved Design
        • Hierarchy leafRelease Notes OpenProject 40 - Integrated query title on work package page
        • Hierarchy leafRelease Notes OpenProject 40 - Integrated toolbar on work package page
        • Hierarchy leafRelease Notes OpenProject 40 - OmniAuth integration for OpenProject
        • Hierarchy leafRelease Notes OpenProject 40 - Work package details pane
      • Expanded. Click to collapseCollapsed. Click to showSecurity and privacy
        • Hierarchy leafFAQ
      • Expanded. Click to collapseCollapsed. Click to showSupport
        • Expanded. Click to collapseCollapsed. Click to showDownload and Installation
          • Hierarchy leafInstallation MacOS
          • Expanded. Click to collapseCollapsed. Click to showInstallation OpenProject 3 0
            • Hierarchy leafDebian Stable with MySQL in production
            • Hierarchy leafInstallation Ubuntu
            • Hierarchy leafInstallation Windows
            • Hierarchy leafInstallation on Centos 65 x64 with Apache and PostgreSQL 93
          • Expanded. Click to collapseCollapsed. Click to showInstallation OpenProject 40
            • Hierarchy leafOP4 Debian Stable with MySQL in production
          • Expanded. Click to collapseCollapsed. Click to showMigration paths
            • Hierarchy leafFrom Chilliproject to OpenProject
            • Hierarchy leafMigration 15 to 30
            • Hierarchy leafMigration 24 to 30
            • Hierarchy leafMigration Redmine 2x › OpenProject 30
            • Hierarchy leafOpenProject 3 Migration
          • Hierarchy leafOpenProject 40
        • Expanded. Click to collapseCollapsed. Click to showNews
          • Hierarchy leafNew OpenProject Translations Plugin
          • Hierarchy leafNew Plugin on OpenProjectorg Local Avatars
          • Hierarchy leafNew design for OpenProject
          • Hierarchy leafNews Accessibility workshop for OpenProject
          • Hierarchy leafNews Glossary for OpenProject
          • Hierarchy leafNews Heartbleed fixed
          • Hierarchy leafNews Icon Fonts
          • Hierarchy leafNews OpenProject 30 Release
          • Hierarchy leafNews Release GitHub Integration Plugin
          • Hierarchy leafNews Success Story Deutsche Telekom
          • Hierarchy leafNews Timelines
          • Hierarchy leafOpenProject 3013 released
          • Hierarchy leafOpenProject 3017 released
          • Hierarchy leafOpenProject 40 released
          • Hierarchy leafOpenProject 40 will be coming soon
          • Hierarchy leafOpenProject 405 released
          • Hierarchy leafOpenProject and pkgrio
          • Hierarchy leafOpenProject news moved to a new blog
          • Hierarchy leafOpenProjectBitnami
          • Hierarchy leafPackager version with plugins released ("Community edition")
          • Hierarchy leafRegistration OpenProject-Foundation
          • Hierarchy leafRelease OpenProject AuthPlugins
          • Hierarchy leafUpdates on OpenProject
          • Hierarchy leafWe need your feedback for the the new fullscreen view for work packages
        • Hierarchy leafOpenProject Plug-Ins
      • Expanded. Click to collapseCollapsed. Click to showWiki
        • Hierarchy leaf2nd Level Support
You are here:
  • Forums
  • General discussion

Content

Issue with getting Email notifications

Added by Vadim TexNetwork over 6 years ago

Dear Community,

I have recently installed and successfully configured Open Project Core 5.0.19
Everything work fine, but I facing troubles with getting email notifications.

Email settings have been correctly configured, test email from System settings——-> Email notification works fine.
But, I haven’t got any notification during exploitation.

I ’ve been trying to register a new user, its showing that invitation has been sent,
but actually nothing came.

I have examined production.log, but was not able to find any tracks of sent emails. So, only test email works.

Please advise and assist, how can I fix this issue. I’ve spent all the day almost and tried everything.

Thanks


Replies (7)

RE: Issue with getting Email notifications - Added by Oliver Günther over 6 years ago

Hi Vadim,

how are you running the server? Do you use the packaged installation?

It sounds like the delayed_job worker is not running.

In a manual installation

  • make sure that you run it according to the documentation.
  • Open a console with RAILS_ENV=production bundle exec rails console and check the output of Delayed::Job.count. It should be zero or some small value depending on what changes you made to work packages in the last minutes, since notifications are aggregated and sent 5minutes later (by default).

In a packaged installation

  • assert that ps ax | grep jobs contains /opt/openproject/vendor/bundle/ruby/2.1.0/bin/rake jobs:work.
  • Open a console with openproject run console and check the output of Delayed::Job.count. It should be zero or some small value depending on what changes you made to work packages in the last minutes, since notifications are aggregated and sent 5minutes later (by default).

Best,
Oliver

RE: Issue with getting Email notifications - Added by Vadim TexNetwork over 6 years ago

Hello Oliver

Thank for reply. It seems delayed_job doesn’t really work.
I have executed commands as you advise and here is result. The output of Delayed::Job.count showing more than 40 jobs…
As I guess they haven’t been ever executed… So, I’ve tried to configure Delayed_jobs through CRON as described in Installation guide,
but there are some issues

1. According the installation manual, into the crontab should be added the following string

****/1 * * * * cd /home/openproject/openproject-ce; /home/openproject/.rvm/gems/ruby-2.1.5/wrappers/rake jobs:workoff*

but there is no folder /rvm in /home/openproject directory, however when I do manually rake jobs:workoff and getting

[Worker(host:h2574187.stratoserver.net pid:26807)] Starting job worker [Worker(host:h2574187.stratoserver.net pid:26807)] No more jobs available. Exiting

if trying rake jobs:work its showing
@
/home/openproject/openproject-ce/lib/open_project/configuration.rb:36: warning: already initialized constant OpenProject::Configuration::ENV_PREFIX
/home/openproject/openproject-ce/lib/open_project/configuration.rb:36: warning: previous definition of ENV_PREFIX was here
@

However, if i execute Delayed::Job.count it show that there are delayed_jobs still exist….

Can you please advise the correct syntax how to run the Delayed_job ?

Thanks.

RE: Issue with getting Email notifications - Added by Vadim TexNetwork over 6 years ago

Vadim TexNetwork wrote:

Hello Oliver

Thank for reply. It seems delayed_job doesn’t really work.
I have executed commands as you advise and here is result. The output of Delayed::Job.count showing more than 40 jobs…
As I guess they haven’t been ever executed… So, I’ve tried to configure Delayed_jobs through CRON as described in Installation guide,
but there are some issues

1. According the installation manual, into the crontab should be added the following string

****/1 * * * * cd /home/openproject/openproject-ce; /home/openproject/.rvm/gems/ruby-2.1.5/wrappers/rake jobs:workoff*

but there is no folder /rvm in /home/openproject directory, however when I do manually rake jobs:workoff and getting

[Worker(host:h2574187.stratoserver.net pid:26807)] Starting job worker [Worker(host:h2574187.stratoserver.net pid:26807)] No more jobs available. Exiting

if trying rake jobs:work its showing
@
/home/openproject/openproject-ce/lib/open_project/configuration.rb:36: warning: already initialized constant OpenProject::Configuration::ENV_PREFIX
/home/openproject/openproject-ce/lib/open_project/configuration.rb:36: warning: previous definition of ENV_PREFIX was here
@

However, if i execute Delayed::Job.count it show that there are delayed_jobs still exist….

Can you please advise the correct syntax how to run the Delayed_job ?

Thanks.

Additional info, I’ve installed and configured manually from source code.

RE: Issue with getting Email notifications - Added by Oliver Günther over 6 years ago

The output of rake jobs:work looks fine, however runs as an active process (waiting for jobs) rather than working off the jobs and exiting (as desired in a cron job).
Can you ensure that delayed_job uses the correct environment by trying RAILS_ENV=production bundle exec rake jobs:workoff and see what happens?

On a side note: Unless you’re on an unsupported distro, why aren’t you using the packaged installation?

Best,
Oliver

RE: Issue with getting Email notifications - Added by Vadim TexNetwork over 6 years ago

After executing RAILS_ENV=production bundle exec rake jobs:workoff all delayed have been executed successfully and all notification emails came as expected.
It works! Thank you.

Probably the issue was, just a command rake jobs:workoff executes jobs related to openproject_development database,
when specifying PRODUCTION environment it works fine.

Soo how can I change environment to production permanently and how to setup crontab?
Can i just put RAILS_ENV=production bundle exec rake jobs:workoff to crontab? would be it enough ?

RE: Issue with getting Email notifications - Added by Oliver Günther over 6 years ago

Hey Vadim,

you’re correct exactly. It appears that your Delayed::Job worker was running off the wrong (dev mode) database, which correctly caused it to see no pending jobs.

Appending the environment variable to the cron job is sufficient to switch the mode.

Best,
Oliver

RE: Issue with getting Email notifications - Added by Vadim TexNetwork over 6 years ago

Dear Oliver,

The issue has been solved and can be closed.
Everything works correctly.

Thanks again for the prompt and professional help !

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