Re: [mapserver-users] Mapcache: error with Berkeley DB and display tiles

2014-01-28 Thread Eichner, Andreas - SID-NLKM
 Andreas, thanks for the explanation about the Berkeley Database.
 However, I have made several changes of permissions and owner of the
 files produced by mapcache_seed, and I still get the same error on
 the OpenLayers demo.
 
 I don't know if others users have had the same error with Mapcache
 and Berkeley Databases in Ubuntu Server.
 

Have you build mapcache yourself or do you use a prebuild one? Today I build 
mapcache with BerkeleyDB support on a Debian Testing box. Basically, this is 
what I did:

* check out latest master
* apt-get install libdb5.1-dev
* follow the install instructions in INSTALL, add -DWITH_BERKELEY_DB=ON to 
cmake .. and make sure * Berkeley DB: /usr/lib/... is listed under 
Optional components
* add the following config element to mapcache.xml if it does not exist yet:
   cache name=bdb type=bdb
  !-- base (required)
 absolute filesystem path where the berkeley db database file is to be 
stored.
 this directory must exist, and be writable
  --
  base/tmp/foo//base
  !-- key_template (optional)
 string template used to create the key for a tile entry in the 
database.
 defaults to the value below. you should include {tileset}, {grid} and 
{dim} here
 unless you know what you are doing, or you will end up with mixed tiles
  key_template{tileset}-{grid}-{dim}-{z}-{y}-{x}.{ext}/key_template
  --
   /cache
* create the base directory and grant access to web server:
  # mkdir /tmp/foo  chgrp www-data /tmp/foo  chmod g+rwx /tmp/foo
* set the cache element to bdb in a tileset
* populate the cache by seeding a tileset that uses a bdb-cache
* the base should look something like this:
# ls -l /tmp/foo/
insgesamt 11528
-rw-r--r-- 1 www-data www-data 9764864 Jan 28 13:30 bdb.db
-rw-r- 1 www-data www-data   24576 Jan 28 13:35 __db.001
-rw-r- 1 www-data www-data  253952 Jan 28 13:35 __db.002
-rw-r- 1 www-data www-data 1318912 Jan 28 13:35 __db.003
-rw-r- 1 www-data www-data  811008 Jan 28 13:35 __db.004

* to verify this worked use the strings command on the bdb.db and grep for the 
tileset name: # strings /tmp/foo/bdb.db|grep MyTilesetName
* use the demo service to check if it is working


___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Mapcache: error with Berkeley DB and display tiles

2014-01-28 Thread samuelm...@gmail.com
Andreas, thank you very much for your time in the instructions,now the
display of tiles worked properly for Berkeley databases. I have followed
the instructions for the Apache  Server. However, I'm using Nginx and
change the permissions of the Group and user as follows:

sudo chown nginx:nginx /tmp/foo  sudo chmod - Rfv g+rwx /tmp/foo

Again many thanks for your help.

I have checked all types of caches, and seems to work faster with Berkeley
databases.

regards,

Samuel Mesa.


2014-01-28 Eichner, Andreas - SID-NLKM andreas.eich...@sid.sachsen.de

  Andreas, thanks for the explanation about the Berkeley Database.
  However, I have made several changes of permissions and owner of the
  files produced by mapcache_seed, and I still get the same error on
  the OpenLayers demo.
 
  I don't know if others users have had the same error with Mapcache
  and Berkeley Databases in Ubuntu Server.
 

 Have you build mapcache yourself or do you use a prebuild one? Today I
 build mapcache with BerkeleyDB support on a Debian Testing box. Basically,
 this is what I did:

 * check out latest master
 * apt-get install libdb5.1-dev
 * follow the install instructions in INSTALL, add -DWITH_BERKELEY_DB=ON to
 cmake .. and make sure * Berkeley DB: /usr/lib/... is listed under
 Optional components
 * add the following config element to mapcache.xml if it does not exist
 yet:
