Closed pabloyoyoista closed 1 year ago
I can not reproduce the problem. For me everything is fine
Uh, is that with the alpine-based container? This is what I'm seeing:
And the only things I have in the Dockerfile that I use to build it are:
FROM docker://zabbix/zabbix-web-apache-mysql:alpine-5.0-latest
USER root
ENV PHP_TZ='Europe/Madrid'
RUN apk add --no-cache tzdata && \
ln -fs /usr/share/zoneinfo/${PHP_TZ} /etc/localtime && \
echo ${PHP_TZ} > /etc/timezone && \
date
Hopefully is nothing else in my setup that's causing the issue, would be a pain to troubleshoot.
try to pull and rebuild.
I have the error too in the ubuntu version (6.4.2). No texts on Zabbix charts ...
PHP Warning: imagettftext(): Could not find/open font in /usr/share/zabbix/include/graphs.inc.php on line 555
what image do you use?
This one : zabbix/zabbix-web-nginx-mysql:6.4.2-ubuntu
I can confirm that #1078 fixed the issue, thanks!
hi, this is happening in zabbix-web-apache-mysql:ubuntu-6.0-latest too
I figured it out, the include/defines.php file has DejaVuSans hardcoded define('ZBX_GRAPH_FONT_NAME', 'DejaVuSans'); // font file name
I changed this to NotoSansCJKjp-Regular and it worked, but I switched back to using DejaVuSans because it loads faster than NotoSansCJKjp-Regular
For that, I had to do a symlink from correct DejaVuSans location and then it works okay ln -s /usr/share/fonts/truetype/dejavu/DejaVuSans.ttf /usr/share/zabbix/assets/fonts/DejaVuSans.ttf
So web-apache-mysql-6.0 needs a fix in the UI since build-mysql image in that branch is using NotoSansCJKjp-Regular font https://github.com/zabbix/zabbix-docker/blob/6.0/Dockerfiles/build-mysql/ubuntu/Dockerfile#L76
or maybe keep using DejaVuSans in 6.0 branch as it is faster but copy it in the sources instead of symlinking it from Linux distros. They keep changing the location.
SUMMARY
I am using
zabbix-web-apache-mysql:alpine-5.0-latest
image. Since tag5.0.33
(presumable commit a966d3fca479319ca32c9761c93e1572fc7f4b02), the legends of classic graphs do not have any text, but just empty color squares. The logs show repeated entries ofPHP Warning: imagettftext(): Could not find/open font in /usr/share/zabbix/include/graphs.inc.php on line 548
. Downloading the DejaVuSans font from the repo, and replacing its name back ininclude/defines.inc.php
, then the graphs correctly display again.OS / ENVIRONMENT / Used docker-compose files
I'm running the
zabbix-web-apache-mysql:alpine-5.0-latest
directly through podman.CONFIGURATION
STEPS TO REPRODUCE
Fire up an
zabbix-web-apache-mysql:alpine-5.0-latest
container, access it, and try to create some classic graph. See how the legend does not display.EXPECTED RESULTS
The legend displays correctly in the classic graphs.
ACTUAL RESULTS
Missing fonts in some graphs (can provide screenshot if necessary).
Maybe the new downloaded NotoSansCJKjp font has some incompatibilities with alpine? The said font is available through
font-noto-sans
package, so maybe one option is to directly use that one?