Port 25 check cause of "Unable to open a socket to Sendmail" error?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Port 25 check cause of "Unable to open a socket to Sendmail" error?

Jamie Burchell

Hi

 

Since configuring a check for Sendmail I’ve started seeing an error from our CodeIgniter PHP application for the first time:

 

Exit status code: 75
Unable to open a socket to Sendmail

The check is:

 

check process sendmail with pidfile /var/spool/postfix/pid/master.pid

start program = "/bin/systemctl postfix start"

stop program = "/bin/systemctl postfix stop"

restart program = "/bin/systemctl postfix restart"

if failed port 25 protocol smtp then restart

if 3 restarts within 5 cycles then unmonitor

 

I’m assuming then, that the port is unavailable to other services that need it if Monit is checking it?

 

TIA

Jamie


--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general
Reply | Threaded
Open this post in threaded view
|

Re: Port 25 check cause of "Unable to open a socket to Sendmail" error?

Tino Hendricks
I think, this might only be the case if your postfix is configured to accept just one concurrent connection, i.e.

master.cf:
# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (no)    (never) (100)
# ==========================================================================
smtp      inet  n       -       n       -       1       smtpd

What do the postfix Logs say?

Cheers!

Tino

> Am 11.04.2019 um 10:18 schrieb Jamie Burchell <[hidden email]>:
>
> Hi
>  
> Since configuring a check for Sendmail I’ve started seeing an error from our CodeIgniter PHP application for the first time:
>  
> Exit status code: 75
> Unable to open a socket to Sendmail
>
> The check is:
>  
> check process sendmail with pidfile /var/spool/postfix/pid/master.pid
> start program = "/bin/systemctl postfix start"
> stop program = "/bin/systemctl postfix stop"
> restart program = "/bin/systemctl postfix restart"
> if failed port 25 protocol smtp then restart
> if 3 restarts within 5 cycles then unmonitor
>  
> I’m assuming then, that the port is unavailable to other services that need it if Monit is checking it?
>  
> TIA
> Jamie
> --
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general


--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general
Reply | Threaded
Open this post in threaded view
|

RE: Port 25 check cause of "Unable to open a socket to Sendmail" error?

Jamie Burchell
Looks like I've erroneously attributed Monit for the error. According to the
logs:

Apr 10 18:40:36 feedback postfix/sendmail[29539]: fatal: [hidden email](997): No
recipient addresses found in message header
Apr 10 18:40:36 feedback postfix/postdrop[29540]: warning: stdin: unexpected
EOF in data, record type 78 length 40
Apr 10 18:40:36 feedback postfix/postdrop[29540]: fatal: uid=997: malformed
input

Indeed looking in to the application responsible, a missing recipient was
the cause.

For completeness, though, master.cf has:

# ==========================================================================
# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (yes)   (never) (100)
# ==========================================================================
smtp      inet  n       -       n       -       -       smtpd

So I believe 100 connections are accepted by default.

Kind regards,

Jamie

-----Original Message-----
From: monit-general [mailto:monit-general-bounces+jamie=[hidden email]]
On Behalf Of Tino Hendricks
Sent: 11 April 2019 09:24
To: This is the general mailing list for monit <[hidden email]>
Subject: Re: Port 25 check cause of "Unable to open a socket to Sendmail"
error?

I think, this might only be the case if your postfix is configured to accept
just one concurrent connection, i.e.

master.cf:
# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (no)    (never) (100)
# ==========================================================================
smtp      inet  n       -       n       -       1       smtpd

What do the postfix Logs say?

Cheers!

Tino

> Am 11.04.2019 um 10:18 schrieb Jamie Burchell <[hidden email]>:
>
> Hi
>
> Since configuring a check for Sendmail I’ve started seeing an error from
> our CodeIgniter PHP application for the first time:
>
> Exit status code: 75
> Unable to open a socket to Sendmail
>
> The check is:
>
> check process sendmail with pidfile /var/spool/postfix/pid/master.pid
> start program = "/bin/systemctl postfix start"
> stop program = "/bin/systemctl postfix stop"
> restart program = "/bin/systemctl postfix restart"
> if failed port 25 protocol smtp then restart if 3 restarts within 5
> cycles then unmonitor
>
> I’m assuming then, that the port is unavailable to other services that
> need it if Monit is checking it?
>
> TIA
> Jamie
> --
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general


--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general

--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general