Top Menu

Jump to content
  • OpenProject
    • View all projects
Home
    • Projects
    • Work packages
    • News
    • Getting started
    • Introduction video

      Welcome to OpenProject Community

      Get an overview

      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

Side Menu

  • Overview
  • Activity
  • Roadmap
  • Work packages
  • Calendars
  • Team planners
  • Boards
  • Forums
  • Wiki
    • Table of contents
      • Erweitert. Klicken Sie zum AusblendenAusgeblendet. Klicken Sie zum AnzeigenDeveloper
        • Hierarchie-BlattAccessibility Checklist
        • Hierarchie-BlattCode Review Guidelines
        • Erweitert. Klicken Sie zum AusblendenAusgeblendet. Klicken Sie zum AnzeigenContribution
          • Hierarchie-BlattGit Workflow
          • Hierarchie-BlattTranslations
        • Erweitert. Klicken Sie zum AusblendenAusgeblendet. Klicken Sie zum AnzeigenDeveloping Plugins
          • Hierarchie-BlattDeveloping an OmniAuth Authentication Plugin
        • Hierarchie-BlattRelease Process
        • Hierarchie-BlattReport a bug
        • Hierarchie-BlattSecurity
        • Hierarchie-BlattSetting up an OpenLDAP server for testing
        • Hierarchie-BlattTheme Features
      • Hierarchie-BlattDownload
      • Erweitert. Klicken Sie zum AusblendenAusgeblendet. Klicken Sie zum AnzeigenFeature tour
        • Hierarchie-BlattRelease Notes OpenProject 30
        • Erweitert. Klicken Sie zum AusblendenAusgeblendet. Klicken Sie zum AnzeigenRelease Notes OpenProject 30 - Overview
          • Hierarchie-BlattGlossary
          • Hierarchie-BlattRelease Notes - Accessibility
          • Hierarchie-BlattRelease Notes - Accessibility changes
          • Hierarchie-BlattRelease Notes - Add work package queries as menu items to sidebar
          • Hierarchie-BlattRelease Notes - Copy projects based on Templates
          • Hierarchie-BlattRelease Notes - Design changes
          • Hierarchie-BlattRelease Notes - Fixed Bugs
          • Hierarchie-BlattRelease Notes - Keyboard Shortcuts
          • Hierarchie-BlattRelease Notes - Project settings
          • Hierarchie-BlattRelease Notes - Ruby&Rails Update
          • Hierarchie-BlattRelease Notes - Security
          • Hierarchie-BlattRelease Notes - Timelines
          • Hierarchie-BlattRelease Notes - Work packages
      • Hierarchie-BlattHowto create animated gifs
      • Hierarchie-BlattMigration Squashing
      • Hierarchie-BlattMod security
      • Hierarchie-BlattNew work package page
      • Hierarchie-BlattOP3 to OP4 Debian upgrade
      • Hierarchie-BlattOP4 Ubuntu1404 Stable with MySQL in production
      • Hierarchie-BlattOpenProject 40 Development Setup
      • Erweitert. Klicken Sie zum AusblendenAusgeblendet. Klicken Sie zum AnzeigenOpenProject Foundation
        • Hierarchie-BlattBoards
        • Hierarchie-BlattMembers
        • Hierarchie-BlattOPF-Meetings
        • Hierarchie-BlattStatutes
      • Erweitert. Klicken Sie zum AusblendenAusgeblendet. Klicken Sie zum AnzeigenRelease Notes
        • Hierarchie-BlattOpenProject released on Bitnami
      • Erweitert. Klicken Sie zum AusblendenAusgeblendet. Klicken Sie zum AnzeigenRelease Notes OpenProject 40 - Overview
        • Hierarchie-BlattRelease Notes OpenProject 40 - Accessibility improvements
        • Hierarchie-BlattRelease Notes OpenProject 40 - Column header functions in work package table
        • Hierarchie-BlattRelease Notes OpenProject 40 - Improved Design
        • Hierarchie-BlattRelease Notes OpenProject 40 - Integrated query title on work package page
        • Hierarchie-BlattRelease Notes OpenProject 40 - Integrated toolbar on work package page
        • Hierarchie-BlattRelease Notes OpenProject 40 - OmniAuth integration for OpenProject
        • Hierarchie-BlattRelease Notes OpenProject 40 - Work package details pane
      • Erweitert. Klicken Sie zum AusblendenAusgeblendet. Klicken Sie zum AnzeigenSecurity and privacy
        • Hierarchie-BlattFAQ
      • Erweitert. Klicken Sie zum AusblendenAusgeblendet. Klicken Sie zum AnzeigenSupport
        • Erweitert. Klicken Sie zum AusblendenAusgeblendet. Klicken Sie zum AnzeigenDownload and Installation
          • Hierarchie-BlattInstallation MacOS
          • Erweitert. Klicken Sie zum AusblendenAusgeblendet. Klicken Sie zum AnzeigenInstallation OpenProject 3 0
            • Hierarchie-BlattDebian Stable with MySQL in production
            • Hierarchie-BlattInstallation Ubuntu
            • Hierarchie-BlattInstallation Windows
            • Hierarchie-BlattInstallation on Centos 65 x64 with Apache and PostgreSQL 93
          • Erweitert. Klicken Sie zum AusblendenAusgeblendet. Klicken Sie zum AnzeigenInstallation OpenProject 40
            • Hierarchie-BlattOP4 Debian Stable with MySQL in production
          • Erweitert. Klicken Sie zum AusblendenAusgeblendet. Klicken Sie zum AnzeigenMigration paths
            • Hierarchie-BlattFrom Chilliproject to OpenProject
            • Hierarchie-BlattMigration 15 to 30
            • Hierarchie-BlattMigration 24 to 30
            • Hierarchie-BlattMigration Redmine 2x › OpenProject 30
            • Hierarchie-BlattOpenProject 3 Migration
          • Hierarchie-BlattOpenProject 40
        • Erweitert. Klicken Sie zum AusblendenAusgeblendet. Klicken Sie zum AnzeigenNews
          • Hierarchie-BlattNew OpenProject Translations Plugin
          • Hierarchie-BlattNew Plugin on OpenProjectorg Local Avatars
          • Hierarchie-BlattNew design for OpenProject
          • Hierarchie-BlattNews Accessibility workshop for OpenProject
          • Hierarchie-BlattNews Glossary for OpenProject
          • Hierarchie-BlattNews Heartbleed fixed
          • Hierarchie-BlattNews Icon Fonts
          • Hierarchie-BlattNews OpenProject 30 Release
          • Hierarchie-BlattNews Release GitHub Integration Plugin
          • Hierarchie-BlattNews Success Story Deutsche Telekom
          • Hierarchie-BlattNews Timelines
          • Hierarchie-BlattOpenProject 3013 released
          • Hierarchie-BlattOpenProject 3017 released
          • Hierarchie-BlattOpenProject 40 released
          • Hierarchie-BlattOpenProject 40 will be coming soon
          • Hierarchie-BlattOpenProject 405 released
          • Hierarchie-BlattOpenProject and pkgrio
          • Hierarchie-BlattOpenProject news moved to a new blog
          • Hierarchie-BlattOpenProjectBitnami
          • Hierarchie-BlattPackager version with plugins released ("Community edition")
          • Hierarchie-BlattRegistration OpenProject-Foundation
          • Hierarchie-BlattRelease OpenProject AuthPlugins
          • Hierarchie-BlattUpdates on OpenProject
          • Hierarchie-BlattWe need your feedback for the the new fullscreen view for work packages
        • Hierarchie-BlattOpenProject Plug-Ins
      • Hierarchie-BlattWiki
You are here:
  • Forums
  • General discussion

Content

Issue with getting Email notifications

Added by Vadim TexNetwork almost 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 almost 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 almost 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 almost 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 almost 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 almost 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 almost 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 almost 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...