报表报500,tomcat日志显示报错:Can't connect to X11 window server using 'localhost:10.0' as the value of the DISPLAY variable

最近部署报表项目时,发现报表服务打不开(页面有明确报错,或者显示500Error),查看tomcat日志提示“Can't connect to X11 window server using 'localhost:10.0' as the value of the DISPLAY variable”,网上找了一些解决方法从而解决了这个问题:

参考原文:https://www.cnblogs.com/hwaggLee/p/5454463.html

解决方法:

1、找到${TOMCAT_HOME}/bin/catalina.sh (windows修改catalina.bat) 文件,在文件里加上一句 :CATALINA_OPTS=-Djava.awt.headless=true

2、修改完之后需要修改一下此文件权限:chmod +x *.sh

3、重启tomcat服务即可(./startup.sh)。

原文地址:https://www.cnblogs.com/foreverfj/p/11131296.html