Text Verification Times Out

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
ecolgroveMOT
Posts: 64
Joined: Thu Aug 22, 2019 1:58 pm

Re: Text Verification Times Out

Post by ecolgroveMOT »

phpmailer.log shows this:
[10-23-2019 13:57:07] SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/ ... leshooting (method=smtp;host=smtp.office365.com;port=587;smtpauth=true;security=tls), Referer: admin/testemail.php
[10-23-2019 14:07:05] SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/ ... leshooting (method=smtp;host=smtp.office365.com;port=587;smtpauth=true;security=tls), Referer: admin/testemail.php
[10-23-2019 14:12:06] SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/ ... leshooting (method=smtp;host=smtp.office365.com;port=587;smtpauth=true;security=tls), Referer: admin/testemail.php
[10-23-2019 14:12:06] SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/ ... leshooting (method=smtp;host=smtp.office365.com;port=587;smtpauth=true;security=tls), Referer: admin/testemail.php
[10-23-2019 14:12:06] SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/ ... leshooting (method=smtp;host=smtp.office365.com;port=587;smtpauth=true;security=tls), Referer: admin/testemail.php
[root@nagiosxi tmp]#

and

tail -f /usr/local/nagiosxi/var/cmdsubsys.log /usr/local/nagiosxi/var/eventman.log shows
[root@nagiosxi tmp]# tail -f /usr/local/nagiosxi/var/cmdsubsys.log /usr/local/nagiosxi/var/eventman.log
==> /usr/local/nagiosxi/var/cmdsubsys.log <==
PROCESSED 0 COMMANDS
....................................................
PROCESSED 0 COMMANDS
..............................................................
PROCESSED 0 COMMANDS
...........................................................
PROCESSED 0 COMMANDS
.........................................................
PROCESSED 0 COMMANDS
...........................
==> /usr/local/nagiosxi/var/eventman.log <==
PROCESSED 0 EVENTS
...................
PROCESSED 0 EVENTS
....................
PROCESSED 0 EVENTS
...................
PROCESSED 0 EVENTS
....................
PROCESSED 0 EVENTS
.........
==> /usr/local/nagiosxi/var/cmdsubsys.log <==
.
==> /usr/local/nagiosxi/var/eventman.log <==
.
==> /usr/local/nagiosxi/var/cmdsubsys.log <==
...
==> /usr/local/nagiosxi/var/eventman.log <==
.
==> /usr/local/nagiosxi/var/cmdsubsys.log <==
...
==> /usr/local/nagiosxi/var/eventman.log <==
.
==> /usr/local/nagiosxi/var/cmdsubsys.log <==
...
==> /usr/local/nagiosxi/var/eventman.log <==
.
==> /usr/local/nagiosxi/var/cmdsubsys.log <==
...
==> /usr/local/nagiosxi/var/eventman.log <==
.
==> /usr/local/nagiosxi/var/cmdsubsys.log <==
...
==> /usr/local/nagiosxi/var/eventman.log <==
.
==> /usr/local/nagiosxi/var/cmdsubsys.log <==
...
==> /usr/local/nagiosxi/var/eventman.log <==
.
==> /usr/local/nagiosxi/var/cmdsubsys.log <==
...
==> /usr/local/nagiosxi/var/eventman.log <==
.
==> /usr/local/nagiosxi/var/cmdsubsys.log <==
...
==> /usr/local/nagiosxi/var/eventman.log <==
.
==> /usr/local/nagiosxi/var/cmdsubsys.log <==
...
==> /usr/local/nagiosxi/var/eventman.log <==
.
==> /usr/local/nagiosxi/var/cmdsubsys.log <==
...
==> /usr/local/nagiosxi/var/eventman.log <==

PROCESSED 0 EVENTS

==> /usr/local/nagiosxi/var/cmdsubsys.log <==

PROCESSED 0 COMMANDS
.
==> /usr/local/nagiosxi/var/eventman.log <==
.
==> /usr/local/nagiosxi/var/cmdsubsys.log <==
...
==> /usr/local/nagiosxi/var/eventman.log <==
.
==> /usr/local/nagiosxi/var/cmdsubsys.log <==
..
==> /usr/local/nagiosxi/var/eventman.log <==
.
==> /usr/local/nagiosxi/var/cmdsubsys.log <==
..
==> /usr/local/nagiosxi/var/eventman.log <==
.
==> /usr/local/nagiosxi/var/cmdsubsys.log <==
...
==> /usr/local/nagiosxi/var/eventman.log <==
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: Text Verification Times Out

Post by mbellerue »

