Receiving Email daemon error

13 views
Skip to first unread message

snowmaninthesun

unread,
Feb 13, 2009, 7:38:03 PM2/13/09
to PeepCode
I'm having problems getting the "Receiving Email with Ruby PDF"
example with fetcher daemon working, i've seen a few forum posts in
different places mentioning the exact same problem but no solutions.
Does anyone know what is going on??


Here is my origional post:

http://www.ruby-forum.com/topic/178498


It says:

I'm using fetcher_daemon
svn://rubyforge.org/var/svn/slantwise/fetcher/trunk which is a daemon
that checks a mail server.

When ever I run 'ruby script/mailer_daemon_fetcher start' it works
great, i get my mail once but then after a few seconds i get an error:

$
/opt/local/lib/ruby/1.8/net/imap.rb:288:in `shutdown': Socket is not
connected (Errno::ENOTCONN)
from /opt/local/lib/ruby/1.8/net/imap.rb:288:in `disconnect'
from
contacts/vendor/plugins/fetcher/lib/fetcher/imap.rb:63:in
`close_connection'
from
AptanaStudio/contacts/vendor/plugins/fetcher/lib/fetcher/base.rb:33:in
`fetch'
from script/mailer_daemon_fetcher:17:in `start'
from script/mailer_daemon_fetcher:16:in `loop'
from script/mailer_daemon_fetcher:16:in `start'
from
/AptanaStudio/contacts/lib/daemon.rb:55:in `start'
from AptanaStudio/contacts/lib/daemon.rb:45:in`fork'
from AptanaStudio/contacts/lib/daemon.rb:45:in `start'
from AptanaStudio/contacts/lib/daemon.rb:32:in 'daemonize'
from AptanaStudio/contacts/lib/daemon.rb:14:in'daemonize' from
script/mailer_daemon_fetcher:28


After which I no longer receive mail. Here is a copy of my code inside
of the fetcher daemon http://pastie.org/387939 .

Does anyone have any hints?

topfunky

unread,
Feb 13, 2009, 8:27:26 PM2/13/09
to PeepCode
On Feb 13, 4:38 pm, snowmaninthesun <TheDicks...@gmail.com> wrote:
> I'm having problems getting the "Receiving Email with Ruby PDF"
> example with fetcher daemon working, i've seen a few forum posts in
> different places mentioning the exact same problem but no solutions.
> Does anyone know what is going on??

There's a fork on GitHub that mentions fixing a socket error. You
could try that:

http://github.com/r38y/fetcher/tree/master

I'll contact the authors to see if there's an updated version of the
code.

Geoffrey Grosenbach

snowmaninthesun

unread,
Feb 15, 2009, 11:27:36 PM2/15/09
to PeepCode
That worked great!! No more error messages, I get mail immediately
after i run the daemon, and every 60 seconds there after!! Thanks.


I do have a question about God though. I've never used god or monit,
and i'm not exactly sure how to verify that its working. It starts up
fine, with no errors but i have to start up my daemon separately. From
my understanding i should be able to "sudo god -c config/fetcher-
daemon.god -D" using this code http://www.pastie.org/390275 and my
daemon should start collecting mail.

snowmaninthesun

unread,
Feb 18, 2009, 10:01:52 PM2/18/09
to PeepCode
I didn't include

w.start_if do |start|
start.condition(:process_running) do |c|
c.interval = 5.seconds
c.running = false
end
end
Reply all
Reply to author
Forward
0 new messages