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

can not search the layer in worldmap #331

Open
lannio opened this issue Dec 12, 2017 · 7 comments
Open

can not search the layer in worldmap #331

lannio opened this issue Dec 12, 2017 · 7 comments

Comments

@lannio
Copy link

lannio commented Dec 12, 2017

hello!
when add layer in the worldmap, we can not search the layer that has been added
image
image
Now our settings as follows:

  1. Modify HYPERMAP_REGISTRY_URL and SOLR_URL of the env_vars in worldmap
    image
  2. Add the corresponding URL in HHPERMAP
    image
    Hope to get your reply.
    Thanks!
@capooti
Copy link
Contributor

capooti commented Dec 12, 2017

Hi

there are several things we must make sure are correctly working (one after the other):

  • in Hypermap, if you go to the WorldMap (the one running at localhost:8000) service page, can you see the layers?
  • for each layer, can you get to the search endpoint? (you can click on the link in the layer endpoints section)
  • now, if you see the search response for that layer, then everything is well configured in Hypermap. We must make sure that the WorldMap client now uses the correct url (172.20.10.13:8093 in your case). Could you use firefox or chrome developer toolbar and see to which IP the request to Solr (or Elasticsearch) is being sent?

screenshot 2017-12-12 11 30 16

@lannio
Copy link
Author

lannio commented Dec 14, 2017

Thank you for your reply. We checked these three points and found some problems.
The IP of the worldmap is 172.20.10.12 and the IP of the hhypermap is 172.20.10.13.
First.
I had access to hhypermap(172.20.10.13) in the worldmap server before, and it was accessible.
image
This time I had access to worldmap(172.20.10.12) in the hhypermap server and found that only 8000 ports were not accessible, and both 8080 and 9090 could be accessed.
image
image
I have opened the 8000 port, but it still can't be solved. Finally, I modified the ALLOWED_HOSTS = * in worldmap env_vars file, so that I can access to worldmap (172.20.10.12) in the hhypermap server.
image
image
But I found that when I look at layers, the console shows that a lot of URL is using "localhost" rather than the corresponding IP (172.20.10.12) in the browser.
image
image
Second.
Access hhypermap(172.20.10.13) in the worldmap server, select a layer of ArcGIS online, and the Search EndPoint is also localhost.
image
And we found http://172.20.10.12:8000 was not imported in Home-Aggregator- Endpoints ,the message is: ERROR! Could not detect service type for endpoint http://172.20.10.12:8000 or already existing. messages=().
image
Third.
When add layer in worldmap, the IP for solr is as follows.
image
image
Now the global variable is as follows.
worldmap
image
Hhypermap
image
When I modify localhost of the global variables to corresponding IP (172.20.10.12 or 172.20.10.13), there are other errors that cause the service to be unable to start.
image

What should I do to make the system run.
We look forward to your reply.
Thank you very much.

@capooti
Copy link
Contributor

capooti commented Dec 14, 2017

dear @Iannio thanks for reporting the problems.
Generally in github is better to file a ticket for each different problem, so next time please keep this in mind.
I will send a different comment for each problem to keep things more clear.

  1. To fix this problem you need to change the SITEURL setting. In your case add the SITEURL in envars:

SITEURL= http://172.20.10.12

add the port if django is running in a port that is not 80

SITEURL = http://172.20.10.12:8000

Then you will need to run the updatelayers to update the links of all of the layers:

python manage.py updatelayers

@capooti
Copy link
Contributor

capooti commented Dec 14, 2017

Second problem: search engine URL in Hypermap must be set in REGISTRY_SEARCH_URL. I see that you have "solr+http://localhost:8983". You need to change this to "solr+http://172.20.10.13" as far as I can see. Then restart the Hypermap process.

@capooti
Copy link
Contributor

capooti commented Dec 14, 2017

Regarding the PostgreSQL connection problem, make sure that the server (172.20.10.12) and port on which PostgreSQL is running are accessible to the WorldMap server:
https://stackoverflow.com/questions/38466190/cant-connect-to-postgresql-on-port-5432

@lannio
Copy link
Author

lannio commented Dec 18, 2017

Thank you for your reminding. I still have problems in worldmap aspects. I'll ask questions at worldmap.
In HHyperMap, whether the environment variable needs to change all of the localhost to the corresponding IP(172.20.10.13), or just to change "REGISTRY_SEARCH_URL = solr+http://localhost:8983" to "REGISTRY_SEARCH_URL = solr+http://172.20.10.13:8983", and the rest is still localhost.
When I change all the localhost to the corresponding IP(172.20.10.13) and find that I can't save a new endpoint or go into the task.
image
image
When I only modify REGISTRY_SEARCH_URL, while others still use localhost, I can normally save endpoint, but when I add 172.20.10.12:800, it can't normally generate server.
image
image
Thank you very much.

@capooti
Copy link
Contributor

capooti commented Dec 18, 2017

I think those are two different problems.

First problem: it seems there is a problem connecting to RabbitMQ. Maybe try changing BROKER_URL to your configuration. Default is amqp://guest:guest@localhost:5672, but you need to change localhost to another IP if RabbitMQ is running on a different server. Also, guest is the default user, but you may need to change that if you customized things. Remember to souce the environment variables file before restarting any process.

Second problem: I believe memcached is not installed on your server or misconfigured. Did you install the memcached and libmemcached-dev packages? Make sure it is running

Hope this helps

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

2 participants