We're using Nagios XI 2024R1.3 on Debian 11.
Our scheduled SLA Reports which are attached in an email are empty ! When opening (using the download button) the same report from the Nagios User Interface it shows the report correctly.
I've checked the following:
- The Program and External URL in System Settings are both the same: https://fqdn/nagiosxi
- /var/log/apache2/error.log creates the following lines when a report is created:
--2024-11-04 14:51:49-- http://localhost/nagiosxi/reports/avail ... servicesta>
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:80... failed: Connection refused.
Connecting to localhost (localhost)|127.0.0.1|:80... failed: Connection refused.
So I'm guessing it's using a wrong url for when creating a pdf which needs to be send by mail. We're indeed using https and do not accept port 80 traffic. Is it possible to change http://localhost to https://fqdn ?
empty (0Kb) pdf attachment in mailed Reports
Re: empty (0Kb) pdf attachment in mailed Reports
Hi @it_circle,
I've submitted a bug report for this. I believe your HTTPS settings should be detected by the report mailer and at a minimum we should be attempting to use an SSL port with localhost if that is your configuration. If that isn't happening, something is likely not working correctly and will need to be addressed. Apologies for the inconvenience!
In the meantime, one suggestion I have is taking a look at the Apache configuration on this Debian 11 server, if you are comfortable doing that. It looks like this value should be coming from a global config setting on the server so if that isn't set correctly, the value will default to localhost on port 80.
I've submitted a bug report for this. I believe your HTTPS settings should be detected by the report mailer and at a minimum we should be attempting to use an SSL port with localhost if that is your configuration. If that isn't happening, something is likely not working correctly and will need to be addressed. Apologies for the inconvenience!
In the meantime, one suggestion I have is taking a look at the Apache configuration on this Debian 11 server, if you are comfortable doing that. It looks like this value should be coming from a global config setting on the server so if that isn't set correctly, the value will default to localhost on port 80.
Re: empty (0Kb) pdf attachment in mailed Reports
Hi @jsimon,
Thanks for the suggestions. I've added this line "Listen 127.0.0.1:80" to the file \etc\apache2\ports.conf so it listens on port 80 on the loopback adapter.
After a restart the problem was more or less solved. We're receiving a pdf by email and it has got the correct content, so that is fixed
In the apache error.log you'll see that it connects over 127.0.0.1:80.
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:80... failed: Connection refused.
Connecting to localhost (localhost)|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... [Tue Nov 05 16:13:24.376631 2024] [php7:notice] [pid 819:tid 819] [client ::1:48604] PHP Notice: Undefined variable: logo_alt in /usr/local/nagiosxi/html/reports/sla.php on line 0
[Tue Nov 05 16:13:24.376655 2024] [php7:notice] [pid 819:tid 819] [client ::1:48604] PHP Notice: Undefined variable: logo_alt in /usr/local/nagiosxi/html/reports/sla.php on line 0
200 OK
Length: unspecified [application/pdf]
Saving to: '/usr/local/nagiosxi/tmp/scheduledreport-adm-1730819602-SLA.pdf'
0K .......... .......... .......... .......... .......... 383M
50K .......... .......... .......... .......... .......... 484M
100K .......... .......... .......... .......... .......... 490M
150K ..... 318M=0s
2024-11-05 16:13:25 (440 MB/s) - '/usr/local/nagiosxi/tmp/scheduledreport-a-ETfUH7igk2bM-1730819602-SLA.pdf' saved [159537]
That's fine for now, I hope that in the future this issue will be solved correctly.
Thanks for the suggestions. I've added this line "Listen 127.0.0.1:80" to the file \etc\apache2\ports.conf so it listens on port 80 on the loopback adapter.
After a restart the problem was more or less solved. We're receiving a pdf by email and it has got the correct content, so that is fixed
In the apache error.log you'll see that it connects over 127.0.0.1:80.
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:80... failed: Connection refused.
Connecting to localhost (localhost)|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... [Tue Nov 05 16:13:24.376631 2024] [php7:notice] [pid 819:tid 819] [client ::1:48604] PHP Notice: Undefined variable: logo_alt in /usr/local/nagiosxi/html/reports/sla.php on line 0
[Tue Nov 05 16:13:24.376655 2024] [php7:notice] [pid 819:tid 819] [client ::1:48604] PHP Notice: Undefined variable: logo_alt in /usr/local/nagiosxi/html/reports/sla.php on line 0
200 OK
Length: unspecified [application/pdf]
Saving to: '/usr/local/nagiosxi/tmp/scheduledreport-adm-1730819602-SLA.pdf'
0K .......... .......... .......... .......... .......... 383M
50K .......... .......... .......... .......... .......... 484M
100K .......... .......... .......... .......... .......... 490M
150K ..... 318M=0s
2024-11-05 16:13:25 (440 MB/s) - '/usr/local/nagiosxi/tmp/scheduledreport-a-ETfUH7igk2bM-1730819602-SLA.pdf' saved [159537]
That's fine for now, I hope that in the future this issue will be solved correctly.
Last edited by it.circle on Tue Nov 05, 2024 10:21 am, edited 1 time in total.
Re: empty (0Kb) pdf attachment in mailed Reports
Thank you for the update! Glad you were able to resolve the issue in the meantime, and this may be helpful for diagnosis.
-
LucasNathann
- Posts: 1
- Joined: Mon Jul 01, 2024 10:02 pm
Re: empty (0Kb) pdf attachment in mailed Reports
It seems like it is just a temporary measure?it.circle wrote: ↑Tue Nov 05, 2024 10:21 am Hi @jsimon,
Thanks for the suggestions. I've added this line "Listen 127.0.0.1:80" to the file \etc\apache2\ports.conf so it listens on port 80 on the loopback adapter.
After a restart the problem was more or less solved. We're receiving a pdf by email and it has got the correct content, so that is fixed![]()
In the apache error.log you'll see that it connects over 127.0.0.1:80.
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:80... failed: Connection refused.
Connecting to localhost (localhost)|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... [Tue Nov 05 16:13:24.376631 2024] [php7:notice] [pid 819:tid 819] [client ::1:48604] PHP Notice: Undefined variable: logo_alt in /usr/local/nagiosxi/html/reports/sla.php on line 0
[Tue Nov 05 16:13:24.376655 2024] [php7:notice] [pid 819:tid 819] [client ::1:48604] PHP Notice: Undefined variable: logo_alt in /usr/local/nagiosxi/html/reports/sla.php on line 0Quick Draw
200 OK
Length: unspecified [application/pdf]
Saving to: '/usr/local/nagiosxi/tmp/scheduledreport-adm-1730819602-SLA.pdf'
0K .......... .......... .......... .......... .......... 383M
50K .......... .......... .......... .......... .......... 484M
100K .......... .......... .......... .......... .......... 490M
150K ..... 318M=0s
2024-11-05 16:13:25 (440 MB/s) - '/usr/local/nagiosxi/tmp/scheduledreport-a-ETfUH7igk2bM-1730819602-SLA.pdf' saved [159537]
That's fine for now, I hope that in the future this issue will be solved correctly.
Re: empty (0Kb) pdf attachment in mailed Reports
Where exactly do you place this: \etc\apache2\ports.conf?it.circle wrote: ↑Mon Nov 04, 2024 9:17 am We're using Nagios XI 2024R1.3 on Debian 11.
Our scheduled SLA Reports which are attached in an email are empty ! When opening (using the download button) the same report from the Nagios User Interface it shows the report correctly.
I've checked the following:
- The Program and External URL in System Settings are both the same: https://fqdn/nagiosxi
- /var/log/apache2/error.log creates the following lines when a report is created:
--2024-11-04 14:51:49-- http://localhost/nagiosxi/reports/avail ... servicesta>
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:80... failed: Connection refused.
Connecting to localhost (localhost)|127.0.0.1|:80... failed: Connection refused.
So I'm guessing it's using a wrong url for when creating a pdf which needs to be send by mail. We're indeed using https and do not accept port 80 traffic. Is it possible to change http://localhost to https://fqdn,Block Blast ?
-
DoubleDoubleA
- Posts: 286
- Joined: Thu Feb 09, 2017 5:07 pm
Re: empty (0Kb) pdf attachment in mailed Reports
Hi @Theab,
I don't understand your question "Where exactly do you place this: \etc\apache2\ports.conf?".
\etc\apache2\ports.conf is a location in the file system, so that's where it is/where it goes.
Can you try asking your question in a different way?
Thanks,
Aaron
I don't understand your question "Where exactly do you place this: \etc\apache2\ports.conf?".
\etc\apache2\ports.conf is a location in the file system, so that's where it is/where it goes.
Can you try asking your question in a different way?
Thanks,
Aaron