Let's see if we can at least change the error message. Can you just type in a wrong password for that email account, and try to send again? Then we'll just check the phpmailer.log file, since the other two weren't giving anything else.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
ecolgroveMOT
Posts: 64
Joined: Thu Aug 22, 2019 1:58 pm

Re: Text Verification Times Out

Post by ecolgroveMOT »

Nagios says:
A test email was sent to [email protected]
----
Mailer said: [10-23-2019 15:19:11] SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/ ... leshooting (method=smtp;host=smtp.office365.com;port=587;smtpauth=true;security=tls), Referer: admin/testemail.php
An error occurred sending a test email!
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: Text Verification Times Out

Post by mbellerue »

Alright, run these two commands,

Code: Select all

cd /usr/local/nagiosxi/html/includes/phpmailer/
sed -i 's/public \$SMTPDebug.*/public \$SMTPDebug = 4;/g' class.phpmailer.php
And then try to send the test email once more. This time you should get an error message in the web interface itself. Once you get that error message, you can undo the above change by running these two commands,

Code: Select all

cd /usr/local/nagiosxi/html/includes/phpmailer/
sed -i 's/public \$SMTPDebug.*/public \$SMTPDebug = 0;/g' class.phpmailer.php
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
ecolgroveMOT
Posts: 64
Joined: Thu Aug 22, 2019 1:58 pm

Re: Text Verification Times Out

Post by ecolgroveMOT »

First command gives us the web interface error as you instructed and as follows:
2019-10-23 20:48:00 Connection: opening to smtp.office365.com:587, timeout=300, options=array ()
2019-10-23 20:48:00 Connection failed. Error #2: stream_socket_client(): unable to connect to smtp.office365.com:587 (Network is unreachable) [/usr/local/nagiosxi/html/includes/phpmailer/class.smtp.php line 299]
2019-10-23 20:48:00 SMTP ERROR: Failed to connect to server: Network is unreachable (101)
SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/ ... leshooting
Notice: This trial copy of Nagios XI will expire in 2 days. Purchase a License Now or Enter your license key.
Test Email Settings

Once second command is ran nagios replys with :
A test email was sent to [email protected]
----
Mailer said: [10-23-2019 15:48:00] SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/ ... leshooting (method=smtp;host=smtp.office365.com;port=587;smtpauth=true;security=tls), Referer: admin/testemail.php
An error occurred sending a test email!
Use this to send a test email to your current logged in user address to verify you can recieve alerts from Nagios XI.

An email will be sent to: [email protected]

A test email was sent to [email protected]
----
Mailer said: [10-23-2019 15:50:05] SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/ ... leshooting (method=smtp;host=smtp.office365.com;port=587;smtpauth=true;security=tls), Referer: admin/testemail.php
An error occurred sending a test email!
Use this to send a test email to your current logged in user address to verify you can recieve alerts from Nagios XI.

An email will be sent to: [email protected]

Change your email address
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: Text Verification Times Out

Post by mbellerue »

2019-10-23 20:48:00 Connection failed. Error #2: stream_socket_client(): unable to connect to smtp.office365.com:587 (Network is unreachable) [/usr/local/nagiosxi/html/includes/phpmailer/class.smtp.php line 299]
2019-10-23 20:48:00 SMTP ERROR: Failed to connect to server: Network is unreachable (101)
That's very strange.

Okay, for your SMTP server, let's just give it an IP address rather than using smtp.office365.com, just to rule out DNS issues. Let's give it, 52.96.70.242 and see what it does.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
ecolgroveMOT
Posts: 64
Joined: Thu Aug 22, 2019 1:58 pm

Re: Text Verification Times Out

Post by ecolgroveMOT »

nagios replys with:
A test email was sent to [email protected]
----
Mailer said: [10-24-2019 08:13:31] SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/ ... leshooting (method=smtp;host=52.96.70.242 ;port=587;smtpauth=true;security=tls), Referer: admin/testemail.php
An error occurred sending a test email!
ecolgroveMOT
Posts: 64
Joined: Thu Aug 22, 2019 1:58 pm

Re: Text Verification Times Out

Post by ecolgroveMOT »

And now when i switch back to sendmail so we can get alerts for the time being. We do not get any alerts anymore. It shows successful just no message. So those last commands must have done something.
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: Text Verification Times Out

Post by mbellerue »

Notice: This trial copy of Nagios XI will expire in 2 days. Purchase a License Now or Enter your license key.
Oh, I didn't catch this. Is your trial still active? When the trial expires, no notifications go out.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
ecolgroveMOT
Posts: 64
Joined: Thu Aug 22, 2019 1:58 pm

Re: Text Verification Times Out

Post by ecolgroveMOT »

it says we have 2 days left on the trial
Locked