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

General discussion
  1. OpenProject
  2. Forums
  3. General discussion
  4. Ticket notification via e-mail

Ticket notification via e-mail

Added by Niels Przybilla almost 10 years ago

Hello,

we use the 4.2.0 Alpha.

Generally e-mail sending works. We get new account mails.

But ticket notifications are not send send.

I set it up for the user, in the ticket the e-mail notification is also activated.

Any idea where i can search to resolve this issue ?

Best wishes

Niels


Replies (23)

RE: Ticket notification via e-mail - Added by Jens Ulferts almost 10 years ago

Hi Niels,

as far as I can tell from the distance, you stumbled over one of the most common installation difficulties - setting up the background jobs. Work package updates are notified via background jobs for which you have to start delayed job. Please follow the installation instructions under “Activate Background Jobs”.

Kind regards

Jens

RE: Ticket notification via e-mail - Added by Niels Przybilla almost 10 years ago

hello jens,

the background jobs are running ever minute, but still no e-mails …

here a manual run:

openproject@openproject:~/openproject$ cd /home/openproject/openproject; /home/openproject/.rvm/gems/ruby-2.1.5/wrappers/rake jobs:workoff
require ‘rails/all’… 0.440s
Bundler.require… 2.160s
Application.initialize!… 1.760s
[Worker(host:openproject pid:8750)] Starting job worker
[Worker(host:openproject pid:8750)] No more jobs available. Exiting
Sie haben neue Post in /var/mail/openproject.

Anymore ideas ?

Best wishes

Niels

RE: Ticket notification via e-mail - Added by Jens Ulferts almost 10 years ago

Hi Niels,

what happens if you specify the rails environment to be production like this:

openproject@openproject:~/openproject$ cd /home/openproject/openproject; /home/openproject/.rvm/gems/ruby-2.1.5/wrappers/rake RAILS_ENV=production jobs:workoff

Regards

Jens

RE: Ticket notification via e-mail - Added by Mihai Badici almost 10 years ago

this time it made some progress
I found that in logs:
2015-06-09T10:16:25+0200: [Worker(delayed_job host:openproject pid:14695)] DeliverWorkPackageUpdatedJob failed with OpenSSL::SSL::SSLError: hostname “localhost” does not match the server certificate - 9 failed attempts

That’s look normal because is an self-signed certificate but i can send test e-mails from configuration menu.
I will take a look and come back

RE: Ticket notification via e-mail - Added by Mihai Badici almost 10 years ago

It still complaint about certificate.
This is (i hope) the relevant part of configuration.yml
we use apache with passenger, after each change in config i restart apache2, that’s correct?

cat config/configuration.yml
production:

email_delivery_method: “smtp”
smtp_address: ‘myserver’

  1. smtp_enable_starttls_auto: ‘false’
  2. smtp_ssl: ‘false’
    smtp_authentication: :login
    smtp_openssl_verify_mode: ‘none’
    smtp_user_name: “myuser”
    smtp_password: “mypass”
    smtp_domain: ‘mydomain’

Still
9:42 +0200>, <From: openproject@sf-solutions.net>, <To: np@sf-solutions.net>, <Message-ID: <openproject.work_package-6-3.20150609083453@sf-solutions.net>>, <References: <openproject.work_package-6-3.20150607082335@sf-solutions.net>>, <Subject: [SF-Admin-Work - Feature #3] Create sieverule on mailserver>, <Mime-Version: 1.0>, <Content-Type: multipart/alternative; boundary=“—==_mimepart_5576a64e80ba2_396794732014201d”; charset=UTF-8>, <Content-Transfer-Encoding: 7bit>, <X-OpenProject-Project: sf-admin-work>, <X-OpenProject-Issue-Id: 3>, <X-OpenProject-Issue-Author: niels>, <X-OpenProject-Type: WorkPackage>, <X-OpenProject-Issue-Assignee: mbadici>, <X-Mailer: OpenProject>, <X-OpenProject-Host: pm.sf-solutions.net>, <X-OpenProject-Site: SF-Solutions Project Management>, <Precedence: bulk>, <Auto-Submitted: auto-generated>>>): hostname “localhost” does not match the server certificate
2015-06-09T10:39:42+0200: [Worker(delayed_job host:openproject pid:14695)] DeliverWorkPackageUpdatedJob failed with OpenSSL::SSL::SSLError: hostname “localhost” does not match the server certificate - 5 failed attempts
2015-06-09T10:39:42+0200: [Worker(delayed_job host:openproject pid:14695)] 4 jobs processed at 7.3988 j/s, 4 failed …

RE: Ticket notification via e-mail - Added by Mihai Badici almost 10 years ago

Din on google and found i need to run ./script/delayed_job .
It works after restart.
Many thanks!

RE: Ticket notification via e-mail - Added by Kendell Welch almost 10 years ago

I think I’m having this same problem…however, I used the packaged installer for openproject-ce (Debian Wheezy) and the paths are all different.

I’ve tried various combinations, but none have worked, even on the command line.

Running this on the command line:
cd /opt/openproject-ce; /opt/openproject-ce/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/bin/rake jobs:workoff

returns:
/usr/bin/env: ruby: No such file or directory

Please Help :)

Thanks
Kendell

RE: Ticket notification via e-mail - Added by Kendell Welch almost 10 years ago

