I wasn't able to install Cartaro on my localhost (Ubuntu 12.04, Tomcat 7, Geoserver 2.3.2, latest beta of Cartaro, latest version of GeoServer extension). I followed install instruction including setting of Geoserver to use Drupal password, but during install I get error message:

GeoServer login failed: Could not contact GeoServer at http://192.168.0.100:8080/geoserver/j_spring_security_check (302). Please check the GeoServer URL and your site maintenance account.

I'm sure, that address and workspace are correct. I also tried to add support using advice on http://nsiakotos.wordpress.com/2013/04/23/geoserver-tomcat-7-and-jsonp/. I'm not sure, how can I append to JAVA_OPTS.

What can I try to make the connection work? Please let me know, if you need more info.

Comments

augustus.kling’s picture

Make sure to use GeoServer 2.2.5 and not a 2.3 version. The GeoServer extension was built for GeoServer 2.2.5 and tested with this exact version.

Regarding the JAVA_OPTS and quoted from http://cartaro.org/documentation/installation:

Remember to set the environment variable ENABLE_JSONP=true for newer GeoServer versions. Please consult the documentation of your servlet container for instructions. Users of Tomcat 7 on Ubuntu want to append to JAVA_OPTS in /etc/default/tomcat7. Note that despite stated in GeoServer's documentation, setting a servlet context variable will not work.

milos.kroulik’s picture

Thanks for compatibility notice. I tried Geoserver 2.2.5. and got another error, mentioned in different thread. I still don't get what "Users of Tomcat 7 on Ubuntu want to append to JAVA_OPTS in /etc/default/tomcat7" means. Example would be very useful. Should I open separate documentation issue for this?

augustus.kling’s picture

In Ubuntu, the file /etc/default/tomcat7 contains settings for the environment to use when starting Tomcat. That means it defines the environment to use for running GeoServer since GeoServer is just one application running within Tomcat. Usually the environment in this context is the user to use to run Tomcat, the Java version to use and settings for the JVM.

GeoServer does no longer send data encapsulated in JavaScript requests since some version in the 2.2 series. As a consequence, among others, serving WFS data to Cartaro pages fails in case the domain names are different for Drupal and GeoServer. You are advised to configure GeoServer to permit data encapsulated in JavaScript to get an installation that works regardless of domain names.

For the steps required, let's assume you find the following line in your /etc/default/tomcat7:
JAVA_OPTS="-Djava.awt.headless=true -Xmx128m -XX:+UseConcMarkSweepGC"
Appending JAVA_OPTS means changing the line to:
JAVA_OPTS="-Djava.awt.headless=true -Xmx128m -XX:+UseConcMarkSweepGC -DENABLE_JSONP=true"

On the next start of Tomcat, GeoServer will pick the setting up and starts to serve data encapsulated in JavaScript when requested to do so.

milos.kroulik’s picture

Status: Active » Closed (fixed)

Thanks a lot for your advice. I was finally able to install Cartaro. It would be probably useful to add these instructions directly to manual.