Re: [mapserver-users] cgi-error: End of script output before headers mapserv

2020-01-23 Thread Eichner, Andreas - SID
Hi,

below you called mapserv with mode=map, have you also tried with the original 
failing query you used for your WMS?
Is your original request reproducible, i.e. it fails every time or only 
sometimes? 

greets

-Ursprüngliche Nachricht-
Von: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] Im 
Auftrag von Johannes Paul
Gesendet: Mittwoch, 22. Januar 2020 16:29
An: Jeff McKenna; Jörg Thomsen (WhereGroup)
Cc: mapserver-users@lists.osgeo.org
Betreff: Re: [mapserver-users] cgi-error: End of script output before headers 
mapserv

Thanks for your help.
1. the mapserv cgi command line gave me a proper png (./mapserv -nh 
"QUERY_STRING=map=/var/www/html/osm-transp-en-default.map=map" > 
/tmp/test.png)
2. i turned on CPL_DEBUG in my mapfile but it doesn't help
3. i ran : shp2img -m /var/www/html/osm-transp-en-default.map -o /tmp/test.png 
-all_debug 5 -e -9.1433 38.7460 -9.1406 38.7487 &> /tmp/shp2img_log.txt
and it looks fine to me...


On Wed, 22 Jan 2020 at 15:28, Jeff McKenna  
wrote:


The more tests the better :)

-jeff



On 2020-01-22 10:21 a.m., Jörg Thomsen (WhereGroup) wrote:
> Hello Jeff,
> 
> is shp2img exactly the same as mapserv? (My thought was to use the 
same
> executable the webserver calls)
> 
> Jo,
> did you get a proper result (image) from your command line request? 
the
> 'error'-messages look quite OK.
> 
> Jörg
> 
> 
> Am 22.01.20 um 15:12 schrieb Jeff McKenna:
>> Hi Jo,
>>
>> Are you passing the problem extents to the shp2img utility?  Such as:
>>
>>shp2img -m osm-transp-en-default.map -e -9.1433 38.7460 -9.1406
>> 38.7487 -o ttt.png -all_debug 5
>>
>> If that doesn't help, then I would start from the beginning: execute 
a
>> GetCapabilities request and make sure you remove all "WARNING" 
messages.
>>
>> -jeff
>>
>>
>>
> 
> 
> Viele Grüße,
> Jörg Thomsen
> 


-- 
Jeff McKenna
MapServer Consulting and Training Services
https://gatewaygeomatics.com/
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] cgi-error: End of script output before headers mapserv

2020-01-23 Thread Johannes Paul
Hi Brian,
I'm not usinage fcgi on my side, and it is not related to file permission
or bad cgi script.
I've tried to work on my Osm postgis tables, and made the geom valid, like
Jukka said, but it didn't change anything...
I'm thinking it might be related with Apache MPM prefork module and the
MaxRequestWorker ?
Keep in touch


Le jeu. 23 janv. 2020 à 20:27, Brian  a écrit :

> So I have this error as well. I mostly see it when a connection times out.
> Like you mapserver shows no errors but apache has the script ended before
> headers error. Do you have fcgi enabled? If I disable fcgi I don't get that
> error, so It could be related to connection a user has to mapserver. Maybe
> FcgidMaxRequestsPerProcess, FcgidMinProcessesPerClass,
> FcgidMaxProcessesPerClass  need to be tweaked?
>
> If you do a google search on this error most of the responses says it is
> either due to a bad cgi script or bad file/dir permissions which in our
> case I doubt that is the reason. If you figure it out let me know.
>
> On Wed, Jan 22, 2020 at 12:31 PM Rahkonen Jukka (MML) <
> jukka.rahko...@maanmittauslaitos.fi> wrote:
>
>> Hi,
>>
>>
>>
>> I would suspect data, especially because it seems to be OSM data. Perhaps
>> some invalid polygon again.
>>
>>
>>
>> You use =default and I suppose that it means all the layers from
>> your mapfile together. In that case I would try to catch the failing layer
>> by adding layers one by one and in groups (first =layer1, then
>> =layer2, then =layer1,layer2).
>>
>>
>>
>> Hopefully that way you can find the failing layer, and then because you
>> know the BBOX you may find the nasty geometry from the database. Without
>> your data and mapfile it is rather useless to make very much guesswork, but
>> a small change in bbox may select/not select a bad geometry, of change of
>> bbox may change scale so much that source data come from a different table
>> if you have a scale dependent layer group in the mapfile etc.
>>
>>
>>
>> If the issue is due to bad geometry and you use PostGIS you may find it
>> with ST_IsValid and ST_IsValidReason, and correct with ST_MakeValid.
>>
>>
>>
>> -Jukka Rahkonen-
>>
>>
>>
>> *Lähettäjä:* mapserver-users  
>> *Puolesta
>> *Johannes Paul
>> *Lähetetty:* keskiviikko 22. tammikuuta 2020 13.02
>> *Vastaanottaja:* mapserver-users@lists.osgeo.org
>> *Aihe:* [mapserver-users] cgi-error: End of script output before headers
>> mapserv
>>
>>
>>
>> Hello,
>>
>> my mapserver is having a very strange behaviour, which I can't explain,
>> nor debug.
>>
>> I'm using mapserver 7.0.0 along with apache http server 2.4.6.
>>
>>
>>
>> Most of the time, the server is working just fine, i.e. when I request a
>> typical URL, I get my image back:
>>
>>
>>
>>
>> http://10.0.0.22/cgi-bin/mapserv?map=/var/www/html/osm-transp-en-default.map=1.1.0=getmap=wms==-9.143,38.746,-9.140,38.748=256=256=default=image/png=EPSG:4326=true
>>
>>
>>
>> but then, when I slightly change bbox values, I get an internal server
>> error (500):
>>
>>
>>
>>
>> http://10.0.0.22/cgi-bin/mapserv?map=/var/www/html/osm-transp-en-default.map=1.1.0=getmap=wms==-9.1433,38.7460,-9.1406,38.7487=256=256=default=image/png=EPSG:4326=true
>>
>>
>>
>> I don't get any mapserver error log, but I do get an apache error log
>> saying:
>>
>> [cgi:error] End of script output before headers: mapserv
>>
>>
>>
>> This is really an strange behaviour which I can't explain.
>>
>> Did anyone already experienced a similar situation ?
>>
>> Thanks
>>
>> Jo
>> ___
>> mapserver-users mailing list
>> mapserver-users@lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] cgi-error: End of script output before headers mapserv

