sj26/mailcatcher

macos 13.0.1, starts but quietly fails to start daemon in ruby 2.7.5, does work if run in foreground, works in ruby 3.1.2 in daemon mode

stepheneb opened this issue · 2 comments

Note does work in daemon mode on ruby 3.1.2 after using thin install tip: gem install thin -v 1.5.1 -- --with-cflags="-Wno-error=implicit-function-declaration" before installing mailcatcher

more about my computer:

% sysinfo
Software:

    System Software Overview:

      System Version: macOS 13.0.1 (22A400)
      Kernel Version: Darwin 22.1.0
      Time since boot: 1 day, 11 hours, 17 minutes

Hardware:

    Hardware Overview:

      Model Name: MacBook Pro
      Model Identifier: MacBookPro18,3
      Model Number: Z15G001X4LL/A
      Chip: Apple M1 Pro
      Total Number of Cores: 10 (8 performance and 2 efficiency)
      Memory: 32 GB
      System Firmware Version: 8419.41.10
      OS Loader Version: 8419.41.10

Start as daemon, console output displays normally but daemon not started.

ruby-2.7.5 % gem info mailcatcher

*** LOCAL GEMS ***

mailcatcher (0.8.2)
    Author: Samuel Cochran
    Homepage: https://mailcatcher.me
    License: MIT
    Installed at: /Users/stephen/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0

    Runs an SMTP server, catches and displays email in a web interface.
ruby-2.7.5 % mailcatcher     
Starting MailCatcher v0.8.2
==> smtp://127.0.0.1:1025
==> http://127.0.0.1:1080
*** MailCatcher runs as a daemon by default. Go to the web interface to quit.
ruby-2.7.5 % curl -i http://127.0.0.1:1080
curl: (7) Failed to connect to 127.0.0.1 port 1080 after 5 ms: Connection refused
ruby-2.7.5 % psg mailcatcher
ruby-2.7.5 % mailcatcher -f      
Starting MailCatcher v0.8.2
==> smtp://127.0.0.1:1025
==> http://127.0.0.1:1080

Open another terminal and check to see if it is running.

ruby-2.7.5 % curl -I http://127.0.0.1:1080
HTTP/1.1 200 OK
Content-Type: text/html;charset=utf-8
Content-Length: 2156
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
Connection: keep-alive
Server: thin 1.5.1 codename Straight Razor

ruby-2.7.5 % psg mailcatcher
stephen          41774   0.0  0.1 409136896  49888 s006  S+    1:24PM   0:00.25 /Users/stephen/.rbenv/versions/2.7.5/bin/ruby /Users/stephen/.rbenv/versions/2.7.5/bin/mailcatcher -f

Tested also by sending mail from rails app in dev mode -- works.

Quit from web application.

Try starting mailcatcher in verbose mode to see if there are any additional error messages -- no additional info.

ruby-2.7.5 % mailcatcher -v
Starting MailCatcher v0.8.2
==> smtp://127.0.0.1:1025
==> http://127.0.0.1:1080
*** MailCatcher runs as a daemon by default. Go to the web interface to quit.
ruby-2.7.5 % curl -I http://127.0.0.1:1080
curl: (52) Empty reply from server

Related to #521

sj26 commented

yeah, this is a duplicate of #521. Please follow up there.