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