Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Mail catching smtp timeout when running in background #182
I have a very strange issue but I do not how I could debug it any further.
1, if I run mailcatcher in the foreground -f -v
a, web interface works perfectly
2, if I run it in the backgroud
a, web interface works
Dec 22 12:34:24 sendemail: ERROR => Timeout while reading from localhost:2525 There was no response after 60 seconds.
If I want to telnet into it I CAN!
It is not a port issue as I run the test on the same computer and when it is in foreground mode it works.
I do not see any error logs anywhere. is there a way to enable some debug mode so that I can see why the smtp timeouts ?
Any idea what can be wrong ?
my ruby version is -> ruby 1.9.3p547 (2014-05-14 revision 45962) [x86_64-linux]
My local gems:
Hi, I am changing my script to do this too. Although I was really worried as the only similar script is https://github.com/ian-kent/Go-MailHog and I really do not want to upgrade as in the project we use vagrant boxes for the devs and each has mailcatcher.
It would be nice to find out what breaks this. Unfortunatelly I am not a ruby guy and I can not see any log message anywherer.
Problem is Process.daemon here:
Just got the same issue, and seems like it somehow depends on Ruby version.
The mailcatcher as a daemon doesn't work on Ruby
I haven't changed anything on the project except Ruby version. The daemon stopped working after upgrade to Ruby 2.1.5.
+1, I encountered this when upgrading from Rails 4.1.x to Rails 4.2. I traced it down to: net/smtp
The version of ruby remained the same: ruby 2.1.5p273
Right before it sends the email
Net Smtp id file (/usr/local/lib/ruby/2.1.0/net/smtp.rb:555)
When running in the foreground (as above) the message received is:
When running in background mode; the message is not received
2 similar comments
Seems to be a bug in the latest version of EventMachine, sadly. -.-
The reason it doesn't daemonise until after the eventmachine loop is running is so that port failures can be reported to the user.
I'll see what's going on upstream in eventmachine. But honestly eventmachine has become a major pain. May see if there's a feasible alternative, maybe even going back to the standard library with a custom select loop.
This does seem to be an eventmachine regression.
Please try mailcatcher 0.6.0pre1 (
@sj26 Sorry to jump-start this again but I don't think it's fixed and having spent the best part of 4 hours of unpaid work playing with this I'm cross! This was a completely clean install this morning.
ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]
Clean install today and updated to 0.6.0
It's working with the -f -v options but nada in the background.
not sure if this is still open, but I am running into this problem where mailcatcher has stopped working. Nothing that I know of has changed (other than switching between a lot of branches) and I can't find any error messages showing where something might be breaking. right now in development I can see the emails being sent in the logs, but they're not popping up in mailcatcher. here's my set up
I have tried @danlo tip and it didn't work (ended with a result similar to @chrishough) and tried running with