Currently I have a login problem with my deployed GeoExplorer. Everything works fine in debug mode on my local VM with the geoserver from my remote server connected. Firebug gives the following output when loading GeoExplorer.

GET http://localhost:9080/geoserver/ows?SERVICE=WMS&REQUEST=GetCapabilities&TILED=true&VERSION=1.1.1 200 OK 140ms XMLHttpRequest.js (Zeile 220)

GET http://localhost:9080/geoserver/pdf/info.json 200 OK 18ms XMLHttpRequest.js (Zeile 220)

However, once I deploy GeoExplorer and move it to my remote server the login button on the upper right doesn't appear anymore. Instead the basic authorization window "GeoServer Realm" pops up and Firebug shows the following "401 Unauthorized" message:

GET http://Server_IP/geoserver/ows?SERVICE=WMS&REQUEST=GetCapabilities&TILED=true&VERSION=1.1.1 200 OK 227ms GeoExplorer.js (Zeile 396)

GET http://Server_IP/geoserver/pdf/info.json 200 OK 75ms GeoExplorer.js (Zeile 396)

GET http://Server_IP/geoserver/rest/imports 401 Unauthorized 202ms GeoExplorer.js (Zeile 396)

"NetworkError: 401 Unauthorized - http://Server_IP/geoserver/rest/imports"

The same problem applies to the GeoExplorer that was originally installed with the OpenGeoSuite, so it rather seems to stem from the server configuration instead of the deployment process.

I've tried various things in GeoServer security setup and found threads with similar symptoms, but couldn't find a solution for us yet. Maybe someone has another useful hint?!

Another idea: Can I configure the deployed GeoExplorer that it requests GeoServer over localhost instead of the server IP? Could this help?

  • What version of the OpenGeo Suite are you using? The missing login button was an issue with an older version, and was fixed as of 3.0.1 if I remember correctly. – ahocevar Aug 9 '13 at 6:55
  • We installed the latest version on the server following: suite.opengeo.org/opengeo-docs/installation/linux/ubuntu/… version.ini states: suite_version=3.1 build_revision=fdace99 build_date=2013-07-05_16-33-15 build_profile= – tobik Aug 9 '13 at 7:35
  • My impression is that it's a session/cache/cookie related problem. When I load GeoExplorer in my VM the first time it runs well. When I login and reload GeoExplorer in Mozilla the Login button doesn't appear anymore and GeoExplorer fires the GET request to localhost:9080/geoserver/rest/imports which is "404 Not Found" from my VM and "401 Not Authorized" from the server. Why does GeoExplorer send this request? – tobik Aug 9 '13 at 14:28
  • Then again loading GeoExplorer on the server never shows me a Login button (neither after restarting and emptying cache in Mozilla). Here, however, I always get the "Geoserver Realm" Authentication window, I guess because GeoExplorer runs in the same servlet container as GeoServer. How can I prevent this in GeoServer? – tobik Aug 9 '13 at 14:29
  • Looks like you are mixing production mode and debug mode on the same machine in different VMs and different browsers. This can indeed cause cookie confusion. So what you should try is clear your browser's cache and cookies, and then go to the production url of your GeoExplorer. You should get a login button then. – ahocevar Aug 9 '13 at 15:04

Don't do a redirect. Using Apache's ProxyPass and ProxyPassReverse is proven to work fine. Also make sure to set proxy url to the proxied external url in the GeoServer config UI, under Settings - Global - Proxy Base URL. Here is an example for ProxyPass and ProxyPassReverse:

ProxyRequests Off
<Proxy *>
    Order deny,allow
    Allow from all
ProxyPass /geoserver http://localhost:8080/geoserver
ProxyPassReverse /geoserver http://localhost:8080/geoserver

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.