<div dir="ltr"><div>Hi Etienne,<br></div><div><br></div><div>Installed and configured xvfb but GetPrint gives the correct layout elements without any of my layer... even OSM layer was blank<br>Tried a few times and then appeared a small arabic label... Since I'm in italy I realized that I have to invert axes in the map0:EXTENT parameter</div><div><br></div><div>The documentation says.<br>This parameter specifies the extent for a layout map item as xmin,ymin,xmax,ymax.</div><div><br></div><div>But i forgot to read again the Getmap section that describes axis order. </div><div><br>Thank-you everybody</div><div><br></div>Amedeo<br><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">Il giorno mar 8 lug 2025 alle ore 15:09 Etienne Trimaille <<a href="mailto:etienne.trimaille@gmail.com">etienne.trimaille@gmail.com</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>You should have a warning like this in QGIS Server logs (increase debug level maybe) : <br></div><div><br></div><div>[WRN] (from Qgis) PostGIS: Connection to database failed<br>definition of service « name of your service » not found</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Next step is make GetPrint working... maybe I'll post another question tomorrow :-)</blockquote><div><br></div><div>Look at XVFB<br></div><div><a href="https://docs.qgis.org/3.40/en/docs/server_manual/getting_started.html#xvfb" target="_blank">https://docs.qgis.org/3.40/en/docs/server_manual/getting_started.html#xvfb</a> <br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le mar. 8 juil. 2025 à 10:43, Amedeo Fadini via QGIS-User <<a href="mailto:qgis-user@lists.osgeo.org" target="_blank">qgis-user@lists.osgeo.org</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi jorge, <div>thank you very much your advice wer useful:<br><br><div>yes I checked permission of .pg_service.conf file and parent dir, same thing happens also putting the file in other locations and chown-ing the file to www-data.</div><div><br></div><div>Not sure where QGIS server should log in this configuration (there's a sysadmin that manage installation in the server i will ask him to make a separate log)<br> but I found something in syslog.</div><div><br></div><div>It seems that thte variable PGSERVICEFILE is not evaluated. </div><div>I've solved commenting the line and putting configuration in the system-wide pgservice.conf location /etc/postgresql.common</div><div><br></div><div>Next step is make GetPrint working... maybe I'll post another question tomorrow :-)<br><br>amefad</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il giorno lun 7 lug 2025 alle ore 23:12 Jorge Gustavo Rocha via QGIS-User <<a href="mailto:qgis-user@lists.osgeo.org" target="_blank">qgis-user@lists.osgeo.org</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><u></u>
<div>
<p>Hi Amedeo,</p>
<p>Is the www-data user able to read the pg service file? If you
didn't change the permissions, /home/ubuntu/.pg_service.conf is
only readable by ubuntu user.</p>
<p>Can you check the qgis server logs to see what is going on?</p>
<p>Best regards,</p>
<p>Jorge<br>
</p>
<div>Às 21:05 de 07/07/25, Amedeo Fadini via
QGIS-User escreveu:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Errata corrige, the demo project works, the sqlite
file was with wrong permission.<br>
Still doesn't load postgis layer<br>
<div><br>
</div>
<div>Amedeo</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">Il giorno lun 7 lug 2025 alle
ore 21:54 Amedeo Fadini <<a href="mailto:amefad@gmail.com" target="_blank">amefad@gmail.com</a>>
ha scritto:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">Hi everybody,
<div><br>
</div>
<div>I'm upgrading a project based on QGIS server and moved
all stuff to new server with Ubuntu 24, QGIS 3.40 LTR
postgresql 16. </div>
<div>Webserver is nginx, QGIS server is configured on
spawn-fcgi with single socket follwing the qgis manual <br>
<a href="https://docs.qgis.org/3.40/en/docs/server_manual/getting_started.html#spawn-fcgi" target="_blank">https://docs.qgis.org/3.40/en/docs/server_manual/getting_started.html#spawn-fcgi</a></div>
<div>The project use two layers from postgis, the connection
is configured with pg service</div>
<div><br>
</div>
<div>Connecting on ssh with x.forwarding the project loads
without any error and works fine</div>
<div><br>
</div>
<div>Calling the qgis server getcapabilities or get
projectsettings it raise the error </div>
<div><span style="font-family:monospace;font-size:13px"><ServerException></span><span style="color:rgb(0,0,0);font-family:monospace;font-size:13px">Layer(s)
not valid</span><span style="font-family:monospace;font-size:13px"></ServerException></span></div>
<div>Setting QGIS_SERVER_IGNORE_BAD_LAYERS=true
getcapabilities works but postgis layer are not published
or not showed in Getmap request.</div>
<div><br>
</div>
<div>Any clue? Where can I find more detailed erro log?</div>
<div><br>
</div>
<div>even the demo project world.qgs gives balnk image in
getmap request. Am I misisng a local Xserver or gui
configuration?</div>
<div><br>
</div>
<div>Below is my nginx conf and
systemd/system/qgis-server.service</div>
<div><br>
</div>
<div>Thank you </div>
<div><br>
</div>
<div>Amedeo Fadini</div>
<div><br>
</div>
<div>---</div>
<div>server {<br>
listen 80;<br>
server_name <my server name>;<br>
<br>
location /qgis/ {<br>
include fastcgi_params;<br>
fastcgi_param SCRIPT_FILENAME
/usr/lib/cgi-bin/qgis_mapserv.fcgi;<br>
#fastcgi_param QGIS_DEBUG 1;<br>
fastcgi_param QGIS_SERVER_LOG_STDERR 1;<br>
#fastcgi_param QGIS_SERVER_LOG_LEVEL 0;<br>
fastcgi_param QGIS_SERVER_LOG_LEVEL 2;<br>
#fastcgi_param PGSERVICEFILE
/home/ubuntu/.pg_service.conf;<br>
#fastcgi_param QGIS_PROJECT_FILE
/home/ubuntu/fiduciali_qgis/fiduciali.qgs;<br>
fastcgi_pass <a>unix:/var/run/qgisserver.socket</a>;<br>
}<br>
}<br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>---</div>
<div><br>
</div>
<div>[Unit]<br>
Description=QGIS server<br>
After=network.target<br>
<br>
[Service]<br>
;; set env var as needed<br>
;Environment="LANG=en_EN.UTF-8"<br>
;Environment="QGIS_SERVER_PARALLEL_RENDERING=1"<br>
;Environment="QGIS_SERVER_MAX_THREADS=12"<br>
Environment="QGIS_SERVER_LOG_LEVEL=0"<br>
Environment="QGIS_SERVER_LOG_STDERR=1"<br>
Environment="PGSERVICEFILE=/home/ubuntu/.pg_service.conf"<br>
;Environment="QGIS_PROJECT_FILE=/var/www/qgis_projects/world.qgs"<br>
Environment="QGIS_PROJECT_FILE=/var/www/qgis_projects/fiduciali.qgs"<br>
Environment="QGIS_SERVER_IGNORE_BAD_LAYERS=true"<br>
;; or use a file:<br>
;EnvironmentFile=/etc/qgis-server-env<br>
<br>
ExecStart=spawn-fcgi -s /var/run/qgisserver.socket -U
www-data -G www-data -n /usr/lib/cgi-bin><br>
<br>
[Install]<br>
WantedBy=multi-user.target<br>
</div>
</div>
</blockquote>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
QGIS-User mailing list
<a href="mailto:QGIS-User@lists.osgeo.org" target="_blank">QGIS-User@lists.osgeo.org</a>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a>
</pre>
</blockquote>
<div>-- <br>
<div> <span> <b> <font size="+2">Geomaster, LDA</font> </b> </span><br>
<div> <b> <font color="#999999" size="-2">VENHA DESCOBRIR O CAMINHO DO OPEN SOURCE CONNOSC</font>
</b>
<table width="450" border="0" height="126" cellspacing="1" cellpadding="2">
<tbody>
<tr>
<td width="150" height="50" valign="top"> <font size="-1"><span> <font size="-2"> </font><br>
Rua Afonso Palmeira, 31, 7 D<br>
4715-278 Braga<br>
VAT/NIF </span><span> 510 906 109<br>
Phone</span><span> +351 253 257 173<br>
</span>Site <a href="http://geomaster.pt" rel="noreferrer" target="_blank">geomaster.pt</a><br>
GPS 41.54627, -8.40432 </font><br>
<span><img src="cid:ii_197e92cb746481bf9481" alt="Logo" width="50" height="50" align="left"></span>
</td>
<td width="25" valign="top" align="right"> <font size="-1"><span></span></font>
<hr width="2" size="100" align="right"> </td>
<td width="150" height="50" valign="top" nowrap>
<font size="-1"> <font size="-1"> <font size="-2"> </font><br>
Jorge Gustavo Rocha </font><br>
<font color="#999999" size="-2">CTO<br>
<br>
</font>Mobile </font> <font size="-1"><span> +351 910 333 888<br>
Email <a href="mailto:jgr@geomaster.pt" target="_blank">jgr@geomaster.pt</a></span></font> </td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
_______________________________________________<br>
QGIS-User mailing list<br>
<a href="mailto:QGIS-User@lists.osgeo.org" target="_blank">QGIS-User@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
</blockquote></div>
_______________________________________________<br>
QGIS-User mailing list<br>
<a href="mailto:QGIS-User@lists.osgeo.org" target="_blank">QGIS-User@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
</blockquote></div>
</blockquote></div></div>