cache name=bdb type=bdb
   !-- base (required)
  absolute filesystem path where the berkeley db database file is
 to be stored.
  this directory must exist, and be writable
   --
   base/tmp/foo//base
   !-- key_template (optional)
  string template used to create the key for a tile entry in the
 database.
  defaults to the value below. you should include {tileset}, {grid}
 and {dim} here
  unless you know what you are doing, or you will end up with mixed
 tiles
   key_template{tileset}-{grid}-{dim}-{z}-{y}-{x}.{ext}/key_template
   --
/cache
 * create the base directory and grant access to web server:
   # mkdir /tmp/foo  chgrp www-data /tmp/foo  chmod g+rwx /tmp/foo
 * set the cache element to bdb in a tileset
 * populate the cache by seeding a tileset that uses a bdb-cache
 * the base should look something like this:
 # ls -l /tmp/foo/
 insgesamt 11528
 -rw-r--r-- 1 www-data www-data 9764864 Jan 28 13:30 bdb.db
 -rw-r- 1 www-data www-data   24576 Jan 28 13:35 __db.001
 -rw-r- 1 www-data www-data  253952 Jan 28 13:35 __db.002
 -rw-r- 1 www-data www-data 1318912 Jan 28 13:35 __db.003
 -rw-r- 1 www-data www-data  811008 Jan 28 13:35 __db.004

 * to verify this worked use the strings command on the bdb.db and grep for
 the tileset name: # strings /tmp/foo/bdb.db|grep MyTilesetName
 * use the demo service to check if it is working





-- 
---
.~.
   / v \
  //\\
 /(  )\
   ^`~'^
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Mapcache: error with Berkeley DB and display tiles

2014-01-24 Thread samuelm...@gmail.com
 Andreas, thanks for the explanation about the Berkeley Database. However, I
have made several changes of permissions and owner of the files produced by
mapcache_seed, and I still get the same error on the OpenLayers demo.

 I don't know if others users have had the same error with Mapcache and
Berkeley Databases in Ubuntu Server.

 Thanks again,

 Samuel.


2014/1/23 Eichner, Andreas - SID-NLKM andreas.eich...@sid.sachsen.de

  Thanks Andreas for your response. I changed all the permissions to
  read, write and the owner, after restarting apache, it fails
  displaying tiles in the demo and report the same error:
 
  failed to aquire connection to bdb backend: unknown error
 
  I followed the instructions to check the database created with db_sql
  according to [1] but I get the same error:
 
   db5.1_sql ortofoto.db
 
  ortoforo.db: multiple databases specified but not supported by file
  Error: file is encrypted or is not a database
 
  I have little knowledge of this type of database, but I would to
  evaluate the loading speed of tiles.

 It seems there is a misunderstanding of the usage of Berkley DB. BDB is a
 library implementing a key/value store and is quite flexible in what can be
 used as key and value.
 And that's the way MapCache uses it. The key is a string representing
 tileset, zoomlevel and any used dimension but at least (x, y) and the value
 is the image BLOB. So there will be a single BDB cache stored in a
 directory (because BDB uses multiple files) for all tilesets configured to
 use this cache.
 The error message you got is a mixed result of BDB (1st: multiple ...)
 and SQLite (2nd: file is encrypted...). This is a new feature since
 Oracle Berkeley DB 11g. It combines the flexibility of the SQLite database
 engine with the strengths of the BDB used as storage backend. See [1] for
 more info on that.
 Although both use-cases use BDB as backend they are in fact completely
 different and cannot be mixed together. So you cannot use dbsql to inspect
 the tilecache. You have to use mapcache_seed to manipulate it (seed/reseed,
 clean).

 HTH

 [1]
 http://www.oracle.com/technetwork/database/berkeleydb/overview/sql-160887.html




-- 
---
.~.
   / v \
  //\\
 /(  )\
   ^`~'^
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Mapcache: error with Berkeley DB and display tiles

