Access MapStore/MapViewer from external (internet)

246 views
Skip to first unread message

ankit...@gmail.com

unread,
Jun 8, 2015, 9:01:57 AM6/8/15
to mapstor...@googlegroups.com

Screenshot: Accessing from - http://localhost:8080/mapstore/manager        
Screenshot: Accessing from outside http://11.12.13.14:8080/mapstore/manager (map layers missing!!!!!)

Hi There,
I've recently installed MapStore on a remote Virtual Server (i.e. VPS) and have been playing around.

1. In MapManager, I've kept few map layers open to 'Everyone'.
2. I've allowed Inbound traffic on Port 80.
3. On VPS with http://localhost:8080/mapstore/manager, I can see all layers (even without login!)
4. From internet when I access the map with http://11.12.13.14:8080/mapstore/manager, I do get the same map-extent, but layers are missing.
Screenshots attached:

Any guidance will be much appreciated.
Thanks in advance,
Ankit






Mauro Bartolomeoli

unread,
Jun 8, 2015, 9:08:10 AM6/8/15
to mapstor...@googlegroups.com
Hi Ankit,
where is GeoServer located?

To be accessible from Internet it should be located on a public internet address. If, for example, you configured the wms source pointing to localhost or an internal ip you won't be able to see the layers when accessing MapStore through Internet.

--
You received this message because you are subscribed to the Google Groups "mapstore-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapstore-user...@googlegroups.com.
To post to this group, send email to mapstor...@googlegroups.com.
Visit this group at http://groups.google.com/group/mapstore-users.
For more options, visit https://groups.google.com/d/optout.

ankit...@gmail.com

unread,
Jun 8, 2015, 10:46:52 AM6/8/15
to mapstor...@googlegroups.com
Thanks Mauro for your quick reply,
Both MapStore and GeoServer are located on remote Server/VPS. Inbound traffic on Port 80 on the server is allowed.
From the internet/outside world, I can access both MapStore and GeoServer via http://11.12.13.14/mapstore or http://11.12.13.14/geoserver respectively.

However, in MapStore, wms source is pointing to localhost (as both are on the same ip). Or should I point wms source (in the MapStore confguration file, that is located in webapps/mapstore/WEB-INF/app/static/config/mapStoreConfig.js, adding to the gsSources section a new object similar to this one) as follows:

 

"geoserver": {

            "ptype": "gxp_wmssource",

            "title": "Local GeoServer",

            "version":"1.1.1",

            "url": "http://11.12.13.14:8080/geoserver/ows"

        }



Thanks in advance,
Ankit

Mauro Bartolomeoli

unread,
Jun 8, 2015, 11:00:40 AM6/8/15
to mapstor...@googlegroups.com
Hi Ankit,

2015-06-08 16:46 GMT+02:00 <ankit...@gmail.com>:
Thanks Mauro for your quick reply,
Both MapStore and GeoServer are located on remote Server/VPS. Inbound traffic on Port 80 on the server is allowed.
From the internet/outside world, I can access both MapStore and GeoServer via http://11.12.13.14/mapstore or http://11.12.13.14/geoserver respectively.

However, in MapStore, wms source is pointing to localhost (as both are on the same ip). Or should I point wms source (in the MapStore confguration file, that is located in webapps/mapstore/WEB-INF/app/static/config/mapStoreConfig.js, adding to the gsSources section a new object similar to this one) as follows:

 

"geoserver": {

            "ptype": "gxp_wmssource",

            "title": "Local GeoServer",

            "version":"1.1.1",

            "url": "http://11.12.13.14:8080/geoserver/ows"

        }


You are correct, you should point to http://11.12.13.14:8080/geoserver/ows. This is because the GeoServer url needs to be accessible by the browser on the internet.

Let me know if it works with this new configuration.

Ragards,
Mauro



--
==
GeoServer Professional Services from the experts! Visit
http://goo.gl/it488V for more information.
==

