Project

General

Profile

Application crashes after updating SMTP settings in configuration.yml

Added by Oliver Pugh almost 7 years ago

See below at bottom for all information.

Issue

I've copied configuration.yml.example over to configuration.ymp with cp. After that, I update the SMTP using Gmail settings in the configuration.yml file while uncommenting the section, keeping in mind to use 2 spaces and not tabs to keep the formatting. I end up with:

# ==== SMTP server at using TLS (GMail)
  # This might require some additional configuration. See the guides at:
  # http://www.redmine.org/projects/redmine/wiki/EmailConfiguration
  #
   email_delivery:
     delivery_method: :smtp
     smtp_settings:
       enable_starttls_auto: true
       address: "smtp.gmail.com" 
       port: 587
       domain: "smtp.gmail.com" # 'your.domain.com' for GoogleApps
       authentication: :plain
       user_name: "XXXXXXXXX@gmail.com" 
       password: "XXXXXXXX" 
  #

After saving this file and restarting nginx, i get the error "We're sorry but something went wrong" when trying to access Redmine via URL. Using tail -f /var/log/nginx/error.log produces the follow:

Redmine cannot checkout session because a spawning error occurred. The identifier of the error is ce0bccf1.

This is where I'm stuck. If I delete the configuration.yml file and replace it with a new copy of the configuration.yml.example (or comment everything out again), then the system returns to working.

Any thoughts? Thanks in advance.

Install Information

Redmine 3.4.4.stable

Default administrator account changed    YES
Attachments directory writable    YES
Plugin assets directory writable (./public/plugin_assets)     YES 
RMagick available (optional)      YES
ImageMagick convert available (optional)    YES

Environment:
  Redmine version                3.4.4.stable
  Ruby version                   2.3.1-p112 (2016-04-26) [x86_64-linux-gnu]
  Rails version                  4.2.8
  Environment                    production
  Database adapter               Mysql2
SCM:
  Git                            2.7.4
  Filesystem                     
Redmine plugins:   no plugin installed

Replies (2)

RE: Application crashes after updating SMTP settings in configuration.yml - Added by Mischa The Evil almost 7 years ago

Just to be sure. Make sure it looks like something like this (and scrub the trailing whitespaces):

# = Redmine configuration file
#
# Each environment has it's own configuration options.  If you are only
# running in production, only the production block needs to be configured.
# Environment specific configuration options override the default ones.
#
# Note that this file needs to be a valid YAML file.
# DO NOT USE TABS! Use 2 spaces instead of tabs for identation.

# default configuration options for all environments
default:
  # Outgoing emails configuration
  # See the examples below and the Rails guide for more configuration options:
  # http://guides.rubyonrails.org/action_mailer_basics.html#action-mailer-configuration
  # email_delivery:
  #
  # ...
  # ...
  #
  # ==== SMTP server at using TLS (GMail)
  # This might require some additional configuration. See the guides at:
  # http://www.redmine.org/projects/redmine/wiki/EmailConfiguration
  #
  email_delivery:
    delivery_method: :smtp
    smtp_settings:
      enable_starttls_auto: true
      address: "smtp.gmail.com" 
      port: 587
      domain: "smtp.gmail.com" # 'your.domain.com' for GoogleApps
      authentication: :plain
      user_name: "XXXXXXXXX@gmail.com" 
      password: "XXXXXXXX" 
  #
  # ...
  # ...

Make sure that you don't overlook commenting out line 15 (source:/tags/3.4.4/config/configuration.yml.example#L15).

RE: Application crashes after updating SMTP settings in configuration.yml - Added by Oliver Pugh almost 7 years ago

Thank you. It was line 15 that was getting me caught up. Thanks again!

    (1-2/2)