[Geoserver-users] setup over Ubuntu 8.04. errors loading demos

Hi list.
It's the first time I try to setup Geoserver under Unix. I had tried
it only with Windows some months ago.
To begin the easy way, I've chosen the binary package, avoiding to
setup the Java container environment.

I've simply exported the JAVA_HOME variable and then I've run the
startup.sh script.
Geoserver loads, I can see localhost:8080/geoserver/ , but I can't see
any demo nor data. If I click, i.e., on WFS-T demo I receive a page
with:

HTTP ERROR:404
NOT_FOUND
RequestURI=/geoserver/www/ol-demo.html

The sartup stdout is:

GEOSERVER_HOME environment variable not found, using current
location. If not set then running this script from other
directories will not work in the future.
GEOSERVER DATA DIR is /home/giova/Programmi_Standalone/geoserver/bin/../data_dir
1 [main] INFO org.mortbay.log - Logging to
org.slf4j.impl.SimpleLogger@anonymised.com via org.mortbay.log.Slf4jLog
283 [main] WARN org.mortbay.log - Deprecated configuration used for
/home/giova/Programmi_Standalone/geoserver/webapps
311 [main] INFO org.mortbay.log - jetty-6.1.8
2160 [main] INFO /geoserver - Initializing Spring root WebApplicationContext
0 [main] ERROR org.vfny.geoserver.global -
----------------------------------
- GEOSERVER_DATA_DIR: /home/giova/Programmi_Standalone/geoserver/bin/../data_dir
----------------------------------
log4j:WARN File option not set for appender [geoserverlogfile].
log4j:WARN Are you using FileAppender instead of ConsoleAppender?
05 set 15:31:01 INFO [geoserver.catalog] - Loaded namespace
'it.geosolutions' (http://www.geo-solutions.it)
05 set 15:31:01 INFO [geoserver.catalog] - Loaded namespace 'topp'
(http://www.openplans.org/topp)
05 set 15:31:01 INFO [geoserver.catalog] - Default namespace: 'topp'
05 set 15:31:01 INFO [geoserver.catalog] - Loaded style 'polygon'
05 set 15:31:01 INFO [geoserver.catalog] - Loaded style 'raster'
05 set 15:31:01 INFO [geoserver.catalog] - Loaded style 'point'
05 set 15:31:01 INFO [geoserver.catalog] - Loaded style 'line'
05 set 15:31:01 INFO [geoserver.confg] - Loading service 'wcs'
05 set 15:31:01 INFO [geoserver.confg] - Loading service 'wms'
05 set 15:31:01 INFO [geoserver.confg] - Loading service 'wfs'
4977 [main] INFO /geoserver - Initializing WebApplicationContext for
Struts ActionServlet 'action', module ''
5000 [main] INFO org.mortbay.log - Opened
/home/giova/Programmi_Standalone/geoserver/logs/2008_09_05.request.log
5033 [main] INFO org.mortbay.log - Started SelectChannelConnector@anonymised.com:8080

What am I doing wrong?
Giovanni

G. Allegri ha scritto:

Hi list.
It's the first time I try to setup Geoserver under Unix. I had tried
it only with Windows some months ago.
To begin the easy way, I've chosen the binary package, avoiding to
setup the Java container environment.

I've simply exported the JAVA_HOME variable and then I've run the
startup.sh script.
Geoserver loads, I can see localhost:8080/geoserver/ , but I can't see
any demo nor data. If I click, i.e., on WFS-T demo I receive a page
with:

Which version of GeoServer is that? And btw, you're using a Sun JDK,
not OpenJDK, right?

Cheers
Andrea

Sorry, I forgot to write it:
geoserver-1.7.0-RC2 (I need it to test the new security functionalities)
Sun Java JRE 1.6.0.06

2008/9/5 Andrea Aime <aaime@anonymised.com>:

G. Allegri ha scritto:

Hi list.
It's the first time I try to setup Geoserver under Unix. I had tried
it only with Windows some months ago.
To begin the easy way, I've chosen the binary package, avoiding to
setup the Java container environment.

I've simply exported the JAVA_HOME variable and then I've run the
startup.sh script.
Geoserver loads, I can see localhost:8080/geoserver/ , but I can't see
any demo nor data. If I click, i.e., on WFS-T demo I receive a page
with:

Which version of GeoServer is that? And btw, you're using a Sun JDK,
not OpenJDK, right?

Cheers
Andrea

I've tried to follow the way of war deployment.
I've installed Tomcat and deployed Geoserver correctly, but I receive
the same error from Tomcat:

HTTP Status 404
The requested resource () is not available.

2008/9/5 G. Allegri <giohappy@anonymised.com>:

Sorry, I forgot to write it:
geoserver-1.7.0-RC2 (I need it to test the new security functionalities)
Sun Java JRE 1.6.0.06

2008/9/5 Andrea Aime <aaime@anonymised.com>:

G. Allegri ha scritto:

Hi list.
It's the first time I try to setup Geoserver under Unix. I had tried
it only with Windows some months ago.
To begin the easy way, I've chosen the binary package, avoiding to
setup the Java container environment.

I've simply exported the JAVA_HOME variable and then I've run the
startup.sh script.
Geoserver loads, I can see localhost:8080/geoserver/ , but I can't see
any demo nor data. If I click, i.e., on WFS-T demo I receive a page
with:

Which version of GeoServer is that? And btw, you're using a Sun JDK,
not OpenJDK, right?

Cheers
Andrea

G. Allegri ha scritto:

Sorry, I forgot to write it:
geoserver-1.7.0-RC2 (I need it to test the new security functionalities)
Sun Java JRE 1.6.0.06

It seems RC2 has been released with the minimal data directory so all
demos are broken.
You should be able to manually register your feature types and perform
tests anyways.
Alternatively, you can download RC1 (which I hope has the proper data dir) and replace the geoserver/data_dir contents of RC2 with the
ones found in RC1.

Hope this helps
Cheers
Andrea

Ok, I setup RC1. WFS-T doesn't work properly, but it's ok. The data
are there, I will look for the reason of the error.
Thanks

2008/9/5 Andrea Aime <aaime@anonymised.com>:

G. Allegri ha scritto:

Sorry, I forgot to write it:
geoserver-1.7.0-RC2 (I need it to test the new security functionalities)
Sun Java JRE 1.6.0.06

It seems RC2 has been released with the minimal data directory so all
demos are broken.
You should be able to manually register your feature types and perform
tests anyways.
Alternatively, you can download RC1 (which I hope has the proper data dir)
and replace the geoserver/data_dir contents of RC2 with the
ones found in RC1.

Hope this helps
Cheers
Andrea

G. Allegri ha scritto:

Ok, I setup RC1. WFS-T doesn't work properly, but it's ok. The data
are there, I will look for the reason of the error.

Does not work... how? :slight_smile:
What do you do, and what output do you get? Any error messages, or
it just locks up? Anything in the GeoServer logs?

Mike, did you try WFS-T demo before releasing RC1? If so we can
assume the issue is brower/platform specific?

Cheers
Andrea

Sorry Andrea, didin't post again. I've solved with RC1. The problem
was that I deployed the war as "geoserverRC1", so there were some
problems with the paths in the demos (that look for "geoserver").

About security, etc. I'm considerinf also other solutions like
OWSProxy, because I was not able to use the Authentication method in
Geoserver from Openlayers...

2008/9/8 Andrea Aime <aaime@anonymised.com>:

G. Allegri ha scritto:

Ok, I setup RC1. WFS-T doesn't work properly, but it's ok. The data
are there, I will look for the reason of the error.

Does not work... how? :slight_smile:
What do you do, and what output do you get? Any error messages, or
it just locks up? Anything in the GeoServer logs?

Mike, did you try WFS-T demo before releasing RC1? If so we can
assume the issue is brower/platform specific?

Cheers
Andrea

G. Allegri ha scritto:

Sorry Andrea, didin't post again. I've solved with RC1. The problem
was that I deployed the war as "geoserverRC1", so there were some
problems with the paths in the demos (that look for "geoserver").

About security, etc. I'm considerinf also other solutions like
OWSProxy, because I was not able to use the Authentication method in
Geoserver from Openlayers...

Interesting. I'm wondering how OWSProxy is handling the authentication
that allows proper operation with OpenLayers?

Cheers
Andrea

I'm trying to discover it to :slight_smile:
I'm waiting for answers on other MLs.

Another thing I'm exlporing (desktop side) is InteProxy [1]

[1] http://inteproxy.wald.intevation.org/

2008/9/8 Andrea Aime <aaime@anonymised.com>:

G. Allegri ha scritto:

Sorry Andrea, didin't post again. I've solved with RC1. The problem
was that I deployed the war as "geoserverRC1", so there were some
problems with the paths in the demos (that look for "geoserver").

About security, etc. I'm considerinf also other solutions like
OWSProxy, because I was not able to use the Authentication method in
Geoserver from Openlayers...

Interesting. I'm wondering how OWSProxy is handling the authentication
that allows proper operation with OpenLayers?

Cheers
Andrea

Cross-posting from the deegre-users ML:

Hi,

I'm not very much experienced with Apache 2.2 and Geoserver but this
should be so much a problem because owsProxy is independ of this. There
are two ways to install/use owsProxy
a) [owsProxy] -> http-call -> [geoserver] This means both owsProxy and
geoserver are running in different web context's registered in one
tomcat or in two different tomcats and owsProxy is installed as a
stand-alone web application
b) [owsProxy -> ServletFilter -> geoserver] This means both owsProxy and
geoserver running in the same web context and owsProxy is installed as a
Java Servlet Filter

