1

Topic: iRedMail 1.1 over Debian 10 - No Netdata

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.1 MARIADB edition
- Deployed with iRedMail Easy or the downloadable installer? downloadable installer
- Linux/BSD distribution name and version: Debian 10 x64 - 4.19.0-8-amd64 #1 SMP Debian 4.19.98-1 (2020-01-26) x86_64 GNU/Linux
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

Hi to all,

I've just reinstall my mail server from scratch with new iRedMail 1.1 downloadable installer.
After that i've setup the webserver with new conf file for my domain website and webmail. website.
Install certbot and fix SSL issue over HTTPs and dovecot / postfix and all appear work fine.
I'm able to access iRedAdmin to setup user and domain correctly but if i try to access netdata appear the error 'File not found'.

From NGINX error.log appear :

2020/03/27 16:25:30 [error] 26016#26016: *922 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 93.41.233.34, server: www.sempai.it, request: "GET /netdata HTTP/2.0", upstream: "fastcgi://127.0.0.1:9999", host: "www.sempai.it"

If i perform CURL over mydomain/netdata :

root@srv-main:/etc/nginx/sites-available# curl -i https://srv-main.sempai.it/netdata
HTTP/2 301
server: nginx
date: Fri, 27 Mar 2020 15:26:44 GMT
content-type: text/html
content-length: 178
location: https://www.sempai.it/netdata
x-frame-options: sameorigin
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
x-download-options: noopen
x-permitted-cross-domain-policies: none
content-security-policy: default-src https: data: 'unsafe-inline' 'unsafe-eval'
referrer-policy: strict-origin

<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx</center>
</body>
</html>
root@srv-main:/etc/nginx/sites-available# curl -i http://srv-main.sempai.it/netdata
HTTP/1.1 301 Moved Permanently
Server: nginx
Date: Fri, 27 Mar 2020 15:26:52 GMT
Content-Type: text/html
Content-Length: 178
Connection: keep-alive
Location: https://www.sempai.it/netdata
X-Frame-Options: sameorigin
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
X-Download-Options: noopen
X-Permitted-Cross-Domain-Policies: none
Content-Security-Policy: default-src https: data: 'unsafe-inline' 'unsafe-eval'
Referrer-Policy: strict-origin

<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx</center>
</body>
</html>

How i can solve this ?

Thanks for your support.

Regards,
LainX84

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: iRedMail 1.1 over Debian 10 - No Netdata

LainX84 wrote:

2020/03/27 16:25:30 [error] 26016#26016: *922 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 93.41.233.34, server: www.sempai.it, request: "GET /netdata HTTP/2.0", upstream: "fastcgi://127.0.0.1:9999", host: "www.sempai.it"

Netdata listens on port 19999, not 9999.

LainX84 wrote:

root@srv-main:/etc/nginx/sites-available# curl -i http://srv-main.sempai.it/netdata
HTTP/1.1 301 Moved Permanently
...
Location: https://www.sempai.it/netdata

Please try https://www.sempai.it/netdata instead.

3

Re: iRedMail 1.1 over Debian 10 - No Netdata

ZhangHuangbin wrote:
LainX84 wrote:

2020/03/27 16:25:30 [error] 26016#26016: *922 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 93.41.233.34, server: www.sempai.it, request: "GET /netdata HTTP/2.0", upstream: "fastcgi://127.0.0.1:9999", host: "www.sempai.it"

Netdata listens on port 19999, not 9999.

LainX84 wrote:

root@srv-main:/etc/nginx/sites-available# curl -i http://srv-main.sempai.it/netdata
HTTP/1.1 301 Moved Permanently
...
Location: https://www.sempai.it/netdata

Please try https://www.sempai.it/netdata instead.

Hi,

if i check netdata conf over /etc/netdata :

root@srv-main:/etc/nginx/sites-available# ack -r '19999' /etc/netdata
/etc/netdata/netdata.conf.2020.03.26.13.09.54
2:# You can download it with command like: 'wget -O /opt/netdata/etc/netdata/netdata.conf http://localhost:19999/netdata.conf'

/etc/netdata/netdata.conf
7:    registry to announce = [url]http://127.0.0.1:19999[/url]
47:    default port = 19999

It is already configured for 19999 port.

Checking NGINX configuration is the same :

root@srv-main:/etc/nginx/sites-available# ack -r '19999' /etc/nginx/
/etc/nginx/templates/netdata-subdomain.tmpl
10:    proxy_pass [url]http://127.0.0.1:19999/$ndpath$is_args$args;[/url]

/etc/nginx/templates/netdata.tmpl
19:    proxy_pass [url]http://127.0.0.1:19999/$ndpath$is_args$args;[/url]

The port 9999 was used for php-fpm :

/etc/php/7.3/fpm/pool.d/www.conf
5:listen = 127.0.0.1:9999

4

Re: iRedMail 1.1 over Debian 10 - No Netdata

When you access /netdata/, the http request should be proxied to netdata directly (port 19999), not to php-fpm (port 9999).
Seems your Nginx config file is messed up?