kartoza / docker-qgis-server

A dockerfile that contains a running QGIS server
68 stars 31 forks source link

<ServerException>Project file error</ServerException> #17

Open juusechec opened 5 years ago

juusechec commented 5 years ago

Hello, I want to deploy a QGIS project: qgis_project.zip

Using this command:

docker run --name "qgis-server" -v $(pwd)/qgis_project/:/project -p 8080:80 -d -t kartoza/qgis-server:3.0.3

But I've get the error: image

What I'm doing wrong?

With LTS version I don't have any problem.

hbruch commented 5 years ago

Same here when requesting GetProjectSettings. Results of "docker logs qgis-server":

...
[Sun Sep 23 11:32:26.557542 2018] [core:notice] [pid 1:tid 140429109689280] AH00094: Command line: 'apache2 -D FOREGROUND'
ERROR: Auth db directory path could not be created
Initializing server modules from  "/usr/lib/lib/qgis/server"

"Checking /usr/lib/lib/qgis/server for native services modules"
"Loading native module /usr/lib/lib/qgis/server/libdummy.so"
"Loading native module /usr/lib/lib/qgis/server/libwcs.so"
"Loading native module /usr/lib/lib/qgis/server/libwfs.so"
"Loading native module /usr/lib/lib/qgis/server/libwms.so"
QFSFileEngine::open: No file name specified
X.X.X.X - - [23/Sep/2018:11:33:09 +0000] "GET /?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetProjectSettings HTTP/1.0" 500 271 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:62.0) Gecko/20100101 Firefox/62.0"

EDIT: Seems as environment variable QGIS_PROJECT_FILE is not passed: [63][12:26:14] - QGIS_PROJECT_FILE / '' (QGIS project file): '' (read from DEFAULT_VALUE)

Adding the following line to /etc/apache2/conf-enabled/qgis.conf solved this for me, though I have no idea why it worked for 2.18/LTS... FcgidInitialEnv QGIS_PROJECT_FILE ${QGIS_PROJECT_FILE}