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

UTF-Grid not working in .fcgi-mode #5260

Merged
merged 1 commit into from Mar 4, 2016

Conversation

Projects
None yet
2 participants
@tbonfort
Member

tbonfort commented Mar 3, 2016

I use Mapserver 7.0.1 (and also tried the latest master) and wasn’t able to get any output from the web-Service as WMS-Request with format “application/json”.
The application/json-response has a filesize of 0Bytes, other formats (jpeg/png) work well – with exactly the same request, except the format.

UTF-Grid also seems to be produced well with a simulated request against mapserver on the commandline-interface
(“/usr/local/bin/mapserv QUERY_STRING="SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&BBOX=339444,5697190,347678,5702286&CRS=EPSG:25832&WIDTH=1556&HEIGHT=963&LAYERS=poi &STYLES=&FORMAT=application/json&TRANSPARENT=TRUE&map=PATH_TO_MAPFILE" > OUTPUT”)

Mapserver LOG (DEBUG 5) with above request wms request thru Apache webserver (fcgi-mode):
[Thu Mar 3 17:01:37 2016].53153 CGI Request 3 on process 2029
[Thu Mar 3 17:01:37 2016].53270 msDrawMap(): rendering using outputformat named json (UTFGrid).
[Thu Mar 3 17:01:37 2016].53278 msDrawMap(): WMS/WFS set-up and query, 0.000s
[Thu Mar 3 17:01:37 2016].60122 msDrawMap(): Layer 0 (poi_bildung), 0.007s
[Thu Mar 3 17:01:37 2016].60131 msDrawMap(): Drawing Label Cache, 0.000s
[Thu Mar 3 17:01:37 2016].60134 msDrawMap() total time: 0.007s
[Thu Mar 3 17:01:37 2016].63945 msSaveImage(stdout) total time: 0.004s
[Thu Mar 3 17:01:37 2016].63963 mapserv request processing time (msLoadMap not incl.): 0.011s
[Thu Mar 3 17:01:37 2016].63966 msFreeMap(): freeing map at 0x2ddcfe0.

Mapserver LOG (DEBUG 5) with above wms request (cgi-mode):
[Thu Mar 3 17:02:11 2016].882422 CGI Request 1 on process 2049
[Thu Mar 3 17:02:11 2016].882667 msDrawMap(): rendering using outputformat named json (UTFGrid).
[Thu Mar 3 17:02:11 2016].882677 msDrawMap(): WMS/WFS set-up and query, 0.000s
[Thu Mar 3 17:02:11 2016].915105 msDrawMap(): Layer 0 (poi_bildung), 0.032s
[Thu Mar 3 17:02:11 2016].915136 msDrawMap(): Drawing Label Cache, 0.000s
[Thu Mar 3 17:02:11 2016].915146 msDrawMap() total time: 0.033s
[Thu Mar 3 17:02:11 2016].926682 msSaveImage(stdout) total time: 0.011s
[Thu Mar 3 17:02:11 2016].926787 mapserv request processing time (msLoadMap not incl.): 0.044s
[Thu Mar 3 17:02:11 2016].926802 msFreeMap(): freeing map at 0xaf0300.

both look good, but no response on the client-side in fcgi-mode! cgi-mode works well!

Some further investigation showed me, that the correct output in fcgi-mode is written to the apache error.log!!!

it seems, that the mapserver output for format “application/json” in fcgi-mode goes to “STDERR” (apache error.log) and not to “STDOUT” (client)

I'm using a fully patched debian 7.

Please have a look at this.

THX

@ruhri

This comment has been minimized.

Show comment
Hide comment
@ruhri

ruhri Mar 3, 2016

could be temporarily (and dirty ;-) fixed with specific apache mod_rewrite rule to use cgi-mode, if query string contains "format=application/json"

RewriteCond %{QUERY_STRING} format=application/json [NC]
RewriteRule ... [PT,QSA]

ruhri commented Mar 3, 2016

could be temporarily (and dirty ;-) fixed with specific apache mod_rewrite rule to use cgi-mode, if query string contains "format=application/json"

RewriteCond %{QUERY_STRING} format=application/json [NC]
RewriteRule ... [PT,QSA]

@tbonfort

This comment has been minimized.

Show comment
Hide comment
@tbonfort

tbonfort Mar 3, 2016

Member

Please try attached patch

Member

tbonfort commented Mar 3, 2016

Please try attached patch

@ruhri

This comment has been minimized.

Show comment
Hide comment
@ruhri

ruhri Mar 3, 2016

Hi Thomas,
thank you for this amazingly fast reaction. I was right on the way home from the office, when I saw your response. I'll test the fix tomorrow morning.
If the bugfix works, this action could be a candidate for the fastest mapserver-bugfix ever 😉 (23minutes)

ruhri commented Mar 3, 2016

Hi Thomas,
thank you for this amazingly fast reaction. I was right on the way home from the office, when I saw your response. I'll test the fix tomorrow morning.
If the bugfix works, this action could be a candidate for the fastest mapserver-bugfix ever 😉 (23minutes)

ruhri added a commit to ruhri/mapserver that referenced this pull request Mar 4, 2016

@ruhri

This comment has been minimized.

Show comment
Hide comment
@ruhri

ruhri Mar 4, 2016

From my point of view this looks good, UTFGrid now also works in fcgi-mode.
Thank You, Thomas!

ruhri commented Mar 4, 2016

From my point of view this looks good, UTFGrid now also works in fcgi-mode.
Thank You, Thomas!

@tbonfort tbonfort merged commit fb73a05 into mapserver:branch-7-0 Mar 4, 2016

1 of 2 checks passed

continuous-integration/appveyor/pr AppVeyor was unable to build non-mergeable pull request
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@tbonfort tbonfort added this to the 7.0.2 Release milestone Mar 4, 2016

@tbonfort tbonfort self-assigned this Mar 4, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment