Rails not accessing mailer functions on Google Compute Engine -


a ubuntu 14.04 instance on google compute engine supposed host rails3 applications served via passenger/nginx. instance has sendmail installed. gce instance has firewall rule

source ranges: 0.0.0.0/0   allowed protocols or ports: tcp:2525 

established , configured send mail via sendgrid. telnet smtp.sendgrid.net 2525 connect , allows send e-mail via connection. traffic should flow.

however none of following combinations don't hit timeout. nginx logs don't pick error, application's log state timeout being reached.

invocations:

actionmailer::base.smtp_settings = config.action_mailer.smtp_settings = 

followed basic bloc

{  :user_name => 'user',  :password => 'aaabbbb',  :domain => 'domain.tld',  :address => 'smtp.sendgrid.net',  :port => 2525,  :authentication => :plain,  :enable_starttls_auto => true } 

atempted in each of environment.rb, application.rb, environments/development.rb

adding, before or after settings bloc, either of these or both blocs:

  config.action_mailer.default_url_options = {     :host => 'smtp.sendgrid.net',     :port => 2525   }   config.action_mailer.delivery_method = :smtp 

has no effect on overall behaviour. that's 8 combos have same behaviour. not having access gce logs handling these outgoing messages, have no idea whether leaving application properly.

frankly, impediment gce of showstopper, imho.

** edit ** launching console returns following error stack:

timeout::error: execution expired     /home/user/.rvm/rubies/ruby-1.9.3-p550/lib/ruby/1.9.1/net/smtp.rb:541:in `initialize'     /home/user/.rvm/rubies/ruby-1.9.3-p550/lib/ruby/1.9.1/net/smtp.rb:541:in `open'     /home/user/.rvm/rubies/ruby-1.9.3-p550/lib/ruby/1.9.1/net/smtp.rb:541:in `tcp_socket'     /home/user/.rvm/rubies/ruby-1.9.3-p550/lib/ruby/1.9.1/net/smtp.rb:550:in `block in do_start'     /home/user/.rvm/rubies/ruby-1.9.3-p550/lib/ruby/1.9.1/net/smtp.rb:550:in `do_start'     /home/user/.rvm/rubies/ruby-1.9.3-p550/lib/ruby/1.9.1/net/smtp.rb:520:in `start'     /home/user/app/shared/bundle/ruby/1.9.1/gems/mail-2.5.4/lib/mail/network/delivery_methods/smtp.rb:112:in `deliver!'     /home/user/app/shared/bundle/ruby/1.9.1/gems/mail-2.5.4/lib/mail/message.rb:2129:in `do_delivery'     /home/user/app/shared/bundle/ruby/1.9.1/gems/mail-2.5.4/lib/mail/message.rb:232:in `block in deliver'     /home/user/app/shared/bundle/ruby/1.9.1/gems/actionmailer-3.2.18/lib/action_mailer/base.rb:415:in `block in deliver_mail'     /home/user/app/shared/bundle/ruby/1.9.1/gems/activesupport-3.2.18/lib/active_support/notifications.rb:123:in `block in instrument' 

[...]

update
marilu pointing out /var/log/syslog.

it not getting referenced @ these actions. yes, rails configuration issue.

i had issue too, working on google compute engine. port 465 blocked. google wants use provider called sendgrid.

...read google cloud docs


Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -