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 configuration issue

Email configuration issue

Added by Phason Electronics about 11 years ago

When I went through installation and initial configuration, I commented out the e-mail configuration section just to eliminate complications. Now that I’ve got things installed, I want to configure the e-mail. When I run comment the e-mail section of my configuration.yml file, I get the passenger “Web application could not be started” error with the following information.

(/home/openproject/openproject/config/configuration.yml): did not find expected key while parsing a block mapping at line 102 column 1 (Psych::SyntaxError)
  /home/svr1/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/psych.rb:370:in `parse'
  /home/svr1/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/psych.rb:370:in `parse_stream'
  /home/svr1/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/psych.rb:318:in `parse'
  /home/svr1/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/psych.rb:245:in `load'
  /home/svr1/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/psych.rb:464:in `block in load_file'
  /home/svr1/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/psych.rb:464:in `open'
  /home/svr1/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/psych.rb:464:in `load_file'
  /home/openproject/openproject/lib/open_project/configuration.rb:145:in `load_config_from_file'
  /home/openproject/openproject/lib/open_project/configuration.rb:79:in `load'
  /home/openproject/openproject/lib/open_project/configuration.rb:104:in `[]'
  /home/openproject/openproject/config/application.rb:130:in `<class:Application>'
  /home/openproject/openproject/config/application.rb:63:in `<module:OpenProject>'
  /home/openproject/openproject/config/application.rb:62:in `<top (required)>'
  /home/openproject/openproject/config/environment.rb:32:in `require'
  /home/openproject/openproject/config/environment.rb:32:in `<top (required)>'
  config.ru:32:in `require'
  config.ru:32:in `block in <main>'
  /home/svr1/.rvm/gems/ruby-2.1.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
  /home/svr1/.rvm/gems/ruby-2.1.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
  config.ru:1:in `new'
  config.ru:1:in `<main>'
  /home/svr1/.rvm/gems/ruby-2.1.1/gems/passenger-4.0.37/helper-scripts/rack-preloader.rb:112:in `eval'
  /home/svr1/.rvm/gems/ruby-2.1.1/gems/passenger-4.0.37/helper-scripts/rack-preloader.rb:112:in `preload_app'
  /home/svr1/.rvm/gems/ruby-2.1.1/gems/passenger-4.0.37/helper-scripts/rack-preloader.rb:158:in `<module:App>'
  /home/svr1/.rvm/gems/ruby-2.1.1/gems/passenger-4.0.37/helper-scripts/rack-preloader.rb:29:in `<module:PhusionPassenger>'
  /home/svr1/.rvm/gems/ruby-2.1.1/gems/passenger-4.0.37/helper-scripts/rack-preloader.rb:28:in `<main>'

I have read through the e-mail configuration in some different instructions. I have seen it formatted differently in some of them. I have attached my configuration file. What am I doing incorrectly?


Replies (4)

RE: Email configuration issue - Added by Philipp Tessenow about 11 years ago

White space is important for .yml files — it might be the indentation which needs a fix

default:
# default configuration options for all environments
# Outgoing emails configuration (see examples above)
  email_delivery_method: smtp
  smtp_address: mail.domain.com
  smtp_port: 587
  smtp_domain: domain.com
  smtp_authentication: :login
  smtp_user_name: openproject@domain.com
  smtp_password: password

note that there are exactly two spaces (not 5) in front of the smtp settings.

RE: Email configuration issue - Added by Phason Electronics about 11 years ago

I did not know that.

I went back and re-copied the configuration.yml.example and then edited it again. The spacing and format is exactly as it is in the example. The only changes I have made to the configuration file are modifying the e-mail settings and enabling the memcache on line 146. I attached the file again, after re-copying it.

One thing I noticed is that the example has quotation marks around the username and password. It doesn’t work for me at the moment either way, but are the quotation marks necessary?

This time I also attached the complete passenger error text.

Is there something else that I have not installed or configured correctly

RE: Email configuration issue - Added by Phason Electronics about 11 years ago

I got past the passenger error. Here is the format I have for the e-mail configuration in the configuration.yml file.

