cacti failed to send email notifications.
Moderators: Developers, Moderators
-
- Posts: 7
- Joined: Thu Jun 21, 2018 12:36 pm
cacti failed to send email notifications.
Hello everyone,
I have an issue with my cacti server. Since one week, it can't send email notifications. I got this message in the logs:
- CMDPHP PHP ERROR NOTICE Backtrace: (/settings.php: 110 email_test)(/lib/functions.php: 3912 send_mail)(/lib/functions.php: 3480 mailer)(/lib/functions.php: 3783 send)(/include/phpmailer/class.phpmailer.php: 1213 postSend)(/include/phpmailer/class.phpmailer.php: 1335 smtpSend)(/include/phpmailer/class.phpmailer.php: 1540 smtpConnect)(/include/phpmailer/class.phpmailer.php: 1700 quit)(/include/phpmailer/class.smtp.php: 827 sendCommand)(/include/phpmailer/class.smtp.php: 885 client_send)(/include/phpmailer/class.smtp.php: 992 fwrite)(CactiErrorHandler)(/lib/functions.php: 4431 cacti_debug_backtrace)
- ERROR PHP NOTICE: fwrite(): send of 6 bytes failed with errno=32 Broken pipe in file: /usr/share/cacti/include/phpmailer/class.smtp.php on line: 992
-----------------------------------
I tried this configuration in the function.php file.
$mail->SMTPOptions = array(
'ssl' => array(
'verify_peer' => false,
'verify_peer_name' => false,
'allow_self_signed' => true
)
);
But no changes.
Can someone help me please ???
I have an issue with my cacti server. Since one week, it can't send email notifications. I got this message in the logs:
- CMDPHP PHP ERROR NOTICE Backtrace: (/settings.php: 110 email_test)(/lib/functions.php: 3912 send_mail)(/lib/functions.php: 3480 mailer)(/lib/functions.php: 3783 send)(/include/phpmailer/class.phpmailer.php: 1213 postSend)(/include/phpmailer/class.phpmailer.php: 1335 smtpSend)(/include/phpmailer/class.phpmailer.php: 1540 smtpConnect)(/include/phpmailer/class.phpmailer.php: 1700 quit)(/include/phpmailer/class.smtp.php: 827 sendCommand)(/include/phpmailer/class.smtp.php: 885 client_send)(/include/phpmailer/class.smtp.php: 992 fwrite)(CactiErrorHandler)(/lib/functions.php: 4431 cacti_debug_backtrace)
- ERROR PHP NOTICE: fwrite(): send of 6 bytes failed with errno=32 Broken pipe in file: /usr/share/cacti/include/phpmailer/class.smtp.php on line: 992
-----------------------------------
I tried this configuration in the function.php file.
$mail->SMTPOptions = array(
'ssl' => array(
'verify_peer' => false,
'verify_peer_name' => false,
'allow_self_signed' => true
)
);
But no changes.
Can someone help me please ???
- camerabob
- Cacti User
- Posts: 386
- Joined: Fri Feb 10, 2017 2:45 pm
- Location: Long Island, New York, USA
- Contact:
Re: cacti failed to send email notifications.
Help others help you better. Please post the version of Cacti and the underlying OS it is running on.
Prod: Cacti 1.2.15 @ CentOS Linux release 7.9.2009 (Core) & PHP 5.4.16-48.el7
Maint @ 1.2
Monitor @ 2.3.6
Thold @ 1.2.4
Temp: Cacti 1.2.3 @ CentOS Linux release 7.9.2009 (Core) & PHP 5.4.16-48.el7
Flowview @ 2.1
Mactrack @ 4.2
Maint @ 1.2
Monitor @ 2.3.6
Router Configs @ 1.3.4
Syslog Monitoring @ 2.1
Thold @ 1.2.4
Maint @ 1.2
Monitor @ 2.3.6
Thold @ 1.2.4
Temp: Cacti 1.2.3 @ CentOS Linux release 7.9.2009 (Core) & PHP 5.4.16-48.el7
Flowview @ 2.1
Mactrack @ 4.2
Maint @ 1.2
Monitor @ 2.3.6
Router Configs @ 1.3.4
Syslog Monitoring @ 2.1
Thold @ 1.2.4
Re: cacti failed to send email notifications.
I would check that you are able to connect to the SMTP server in question. It tells you that there is a connectivity issue when attempting to connect to it. If you are using a local SMTP service make sure it's running. If you are going through a firewall, make sure it's allowed.
Cacti Developer & Release Manager
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
-
- Posts: 7
- Joined: Thu Jun 21, 2018 12:36 pm
Re: cacti failed to send email notifications.
I'm using cacti 1.1.19 running on CentOS release 6.9camerabob wrote:Help others help you better. Please post the version of Cacti and the underlying OS it is running on.
I checked the connectivity with the mail server and it's ok. You can see below the result.netniV wrote:I would check that you are able to connect to the SMTP server in question. It tells you that there is a connectivity issue when attempting to connect to it. If you are using a local SMTP service make sure it's running. If you are going through a firewall, make sure it's allowed.
-----------------------------------------------------------------------------------------------------
[My server~]# telnet 172.21.55.12 25
Trying 172.21.55.12...
Connected to 172.21.55.12.
Escape character is '^]'.
220 webmail.mydomain.com Microsoft ESMTP MAIL Service ready at Wed, 25 Jul 2018 19:40:56 +0100
-----------------------------------------------------------------------------------------------------
Their is no firewall between my cacti server and the mail server.
The smtp service is running.
---------------------------------------------------------------------------------------------
[My server ~]# netstat -an | grep 25
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN
tcp 0 96 172.24.4.32:22 172.24.6.190:55259 ESTABLISHED
tcp 0 0 ::1:25 :::* LISTEN
---------------------------------------------------------------------------------------------
I successfully send an email from the cli, but cacti can't send me email notifications.
Re: cacti failed to send email notifications.
Have you used the Send a Test Email option within the settings? Can you post the results?
Also, as you are using an older version of Cacti, you may benefit from an upgrade as there have been some changes to the mailing code to handle things like TLS, etc.
Also, as you are using an older version of Cacti, you may benefit from an upgrade as there have been some changes to the mailing code to handle things like TLS, etc.
Cacti Developer & Release Manager
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
-
- Posts: 7
- Joined: Thu Jun 21, 2018 12:36 pm
Re: cacti failed to send email notifications.
Here is the result of a test email.
- Attachments
-
- cacti.png (10.87 KiB) Viewed 6937 times
Re: cacti failed to send email notifications.
Hmm, my advise would be to update your version of Cacti. As I said before, we changed various functions relating to sending SMTP mails and even introduced a CLI program that would allow you to get more information on what is happened during the test.
Cacti Developer & Release Manager
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
-
- Posts: 7
- Joined: Thu Jun 21, 2018 12:36 pm
Re: cacti failed to send email notifications.
Thanks for your help. I'll update my cacti version.
- camerabob
- Cacti User
- Posts: 386
- Joined: Fri Feb 10, 2017 2:45 pm
- Location: Long Island, New York, USA
- Contact:
Re: cacti failed to send email notifications.
I discovered in version 1.1.36 that the test function failed while notifications still went through. This occurred on one of my two servers, both with the same exact version.
Prod: Cacti 1.2.15 @ CentOS Linux release 7.9.2009 (Core) & PHP 5.4.16-48.el7
Maint @ 1.2
Monitor @ 2.3.6
Thold @ 1.2.4
Temp: Cacti 1.2.3 @ CentOS Linux release 7.9.2009 (Core) & PHP 5.4.16-48.el7
Flowview @ 2.1
Mactrack @ 4.2
Maint @ 1.2
Monitor @ 2.3.6
Router Configs @ 1.3.4
Syslog Monitoring @ 2.1
Thold @ 1.2.4
Maint @ 1.2
Monitor @ 2.3.6
Thold @ 1.2.4
Temp: Cacti 1.2.3 @ CentOS Linux release 7.9.2009 (Core) & PHP 5.4.16-48.el7
Flowview @ 2.1
Mactrack @ 4.2
Maint @ 1.2
Monitor @ 2.3.6
Router Configs @ 1.3.4
Syslog Monitoring @ 2.1
Thold @ 1.2.4
Re: cacti failed to send email notifications.
I recall that being fixed in later versions. Check the CHANGELOG on release 1.1.38.
Cacti Developer & Release Manager
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
- camerabob
- Cacti User
- Posts: 386
- Joined: Fri Feb 10, 2017 2:45 pm
- Location: Long Island, New York, USA
- Contact:
Re: cacti failed to send email notifications.
The OP is/was on version 1.1.19.
Prod: Cacti 1.2.15 @ CentOS Linux release 7.9.2009 (Core) & PHP 5.4.16-48.el7
Maint @ 1.2
Monitor @ 2.3.6
Thold @ 1.2.4
Temp: Cacti 1.2.3 @ CentOS Linux release 7.9.2009 (Core) & PHP 5.4.16-48.el7
Flowview @ 2.1
Mactrack @ 4.2
Maint @ 1.2
Monitor @ 2.3.6
Router Configs @ 1.3.4
Syslog Monitoring @ 2.1
Thold @ 1.2.4
Maint @ 1.2
Monitor @ 2.3.6
Thold @ 1.2.4
Temp: Cacti 1.2.3 @ CentOS Linux release 7.9.2009 (Core) & PHP 5.4.16-48.el7
Flowview @ 2.1
Mactrack @ 4.2
Maint @ 1.2
Monitor @ 2.3.6
Router Configs @ 1.3.4
Syslog Monitoring @ 2.1
Thold @ 1.2.4
Re: cacti failed to send email notifications.
Yes, but I was explaining to you that the bug you mentioned was subsequently fixed. I'm sure in a release before 1.2 but I know it definitely works for me and there's a cli package. My recommendation was to upgrade.
Cacti Developer & Release Manager
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
-
- Posts: 1
- Joined: Wed Sep 23, 2020 8:07 pm
Re: cacti failed to send email notifications.
I have the latest version 2020 and mail system no working, I have tried most of the posted solutions online and nothing... i love cacti but... Is running on windows server.....
Who is online
Users browsing this forum: No registered users and 2 guests