2020-01-23 Thread Brian
So I have this error as well. I mostly see it when a connection times out.
Like you mapserver shows no errors but apache has the script ended before
headers error. Do you have fcgi enabled? If I disable fcgi I don't get that
error, so It could be related to connection a user has to mapserver. Maybe
FcgidMaxRequestsPerProcess, FcgidMinProcessesPerClass,
FcgidMaxProcessesPerClass  need to be tweaked?

If you do a google search on this error most of the responses says it is
either due to a bad cgi script or bad file/dir permissions which in our
case I doubt that is the reason. If you figure it out let me know.

On Wed, Jan 22, 2020 at 12:31 PM Rahkonen Jukka (MML) <
jukka.rahko...@maanmittauslaitos.fi> wrote:

> Hi,
>
>
>
> I would suspect data, especially because it seems to be OSM data. Perhaps
> some invalid polygon again.
>
>
>
> You use =default and I suppose that it means all the layers from
> your mapfile together. In that case I would try to catch the failing layer
> by adding layers one by one and in groups (first =layer1, then
> =layer2, then =layer1,layer2).
>
>
>
> Hopefully that way you can find the failing layer, and then because you
> know the BBOX you may find the nasty geometry from the database. Without
> your data and mapfile it is rather useless to make very much guesswork, but
> a small change in bbox may select/not select a bad geometry, of change of
> bbox may change scale so much that source data come from a different table
> if you have a scale dependent layer group in the mapfile etc.
>
>
>
> If the issue is due to bad geometry and you use PostGIS you may find it
> with ST_IsValid and ST_IsValidReason, and correct with ST_MakeValid.
>
>
>
> -Jukka Rahkonen-
>
>
>
> *Lähettäjä:* mapserver-users  
> *Puolesta
> *Johannes Paul
> *Lähetetty:* keskiviikko 22. tammikuuta 2020 13.02
> *Vastaanottaja:* mapserver-users@lists.osgeo.org
> *Aihe:* [mapserver-users] cgi-error: End of script output before headers
> mapserv
>
>
>
> Hello,
>
> my mapserver is having a very strange behaviour, which I can't explain,
> nor debug.
>
> I'm using mapserver 7.0.0 along with apache http server 2.4.6.
>
>
>
> Most of the time, the server is working just fine, i.e. when I request a
> typical URL, I get my image back:
>
>
>
>
> http://10.0.0.22/cgi-bin/mapserv?map=/var/www/html/osm-transp-en-default.map=1.1.0=getmap=wms==-9.143,38.746,-9.140,38.748=256=256=default=image/png=EPSG:4326=true
>
>
>
> but then, when I slightly change bbox values, I get an internal server
> error (500):
>
>
>
>
> http://10.0.0.22/cgi-bin/mapserv?map=/var/www/html/osm-transp-en-default.map=1.1.0=getmap=wms==-9.1433,38.7460,-9.1406,38.7487=256=256=default=image/png=EPSG:4326=true
>
>
>
> I don't get any mapserver error log, but I do get an apache error log
> saying:
>
> [cgi:error] End of script output before headers: mapserv
>
>
>
> This is really an strange behaviour which I can't explain.
>
> Did anyone already experienced a similar situation ?
>
> Thanks
>
> Jo
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users