[TILE RENDER ERROR] -- 404: Error: Postgis Plugin: FATAL: database "otm" does not exist

71 views
Skip to first unread message

Gonz Rafuls

unread,
Oct 12, 2014, 5:51:11 PM10/12/14
to opentree...@googlegroups.com
Hi guys,

Me again. I am afraid the OTM-tiler is not working for me.
This is due to the fact that I changed the dbname when creating it on postgresql to a name different from 'otm'.
I am now not sure where is this 'otm' name been picked up from since I have no line for the dbname on my settings.json:

{
    "username": [USER],
    "host": "localhost",
    "password": [PASS],
    "port": "5432",
    "redishost": "localhost"
}

The user and pass are correctly populated:

host=localhost port=5432 dbname=otm user=[USER] password=[PASS] connect_timeout=4  encountered during parsing of layer 'treemap_mapfeature' in Layer at line 17

Any ideas where tiler might be picking the dbname from?

Thanks in advance.

Cheers,
Gonza.-

Gonz Rafuls

unread,
Oct 12, 2014, 6:15:06 PM10/12/14
to opentree...@googlegroups.com
Just found out this dbname is coming from the params in the url requests like:

http://localhost/tile/[id]/database/otm/table/treemap_boundary/11/677/1222.png?instance_id=1

Question now is, how are this url requests created?

Gonz Rafuls

unread,
Oct 12, 2014, 6:51:03 PM10/12/14
to opentree...@googlegroups.com
Found it, ignore this.

The url requests for tiler are generated from within /usr/local/otm/static/js/treemap.js.
Modified line 50686 from:
'/database/otm/table/' + layer + '/{z}/{x}/{y}.' +

To:
'/database/[MY_DB_NAME]/table/' + layer + '/{z}/{x}/{y}.' +

Sorry for the spam.

Cheers,
Gonza.-

Michael Maurizi

unread,
Oct 13, 2014, 10:29:21 AM10/13/14
to opentree...@googlegroups.com
Gonza,

We recently ran into this ourselves, and we have an issue raised here: https://github.com/OpenTreeMap/OTM2/issues/1684

Ideally we'd like to remove the dbname parameter from the tiler requests and add a dbname parameter to the tiler's settings.json, we just haven't had the time to do so yet.

Pull requests are welcome if you do so yourself.

Thanks,
Michael Maurizi

Gonz Rafuls

unread,
Oct 13, 2014, 4:13:52 PM10/13/14
to opentree...@googlegroups.com
Michael,

It would be great if we could do so. I'll work my head around it when I get the time and send over the pull request.

Cheers,
Gonza.-

Gonz Rafuls

unread,
Oct 18, 2014, 6:49:53 PM10/18/14
to opentree...@googlegroups.com
Hi Guys,

I came to the bottom of this but in order for tiler to pick up the dbname from the settings.json, I had to make changes to the mml_builder.js interface from the Grainstore module.
Is there a way to make this effective for OTM2 in this case?

Cheers,
Gonza.-


On Monday, October 13, 2014 4:29:21 PM UTC+2, Michael Maurizi wrote:
Reply all
Reply to author
Forward
0 new messages