NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Hi all,

I've my own instance of OSM tile server (PostgreSQL 9.3, Postgis 2.1).

Now I'm trying to run own Nominatim search engine on the same host (Nominatim 2.3.1).

Tile server is working OK and serving sample Luxembourg test map tiles. Nominatim search page is displayed OK, but the following problems occur:

1) it displays 'Data: DB Error: insufficient permissions' warning,

2) my Nominatim instance is using public OSM tile server instead of mine tile server.

3) when search is used, it displays 'Details: Could not get word tokens' error.

I've setup local.php properties for Nominatim, including:

@define('CONST___Website_BaseURL', 'http://mysite/nominatim/')

but still no success.

After some debug (debug=1) I've found more detailed error messages:

Offending query is:

string(138) "select word_id,word_token, word, class, type, country_code, operator, search_name_count from word where word_token in (' beggen','beggen')"

and message is:

[nativecode=ERROR: permission denied for relation word]

Could anyone point me where to seek for solution?

How to setup Nominatim to use my tile server?

asked 21 Jun '15, 09:44

jaglu's gravatar image

jaglu
11113
accept rate: 0%

edited 21 Jun '15, 10:22

Do you just want to use the same server, or the same database?

Do you have a different own database for each, Nominatim and Tile Rendering?

If not, I found the following:

http://gis.stackexchange.com/questions/137122/is-it-possible-to-render-map-tiles-with-a-nominatim-postgis-db

and

https://lists.openstreetmap.org/pipermail/dev/2011-April/022309.html

(21 Jun '15, 11:18) stephan75

Do you just want to use the same server, or the same database?

I want to use the same server. It's my own VM running Ubuntu 12.04. I'm aware that, at the moment, setup both Nominatim and Tile Rendering on the same database is impossible.

Do you have a different own database for each, Nominatim and Tile Rendering?

I have two separate databases for Nominatim and Tile Rendering. I'm fine with having two databases, because I plan to serve OSM map & search for a single country.

(21 Jun '15, 18:16) jaglu

I was able to move forward few steps just by invoking: GRANT ALL PRIVILEGES ON TABLE some-nominatim-table TO "myuser"; Now the debug stacktrace displays two tables with results from 'word' and 'search_name' tables, but suck again on: Details: Could not get details for place. When I invoke the debbuged sql statement directly in psql, it displays data just fine.

(21 Jun '15, 18:55) jaglu
1

Half of the problems solved: 1) search is working well after I've granted ALL PRIVILEGES to 'www-user' instead of 'myuser' in PSQL. 2) 'Data: DB Error: insufficient permissions' warning is gone. This is the difference between Nominatim and Tile Rendering: Tile Rendering is using 'myuser' to run renderd daemon. Nominatim is using plain apache's 'www-data' user to run php pages. Hope it can save someone a day :)

(21 Jun '15, 20:14) jaglu

Still my Nominatim map is using default public OSM tile server instead of my own tile server. Any ideas? Strange fact: Nominatim's JSON search is using my database, because if I seek for results outside my example map (Luxembourg only), it returns no results.

(21 Jun '15, 20:17) jaglu

So you need a redirection for your tile requests from OSM tile servers to your own servers like localhost or similar?

What is your HTML or Javascript code about tile display? OpenLayers or Leafletjs???

(22 Jun '15, 17:25) stephan75

I want my own nominatim instance to use my tile server (i.e: http://myserver/osm_tiles/). Now my nominatim is using: map.addLayer(new OpenLayers.Layer.OSM.Mapnik("Default"));

(22 Jun '15, 18:54) jaglu

There's a simple Openlayers example here:

https://switch2osm.org/using-tiles/getting-started-with-openlayers/

That should give you an item what to look for.

(22 Jun '15, 18:57) SomeoneElse2

Well, I'm perfectly aware how to make OSM map use layer of my own tile server. I've just hoped there is a Nominatim's configuration I could setup to use different (my own) tile server instead of default one. If there isn't such a configuration, I'll just modify Nominatim's php sources, although this is not a nice solution. Am I right? Should I modify raw php sources?

(22 Jun '15, 19:05) jaglu

I was not aware that Nominatim configuration has any influence on tile displaying, can you explain that a bit more? ... I fear you should describe your issue in more detailed way.

(22 Jun '15, 19:28) stephan75
1

I run my own tile server and own Nominatim service as a part of my own apache instance. If I import only Luxembourg to my 'gis' database, tile server is rendering only Luxembourg on my map. The rest of map is blank, of course. If I import only Luxembourg to my 'nominatim' database, the search is restricted only to the addresses' in Luxembourg, of course. Both cases are perfectly fine for me. What is not fine: if I browse to http://myserver/nominatim/, the map is displayed for the whole planet. I want to narrow Nominatim's default map to the tiles generated only by my tile server. Which is Luxembourg only :)

(22 Jun '15, 19:44) jaglu
showing 5 of 11 show 6 more comments

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×689
×287
×39
×2

question asked: 21 Jun '15, 09:44

question was seen: 6,525 times

last updated: 22 Jun '15, 19:44

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum