<div dir="ltr">Hi,<div><br></div><div>To me it looks like the server cannot create the path to store its credentials:</div><div><br></div><div>ERROR: Auth db directory path could not be created </div><div><br></div><div>Could you probably check permissions if the server is allowed to write there?</div><div><br></div><div>regards</div><div>Werner <br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Dec 13, 2019 at 10:03 AM Arnaud Vandecasteele <<a href="mailto:arnaud.sig@gmail.com">arnaud.sig@gmail.com</a>> wrote:<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="auto"><div>Hi Alessandro,<div dir="auto"><br></div><div dir="auto">Indeed there is no db file created.</div><div dir="auto">I've checked the link you gave me, but I don't know what to with this. Am I suppose to execute something ? </div><div dir="auto"><br></div><div dir="auto">Best, </div><div dir="auto"><br></div><div dir="auto">Arnaud</div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le ven. 13 déc. 2019 à 12:50, Alessandro Pasotti <<a href="mailto:apasotti@gmail.com" target="_blank">apasotti@gmail.com</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"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Dec 13, 2019 at 9:17 AM Arnaud Vandecasteele <<a href="mailto:arnaud.sig@gmail.com" rel="noreferrer" target="_blank">arnaud.sig@gmail.com</a>> wrote:<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>Hi Etienne,</div><div><br></div><div>Thanks for your help.<br></div><div>As suggested, I change the config for :</div><div><br></div><div> FcgidInitialEnv DISPLAY ":99"<br> FcgidInitialEnv QGIS_SERVER_LOG_LEVEL "0"<br> FcgidInitialEnv QGIS_SERVER_LOG_STDERR "1"<br> FcgidInitialEnv QGIS_AUTH_DB_DIR_PATH "/home/arnaudvandecasteele/qgisserver"<br> FcgidInitialEnv QGIS_AUTH_PASSWORD_FILE "/home/arnaudvandecasteele/qgisserver/qgis-auth.db"<br> FcgidInitialEnv QGIS_PREFIX_PATH /usr<br> FcgidInitialEnv QGIS_OPTIONS_PATH "/home/arnaudvandecasteele/qgisserver/</div><div><br></div><div>The folder rights looks ok.<br></div><div>ls -l</div><div>drwxrwxr-x 2 www-data www-data 4096 Dec 13 08:45 qgisserver</div><div><br></div><div>Unfortunately the error remain :</div><div>*************<br></div><div>Warning 1: Unable to find driver ECW to unload from GDAL_SKIP environment variable.<br>Warning 1: Unable to find driver ECW to unload from GDAL_SKIP environment variable.<br>Warning 1: Unable to find driver JP2ECW to unload from GDAL_SKIP environment variable.<br>Warning 1: Unable to find driver ECW to unload from GDAL_SKIP environment variable.<br>Warning 1: Unable to find driver JP2ECW to unload from GDAL_SKIP environment variable.<br>ERROR: Auth db directory path could not be created<br>Initializing server modules from "/usr/lib/qgis/server" <br><br>"Checking /usr/lib/qgis/server for native services modules"<br>"Loading native module /usr/lib/qgis/server/libdummy.so"<br>"Loading native module /usr/lib/qgis/server/libwcs.so"<br>"Loading native module /usr/lib/qgis/server/libwfs.so"<br>"Loading native module /usr/lib/qgis/server/libwms.so"<br>"Loading native module /usr/lib/qgis/server/libwmts.so"<br>ERROR: Opening of authentication db FAILED<br>QSqlQuery::prepare: database not open<br>WARNING: Auth db query exec() FAILED</div><div>*************</div><div><br></div><div>As I understand the use of the authentification system in desktop mode, it is still a bit confusing for me when using a server.<br></div><div>For example, I don't have any qgis-auth.db file on my server. Do I have to copy it from my desktop ?</div></div></blockquote><div><br></div><div><br></div><div>Hi,</div><div><br></div><div>no, you don't need to copy it unless you want to use the credentials you've stored in it.</div><div><br></div><div>The DB will be created automatically if it doesn't exist when QGIS Server process starts.</div><div><br></div><div>See: <a href="https://github.com/qgis/QGIS/blob/master/src/server/qgsserver.cpp#L245" rel="noreferrer" target="_blank">https://github.com/qgis/QGIS/blob/master/src/server/qgsserver.cpp#L245</a></div><div><br></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"><div dir="ltr"><div><br></div><div>Thanks again,</div><div><br></div><div>Best,</div><div><br></div><div>Arnaud<br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Dec 13, 2019 at 11:37 AM Etienne Trimaille <<a href="mailto:etienne.trimaille@gmail.com" rel="noreferrer" target="_blank">etienne.trimaille@gmail.com</a>> wrote:<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>Hi Arnaud,</div><div><br></div><div>It looks like a cache write issue.</div><div><br></div><div>QGIS_OPTIONS_PATH must be a directory, not a file path.</div><div><a href="https://docs.qgis.org/testing/en/docs/user_manual/working_with_ogc/server/config.html#qgis-options-path" rel="noreferrer" target="_blank">https://docs.qgis.org/testing/en/docs/user_manual/working_with_ogc/server/config.html#qgis-options-path</a></div><div><br></div><div>I would add QGIS_OPTIONS_PATH too. And check that the profile is writable for QGIS Server (www-data?). After the GetPrint request, I think you should see the cache folder created.<br></div><div><br></div><div>This my config :<br></div><div><br></div><div>QGIS_CUSTOM_CONFIG_PATH=/home/etienne/dev/qgis/server_home/profile<br>QGIS_OPTIONS_PATH=/home/etienne/dev/qgis/server_home<br>QGIS_PLUGINPATH=/home/etienne/dev/qgis/server_plugin</div><div><br></div><div>Can you check that?<br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le ven. 13 déc. 2019 à 07:25, Arnaud Vandecasteele <<a href="mailto:arnaud.sig@gmail.com" rel="noreferrer" target="_blank">arnaud.sig@gmail.com</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">****<br>Distribution Ubuntu <br>QGIS Server on server -> Version: 3.4.11+dfsg-2~bionic1<br>QGIS Server on computer -> Version: 3.4.13+dfsg-3~bionic2<br>****<br><br>I have QGIS Server installed on my computer and on my server. The same project is used on both. This project is very simple and contains a SHP layer and a XYZ OpenStreetMap layer. When printing the map (GetPrint) on my computer all layers are correctly displayed.<br>The same operation on the server displays only the SHP layer and not the XYZ layer.<br><br>When the GetPrint request is made on the server, the following lines are added to the log file:<br>ERROR: Opening of authentication db FAILED<br>QSqlQuery::prepare: database not open<br>WARNING: Auth db query exec() FAILED<br><br>However, I have the impression that my configuration file is correctly configured:<br><br> FcgidInitialEnv DISPLAY":99"<br> FcgidInitialEnv QGIS_SERVER_LOG_LEVEL "0"<br> FcgidInitialEnv QGIS_SERVER_LOG_STDERR "1"<br> FcgidInitialEnv QGIS_AUTH_DB_DIR_PATH "/home/qgis/qgisserverdb"<br> FcgidInitialEnv QGIS_AUTH_PASSWORD_FILE "/home/qgis/qgisserverdb/qgis-auth.db"<br> FcgidInitialEnv QGIS_PREFIX_PATH /usr<br> FcgidInitialEnv QGIS_OPTIONS_PATH /data/owncloud-data/arnaud/files/GEOLAB/Transfert/webmapping-lizmap/QGIS3.ini<br> <Rental /qgisserver><br> SetHandler fcgid-script<br> FcgidWrapper /usr/lib/cgi-bin/qgis_mapserv.fcgi virtual<br> Options +ExecCGI -MultiViews +FollowSymLinks<br> Require all granted<br> </Location><br><br> ErrorLog ${APACHE_LOG_DIR}/map-error.log<br> LogLevel warn<br> CustomLog ${APACHE_LOG_DIR}/map-access.log combined<br><br>And the permissions look good:<br>ls -l /home/qgis/ <br>drwxr-xr-x 2 www-data www-data www-data 4096 Oct 25 08:46 cache <br>drwxr-xr-xx 2 www-data www-data www-data 4096 Jun 20 07:32 qgisserverdb<br><br>Do you have any idea what might cause this problem?<br><br>Thank you in advance,<br><br>Arnaud<br></div>
_______________________________________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org" rel="noreferrer" target="_blank">Qgis-user@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer 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 noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a></blockquote></div>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr"><div dir="ltr">--------------------------------------------------------------------<br>Arnaud Vandecasteele<br>SIG - WebMapping - Spatial Ontology - GeoCollaboration<br><br>Web Site<br><a href="http://geotribu.net/" rel="noreferrer" target="_blank">http://geotribu.net/</a><br><a href="http://about.me/arnaud_vandecasteele" rel="noreferrer" target="_blank">http://about.me/arnaud_vandecasteele</a><br><br></div></div>
_______________________________________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org" rel="noreferrer" target="_blank">Qgis-user@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer 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 noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a></blockquote></div><br clear="all"><br>-- <br><div dir="ltr">Alessandro Pasotti<br>w3: <a href="http://www.itopen.it" rel="noreferrer" target="_blank">www.itopen.it</a></div></div>
</blockquote></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></blockquote></div>