Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bugfix][server] Fix prefix path for server #6502

Merged
merged 2 commits into from
Mar 1, 2018

Conversation

elpaso
Copy link
Contributor

@elpaso elpaso commented Mar 1, 2018

Fixes #18230 - service configuration error (service unknown or unsupported)

I thought about placing the fix into the server code, but I believe
that it's much more cleaner here: otherwise we'd need to adjust all
other paths after they have been uncorrectly set by the application
init() code.

Note that it is always possible to override the path with an environment variable.

Fixes qgis#18230 - service configuration error (service unknown or unsupported)

I though about placing the fix into the server code, but I believe
that it's much more cleaner here: otherwise we'd need to adjust all
other paths *after* they were uncorrectly set by the application
init() code.
@pblottiere
Copy link
Member

Nice, thank you @elpaso 👍! We encountered this issue with @elemoine when we tried qgis server 3 from debian packages (and we had to correctly set QGIS_PREFIX_PATH environment variable to make it work).

@elpaso elpaso merged commit baeaeac into qgis:master Mar 1, 2018
@elpaso elpaso deleted the bugfix-18230-server-prefix-path branch March 1, 2018 21:01
@ponceta
Copy link

ponceta commented Apr 11, 2018

In qgis 3.0.1 actual official package (on ubuntu 17.10), it is still required to fix it using something like

  # FIX path to library see https://issues.qgis.org/issues/18230
  FcgidInitialEnv QGIS_PREFIX_PATH "/usr" 

@umbe1987
Copy link

umbe1987 commented Oct 31, 2018

Is this still a problem? I am experiencing the same issue as in 3liz/lizmap-web-client#793 on my fresh Ubuntu Server 18.04 install and qgis-server/bionic,now 1:3.4.0+28bionic amd64.

Unfortunately, adding FcgidInitialEnv QGIS_PREFIX_PATH "/usr" to my qgis.demo.conf file and restart apache didn't make it work.

My test was:

  • downloading the demo files from https://github.com/qgis/QGIS-Training-Data
  • extracting the qgis-server-tutorial-data in my server's folder (mine is /home/ubuntu/projects/)
  • curl http://qgis.demo/cgi-bin/qgis_mapserv.fcgi?SERVICE=WMS%26VERSION=1.3.0%26REQUEST=GetCapabilities%26map=/home/ubuntu/qgis/projects/qgis-server-tutorial-data/world.qgs

The output I am receiving (before and after the QGIS_PREFIX_PATH workaround) is:

<ServiceExceptionReport xmlns="http://www.opengis.net/ogc" version="1.3.0">
 <ServiceException code="Service configuration error">Service unknown or unsupported</ServiceException>
</ServiceExceptionReport>

P.S.: I also tried with v2.0 of the demo data but still the same exception.

@umbe1987
Copy link

umbe1987 commented Nov 1, 2018

I also added a note in the original bug https://issues.qgis.org/issues/18230#note-13

@umbe1987
Copy link

umbe1987 commented Nov 3, 2018

Sorry, everything was ok with my config and QGIS SERVER.
Thanks to gis.stackoverflow comment to my question
https://gis.stackexchange.com/questions/301305/qgis-server-3-service-service-unknown-or-unsupported?noredirect=1#comment485177_301305
, I found out the problem was in the way I created my URL request and CURL.
Instead of doing curl
http://qgis.demo/cgi-bin/qgis_mapserv.fcgi?SERVICE=WMS%26VERSION=1.3.0%26REQUEST=GetCapabilities%26map=/home/ubuntu/qgis/projects/test_qgis/milano_test.qgs
I had to do curl
"http://qgis.demo/cgi-bin/qgis_mapserv.fcgi?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities&map=/home/ubuntu/qgis/projects/test_qgis/milano_test.qgs"
no %26 instead of &, and the entire URL within double quotes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants