[ZBX-20671] Zabbix-nginx/geomaps don't work Created: 2022 Feb 24  Updated: 2024 Apr 10  Resolved: 2022 May 10

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: 6.0.0, 6.0.1rc1, 6.0.1rc2
Fix Version/s: 6.2 (plan)

Type: Problem report Priority: Trivial
Reporter: Juan Carlos Angelucci Assignee: Jurijs Klopovskis
Resolution: Fixed Votes: 0
Labels: dashboard, frontend
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Tested on Zabbix Appliance and Zabbix VM Ubuntu 20.04.2 (Upgrade and Fresh install)


Attachments: PNG File Geomap and nginx.png     PNG File Widget config.png     PNG File image-2022-03-10-09-28-53-359.png     PNG File image-2022-03-10-09-29-29-382.png     PNG File map.png     PNG File opt-1.png     PNG File opt.png    
Issue Links:
Duplicate
is duplicated by ZBX-21237 Default NGINX configuration prevents ... Closed
Team: Team D
Sprint: Sprint 86 (Mar 2022), Sprint 87 (Apr 2022)
Story Points: 0.2

 Description   

Excuse my English

Steps to reproduce:

  1. New installation or update of zabbix/nginx to 6.0 rc1, rc2 or LTS does not allow the maps to work correctly.
    The problem arises immediately when adding a geomap widget to the zabbix dashboard.

Result:
See screenshot Geomap and nginx

Tested with Firefox 97.0.1 (64-bit) and Chrome Versión 98.0.4758.102 (Build oficial) (64 bits)

It only happens with nginx, with apache it works fine.

nginx -V
nginx version: nginx/1.18.0 (Ubuntu)
built with OpenSSL 1.1.1f  31 Mar 2020
TLS SNI support enabled
configure arguments: --with-cc-opt='-g -O2 -fdebug-prefix-map=/build/nginx-KTLRnK/nginx-1.18.0=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Wdate-time -D_FORTIFY_SOURCE=2' --with-ld-opt='-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -fPIC' --prefix=/usr/share/nginx --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid --modules-path=/usr/lib/nginx/modules --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-debug --with-compat --with-pcre-jit --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_auth_request_module --with-http_v2_module --with-http_dav_module --with-http_slice_module --with-threads --with-http_addition_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_image_filter_module=dynamic --with-http_sub_module --with-http_xslt_module=dynamic --with-stream=dynamic --with-stream_ssl_module --with-mail=dynamic --with-mail_ssl_module
dpkg -l | grep -i zabbix
ii  zabbix-agent                       1:6.0.0-1+ubuntu20.04              amd64        Zabbix network monitoring solution - agent
ii  zabbix-frontend-php                1:6.0.0-1+ubuntu20.04              all          Zabbix network monitoring solution - PHP front-end
ii  zabbix-nginx-conf                  1:5.4.1-1+ubuntu20.04              all          Zabbix network monitoring solution - nginx and php-fpm configuration for front-end
ii  zabbix-release                     1:6.0-1+ubuntu20.04                all          Zabbix official repository configuration
ii  zabbix-server-pgsql                1:6.0.0-1+ubuntu20.04              amd64        Zabbix network monitoring solution - server (PostgreSQL)
ii  zabbix-sql-scripts                 1:5.4.1-1+ubuntu20.04              all          Zabbix network monitoring solution - sql-scripts
cat /etc/apt/sources.list.d/zabbix.list
deb https://repo.zabbix.com/zabbix/6.0/ubuntu focal main
deb-src https://repo.zabbix.com/zabbix/6.0/ubuntu focal main


 Comments   
Comment by Aleksey Volodin [ 2022 Feb 25 ]

Can you please share what Tile provider used?
Also please share widget settings.

Best regards,
Aleksey

Comment by Juan Carlos Angelucci [ 2022 Feb 25 ]

Tile provider:

Map Provider: OpenStreetMap Mapnik

https://\{s}.tile.openstreetmap.org/{z}/{x}/{y}.png

© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors

 

For widget see attachment.

We already tried with all the different tiles and it happens with all of them.

 

Thanks!!

 

Comment by Edgar Akhmetshin [ 2022 Feb 28 ]

Hello

Could you please provide all the files from /etc/nginx/ directory + PHP configuration files while problem is in place. This will help to repeat the issue locally.

Regards,
Edgar

Comment by hiwuye [ 2022 Mar 10 ]

遇到同样的问题(The same problem)

系统为(OS):centos 8 stream

nginx version: nginx/1.14.1

zabbix version:6.0.1

php version:7.2.24-1

Comment by Vladimir [ 2022 Apr 07 ]

Update 5.4 -> 6.0

OS: Debian 10.11

(Linux proxmox3 5.4.174-2-pve #1 SMP PVE 5.4.174-2 (Thu, 10 Mar 2022 15:58:44 +0100) x86_64 GNU/Linux)

nginx version: nginx/1.14.2

zabbix version:6.0.2

php version (php-fpm):PHP 7.3.31-1~deb10u1 (cli) (built: Oct 24 2021 15:18:08) ( NTS )

mysqld  Ver 10.5.15-MariaDB-1:10.5.15+maria~buster

Comment by Alex Kalimulin [ 2022 Apr 07 ]

With help of VaBank, the most likely cause has been found. The problem occurs when the widget cannot access leaflet.css.

This .css is blocked by older Zabbix nginx.confs (e.g. from Zabbix 5.4) because location matching expression is too broad. This happens if the new nginx.conf hasn't been selected during the upgrade to 6.0. If you didn't select the packaged (6.0) version of the config during the upgrade you can fix it manually.

Locate this block in Zabbix nginx.conf (typically /etc/zabbix/nginx.conf):

        location ~ /(api\/|conf[^\.]|include|locale|vendor) {
                deny            all;
                return          404;
        }

And change it to:

        location ~ /(api\/|conf[^\.]|include|locale) {
                deny            all;
                return          404;
        }

        location /vendor {
                deny            all;
                return          404;
        }

and don't forget to restart Nginx.

Comment by Alexander Vladishev [ 2022 May 10 ]

Added to Known issues in 6.0, 6.2

Generated at Sun Apr 06 09:13:00 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.