# default configuration options for all environments
# Outgoing emails configuration (see examples above)
default:
    email_delivery: 
    delivery_method: :smtp
    smtp_address: mail.domain.com
    smtp_port: 25
    smtp_domain: domain.com
    smtp_authentication: :login
    smtp_user_name: "openproject@domain.com"
    smtp_password: "MyPassword"

However, when I try to do something in open project that requires sending an e-mail notification, I get a 500 error. When I check the log, this is what it says.

Connecting to database specified by database.yml
Creating scope :open. Overwriting existing method WorkPackage.open.
Creating scope :like. Overwriting existing method Principal.like.
Creating scope :open. Overwriting existing method Version.open.
Creating scope :public. Overwriting existing method Project.public.
127.0.0.1:11211 failed (count: 0)
Started GET "/projects/get-this-thing-running/work_packages/new" for 192.168.1.177 at 2014-03-07 11:27:59 -0600
Processing by WorkPackagesController#new as HTML
  Parameters: {"project_id"=>"get-this-thing-running"}
Redirected to http://192.168.1.16:3000/login?back_url=http%3A%2F%2F192.168.1.16%3A3000%2Fprojects%2Fget-this-thing-running%2Fwork_packages%2Fnew%3F
Filter chain halted as :authorize rendered or redirected
Completed 302 Found in 235.1ms (ActiveRecord: 36.1ms)
Started GET "/login?back_url=http%3A%2F%2F192.168.1.16%3A3000%2Fprojects%2Fget-this-thing-running%2Fwork_packages%2Fnew%3F" for 192.168.1.177 at 2014-03-07 11:27:59 -0600
Processing by AccountController#login as HTML
  Parameters: {"back_url"=>"http://192.168.1.16:3000/projects/get-this-thing-running/work_packages/new?"}
  Rendered account/login.html.erb within layouts/base (11.4ms)
  Rendered search/_mini_form.html.erb (2.1ms)
  Rendered account/_login.html.erb (5.8ms)
  Rendered layouts/_action_menu.html.erb (0.4ms)
Completed 200 OK in 235.6ms (Views: 226.5ms | ActiveRecord: 6.7ms)
Started POST "/login" for 192.168.1.177 at 2014-03-07 11:28:13 -0600
Processing by AccountController#login as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"YoIfH6fL8a7psppIDqKYNa0o3KViimDLqAgs8Copiy4=", "back_url"=>"http%3A%2F%2F192.168.1.16%3A3000%2Fprojects%2Fget-this-thing-running%2Fwork_packages%2Fnew%3F", "username"=>"cji", "password"=>"[FILTERED]", "login"=>"Login"}
Redirected to http://192.168.1.16:3000/projects/get-this-thing-running/work_packages/new?
Completed 302 Found in 135.2ms (ActiveRecord: 85.6ms)
Started GET "/projects/get-this-thing-running/work_packages/new" for 192.168.1.177 at 2014-03-07 11:28:13 -0600
Processing by WorkPackagesController#new as HTML
  Parameters: {"project_id"=>"get-this-thing-running"}
  Rendered work_packages/_two_column_attributes.html.erb (1.0ms)
  Rendered work_packages/_attributes.html.erb (58.2ms)
  Rendered attachments/_form.html.erb (3.7ms)
  Rendered work_packages/_form.html.erb (111.1ms)
  Rendered work_packages/new.html.erb within layouts/base (128.1ms)
  Rendered search/_mini_form.html.erb (0.6ms)
  Rendered layouts/_action_menu.html.erb (0.1ms)
