D
Daniel Berger
Hi,
Ruby 1.8.6-p114
RHEL 3
I've got two RHEL3 boxes, alpha and beta. On the alpha box, the
following script works fine. On the beta box I get a timeout error
with the same script. What's happening?
require 'net/smtp'
host = 'mailhost.foo.com'
port = 25
to = '(e-mail address removed)'
from = '(e-mail address removed)'
subject = 'test'
body = 'hello world'
Net::SMTP.start(host, port, host){ |smtp|
smtp.open_message_stream(from, to){ |stream|
stream.puts "From: #{from}"
stream.puts "To: " + to.to_a.join(', ')
stream.puts "Subject: #{subject}"
stream.puts
stream.puts body
}
}
Result:
/usr/local/lib/ruby/1.8/timeout.rb:54:in `new': execution expired
(Timeout::Error)
from /usr/local/lib/ruby/1.8/net/protocol.rb:206:in `old_open'
from /usr/local/lib/ruby/1.8/timeout.rb:56:in `timeout'
from /usr/local/lib/ruby/1.8/timeout.rb:76:in `timeout'
from /usr/local/lib/ruby/1.8/net/protocol.rb:206:in `old_open'
from /usr/local/lib/ruby/1.8/net/smtp.rb:393:in `do_start'
from /usr/local/lib/ruby/1.8/net/smtp.rb:378:in `start'
from /usr/local/lib/ruby/1.8/net/smtp.rb:316:in `start'
from smtp_test.rb:12
I did validate that the /etc/resolv.conf and /etc/protocols files were
the same on both boxes.
This some sort of sendmail config issue? If so, any ideas what it
might be?
Regards,
Dan
Ruby 1.8.6-p114
RHEL 3
I've got two RHEL3 boxes, alpha and beta. On the alpha box, the
following script works fine. On the beta box I get a timeout error
with the same script. What's happening?
require 'net/smtp'
host = 'mailhost.foo.com'
port = 25
to = '(e-mail address removed)'
from = '(e-mail address removed)'
subject = 'test'
body = 'hello world'
Net::SMTP.start(host, port, host){ |smtp|
smtp.open_message_stream(from, to){ |stream|
stream.puts "From: #{from}"
stream.puts "To: " + to.to_a.join(', ')
stream.puts "Subject: #{subject}"
stream.puts
stream.puts body
}
}
Result:
/usr/local/lib/ruby/1.8/timeout.rb:54:in `new': execution expired
(Timeout::Error)
from /usr/local/lib/ruby/1.8/net/protocol.rb:206:in `old_open'
from /usr/local/lib/ruby/1.8/timeout.rb:56:in `timeout'
from /usr/local/lib/ruby/1.8/timeout.rb:76:in `timeout'
from /usr/local/lib/ruby/1.8/net/protocol.rb:206:in `old_open'
from /usr/local/lib/ruby/1.8/net/smtp.rb:393:in `do_start'
from /usr/local/lib/ruby/1.8/net/smtp.rb:378:in `start'
from /usr/local/lib/ruby/1.8/net/smtp.rb:316:in `start'
from smtp_test.rb:12
I did validate that the /etc/resolv.conf and /etc/protocols files were
the same on both boxes.
This some sort of sendmail config issue? If so, any ideas what it
might be?
Regards,
Dan