Dott. Mauro Bartolomeoli
@mauro_bart
Senior Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
fax:     +39 0584 1660272


-------------------------------------------------------

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

 

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility  for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.

ankit...@gmail.com

unread,
Jun 8, 2015, 11:54:14 AM6/8/15
to mapstor...@googlegroups.com, mauro.bar...@geo-solutions.it
Hi Mauro,
Sorry, the problem persists despite configuring mapStoreConfig.js as suggested.

I've noticed another thing. http://11.12.13.14:8080/geoserver/ows gives me the following:

This XML file does not appear to have any style information associated with it. The document tree is shown below.

      <ServiceExceptionReport version="1.3.0" xsi:schemaLocation="http://www.opengis.net/ogc http://11.12.13.14:8080/geoserver/schemas/wms/1.3.0/exceptions_1_3_0.xsd"><ServiceException code="MissingParameterValue" locator="request">
      Could not determine geoserver request from http request org.geoserver.platform.AdvancedDispatchFilter$AdvancedDispatchHttpRequest@4eca6e98
</ServiceException></ServiceExceptionReport>

I have had Geoserver.war (from http://geoserver.org/release/stable/) file deployed on Tomcat earlier. This I've undeployed and replaced with GeoSolution's GeoServer Enterprise (from http://geoserver.geo-solutions.it/downloads/releases/2.2.x/2.2.6-ENTERPRISE/) geoserver-2.2.6-ENTERPRISE-war file.

I can't understand the issue now!
Thanks,
Ankit

Mauro Bartolomeoli

unread,
Jun 9, 2015, 4:19:42 AM6/9/15
to mapstor...@googlegroups.com, Mauro Bartolomeoli
Hi Ankit,

2015-06-08 17:54 GMT+02:00 <ankit...@gmail.com>:
Hi Mauro,
Sorry, the problem persists despite configuring mapStoreConfig.js as suggested.

I've noticed another thing. http://11.12.13.14:8080/geoserver/ows gives me the following:

That's just the basic url, MapStore appends several parameters to have a list of GeoServer capabilities. This is a sample request:


You could use your browser tools (Developer Tools for Chrome, Firefox or IE) to inspect the urls called by MapStore and the received responses, and see if anything wrong is happening. I could do that for you, but I think that URL is not accessible from here, right?
 
I have had Geoserver.war (from http://geoserver.org/release/stable/) installed earlier. This I've undeployed (on Tomcat) and replaced with GeoSolution's GeoServer Enterprise (from http://geoserver.geo-solutions.it/downloads/releases/2.2.x/2.2.6-ENTERPRISE/).


I would suggest going back to the stable release, 2.2.6-ENTERPRISE is quite old.
 
Regards,
Mauro

ankit...@gmail.com

unread,
Jun 9, 2015, 7:36:12 AM6/9/15
to mapstor...@googlegroups.com, mauro.bar...@geo-solutions.it
****** SOLVED *******

Many thanks to Geo-Solutions team. They have been very pro-active to support the GeoServer open-source community.

Here is the conclusion:

1. Install http_proxy.war file (available as part of standard binary, http://mapstore.geo-solutions.it/mapstore/) on to Tomcat.
2. There may be some problem with existing GeoServer installed on Tomcat (I had this issue!).
3. Undeploy old version of GeoServer.War and fresh deploy the latest version of GeoServer (http://geoserver.org/download/).
4. Restart Tomcat.
5. Open Port 80 to inbound traffic in windows (help: http://wiki.mcneel.com/zoo/window7firewall)

Once done both GeoServer (http://11.12.13.14:8080/geoserver/web) and MapStore (for ex. http://11.12.13.14:8080/mapstore/manager) can be accessed from internet (from outside world!). Please note the IP here is only for example.

Best wishes to all newbies like me.
Ankit
Reply all
Reply to author
Forward
0 new messages