The advantage of a) is that you are more flexible, e.g. by using a OWS
that is not written in Java. The advantage of b) is less overhead and so
it is faster, more robust and easyer to handle.

Example for a) (this is the one from documentation)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd&quot;&gt;
<web-app>
   <filter>
       <filter-name>OWSProxy</filter-name>

<filter-class>org.deegree_impl.security.owsproxy.ConfigurableOWSProxyServletFilter</filter-class>
       <init-param>
           <param-name>WMS:POLICY</param-name>
           <param-value>./resources/wmspolicy.xml</param-value>
       </init-param>
       <init-param>
           <param-name>CSW:POLICY</param-name>
           <param-value>./resources/cswpolicy.xml</param-value>
       </init-param>
       <init-param>
           <param-name>AuthenticationSettings</param-name>

<param-value>/WEB-INF/conf/security/authentication.xml</param-value>
       </init-param>
       <init-param>
           <param-name>PROXYURL</param-name>
           <param-value>http://myHost:8080/owsproxy/proxy&lt;/param\-value&gt;
       </init-param>
       <init-param>
           <param-name>ALTREQUESTPAGE</param-name>
           <param-value>/altrequestpage.jsp</param-value>
       </init-param>
       <init-param>
           <param-name>ALTRESPONSEPAGE</param-name>
           <param-value>/altresponsepage.jsp</param-value>
       </init-param>
   </filter>
   <filter-mapping>
       <filter-name>OWSProxy</filter-name>
       <url-pattern>/*</url-pattern>
   </filter-mapping>
   <servlet>
       <servlet-name>SimpleProxyServlet</servlet-name>

<servlet-class>org.deegree.enterprise.servlet.SimpleProxyServlet</servlet-class>
       <init-param>
           <param-name>WMS:HOST</param-name>

<param-value>http://localhost:8081/deegree/services&lt;/param\-value&gt;
       </init-param>
       <init-param>
           <param-name>CSW:HOST</param-name>

<param-value>http://localhost:8081/deegree/services&lt;/param\-value&gt;
       </init-param>
   </servlet>
   <servlet-mapping>
       <servlet-name>SimpleProxyServlet</servlet-name>
       <url-pattern>/proxy</url-pattern>
   </servlet-mapping>
</web-app>

This says that you define owsProxy in a tomcat context where tomcat is
running on port 8080. The protected service (WMS and CSW) are running on
another server (no matter if tomcat or anything else) on port 8081. This
mean they are completly independ in its installation. It would be your
job to ensure that the WMS and CSW can just be accessed from the server
running owsProxy (in tomcat you would you <valve> elements for this).
oswProxy is running as a servlet filter in front of a simple proxy
servlet delegates incoming requests to the real OWS. Your client would
talk to http://:8080$myURL$/$myContext$/proxy and it would behave like a
WMS and a CSW

Example for b)
This is much same but now OWS are runing in the same web context.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd&quot;&gt;
<web-app>
   <filter>
       <filter-name>OWSProxy</filter-name>

<filter-class>org.deegree_impl.security.owsproxy.ConfigurableOWSProxyServletFilter</filter-class>
       <init-param>
           <param-name>WMS:POLICY</param-name>
           <param-value>./resources/wmspolicy.xml</param-value>
       </init-param>
       <init-param>
           <param-name>CSW:POLICY</param-name>
           <param-value>./resources/cswpolicy.xml</param-value>
       </init-param>
       <init-param>
           <param-name>AuthenticationSettings</param-name>

<param-value>/WEB-INF/conf/security/authentication.xml</param-value>
       </init-param>
       <init-param>
           <param-name>PROXYURL</param-name>
           <param-value>http://myHost:8080/owsproxy/proxy&lt;/param\-value&gt;
       </init-param>
       <init-param>
           <param-name>ALTREQUESTPAGE</param-name>
           <param-value>/altrequestpage.jsp</param-value>
       </init-param>
       <init-param>
           <param-name>ALTRESPONSEPAGE</param-name>
           <param-value>/altresponsepage.jsp</param-value>
       </init-param>
   </filter>
   <filter-mapping>
       <filter-name>OWSProxy</filter-name>
       <url-pattern>/*</url-pattern>
   </filter-mapping>
   <servlet>
       <servlet-name>owservice</servlet-name>

<servlet-class>org.deegree.enterprise.servlet.OGCServletController</servlet-class>
       <init-param>
           <param-name>services</param-name>
           <param-value>wms</param-value>
           <description>
       list of supported services, e.g.: wfs,wms (comma separated),
will be replaced by ant
     </description>
       </init-param>
       <init-param>
           <param-name>wms.handler</param-name>

<param-value>org.deegree.enterprise.servlet.WMSHandler</param-value>
       </init-param>
       <init-param>
           <param-name>wms.config</param-name>

<param-value>WEB-INF/conf/wms/wms_configuration.xml</param-value>
       </init-param>
       <load-on-startup>1</load-on-startup>
   </servlet>
   <servlet-mapping>
       <servlet-name>owservice</servlet-name>
       <url-pattern>/services</url-pattern>
   </servlet-mapping>
</web-app>

Here the owsProxy directly sits on top of a OWS realized as java servlet
(in this case a deegree WMS). So there is no additional/special Tomcat
for owsProxy. Your WMS can be reached as usual:
http//:$myURL$:8080/$myContext$/services

I hope this answers your questions

best regards

ANDREAS

The final solution we are adopting is the use of Springframework
features for session-based authentication [1].
When it will be up, I will share our experience.

Giovanni

[1] http://www.springframework.org/

G. Allegri ha scritto:

The final solution we are adopting is the use of Springframework
features for session-based authentication [1].
When it will be up, I will share our experience.

Hum, I never tried to use it, but GeoServer is already using
the remember me cookies, adding session based authentication
too should not be that difficult. If you have a patch allowing
us to add that kind of authentication too it would be great indeed.

Cheers
Andrea

Andrea Aime ha scritto:

G. Allegri ha scritto:

The final solution we are adopting is the use of Springframework
features for session-based authentication [1].
When it will be up, I will share our experience.

Hum, I never tried to use it, but GeoServer is already using
the remember me cookies, adding session based authentication
too should not be that difficult. If you have a patch allowing
us to add that kind of authentication too it would be great indeed.

Hum, wait a second, we're already using session based authentication
in the web UI, but the mechanism it not really web ui specific. If
you want to try out, login in GeoServer with the user of your choice,
and then issue directly (not thru the demo page) some wfs/wms requests,
they will be using the user currently logged in.
So, it seems to me, if you emulate the login request (a simple post
request) with the browser using javascript, you'll effectively
set the user for the current session.

Cheers
Andrea