Debian – GISPRO – QGIS problème edition
Erreur lors de l’impression
Server Internal Error
X dependency
The most important is probably the xorg requirement that Qt libs have when rendering to PDF, this is an undocumented requirement and the fix is not trivial.
The symptoms
Server chrashes after a GetPrint request with segfault, output in system logs:
- [33988.177726] qgis_mapserv.fc[28337]: segfault at 10 ip 00007f278e78c65b sp 00007fffaabf4c78 error 4 in libQtGui.so.4.8.2[7f278e51e000+a82000]
Fix
- sudo apt–get install xvfb
Since a configurable display number is needed (here set to 99), I’ve adapted the script setting display to 99:
- #!/bin/sh
- ### BEGIN INIT INFO
- # Provides: Xvfb
- # Required-Start: $local_fs $remote_fs
- # Required-Stop:
- # X-Start-Before:
- # Default-Start: 2 3 4 5
- # Default-Stop: 0 1 6
- # Short-Description: Loads X Virtual Frame Buffer
- ### END INIT INFO
-
- XVFB=/usr/bin/Xvfb
- XVFBARGS=“:99 -screen 0 1024x768x24 -ac +extension GLX +render -noreset”
- PIDFILE=/var/run/xvfb.pid
- case “$1” in
- start)
- echo –n “Starting virtual X frame buffer: Xvfb”
- start–stop–daemon —start —quiet —pidfile $PIDFILE —make–pidfile —background —exec $XVFB — $XVFBARGS
- echo “.”
- ;;
- stop)
- echo –n “Stopping virtual X frame buffer: Xvfb”
- start–stop–daemon —stop —quiet —pidfile $PIDFILE
- echo “.”
- ;;
- restart)
- $0 stop
- $0 start
- ;;
- *)
- echo “Usage: /etc/init.d/xvfb {start|stop|restart}”
- exit 1
- esac
-
- exit 0
Install it with:
- chmod +x /etc/init.d/xvfb
- update–rc.d xvfb defaults
Fast CGI needs an environment variable DISPLAY having the same display number (99), I’ve adapted the fcgid configuration accordingly:
- $ cat /etc/apache2/mods–enabled/fcgid.conf
-
- AddHandler fcgid–script .fcgi
- FcgidConnectTimeout 20
- # Pass display number to QGIS MapServer instances
- FcgidInitialEnv DISPLAY “:99”
|
Comments