Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: We were unable to connect to this server, would still like to add this server ? #7

Open
Gpetrak opened this issue Mar 16, 2017 · 5 comments

Comments

@Gpetrak
Copy link

Gpetrak commented Mar 16, 2017

Hello,
I replaced GeoExplorer with MapLoom in GeoNode following the instructions from django-maploom in GitHub( https://github.com/ROGUE-JCTD/django-maploom ).
When browser renders the template, displays a popup error with the message:
We were unable to connect to this server, would still like to add this server ?
If I click yes it does nothing. Otherwise it displays the following:

Failed to load the server for the following reason:
{"id":null"ptype":"gxp_wmscsource",,"config":
{"url":"http://localhost:8080/geoserver/wms","restUrl":"
/gs/rest","type:"gxp_wmscsource",isVirtualService":false},
"populatingLayerssConfig":false,"isVirtalService":false,lazy":false,"url"
:"http:/localhost:8080/geoserver/wms","restUrl":"/gs/rest",
"isLocal":true,"name":"local Geoserver","layersConfig":[]}

For the replacement of GeoExplorer in GeoNode I followed the steps below:

-- I installed GeoNode with custom installation. My GeoNode instance lives in /home/geonode/geonode
-- I created a geonode-project and added data.
-- Then with the command:
pip install django-maploom
Maploom was installed in /usr/local/lib/python2.7/dist-packages/maploom.
--I Added maploom to INSTALLED_APPS in your project's settings module:

INSTALLED_APPS = (
'maploom',
# other apps
)
before geoexplorer app.
-- I added the MapLoom urls to the bottom of the urls.py file in GeoNode and append them to the GeoNode url patterns.

from maploom.geonode.urls import urlpatterns as maploom_urls

urlpatterns += maploom_urls

When I refreshed for the first time the /maps/new page browser could not find the MapLoom.js and MapLoom.css files. Thus I added them in geonode/static_root.

So after the above steps, after every refresh it raises the popup error.
What am I doing wrong ?

@garnertb
Copy link
Contributor

Can you confirm the address for your geoserver is: http://localhost:8080/geoserver?

@Gpetrak
Copy link
Author

Gpetrak commented Mar 16, 2017

Yes, this is the address of my geoserver. Geonode runs in my local system also (http://localhost).

@garnertb
Copy link
Contributor

Can you use the developer tools to inspect the network traffic going to localhost:8080/geoserver and post the request/response here?

@garnertb garnertb reopened this Mar 16, 2017
@Gpetrak
Copy link
Author

Gpetrak commented Mar 16, 2017

This is the only request related to geoserver that I found:
http://localhost:8080/geoserver/wms?SERVICE=WMS&REQUEST=GetCapabilities
Request method: OPTIONS
status code: 200 ok
Response: It displays an empty file

Also no logs in tomcat7 (catalina.out)

@richard3d
Copy link
Member

Tyler,

I can confirm the same issue. I have been dealing with the same issue since working on Maploom/OSH. Although It's weird because it does seem to be able to hit the endpoint and I see the basic map render if I click 'yes'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants