error: unknown service

8 views
Skip to first unread message

Marc Pfister

unread,
Mar 18, 2011, 4:40:14 PM3/18/11
to mod-ge...@googlegroups.com
I installed mod_geocache 0.3.1 in Apache on Ubuntu and it seemed to build fine. Restarting Apache gives no errors, and I don't see any errors in the Apache log. If I break the path to the geocache config XML, then Apache will complain on restart, so it looks like the module is loading fine. If I put an error in the XML file, I'll also get an error upon restarting Apache, so I think my config file is being parsed correctly.

But if I try to request a sample tile, I get:

error: unknown service

I get the same error if using the benchmarking url:

http
://myserver/geocache?LAYERS=test&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A4326&BBOX=-2.8125,47.8125,0,50.625&WIDTH=256&HEIGHT=256

And trying other layers in the sample config (osm, test2, test3), all give me the same error. Looking at the source it seems that the error means that there are no services matching the layer, but the config file has a service entry for WMS, and appending in a WMS to the url doesn't change the error.

Also, if I just try:

http://myserver/geocache

I get the same error, instead of
"missing a service".

So, any ideas?

-Marc

thomas bonfort

unread,
Mar 18, 2011, 5:25:22 PM3/18/11
to mod-ge...@googlegroups.com, Marc Pfister
Marc,
the wms service is located on the /wms endpoint, so you'd have to use
http://myservice/geocache/wms instead of your url.
note that you also have a demo service with your configured layers at
/geocache/demo, that will create the necessary javascript you can
copy/paste to setup openlayers.

best regards,
thomas

> --
> You received this message because you are subscribed to the Google Groups
> "mod-geocache" group.
> To post to this group, send email to mod-ge...@googlegroups.com.
> To unsubscribe from this group, send email to
> mod-geocache...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/mod-geocache?hl=en.
>

Marc Pfister

unread,
Mar 18, 2011, 5:45:05 PM3/18/11
to mod-geocache
On Mar 18, 2:25 pm, thomas bonfort <thomas.bonf...@gmail.com> wrote:

> the wms service is located on the /wms endpoint, so you'd have to usehttp://myservice/geocache/wmsinstead of your url.
> note that you also have a demo service with your configured layers at
> /geocache/demo, that will create the necessary javascript you can
> copy/paste to setup openlayers.

Thomas,

I tried /wms and /demo endpoints and I get the same error: unknown
service.

thomas bonfort

