java.lang.InternalError: Can't connect to X11 window server using 'localhost:10.0' as the value of the DISPLAY variable
Solution: add parameter in startup script
java -Djava.awt.headless=true -jar "$SCRIPTPATH/../lib/jasperstarter.jar" "$@"
Problem seems to occur after a few days on a django website. If I run the script manually it will always work.
sample python code:
cmd="/opt/jasperstarter/bin/jasperstarter" + " pr -t postgres -u postgres -f pdf -H localhost -n bgmc /var/www/bgmc/rapporten/leverancier_tracering.jrxml -o /tmp/%s -p postgres -P uuid=%s"%(uniekid,uniekid)
(out, err) = Popen(cmd, close_fds=True, shell=True).communicate(None)
After I added the "headless" startup parameter the problem never occured again.
X is installed on the machine but not running. Django is running with Gunicorn.
Linux
It looks like you are using X-forwarding when connecting to the django machine and trying to run the above command. Can you please try to connect to your django host without X-forwarding (ssh -x …)and run the command again (and remove the headless parameter from the startup script)?