[Geoserver-users] Rest problems

I have two installations of GeoServer 2.0.2 with the rest config
plugin installed. On Windows XP all the examples work as I'd expect.
On Linux they all return 404 is there some undocumented trick to
setting up rest on linux boxes?

Here is what I see:
Linux:
[ijt1@anonymised.com ~]$ curl -u admin:xxxxxxxx -v
http://localhost:8080/geoserver/rest/styles/green.sld
* About to connect() to localhost port 8080
* Trying 127.0.0.1... * connected
* Connected to localhost (127.0.0.1) port 8080
* Server auth using Basic with user 'admin'

GET /geoserver/rest/styles/green.sld HTTP/1.1

Authorization: Basic YWRtaW46aWFuaWFu
User-Agent: curl/7.12.1 (i386-redhat-linux-gnu) libcurl/7.12.1
OpenSSL/0.9.7a zlib/1.2.1.2 libidn/0.5.6
Host: localhost:8080
Pragma: no-cache
Accept: */*

< HTTP/1.1 404 Not Found
< Server: Apache-Coyote/1.1
< Date: Thu, 24 Jun 2010 23:49:19 GMT
< Server: Noelios-Restlet-Engine/1.0..8
< Transfer-Encoding: chunked
* Connection #0 to host localhost left intact
* Closing connection #0

Windows:
$ curl -u admin:geoserver -v http://localhost:8080/geoserver/rest/styles/green.
sld
* About to connect() to localhost port 8080 (#0)
* Trying 127.0.0.1... connected
* Connected to localhost (127.0.0.1) port 8080 (#0)
* Server auth using Basic with user 'admin'

GET /geoserver/rest/styles/green.sld HTTP/1.1
Authorization: Basic YWRtaW46Z2Vvc2VydmVy
User-Agent: curl/7.20.1 (i686-pc-cygwin) libcurl/7.20.1 OpenSSL/0.9.8o zlib/1.

2.3 libidn/1.18 libssh2/1.2.5

Host: localhost:8080
Accept: */*

< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Date: Thu, 24 Jun 2010 23:49:09 GMT
< Server: Noelios-Restlet-Engine/1.0..8
< Content-Type: application/vnd.ogc.sld+xml
< Transfer-Encoding: chunked
<
* Connection #0 to host localhost left intact
* Closing connection #0
<?xml version="1.0" encoding="UTF-8"?><sld:StyledLayerDescriptor xmlns="http://w
ww.opengis.net/sld" xmlns:sld="http://www.opengis.net/sld&quot; xmlns:ogc="http://www
.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml&quot; version="1.0.0"><sld:Na
medLayer><sld:Name>green</sld:Name><sld:UserStyle><sld:Name>green</sld:Name><sld
:Title>Green polygon</sld:Title><sld:Abstract>Green fill with black outline</sld
:Abstract><sld:FeatureTypeStyle><sld:Name>name</sld:Name><sld:Rule><sld:PolygonS
ymbolizer><sld:Fill><sld:CssParameter name="fill">#66FF66</sld:CssParameter></sl
d:Fill><sld:Stroke/></sld:PolygonSymbolizer></sld:Rule></sld:FeatureTypeStyle></
sld:UserStyle></sld:NamedLayer></sld:StyledLayerDescriptor>

The log file has nothing helpful in it in either case.

Ian
--
Ian Turton

There should

On 10-06-24 5:53 PM, Ian Turton wrote:

I have two installations of GeoServer 2.0.2 with the rest config
plugin installed. On Windows XP all the examples work as I'd expect.
On Linux they all return 404 is there some undocumented trick to
setting up rest on linux boxes?

Here is what I see:
Linux:
[ijt1@anonymised.com ~]$ curl -u admin:xxxxxxxx -v
http://localhost:8080/geoserver/rest/styles/green.sld
* About to connect() to localhost port 8080
* Trying 127.0.0.1... * connected
* Connected to localhost (127.0.0.1) port 8080
* Server auth using Basic with user 'admin'

GET /geoserver/rest/styles/green.sld HTTP/1.1

Authorization: Basic YWRtaW46aWFuaWFu
User-Agent: curl/7.12.1 (i386-redhat-linux-gnu) libcurl/7.12.1
OpenSSL/0.9.7a zlib/1.2.1.2 libidn/0.5.6
Host: localhost:8080
Pragma: no-cache
Accept: */*

< HTTP/1.1 404 Not Found
< Server: Apache-Coyote/1.1
< Date: Thu, 24 Jun 2010 23:49:19 GMT
< Server: Noelios-Restlet-Engine/1.0..8
< Transfer-Encoding: chunked
* Connection #0 to host localhost left intact
* Closing connection #0

Windows:
$ curl -u admin:geoserver -v http://localhost:8080/geoserver/rest/styles/green.
sld
* About to connect() to localhost port 8080 (#0)
* Trying 127.0.0.1... connected
* Connected to localhost (127.0.0.1) port 8080 (#0)
* Server auth using Basic with user 'admin'

GET /geoserver/rest/styles/green.sld HTTP/1.1
Authorization: Basic YWRtaW46Z2Vvc2VydmVy
User-Agent: curl/7.20.1 (i686-pc-cygwin) libcurl/7.20.1 OpenSSL/0.9.8o zlib/1.

2.3 libidn/1.18 libssh2/1.2.5

Host: localhost:8080
Accept: */*

< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Date: Thu, 24 Jun 2010 23:49:09 GMT
< Server: Noelios-Restlet-Engine/1.0..8
< Content-Type: application/vnd.ogc.sld+xml
< Transfer-Encoding: chunked
<
* Connection #0 to host localhost left intact
* Closing connection #0
<?xml version="1.0" encoding="UTF-8"?><sld:StyledLayerDescriptor xmlns="http://w
ww.opengis.net/sld" xmlns:sld="http://www.opengis.net/sld&quot; xmlns:ogc="http://www
.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml&quot; version="1.0.0"><sld:Na
medLayer><sld:Name>green</sld:Name><sld:UserStyle><sld:Name>green</sld:Name><sld
:Title>Green polygon</sld:Title><sld:Abstract>Green fill with black outline</sld
:Abstract><sld:FeatureTypeStyle><sld:Name>name</sld:Name><sld:Rule><sld:PolygonS
ymbolizer><sld:Fill><sld:CssParameter name="fill">#66FF66</sld:CssParameter></sl
d:Fill><sld:Stroke/></sld:PolygonSymbolizer></sld:Rule></sld:FeatureTypeStyle></
sld:UserStyle></sld:NamedLayer></sld:StyledLayerDescriptor>

The log file has nothing helpful in it in either case.

Ian

--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.

There should be no difference. If i had to guess I would guess either an installation issue of the rest confg, or some network issue.

On 10-06-24 5:53 PM, Ian Turton wrote:

I have two installations of GeoServer 2.0.2 with the rest config
plugin installed. On Windows XP all the examples work as I'd expect.
On Linux they all return 404 is there some undocumented trick to
setting up rest on linux boxes?

Here is what I see:
Linux:
[ijt1@anonymised.com ~]$ curl -u admin:xxxxxxxx -v
http://localhost:8080/geoserver/rest/styles/green.sld
* About to connect() to localhost port 8080
* Trying 127.0.0.1... * connected
* Connected to localhost (127.0.0.1) port 8080
* Server auth using Basic with user 'admin'

GET /geoserver/rest/styles/green.sld HTTP/1.1

Authorization: Basic YWRtaW46aWFuaWFu
User-Agent: curl/7.12.1 (i386-redhat-linux-gnu) libcurl/7.12.1
OpenSSL/0.9.7a zlib/1.2.1.2 libidn/0.5.6
Host: localhost:8080
Pragma: no-cache
Accept: */*

< HTTP/1.1 404 Not Found
< Server: Apache-Coyote/1.1
< Date: Thu, 24 Jun 2010 23:49:19 GMT
< Server: Noelios-Restlet-Engine/1.0..8
< Transfer-Encoding: chunked
* Connection #0 to host localhost left intact
* Closing connection #0

Windows:
$ curl -u admin:geoserver -v http://localhost:8080/geoserver/rest/styles/green.
sld
* About to connect() to localhost port 8080 (#0)
* Trying 127.0.0.1... connected
* Connected to localhost (127.0.0.1) port 8080 (#0)
* Server auth using Basic with user 'admin'

GET /geoserver/rest/styles/green.sld HTTP/1.1
Authorization: Basic YWRtaW46Z2Vvc2VydmVy
User-Agent: curl/7.20.1 (i686-pc-cygwin) libcurl/7.20.1 OpenSSL/0.9.8o zlib/1.

2.3 libidn/1.18 libssh2/1.2.5

Host: localhost:8080
Accept: */*

< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Date: Thu, 24 Jun 2010 23:49:09 GMT
< Server: Noelios-Restlet-Engine/1.0..8
< Content-Type: application/vnd.ogc.sld+xml
< Transfer-Encoding: chunked
<
* Connection #0 to host localhost left intact
* Closing connection #0
<?xml version="1.0" encoding="UTF-8"?><sld:StyledLayerDescriptor xmlns="http://w
ww.opengis.net/sld" xmlns:sld="http://www.opengis.net/sld&quot; xmlns:ogc="http://www
.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml&quot; version="1.0.0"><sld:Na
medLayer><sld:Name>green</sld:Name><sld:UserStyle><sld:Name>green</sld:Name><sld
:Title>Green polygon</sld:Title><sld:Abstract>Green fill with black outline</sld
:Abstract><sld:FeatureTypeStyle><sld:Name>name</sld:Name><sld:Rule><sld:PolygonS
ymbolizer><sld:Fill><sld:CssParameter name="fill">#66FF66</sld:CssParameter></sl
d:Fill><sld:Stroke/></sld:PolygonSymbolizer></sld:Rule></sld:FeatureTypeStyle></
sld:UserStyle></sld:NamedLayer></sld:StyledLayerDescriptor>

The log file has nothing helpful in it in either case.

Ian

--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.

On Wed, Jun 30, 2010 at 10:22 AM, Justin Deoliveira
<jdeolive@anonymised.com> wrote:

There should be no difference. If i had to guess I would guess either an
installation issue of the rest confg, or some network issue.

Oddly enough if I install the Jetty version I can use REST to the same
data_directory and all works fine. So it seems to be tomcat related -
not sure how I could have screwed up the rest-config install (I just
have to copy in the jar, right?) and localhost:8080 should always
work?

Would it be helpful if there was some default rest page that could be
used to test the rest install?

Ian
--
Ian Turton