Content
Email updates - Not sending, however no apparent error
Added by David Worthington over 9 years ago
Hi All,
I am very new to Open Project and have gone through and attempted to setup email notifications. I had initial issues with spacing etc in the configuration.ml file, which were subsequently resolved and email updates where working for a while using a no-reply@mydomain.com (Gmail account fyi).
However I decided in my ultimate wisdom that would like to change to Emission Email Address (Administration > Settings >Email notifications) to openproject@mydomain.com and email updates stopped working. I changed the email address back to the account address of no-replymydomain.com however this has not resolved the issue.
If I use the “Send a test email” link on the bottom an email will send fine.
I am sure the emails are not being sent as I can log into the Gmail account and see that there are no emails being sent, however I do see ones previous to the change above and the test emails.
The only other time it seems to work is if I create a new work package. However changes to existing / already setup work packages do no. I have checked all the “Select actions for which email notifications should be sent” in the ‘Email Notification’ configuration page.
Any help appreciated.
Replies (6)
Hi David,
seems to me that the process which is responsible to handle emails asynchron is not working properly. You should have a deamon running called delayed_job. What is the output of
ps ax | grep delayed
?How did you install OpenProject? For the packaged installation you can try
openproject run script/delayed_job restart
to fix the issue.Cheers,
Karsten
Hi Karsten,
I am using a Bitnami VM installation. Her is the output of that command
bitnami@linux:~$ ps ax | grep delayed
3497 pts/0 S+ 0:00 grep delayed
I just just tried the delayed_job restart as above and got the following output?
bitnami@linux:~$ /opt/bitnami/apps/openproject/htdocs/script/delayed_job restart
require ‘rails/all’… 0.680s
Bundler.require… 2.540s
Application.initialize!… Rails Error: Unable to access log file. Please ensure that /opt/bitnami/apps/openproject/htdocs/log/development.log exists and is chmod 0666. The log level has been raised to WARN and the output directed to STDERR until the problem is fixed.
[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/bitnami/apps/openproject/htdocs/vendor/bundle/ruby/2.0.0/gems/mysql2-0.3.11/lib/mysql2/client.rb:44:in `connect’: Access denied for user ‘bn_openproject’@‘localhost’ to database ‘bitnami_openproject_development’ (Mysql2::Error)
from /opt/bitnami/apps/openproject/htdocs/vendor/bundle/ruby/2.0.0/gems/mysql2-0.3.11/lib/mysql2/client.rb:44:in `initialize’
from /opt/bitnami/apps/openproject/htdocs/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.21/lib/active_record/connection_adapters/mysql2_adapter.rb:16:in `new’
from /opt/bitnami/apps/openproject/htdocs/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.21/lib/active_record/connection_adapters/mysql2_adapter.rb:16:in `mysql2_connection’
from /opt/bitnami/apps/openproject/htdocs/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.21/lib/active_record/connection_adapters/abstract/connection_pool.rb:315:in `new_connection’
from /opt/bitnami/apps/openproject/htdocs/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.21/lib/active_record/connection_adapters/abstract/connection_pool.rb:325:in `checkout_new_connection’
from /opt/bitnami/apps/openproject/htdocs/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.21/lib/active_record/connection_adapters/abstract/connection_pool.rb:247:in `block (2 levels) in checkout’
from /opt/bitnami/apps/openproject/htdocs/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.21/lib/active_record/connection_adapters/abstract/connection_pool.rb:242:in `loop’
from /opt/bitnami/apps/openproject/htdocs/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.21/lib/active_record/connection_adapters/abstract/connection_pool.rb:242:in `block in checkout’
from /opt/bitnami/ruby/lib/ruby/2.0.0/monitor.rb:211:in `mon_synchronize’
from /opt/bitnami/apps/openproject/htdocs/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.21/lib/active_record/connection_adapters/abstract/connection_pool.rb:239:in `checkout’
from /opt/bitnami/apps/openproject/htdocs/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.21/lib/active_record/connection_adapters/abstract/connection_pool.rb:102:in `block in connection’
from /opt/bitnami/ruby/lib/ruby/2.0.0/monitor.rb:211:in `mon_synchronize’
from /opt/bitnami/apps/openproject/htdocs/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.21/lib/active_record/connection_adapters/abstract/connection_pool.rb:101:in `connection’
from /opt/bitnami/apps/openproject/htdocs/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.21/lib/active_record/connection_adapters/abstract/connection_pool.rb:410:in `retrieve_connection’
from /opt/bitnami/apps/openproject/htdocs/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.21/lib/active_record/connection_adapters/abstract/connection_specification.rb:171:in `retrieve_connection’
from /opt/bitnami/apps/openproject/htdocs/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.21/lib/active_record/connection_adapters/abstract/connection_specification.rb:145:in `connection’
from /opt/bitnami/apps/openproject/htdocs/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.21/lib/active_record/model_schema.rb:224:in `table_exists?’
from /opt/bitnami/apps/openproject/htdocs/config/initializers/30-redmine.rb:32:in `<top (required)>’
from /opt/bitnami/apps/openproject/htdocs/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.21/lib/active_support/dependencies.rb:245:in `load’
from /opt/bitnami/apps/openproject/htdocs/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.21/lib/active_support/dependencies.rb:245:in `block in load’
from /opt/bitnami/apps/openproject/htdocs/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.21/lib/active_support/dependencies.rb:236:in `load_dependency’
from /opt/bitnami/apps/openproject/htdocs/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.21/lib/active_support/dependencies.rb:245:in `load’
from /opt/bitnami/apps/openproject/htdocs/vendor/bundle/ruby/2.0.0/gems/railties-3.2.21/lib/rails/engine.rb:593:in `block (2 levels) in class:Engine’
from /opt/bitnami/apps/openproject/htdocs/vendor/bundle/ruby/2.0.0/gems/railties-3.2.21/lib/rails/engine.rb:592:in `each’
from /opt/bitnami/apps/openproject/htdocs/vendor/bundle/ruby/2.0.0/gems/railties-3.2.21/lib/rails/engine.rb:592:in `block in class:Engine’
from /opt/bitnami/apps/openproject/htdocs/vendor/bundle/ruby/2.0.0/gems/railties-3.2.21/lib/rails/initializable.rb:30:in `instance_exec’
from /opt/bitnami/apps/openproject/htdocs/vendor/bundle/ruby/2.0.0/gems/railties-3.2.21/lib/rails/initializable.rb:30:in `run’
from /opt/bitnami/apps/openproject/htdocs/vendor/bundle/ruby/2.0.0/gems/railties-3.2.21/lib/rails/initializable.rb:55:in `block in run_initializers’
from /opt/bitnami/apps/openproject/htdocs/vendor/bundle/ruby/2.0.0/gems/railties-3.2.21/lib/rails/initializable.rb:54:in `each’
from /opt/bitnami/apps/openproject/htdocs/vendor/bundle/ruby/2.0.0/gems/railties-3.2.21/lib/rails/initializable.rb:54:in `run_initializers’
from /opt/bitnami/apps/openproject/htdocs/vendor/bundle/ruby/2.0.0/gems/railties-3.2.21/lib/rails/application.rb:136:in `initialize!’
from /opt/bitnami/apps/openproject/htdocs/vendor/bundle/ruby/2.0.0/gems/railties-3.2.21/lib/rails/railtie/configurable.rb:30:in `method_missing’
from /opt/bitnami/apps/openproject/htdocs/config/environment.rb:36:in `block in <top (required)>’
from /opt/bitnami/apps/openproject/htdocs/config/application.rb:44:in `block in bench’
from /opt/bitnami/ruby/lib/ruby/2.0.0/benchmark.rb:281:in `measure’
from /opt/bitnami/apps/openproject/htdocs/config/application.rb:43:in `bench’
from /opt/bitnami/apps/openproject/htdocs/config/environment.rb:34:in `<top (required)>’
from /opt/bitnami/ruby/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require’
from /opt/bitnami/ruby/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require’
from /opt/bitnami/apps/openproject/htdocs/script/delayed_job:3:in `
’
I am picking the above is not ideal?
Thanks
Hi,
please run the following command to start delayed_job:
@ RAILS_ENV=production /opt/bitnami/apps/openproject/htdocs/script/delayed_job restart@
That should at least solve the database problem. Please keep me posted if this solves the problem or not.
Cheers,
Karsten
Thanks Karsten,
I ran the command as above, however this has not seemed to resolved the issue. I updated several work packages (changed % completed, added notes etc) and still no record of the update emails being sent (Gmail SMTP) or receiving any. Here is the output from that command,
bitnami@linux:~$ RAILS_ENV=production /opt/bitnami/apps/openproject/htdocs/script/delayed_job restart
require ‘rails/all’… 0.670s
Bundler.require… 2.600s
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.
Error: secret_token empty!
Please set it with ENV variable ‘SECRET_TOKEN’ or
run ‘rake generate_secret_token’
Further to the above, I tried to run ’rake generate_secret_token as per the output but get this,
bitnami@linux:~$ sudo rake —trace generate_secret_token
[sudo] password for bitnami:
rake aborted!
No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb)
/opt/bitnami/ruby/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/application.rb:632:in `raw_load_rakefile’
/opt/bitnami/ruby/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/application.rb:94:in `block in load_rakefile’
/opt/bitnami/ruby/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/application.rb:165:in `standard_exception_handling’
/opt/bitnami/ruby/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/application.rb:93:in `load_rakefile’
/opt/bitnami/ruby/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/application.rb:77:in `block in run’
/opt/bitnami/ruby/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/application.rb:165:in `standard_exception_handling’
/opt/bitnami/ruby/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/application.rb:75:in `run’
/opt/bitnami/ruby/lib/ruby/gems/2.0.0/gems/rake-10.1.0/bin/rake:33:in `<top (required)>’
/opt/bitnami/ruby/bin/rake:23:in `load’
/opt/bitnami/ruby/bin/rake:23:in `
’
Hi David,
I just stumbled across this thread. Is it still valid?
To run a rake task you need to be in the folder of openproject. This should be
/opt/bitnami/apps/openproject
.Best,
Jonas