Completed 200 OK in 275.6ms (Views: 197.9ms | ActiveRecord: 26.5ms)
Started GET "/projects/get-this-thing-running/work_packages/new_type?utf8=%E2%9C%93&authenticity_token=Gzu1V8Ad1LgnSwOfQN0w4ebKhlWZI%2BEkrJzcAHs29TQ%3D&work_package%5Btype_id%5D=6&work_package%5Bsubject%5D=&work_package%5Bparent_id%5D=&work_package%5Bdescription%5D=&work_package%5Bstatus_id%5D=1&work_package%5Bpriority_id%5D=2&work_package%5Bassigned_to_id%5D=&work_package%5Bresponsible_id%5D=&work_package%5Bstart_date%5D=&work_package%5Bdue_date%5D=&work_package%5Bestimated_hours%5D=&work_package%5Bdone_ratio%5D=0&attachments%5B1%5D%5Bdescription%5D=&send_notification=0&send_notification=1&commit=Create&authenticity_token=Gzu1V8Ad1LgnSwOfQN0w4ebKhlWZI%2BEkrJzcAHs29TQ%3D" for 192.168.1.177 at 2014-03-07 11:28:18 -0600
Processing by WorkPackagesController#new_type as JS
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"Gzu1V8Ad1LgnSwOfQN0w4ebKhlWZI+EkrJzcAHs29TQ=", "work_package"=>{"type_id"=>"6", "subject"=>"", "parent_id"=>"", "description"=>"", "status_id"=>"1", "priority_id"=>"2", "assigned_to_id"=>"", "responsible_id"=>"", "start_date"=>"", "due_date"=>"", "estimated_hours"=>"", "done_ratio"=>"0"}, "attachments"=>{"1"=>{"description"=>""}}, "send_notification"=>"1", "commit"=>"Create", "project_id"=>"get-this-thing-running"}
  Rendered work_packages/_two_column_attributes.html.erb (1.0ms)
  Rendered work_packages/_attributes.html.erb (39.9ms)
  Rendered work_packages/new_type.html.erb (41.5ms)
Completed 200 OK in 99.0ms (Views: 68.4ms | ActiveRecord: 6.1ms)
Started POST "/projects/get-this-thing-running/work_packages" for 192.168.1.177 at 2014-03-07 11:28:35 -0600
Processing by WorkPackagesController#create as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"Gzu1V8Ad1LgnSwOfQN0w4ebKhlWZI+EkrJzcAHs29TQ=", "work_package"=>{"type_id"=>"6", "subject"=>"Stable version release", "parent_id"=>"", "description"=>"Installed stable version 3.0.0.", "status_id"=>"1", "priority_id"=>"2", "assigned_to_id"=>"", "responsible_id"=>"", "start_date"=>"2014-03-07", "due_date"=>"2014-03-07", "estimated_hours"=>"", "done_ratio"=>"0", "watcher_user_ids"=>["3", "4"]}, "attachments"=>{"1"=>{"description"=>""}}, "send_notification"=>"1", "commit"=>"Create", "project_id"=>"get-this-thing-running"}
  Rendered user_mailer/_issue_details.html.erb (11.5ms)
  Rendered user_mailer/work_package_added.html.erb within layouts/user_mailer (16.9ms)
  Rendered user_mailer/_issue_details.text.erb (3.6ms)
  Rendered user_mailer/work_package_added.text.erb within layouts/user_mailer (5.0ms)

Sent mail to  (7.3ms)
  Rendered user_mailer/_issue_details.html.erb (3.2ms)
  Rendered user_mailer/work_package_added.html.erb within layouts/user_mailer (3.6ms)
  Rendered user_mailer/_issue_details.text.erb (2.5ms)
  Rendered user_mailer/work_package_added.text.erb within layouts/user_mailer (2.7ms)

Sent mail to joelseys@phason.ca (9.9ms)
Completed 500 Internal Server Error in 398.4ms

Errno::ECONNREFUSED (Connection refused - connect(2) for "localhost" port 25):
  app/models/work_package_observer.rb:38:in `block in after_create'
  app/models/work_package_observer.rb:37:in `each'
  app/models/work_package_observer.rb:37:in `after_create'
  app/controllers/work_packages_controller.rb:144:in `create'

I have tried setting the smtp_port in the configuration file to 30 and 587, but the error message is the same, including the port.

RE: Email configuration issue - Added by Phason Electronics about 11 years ago

I am still stumped on this e-mail issue and have not gotten any farther. Is there something I have done incorrectly, or that I can try?

Regards,
Chris

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