unread,
Mar 18, 2011, 5:56:37 PM3/18/11
to mod-ge...@googlegroups.com, Marc Pfister
I can't imagine what's going on then... I've just installed 0.3.1 from
scratch on a debian server with no trouble, and the default
configuration is working out of the box. Installing on ubuntu should
not be different. ( http://www2.terriscope.fr/geocache/demo )

have you modified the geocache.xml file in some way?
what are the relevant lines in your apache configuration file?
any chance you can point me to the server where this is hosted
(offlist if you prefer)?

--
thomas

Marc Pfister

unread,
Mar 18, 2011, 6:04:19 PM3/18/11
to thomas bonfort, mod-ge...@googlegroups.com
On Fri, Mar 18, 2011 at 2:56 PM, thomas bonfort
<thomas....@gmail.com> wrote:

> have you modified the geocache.xml file in some way?

I'm using the included xml file for now.

> what are the relevant lines in your apache configuration file?

LoadModule geocache_module /usr/lib/apache2/modules/mod_geocache.so
<IfModule geocache_module>
<Location /geocache>
SetHandler geocache
GeoCacheConfigFile "/home/ubuntu/mod_geocache/geocache.xml"
</Location>
</IfModule>

Almost the same as the install directions, other than the location of
mod_geocache.so.

--Marc

Marc Pfister

unread,
Mar 24, 2011, 7:33:45 PM3/24/11
to mod-ge...@googlegroups.com, thomas bonfort, Marc Pfister
I've tracked down the problem to some conflict with Django running on WSGI. I was hoping that putting mod_geocache on its own port using NameVirtualHost would fix things, but it still gives the same error.

Marc

thomas bonfort

unread,
Apr 27, 2011, 5:56:53 AM4/27/11
to mod-ge...@googlegroups.com, Marc Pfister
I've encountered this bug and can give a workaround. In my case, the
problem arises when mod-geocache is configured in a virtualhost with
no documentroot set. in that case, the pathinfo that is given by
apache to mod-geocache is /geocache/wms , instead of the expected
/wms.
I'm not sure if it's a bug in apache, or if this is a normal behavior,
but anyhow setting a DocumentRoot in my virtualhost fixed the issue
for me.
Marc, could you please confirm if you try this out ?

--
thomas

Marc Pfister

unread,
Apr 28, 2011, 3:49:51 PM4/28/11
to mod-ge...@googlegroups.com, Marc Pfister
Thomas,

I already had a documentroot set, so that's probably not the problem I'm seeing.

Marc

thomas bonfort

unread,
Apr 29, 2011, 5:53:16 AM4/29/11
to mod-ge...@googlegroups.com, Marc Pfister
Marc,
the trunk version now prints the pathinfo that mod-geocache received
in the error message. you could use that to debug your problem.

when requesting http://server/geocache/demo, the pathinfo should be "demo".

I'd be interested to know what you get for that when the error occurs.

regards,
thomas

Marc Pfister

unread,
Apr 29, 2011, 3:08:45 PM4/29/11
to mod-ge...@googlegroups.com, Marc Pfister
On Friday, April 29, 2011 2:53:16 AM UTC-7, thomas bonfort wrote:
Marc,
the trunk version now prints the pathinfo that mod-geocache received
in the error message. you could use that to debug your problem.

when requesting http://server/geocache/demo, the pathinfo should be "demo".

I'd be interested to know what you get for that when the error occurs.


I tried to install from trunk and I got this error:

service_demo.c: In function ‘_create_demo_wms’:
service_demo.c:455: error: ‘demo_layer_singletile’ undeclared (first use in this function)
service_demo.c:455: error: (Each undeclared identifier is reported only once
service_demo.c:455: error: for each function it appears in.)

because I'm not using Cairo. So I enabled it anyway and after setting the  "full_wms" to ERROR instead of ASSEMBLE I got mod_geocache to start up.

Going to:

http://my.server/geocache/demo gives the following error:

error: unknown service geocache/demo
If I comment out my wsgi stuff for Django, then /geocache/demo works.

-Marc

thomas bonfort

unread,
Apr 29, 2011, 3:16:28 PM4/29/11
to mod-ge...@googlegroups.com, Marc Pfister
thanks for testing!

On Fri, Apr 29, 2011 at 21:08, Marc Pfister <marc.p...@gmail.com> wrote:
> On Friday, April 29, 2011 2:53:16 AM UTC-7, thomas bonfort wrote:
>>
>> Marc,
>> the trunk version now prints the pathinfo that mod-geocache received
>> in the error message. you could use that to debug your problem.
>>
>> when requesting http://server/geocache/demo, the pathinfo should be
>> "demo".
>>
>> I'd be interested to know what you get for that when the error occurs.
>
> I tried to install from trunk and I got this error:
>
> service_demo.c: In function ‘_create_demo_wms’:
> service_demo.c:455: error: ‘demo_layer_singletile’ undeclared (first use in
> this function)
> service_demo.c:455: error: (Each undeclared identifier is reported only once
> service_demo.c:455: error: for each function it appears in.)
>
> because I'm not using Cairo. So I enabled it anyway and after setting the
> "full_wms" to ERROR instead of ASSEMBLE I got mod_geocache to start up.

I just fixed that, it should build without the need for cairo now.

>
> Going to:
>
> http://my.server/geocache/demo gives the following error:
>
> error: unknown service geocache/demo
>
> If I comment out my wsgi stuff for Django, then /geocache/demo works.
>
> -Marc

There's something subtle going on here, as the pathinfo is modified if
the virtualhost has no documentroot set, or if the wsgi handler is
activated.
I'm wondering if mod-geocache shouldn't be a bit more lenient, and
check for the last part of the pathinfo instead of the full pathinfo
to account for those cases. Please file a bug if you'd like me to add
that.

thanks for the report,
thomas

Marc Pfister

unread,
Apr 29, 2011, 3:17:50 PM4/29/11
to mod-ge...@googlegroups.com, Marc Pfister
I found something that's getting it to work better.

Previously, I had in my conf:

WSGIScriptAlias / /path/to/my/django.wsgi

and

<Location /geocache>

for the geocache module.

Not suprisingly, if I change the wsgi configuration to:

WSGIScriptAlias /django /path/to/my/django.wsgi

Then things work. So it looks like I need to do some Apache configuration magic to get the urls that I want.

- Marc

Reply all
Reply to author
Forward
0 new messages