2014-01-24 Thread Jeff McKenna
On 1/24/2014, 1:50 PM, samuelm...@gmail.com wrote:
 
 Idon'tknowifothersusershave
 hadthesameerrorwithMapcacheandBerkeleyDatabases inUbuntuServer.
 
 Thanksagain,
 
 Samuel.
 

I did some testing a while back with BDB and MapCache on Windows; it was
working, but there was one small issue.  I believe I filed a ticket for
that, but it is unrelated to your problem. (oh here was the ticket
https://github.com/mapserver/mapcache/issues/58)

-jeff




-- 
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/



___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Mapcache: error with Berkeley DB and display tiles

2014-01-24 Thread samuelm...@gmail.com
Jeff, I checked your ticket previously, and it may be the same error.  So
far I have not been able to solve the problem of displaying of BDB cache,
so this is probably a bug.

Samuel.


2014/1/24 Jeff McKenna jmcke...@gatewaygeomatics.com

 On 1/24/2014, 1:50 PM, samuelm...@gmail.com wrote:
 
  Idon'tknowifothersusershave
  hadthesameerrorwithMapcacheandBerkeleyDatabases inUbuntuServer.
 
  Thanksagain,
 
  Samuel.
 

 I did some testing a while back with BDB and MapCache on Windows; it was
 working, but there was one small issue.  I believe I filed a ticket for
 that, but it is unrelated to your problem. (oh here was the ticket
 https://github.com/mapserver/mapcache/issues/58)

 -jeff




 --
 Jeff McKenna
 MapServer Consulting and Training Services
 http://www.gatewaygeomatics.com/



 ___
 mapserver-users mailing list
 mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-users




-- 
---
.~.
   / v \
  //\\
 /(  )\
   ^`~'^
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Mapcache: error with Berkeley DB and display tiles

2014-01-22 Thread Eichner, Andreas - SID-NLKM
 failed to aquire connection to bdb backend: unknown error
 
 How can I fix or connect to the Berkeley DB?. I'm using Ubuntu Server
 12.05 and Berkeley 5.1 (libdb5.1)

Have you checked the file permissions to allow access to the user the web 
server runs under? 
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Mapcache: error with Berkeley DB and display tiles

2014-01-22 Thread samuelm...@gmail.com
Thanks Andreas for your response. I changed all the permissions to read,
write and the owner, after restarting apache, it fails displaying tiles in
the demo and report the same error:

failed to aquire connection to bdb backend: unknown error

I followed the instructions to check the database created with db_sql
according to [1] but I get the same error:

 db5.1_sql ortofoto.db

ortoforo.db: multiple databases specified but not supported by file
Error: file is encrypted or is not a database

I have little knowledge of this type of database, but I would to evaluate
the loading speed of tiles.

Regards,

Samuel Mesa.

  [1] https://github.com/mapserver/mapcache/issues/58



2014/1/22 Eichner, Andreas - SID-NLKM andreas.eich...@sid.sachsen.de

  failed to aquire connection to bdb backend: unknown error
 
  How can I fix or connect to the Berkeley DB?. I'm using Ubuntu Server
  12.05 and Berkeley 5.1 (libdb5.1)

 Have you checked the file permissions to allow access to the user the web
 server runs under?




-- 
---
.~.
   / v \
  //\\
 /(  )\
   ^`~'^
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

[mapserver-users] Mapcache: error with Berkeley DB and display tiles

2014-01-21 Thread samuelm...@gmail.com
Hi, I am creating a cache with Berkeley DB, mapcache_seed successfully
generate tiles, but when it display the tiles, reports the following
error:

failed to aquire connection to bdb backend: unknown error

How can I fix or connect to the Berkeley DB?. I'm using Ubuntu Server 12.05
and Berkeley 5.1 (libdb5.1)


Thanks,  SamTux

-- 
---
.~.
   / v \
  //\\
 /(  )\
   ^`~'^
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users