Also, running “openproject-ce run check” returns:

[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…
[ok] test email sent to administrator@epiworks.com

I do receive the email, so I’m pretty confident the config is correct…it’s just a cron thing.

RE: Ticket notification via e-mail - Added by Jens Ulferts almost 10 years ago

Hi Kendell,

it looks as if ruby is not part of your PATH environment variable. If so you need to specify it in your .bashrc or .profile. Can you please post the result of

which ruby

Kind regards

Jens

RE: Ticket notification via e-mail - Added by Kendell Welch almost 10 years ago

“which ruby” runs, but returns nothing at all…just jumps to the next command line.

a “locate ruby” finds a bunch of stuff at:
/opt/openproject-ce/vendor/ruby-2.1.5/lib/ruby/2.1.0/

Maybe that’s where I should be pointing?

Again, this was installed using the packaged installer…there are no instructions on the directions for that for setting up a cron job.

Thanks!
Kendell

RE: Ticket notification via e-mail - Added by Jens Ulferts almost 10 years ago

Hi Kendell,

let’s try this differently. My colleagues informed me that you need to call ruby via openproject-ce so

openproject-ce run ruby --version

should work.

That would mean that you should try running:

cd /opt/openproject-ce; openproject-ci run /opt/openproject-ce/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/bin/rake jobs:workoff

Does this help?

RE: Ticket notification via e-mail - Added by Kendell Welch almost 10 years ago

Result from “openproject-ce run ruby —version”:
ruby 2.1.5p273 (2014-11-13 revision 48405) [x86_64-linux]

Ran the following from the command line:
cd /opt/openproject-ce; openproject-ce run /opt/openproject-ce/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/bin/rake jobs:workoff

Result:

require ‘rails/all’… 0.450s
Bundler.require… 1.840s
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /opt/openproject-ce/Rakefile:35)
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /opt/openproject-ce/Rakefile:35)
Application.initialize!… [deprecated] I18n.enforce_available_locales will default to true in the future. If you really want to skip validation of your locale you can set I18n.enforce_available_locales = false to avoid this message.
/opt/openproject-ce/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/bin/rake: No such file or directory - git
2.620s
[Worker(host:openproject pid:3751)] Starting job worker
[Worker(host:openproject pid:3751)] No more jobs available. Exiting

RE: Ticket notification via e-mail - Added by Jens Ulferts almost 10 years ago

Great, we are getting somewhere.

Now do the same with

cd /opt/openproject-ce; openproject-ce run /opt/openproject-ce/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/bin/rake RAILS_ENV=production jobs:workoff

RAILS_ENV=production added.

If that actually sends out your missing mail then you can configure this in your crontab.

RE: Ticket notification via e-mail - Added by Kendell Welch almost 10 years ago

I think we’re closer, but I think there’s still an issue with git:

require ‘rails/all’… 0.440s
Bundler.require… 1.850s
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /opt/openproject-ce/Rakefile:35)
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /opt/openproject-ce/Rakefile:35)
Application.initialize!… [deprecated] I18n.enforce_available_locales will default to true in the future. If you really want to skip validation of your locale you can set I18n.enforce_available_locales = false to avoid this message.
fatal: Not a git repository (or any of the parent directories): .git
2.640s
[Worker(host:openproject pid:6256)] Starting job worker
[Worker(host:openproject pid:6256)] No more jobs available. Exiting


I have “git version 1.7.10.4” which I just installed using apt-get.

RE: Ticket notification via e-mail - Added by Jens Ulferts almost 10 years ago

Hm, I have no clue why git would join the game here. It shouldn’t.

My colleagues tell me that the openproject-ce bundled version should have a procfile that also starts jobs:workoff. Can you please try this approach?

RE: Ticket notification via e-mail - Added by Kendell Welch almost 10 years ago

I’d be happy to try what you ask, but I have no idea what you’re talking about - procfile?

RE: Ticket notification via e-mail - Added by Kendell Welch almost 10 years ago

OK. I think I found the procfile. What do I do with it?

RE: Ticket notification via e-mail - Added by Kendell Welch almost 10 years ago

Is there any movement on this? I need to get this working.

RE: Ticket notification via e-mail - Added by Jens Ulferts almost 10 years ago

Hi Kendell,

can you please post the command you are issuing to receive the stack trace?

Kind regards

Jens

RE: Ticket notification via e-mail - Added by Kendell Welch almost 10 years ago

cd /opt/openproject-ce; openproject-ce run /opt/openproject-ce/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/bin/rake RAILS_ENV=production jobs:workoff

RE: Ticket notification via e-mail - Added by Jens Ulferts almost 10 years ago

The command you posted and the console output you showed both look good. Therefore, I think that this part works. Can you please try to do the following:

1) Go into OpenProject -> “My Account” verify your mail address and uncheck “I don’t want to be notified about changes that I make myself”
2) Go to “Administration” -> “Settings” -> “Email notifications” and click the “Send a test email” link.

Do you receive a test mail then?

RE: Ticket notification via e-mail - Added by Kendell Welch almost 10 years ago

Don’t ask me how, but email notifications just started working for me. Weird.

RE: Ticket notification via e-mail - Added by Jens Ulferts almost 10 years ago

Glad to hear that, Kendell.

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