Discussion:
[MapProxy] mapproxy with mapserver srs problem
karsten
2013-10-15 08:20:16 UTC
Permalink
Hi,

I have installed mapproxy on my Ubuntu server outside the virtual
environment (the virtual env was troublesome so I for now settled for this
option).
I am able to run the demo site with both the regular apache server and also
the test server.
This works great. I now added one MapServer layer (which is located on the
same server. I tested again that my wms is working and it is e.g.

http://terra2.terragis.net/cgi-bin/mapserv?map=/mnt/maps/vfs_mapproxytest.ma
p
<http://terra2.terragis.net/cgi-bin/mapserv?map=/mnt/maps/vfs_mapproxytest.m
ap&LAYERS=gemeinde_merc&TRANSPARENT=TRUE&SERVICE=WMS&VERSION=1.1.1&REQUEST=G
etMap&STYLES=&FORMAT=image%2Fpng&SRS=EPSG%3A900913&BBOX=1160758.2358917,6226
544.0158282,1273273.5415119,6351442.1200288&WIDTH=736&HEIGHT=817>
&LAYERS=gemeinde_merc&TRANSPARENT=TRUE&SERVICE=WMS&VERSION=1.1.1&REQUEST=Get
Map&STYLES=&FORMAT=image%2Fpng&SRS=EPSG%3A900913&BBOX=1160758.2358917,622654
4.0158282,1273273.5415119,6351442.1200288&WIDTH=736&HEIGHT=817


Now when I try to use MapProxy I always get a message back that the SRS is
not valid for all layers. However there is only one layer in the map files
and it has teh following srs configured:
"wms_srs" "epsg:31468 epsg:31494 epsg:4326 epsg:900913"

My questions are

1. is there a way (hopefully outside of python and in the configuration
files) to not only log the actual WMS request MapProxy makes to MapServer .
So far I could only see the requests made ot the MapProxy service (I saw
that in the console output and the apache log file)

2. Is there anything obvious wrong with my configuration ( see below) so I
can not get any images back from MapServer / MapProxy ?

Cheers
Karsten

----------------------------------------------------------------------------
--------------------
In MapProxy yaml I have added to the demo layers this:

... snip ....
layers:
- name: gemeinde
title: Gemeinden in Bayern
sources: [gemeinde_cache]

caches:
gemeinde_cache:
grids: [bayern]
sources: [gemeinde_wms]


sources:
gemeinde_wms:
type: mapserver
req:
layers: gemeinde_merc
map: /mnt/maps/vfs_mapproxytest.map
mapserver:
binary: /var/www <http://localhost/cgi-bin/mapserv> /cgi-bin/mapserv
working_dir: /mnt/maps/
coverage:
bbox: [1025548.802262,6027618.553381,1540090.415317,6519963.998869]
bbox_srs: 'EPSG:900913'

grids:
bayern:
base: GLOBAL_WEBMERCATOR

globals:
image:
formats:
terra_image_jpeg:
format: image/jpeg
resampling_method: nearest
jpeg_quality: 90

...

Karsten Vennemann
Principal

Terra GIS LTD
2119 Boyer Ave E
Seattle, WA 98112
USA
<http://www.terragis.net/> www.terragis.net


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapproxy/attachments/20131015/62586c1f/attachment.html>
karsten
2013-10-15 08:23:19 UTC
Permalink
the WMS request was mangled below so again it is
http://terra2.terragis.net/cgi-bin/mapserv?map=/mnt/maps/vfs_mapproxytest.ma
p&LAYERS=gemeinde_merc&TRANSPARENT=TRUE&SERVICE=WMS&VERSION=1.1.1&REQUEST=Ge
tMap&STYLES=&FORMAT=image%2Fpng&SRS=EPSG%3A900913&BBOX=1160758.2358917,62265
44.0158282,1273273.5415119,6351442.1200288&WIDTH=736&HEIGHT=817

Karsten
karsten
2013-10-15 08:26:32 UTC
Permalink
Sorry the mapserver source really is

sources:
gemeinde_wms:
type: mapserver
req:
layers: gemeinde_merc
map: /mnt/maps/vfs_mapproxytest.map
mapserver:
binary: /var/www/cgi-bin/mapserv
working_dir: /mnt/maps/
Rahkonen Jukka
2013-10-15 08:29:55 UTC
Permalink
Hi,

Try with capital letters EPSG in
"wms_srs" "epsg:31468 epsg:31494 epsg:4326 epsg:900913"

It is not necessarily mentioned in Mapserver WMS documents that but I am remembering that it must be EPSG. Send a message if it happens to be the case.

Because Mapserver is your own you can check the requests which are sent by MapProxy by looking at what comes in for Mapserver from the Apache access.log.

-Jukka Rahkonen-


karsten wrote:

Hi,

I have installed mapproxy on my Ubuntu server outside the virtual environment (the virtual env was troublesome so I for now settled for this option).
I am able to run the demo site with both the regular apache server and also the test server.
This works great. I now added one MapServer layer (which is located on the same server. I tested again that my wms is working and it is e.g.

http://terra2.terragis.net/cgi-bin/mapserv?map=/mnt/maps/vfs_mapproxytest.map&LAYERS=gemeinde_merc&TRANSPARENT=TRUE&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&FORMAT=image%2Fpng&SRS=EPSG%3A900913&BBOX=1160758.2358917,6226544.0158282,1273273.5415119,6351442.1200288&WIDTH=736&HEIGHT=817


Now when I try to use MapProxy I always get a message back that the SRS is not valid for all layers. However there is only one layer in the map files and it has teh following srs configured:
"wms_srs" "epsg:31468 epsg:31494 epsg:4326 epsg:900913"

My questions are

1. is there a way (hopefully outside of python and in the configuration files) to not only log the actual WMS request MapProxy makes to MapServer . So far I could only see the requests made ot the MapProxy service (I saw that in the console output and the apache log file)

2. Is there anything obvious wrong with my configuration ( see below) so I can not get any images back from MapServer / MapProxy ?

Cheers
Karsten

------------------------------------------------------------------------------------------------
In MapProxy yaml I have added to the demo layers this:

... snip ....
layers:
- name: gemeinde
title: Gemeinden in Bayern
sources: [gemeinde_cache]

caches:
gemeinde_cache:
grids: [bayern]
sources: [gemeinde_wms]


sources:
gemeinde_wms:
type: mapserver
req:
layers: gemeinde_merc
map: /mnt/maps/vfs_mapproxytest.map
mapserver:
binary: /var/www/cgi-bin/mapserv<http://localhost/cgi-bin/mapserv>
working_dir: /mnt/maps/
coverage:
bbox: [1025548.802262,6027618.553381,1540090.415317,6519963.998869]
bbox_srs: 'EPSG:900913'

grids:
bayern:
base: GLOBAL_WEBMERCATOR

globals:
image:
formats:
terra_image_jpeg:
format: image/jpeg
resampling_method: nearest
jpeg_quality: 90

...
Karsten Vennemann
Principal

Terra GIS LTD
2119 Boyer Ave E
Seattle, WA 98112
USA
www.terragis.net<http://www.terragis.net/>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapproxy/attachments/20131015/310a643f/attachment-0001.html>
Oliver Tonnhofer
2013-10-15 08:46:27 UTC
Permalink
Post by Rahkonen Jukka
Try with capital letters EPSG in
"wms_srs" "epsg:31468 epsg:31494 epsg:4326 epsg:900913"
It is not necessarily mentioned in Mapserver WMS documents that but I am remembering that it must be EPSG. Send a message if it happens to be the case.
Good to know, thanks.
Post by Rahkonen Jukka
Because Mapserver is your own you can check the requests which are sent by MapProxy by looking at what comes in for Mapserver from the Apache access.log.
There aren't any separate Apache logs for MapServer since Karsten used the integrated MapServer source-type in MapProxy.
The source request log of MapProxy should list bbox and srs of the requests however. The default log.ini should also create a source-requests.log file with all requests made to MapServer. See: http://mapproxy.org/docs/nightly/deployment.html#logging



Regards,
Oliver
--
Oliver Tonnhofer | Omniscale GmbH & Co KG | http://omniscale.com
http://mapproxy.org | https://github.com/olt | @oltonn
karsten
2013-10-15 09:40:05 UTC
Permalink
Post by Oliver Tonnhofer
Post by Rahkonen Jukka
It is not necessarily mentioned in Mapserver WMS documents that but I am
remembering that it must be EPSG. Send a message if it happens to be the
case.
Post by Oliver Tonnhofer
Good to know, thanks.
Thanks , Ah yes I think I had seen that years ago somewhere in an email but
actually never ran into any trouble with lower case, also as is the WMS is
working.
I still changed it to all upper case - but hat did not make any visible
difference I still get the same error
Post by Oliver Tonnhofer
Because Mapserver is your own you can check the requests which are sent
by MapProxy by looking at what comes in for Mapserver from the Apache
access.log.
Post by Oliver Tonnhofer
There aren't any separate Apache logs for MapServer since Karsten used
the integrated MapServer source-type in MapProxy.

Yes the only type of request I can find with either version (mapserver or
wms types is like this
http://terra2.terragis.net/mapproxy/service?LAYERS=gemeinde&FORMAT=image%2Fp
ng&SRS=EPSG%3A900913&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&TRANSPARENT
=TRUE&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&BBOX=888873.686294,59
72302.049725,1676765.531286,6575280.502525&WIDTH=784&HEIGHT=600
Post by Oliver Tonnhofer
The source request log of MapProxy should list bbox and srs of the
requests however. The default log.ini should also create a
source-requests.log file with all requests >> made to MapServer. See:
http://mapproxy.org/docs/nightly/deployment.html#logging
Sorry I somehow still do not understand correctly - I think - how to enable
this as I still get no log file after running
mapproxy-util create -t log-ini log.ini
At ldast that commad created an ini file in the same dierctory but no
source-requests.log fiel is to be found anyhwer o my serer so far...
I also chsnged the owner fo the log.ini file to www-data to make sure it can
be accessed ...

The loggers options
mapproxy.system
mapproxy.config
mapproxy.source.XXX
mapproxy.source.request
Are only relevant inside python right ? or can I sue them in the yaml file
somehow to invoke logging ?
Any hints what I still need to do after running
mapproxy-util create -t log-ini log.ini ?

Thanks
Karsten



Regards,
Oliver
--
Oliver Tonnhofer | Omniscale GmbH & Co KG | http://omniscale.com
http://mapproxy.org | https://github.com/olt | @oltonn
Oliver Tonnhofer
2013-10-15 10:52:20 UTC
Permalink
Post by Oliver Tonnhofer
Post by Oliver Tonnhofer
The source request log of MapProxy should list bbox and srs of the
requests however. The default log.ini should also create a
http://mapproxy.org/docs/nightly/deployment.html#logging
Sorry I somehow still do not understand correctly - I think - how to enable
this as I still get no log file after running
mapproxy-util create -t log-ini log.ini
At ldast that commad created an ini file in the same dierctory but no
source-requests.log fiel is to be found anyhwer o my serer so far...
I also chsnged the owner fo the log.ini file to www-data to make sure it can
be accessed ...
[...]
Any hints what I still need to do after running
mapproxy-util create -t log-ini log.ini ?
You need to enable logging. See http://mapproxy.org/docs/nightly/deployment.html#logging and the commented lines in your config.py.

But I strongly advise you to use `mapproxy-util serve-develop` when you are working on the configuration. You will see all logs on the console (request to and from MapProxy and the MapProxy logs) and it will automatically reload your configuration. You should configure your deployment only when the configuration is working. This really makes troubleshooting easier.


Regards,
Oliver
--
Oliver Tonnhofer | Omniscale GmbH & Co KG | http://omniscale.com
http://mapproxy.org | https://github.com/olt | @oltonn
karsten
2013-10-16 23:07:31 UTC
Permalink
Thanks all, mystery solved !

My hang-up was
* that I saw the WMS working on one hand and did not get it working in the
demo site when I added my WMS layer
The problem was that I defined the old unofficial EPSG fro Google Mercator
900913 in my map file but the demo site requested the official EPSG 3857
(which is a another EPSG code ID for the same thing) , thus all solved and
working after I added that EPSG code to my map file projection list in
METADATA and the Layer tag:
"wms_srs" "EPSG:31468 EPSG:31494 EPSG:4326 EPSG:900913 EPSG:3857"

For completeness - in case it help somebody else - I got the logging working
right away after I created the log.ini file AND after uncomment the
following lines in config.py, plus apache2 restart
( and it does show the exact calls made to the MS WMS ) :

from logging.config import fileConfig
import os.path
fileConfig(r'/etc/mymapproxy/log.ini', {'here': os.path.dirname(__file__)})

Cheers
Karsten
karsten
2013-10-17 06:18:58 UTC
Permalink
Hi All,

I have run into the error above using the demo page when I added a new layer
in EPSG:31468. The WMS is working for all other projection of the same layer
except for EPSG:31468, even though that is the native projection in my
MapServer map file. Also MapProxy the demo page works for TMS including
EPSG:31468
For WMTS it says for that layer : not compatible with WMTS

Furthermore surprisingly I was able to run mapproxy-seed and successfully
created 60% of the tiles, where I stopped the process to resume at a later
time. Also I changed the file owner of all tiles to be www-data:www-data.

How can I fix this ?
See config below
Karsten
--------------------------

I have the following config for MapProxy 1.6 in mapproxy.yaml:

services:
demo:
tms:
use_grid_names: true
# origin for /tiles service
origin: 'nw'
kml:
use_grid_names: true
wmts:
wms:
md:
title: MapProxy WMS Proxy
abstract: This is a minimal MapProxy example.

layers:
- name: bayern_gemeinde
title: Gemeinden in Bayern 31468
sources: [bayern_gemeinde_cache]


caches:
bayern_gemeinde_cache:
grids: [bayern_31468]
sources: [gemeinde_wms_31468]

sources:
gemeinde_wms_31468:
type: wms
req:
layers: gemeinde_merc
url:
http://terra2.terragis.net/cgi-bin/mapserv?map=/mnt/maps/vfs_mapproxytest.ma
p
coverage:
bbox: [4268292.1572492,5251787.8034355,4638833.195067,5730276.9668371]
bbox_srs: 'EPSG:31468'

grids:
bayern_31468:
srs: EPSG:31468
bbox:
[4268292.1572492,5251787.8034355,4638833.195067,5730276.9668371]
bbox_srs: 'EPSG:31468'
min_res: 1234.7215554725824


globals:
image:
formats:
terra_image_jpeg:
format: image/jpeg
resampling_method: nearest
jpeg_quality: 90
Oliver Tonnhofer
2013-10-17 15:40:31 UTC
Permalink
Post by karsten
I have run into the error above using the demo page when I added a new layer
in EPSG:31468. The WMS is working for all other projection of the same layer
except for EPSG:31468, even though that is the native projection in my
MapServer map file. Also MapProxy the demo page works for TMS including
EPSG:31468
You need to add the SRS to services.wms.srs. See http://mapproxy.org/docs/nightly/services.html#srs
Post by karsten
For WMTS it says for that layer : not compatible with WMTS
Your grid is not compatible with WMTS. See http://mapproxy.org/docs/nightly/configuration.html#origin


Regards,
Oliver
--
Oliver Tonnhofer | Omniscale GmbH & Co KG | http://omniscale.com
http://mapproxy.org | https://github.com/olt | @oltonn
karsten
2013-10-21 22:13:54 UTC
Permalink
Hi,

Thanks. I have this all working now. I was able to configure it using basic
auth similar to this fashion:
http://user1234:xsre242ffs at geo.myserver.org/proxy.php?layers=images&width=60
0&version=1.1.1&bbox=4268292.15725,5251787.80344,4638833.19507,5730276.96684
&service=WMS&format=image%2Fpng&styles=&srs=EPSG%3A31468&request=GetMap&heig
ht=775

I think a restart of apache was needed to get the settings to work.

Good to know that that is the status coed and time in milsecs. Yes I looked
at the log files and that was what came to mind when I could initially not
get the request working
Now I know about the status code and time.

Karsten

----------------------------------
Post by Rahkonen Jukka
The 200 - 3177 feels odd. Is it possible that the line is taken from a
server log file and 200 could mean the http code for the result (200 OK) and
3177 the size of the response?

Yes, 200 is the status code, the dash is the content-length (which was not
set by the server in this case) and 3177 is the time it took in
milliseconds.
Post by Rahkonen Jukka
I am sure that I have used MapProxy with https and basic authentication
simply by giving the WMS server URL as https://user:passwd at server.com...
Post by Rahkonen Jukka
I do not understand why it does not work for you. Are you also behind a
proxy server?

It's strange. A missing http_proxy normally results in blocked connections
or timeouts due to firewall restrictions. An empty image as a response looks
more like the source WMS "blocks" the requests (by server IP, user-agent,
typo in password, etc.). A well behaved server should respond with 401 or
403 in this case, but thats theory...

@Karsten: Can you curl the image from your MapProxy server?

curl --user yourusername
"http://user1234:xsre242ffs at geo.myserver.org/proxy.php?layers=images&width=6
00&version=1.1.1&bbox=4268292.15725,5251787.80344,4638833.19507,5730276.9668
4&service=WMS&format=image%2Fpng&styles=&srs=EPSG%3A31468&request=GetMap&hei
ght=775" -o /tmp/out.png -D - -s


Regards,
Oliver
karsten
2013-10-21 22:21:05 UTC
Permalink
Hi,

I would like to understand this better. Lets say I have configured and
seeded a MapProxy cache for an extent (or grid how it is used in the
MapProxy config). Now if over the course of a project the areas changes (is
adding adjacent areas e.g. making the extent area larger). What would be the
best way to deal with that ?

I assume that I can just use the exisitng cache and change the grid settings
, then re-run the cache seeding ? Is that the best way ? Or will there be
any complications ?

Karsten
Matt Walker
2013-10-22 07:11:52 UTC
Permalink
Hi Karsten,

The approach I've generally used when there is a chance that the extent of
a cache will need to change in future is to define the initial grid so that
it matches the extent of the SRS. If I only need a subset of the extent
initially I simply limit the extent or coverage when seeding and in my web
map client.

It's also worth noting that adding additional more detailed resolutions is
simple but adding smaller scales is generally not. Because of this I tend
to define my resolutions so that the first covers the entire extent from
the start.

Hope that helps,

Matt.
Astun Technology
Post by karsten
Hi,
I would like to understand this better. Lets say I have configured and
seeded a MapProxy cache for an extent (or grid how it is used in the
MapProxy config). Now if over the course of a project the areas changes (is
adding adjacent areas e.g. making the extent area larger). What would be the
best way to deal with that ?
I assume that I can just use the exisitng cache and change the grid settings
, then re-run the cache seeding ? Is that the best way ? Or will there be
any complications ?
Karsten
_______________________________________________
MapProxy mailing list
MapProxy at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapproxy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapproxy/attachments/20131022/d8def59e/attachment.html>
karsten
2013-10-17 06:58:48 UTC
Permalink
Hi All,

I would like to configure a cache for a third party wms that requires basic
auth for example in the format:

http://12346puser78:98pw65432 at www.geodatenserver.net/ogc/ogc_layers.cgi?

What is the best way to configure this with MapProxy ? So far I simply tried
to use the above url in the url parameter of a wms type aye which did not
work

Karsten
karsten
2013-10-15 09:47:17 UTC
Permalink
Hmm ok in the apache error log I also found this that looks only
sub-optimal to me :

[Tue Oct 15 11:49:12 2013] [warn] mod_wsgi: Compiled for Python/2.7.2rc1.
[Tue Oct 15 11:49:12 2013] [warn] mod_wsgi: Runtime using Python/2.7.2+.
[Tue Oct 15 11:49:12 2013] [notice] Apache/2.2.20 (Ubuntu)
Phusion_Passenger/2.2.11 PHP/5.3.6-13ubuntu3.8 with Suhosin-Patch
mod_wsgi/3.3 Python/2.7.2+ confi$
[Tue Oct 15 11:49:26 2013] [error]
/usr/local/lib/python2.7/dist-packages/mapproxy/image/message.py:18:
UserWarning: Module _yaml was already imported from /$
[Tue Oct 15 11:49:26 2013] [error] import pkg_resources
[Tue Oct 15 11:50:00 2013] [error] No handlers could be found for logger
"mapproxy.source.wms"

Could this be the reason for the trouble ?
However, that said the Osm source with Mapproxy works perfectly ...

Cheers
Karsten


-----Original Message-----
From: karsten [mailto:karsten at terragis.net]
Sent: Tuesday, October 15, 2013 02:40 AM
To: 'Oliver Tonnhofer'; 'Rahkonen Jukka'
Cc: 'mapproxy at lists.osgeo.org'
Subject: RE: [MapProxy] mapproxy with mapserver srs problem
Post by Oliver Tonnhofer
Post by Rahkonen Jukka
It is not necessarily mentioned in Mapserver WMS documents that but I am
remembering that it must be EPSG. Send a message if it happens to be the
case.
Post by Oliver Tonnhofer
Good to know, thanks.
Thanks , Ah yes I think I had seen that years ago somewhere in an email but
actually never ran into any trouble with lower case, also as is the WMS is
working.
I still changed it to all upper case - but hat did not make any visible
difference I still get the same error
Post by Oliver Tonnhofer
Because Mapserver is your own you can check the requests which are sent
by MapProxy by looking at what comes in for Mapserver from the Apache
access.log.
Post by Oliver Tonnhofer
There aren't any separate Apache logs for MapServer since Karsten used
the integrated MapServer source-type in MapProxy.

Yes the only type of request I can find with either version (mapserver or
wms types is like this
http://terra2.terragis.net/mapproxy/service?LAYERS=gemeinde&FORMAT=image%2Fp
ng&SRS=EPSG%3A900913&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&TRANSPARENT
=TRUE&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&BBOX=888873.686294,59
72302.049725,1676765.531286,6575280.502525&WIDTH=784&HEIGHT=600
Post by Oliver Tonnhofer
The source request log of MapProxy should list bbox and srs of the
requests however. The default log.ini should also create a
http://mapproxy.org/docs/nightly/deployment.html#logging
Sorry I somehow still do not understand correctly - I think - how to enable
this as I still get no log file after running mapproxy-util create -t
log-ini log.ini At ldast that commad created an ini file in the same
dierctory but no source-requests.log fiel is to be found anyhwer o my serer
so far...
I also chsnged the owner fo the log.ini file to www-data to make sure it can
be accessed ...

The loggers options
mapproxy.system
mapproxy.config
mapproxy.source.XXX
mapproxy.source.request
Are only relevant inside python right ? or can I sue them in the yaml file
somehow to invoke logging ?
Any hints what I still need to do after running
mapproxy-util create -t log-ini log.ini ?

Thanks
Karsten



Regards,
Oliver
--
Oliver Tonnhofer | Omniscale GmbH & Co KG | http://omniscale.com
http://mapproxy.org | https://github.com/olt | @oltonn
Holger Schiebold
2013-10-15 14:53:33 UTC
Permalink
Hi,

please try source type wms with supported_srs option for your gemeinde
layer or try to support 3857 instead of the older and not official (i
think) 900913 EPSG number in your mapserver at the same machine, because
at the moment he isn't supporting it.

cheers

Holger
Post by karsten
Hi,
I have installed mapproxy on my Ubuntu server outside the virtual
environment (the virtual env was troublesome so I for now settled for
this option).
I am able to run the demo site with both the regular apache server and
also the test server.
This works great. I now added one MapServer layer (which is located on
the same server. I tested again that my wms is working and it is e.g.
http://terra2.terragis.net/cgi-bin/mapserv?map=/mnt/maps/vfs_mapproxytest.map&LAYERS=gemeinde_merc&TRANSPARENT=TRUE&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&FORMAT=image%2Fpng&SRS=EPSG%3A900913&BBOX=1160758.2358917,6226544.0158282,1273273.5415119,6351442.1200288&WIDTH=736&HEIGHT=817
Now when I try to use MapProxy I always get a message back that the
SRS is not valid for all layers. However there is only one layer in
"wms_srs" "epsg:31468 epsg:31494 epsg:4326 epsg:900913"
My questions are
1. is there a way (hopefully outside of python and in the
configuration files) to not only log the actual WMS request MapProxy
makes to MapServer . So far I could only see the requests made ot
the MapProxy service (I saw that in the console output and the apache
log file)
2. Is there anything obvious wrong with my configuration ( see below)
so I can not get any images back from MapServer / MapProxy ?
Cheers
Karsten
------------------------------------------------------------------------------------------------
... snip ....
- name: gemeinde
title: Gemeinden in Bayern
sources: [gemeinde_cache]
grids: [bayern]
sources: [gemeinde_wms]
type: mapserver
layers: gemeinde_merc
map: /mnt/maps/vfs_mapproxytest.map
binary: _/var/www_/cgi-bin/mapserv
<http://localhost/cgi-bin/mapserv>
working_dir: /mnt/maps/
bbox: [1025548.802262,6027618.553381,1540090.415317,6519963.998869]
bbox_srs: 'EPSG:900913'
base: GLOBAL_WEBMERCATOR
format: image/jpeg
resampling_method: nearest
jpeg_quality: 90
...
Karsten Vennemann
Principal
Terra GIS LTD
2119 Boyer Ave E
Seattle, WA 98112
USA
www.terragis.net <http://www.terragis.net/>
_______________________________________________
MapProxy mailing list
MapProxy at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapproxy
--
Holger Schiebold


____________________
codematix GmbH
Felsbachstrasse 5/7
D-07745 Jena
Tel. +49 (3641) 3038-34
www.codematix.de

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapproxy/attachments/20131015/fcf47bb9/attachment-0001.html>
Rahkonen Jukka
2013-10-17 08:24:45 UTC
Permalink
Quick question:
Are you sure it is http and not https?

-Jukka-
Post by karsten
Hi All,
I would like to configure a cache for a third party wms that requires basic auth
http://12346puser78:98pw65432 at www.geodatenserver.net/ogc/ogc_layers.cg
i?
What is the best way to configure this with MapProxy ? So far I simply tried to
use the above url in the url parameter of a wms type aye which did not work
Karsten
_______________________________________________
MapProxy mailing list
MapProxy at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapproxy
karsten
2013-10-17 19:14:25 UTC
Permalink
Yes it definitely is http as I have manually requests to the WMS working,
however via MapProxy it appears not to be working that way.

I Now tried to sue a proxy PHP that uses curl to send the user and pw to the
external WMS (I know that basically that script is working as I sued in in
a different setup)

Now with MapProxy it almost works and I can see requests like this to the
wms :

http://geo.myserver.org/proxy.php?layers=images&width=600&version=1.1.1&bbox
=4268292.15725,5251787.80344,4638833.19507,5730276.96684&service=WMS&format=
image%2Fpng&styles=&srs=EPSG%3A31468&request=GetMap&height=775 200 - 3177

In MapProxy currently still I get no image back, however tracing the error I
checked and when I paste that url omitting the last part ' 200 - 3177'
after height=7555 that MapProxy added I indeed get the requested image back
.

Now how can I avoid that MapProxy ads the 200 - 3177 in the end of the
request (as that upsets the external wms service and I get a response
'Ung?ltiger Wert: 775 200 - 3177 Exception by ProxyServlet' ) ? Is there a
setting for that to omit. I am not even sure what those parameter are at
all?
Any ideas ?

Cheers
Karsten
From: Rahkonen Jukka <jukka.rahkonen at mmmtike.fi>
Quick question:
Are you sure it is http and not https?

-Jukka-
Rahkonen Jukka
2013-10-17 19:43:10 UTC
Permalink
Hi,

The 200 - 3177 feels odd. Is it possible that the line is taken from a server log file and 200 could mean the http code for the result (200 OK) and 3177 the size of the response?

I am sure that I have used MapProxy with https and basic authentication simply by giving the WMS server URL as https://user:passwd at server.com...
I do not understand why it does not work for you. Are you also behind a proxy server?

-Jukka Rahkonen-
Post by karsten
Yes it definitely is http as I have manually requests to the WMS working,
however via MapProxy it appears not to be working that way.
I Now tried to sue a proxy PHP that uses curl to send the user and pw to the
external WMS (I know that basically that script is working as I sued in in a
different setup)
http://geo.myserver.org/proxy.php?layers=images&width=600&version=1.1.1&
bbox
=4268292.15725,5251787.80344,4638833.19507,5730276.96684&service=WMS
&format=
image%2Fpng&styles=&srs=EPSG%3A31468&request=GetMap&height=775 200
- 3177
In MapProxy currently still I get no image back, however tracing the error I
checked and when I paste that url omitting the last part ' 200 - 3177'
after height=7555 that MapProxy added I indeed get the requested image back .
Now how can I avoid that MapProxy ads the 200 - 3177 in the end of the request
775 200 - 3177 Exception by ProxyServlet' ) ? Is there a setting for that to omit. I
am not even sure what those parameter are at all?
Any ideas ?
Cheers
Karsten
From: Rahkonen Jukka <jukka.rahkonen at mmmtike.fi>
Are you sure it is http and not https?
-Jukka-
_______________________________________________
MapProxy mailing list
MapProxy at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapproxy
Oliver Tonnhofer
2013-10-18 06:47:42 UTC
Permalink
Hi,
Post by Rahkonen Jukka
The 200 - 3177 feels odd. Is it possible that the line is taken from a server log file and 200 could mean the http code for the result (200 OK) and 3177 the size of the response?
Yes, 200 is the status code, the dash is the content-length (which was not set by the server in this case) and 3177 is the time it took in milliseconds.
Post by Rahkonen Jukka
I am sure that I have used MapProxy with https and basic authentication simply by giving the WMS server URL as https://user:passwd at server.com...
I do not understand why it does not work for you. Are you also behind a proxy server?
It's strange. A missing http_proxy normally results in blocked connections or timeouts due to firewall restrictions. An empty image as a response looks more like the source WMS "blocks" the requests (by server IP, user-agent, typo in password, etc.). A well behaved server should respond with 401 or 403 in this case, but thats theory...

@Karsten: Can you curl the image from your MapProxy server?

curl --user yourusername "http://geo.myserver.org/proxy.php?layers=images&width=600&version=1.1.1&bbox=4268292.15725,5251787.80344,4638833.19507,5730276.96684&service=WMS&format=image%2Fpng&styles=&srs=EPSG%3A31468&request=GetMap&height=775" -o /tmp/out.png -D - -s


Regards,
Oliver
--
Oliver Tonnhofer | Omniscale GmbH & Co KG | http://omniscale.com
http://mapproxy.org | https://github.com/olt | @oltonn
Loading...