Importing OSM into PostgreSQL database (Ubunutu) - postgresql

I am trying to setup a Nominatim server following this tutorial:
https://www.linuxbabe.com/ubuntu/osm-nominatim-geocoding-server-ubuntu-20-04
Shortly after I run the import of the OSM data into the postgresql database using the following command:
/srv/nominatim/build$ /srv/nominatim/build/utils/setup.php --osm-file /home/zineb/data/great-britain-latest.osm.pbf --all 2>&1 | tee setup.log
I get the following error:
2022-03-02 11:49:27 == module path: /srv/nominatim/build/module
2022-03-02 11:49:27 == Create DB 2022-03-02 11:49:27 == Setup DB
Postgres version found: 12 Postgis version found: 3.2 PHP Fatal error:
Uncaught Nominatim\DatabaseError: [500]: Database server failed to
load /srv/nominatim/build/module/nominatim.so module thrown in
/srv/nominatim/Nominatim-3.5.1/lib/DB.php on line 61
What can be the source of this issue?
Thanks in advance.

Related

Hyperledger iroha - schema error while connecting to postgres database

I am trying to deploy Hyperledger Iroha on MacOS (BigSUr) locally, and while running the following command
./build/bin/irohad --config example/config.postgres.sample --genesis_block example/genesis.block --keypair_name example/node0
I get the error
Storage initialization failed: Cannot execute query. Fatal error. ERROR: relation "schema_version" does not exist LINE 1: ... test, iroha_major, iroha_minor, iroha_patch from schema_ver... ^ while executing "select 1 test, iroha_major, iroha_minor, iroha_patch from schema_version;".
I have installed Postgresql DB locally and created the iroha_data database.
Is there a schema that i must load additionally or does it get auto created ?
I was able to overcome this issue by adding -drop_state while starting iroha daemon.

ERROR: could not load library ~/orafce.so: ~/orafce.so: undefined symbol: pq_sendbyte SQL state: XX000

Im trying to enable Orafce(3.7.1-1) extension on my postgress11 (11.2-2)
My OS is Ubuntu 18.04
The extension is already available in the database , and is listed if I run the following command :
select * from pg_catalog.pg_available_extensions
However when I try running the following command, I see error below.
create extension orafce with schema vias;
> Error>
ERROR: could not load library "/home/vias/path/pg11/lib/postgresql/orafce.so": /home/vias/path/pg11/lib/postgresql/orafce.so: undefined symbol: pq_sendbyte SQL state: XX000
Im really stuck... please advice
Recompile the extension for Postgres 11, it's likely compiled for Postgres 10

Cant import table to H2O, using Postgresql JDBC in Ubuntu

I am having trouble to import a sql table to H2O.ai using Postgresql JDBC Driver in Ubuntu. I'm getting the follow error:
ERROR MESSAGE:
SQLException: ERROR: relation "XXX" does not exist
Position: 22
Failed to connect and read from SQL database with connection_url: jdbc:postgresql://localhost:5432/...**
I am executing H2O with the follow command:
java -cp h2o.jar:/usr/share/java/postgresql-9.4.1212.jar water.H2OApp
The JDBC driver is installed and already try to construct the Connection URL in several ways.
I'm using this one right now:
jdbc:postgresql://localhost:5432/XXX?&useSSL=false

Migration From Tokumx 1.5 To Percona Server For mongodb 3.11

Migrating Data from Tokumx To Percona Server For MonoDB
Step 1 :
This guide describes how to upgrade existing Percona TokuMX instance to Percona Server for MongoDB. The following JavaScript files are required to perform the upgrade:
• allDbStats.js
• tokumx_dump_indexes.js
• psmdb_restore_indexes.js
You can download those files from GitHub.
Step 2 :
Run the allDbStats.js script to record database state before migration:
$ mongo ./allDbStats.js > ~/allDbStats.before.out
Step 3 :
Perform a dump of the database:
$ mongodump --out /your/dump/path
Step 4 :
Perform a dump of the indexes:
$ ./tokumx_dump_indexes.js > /your/dump/path/tokumxIndexes.json
Step 5 :
Restore the collections without indexes using “--noIndexRestore” switch:
$ mongorestore --noIndexRestore /your/dump/path
Step 6 :
Restore the indexes (this may take a while). This step will remove clustering options to the collections before inserting.
$./psmdb_restore_indexes.js --eval "data='/your/dump/path/tokumxIndexes.json' "
Step 7 :
Run the allDbStats.js script to record database state after migration:
mongo ./allDbStats.js > ~/allDbStats.after.out
This is the guide i have found in the Migration from Tokumx to Percona server for mongodb. at step 6 when i try to restore indexes i get below mentioned error :
/mnt/tokumx-bkup/tokumxIndexes.json
2016-06-29T05:28:20.028+0000 E QUERY SyntaxError: Unexpected identifier
at /tmp/tokumx2_to_psmdb3_migration-master/psmdb_restore_indexes.js:78:1 at /mnt/tokumx-bkup/tokumxIndexes.json
2016-06-29T05:28:20.028+0000 E QUERY Error: error loading js file: /mnt/tokumx-bkup/tokumxIndexes.json
at /tmp/tokumx2_to_psmdb3_migration-master/psmdb_restore_indexes.js:78:1 at /tmp/tokumx2_to_psmdb3_migration-master/psmdb_restore_indexes.js:78
failed to load: /tmp/tokumx2_to_psmdb3_migration-master/psmdb_restore_indexes.js
Any help will be welcomed.
Thanks
check the tokumxIndexes.json file. When tokumx_dump_indexes.js is run, the mongo shell parameter --quiet must be used or the resulting json will contain the shell preamble at the beginning.
And check the file using something like http://jsonlint.com/
Also if preamble is present delete these two lines from the tokumxIndexes.json file.
"MongoDB shell version: 3.0.11-1.6
connecting to: 127.0.0.1:27017/test"
and Run the script again.
and Run the script again
$./psmdb_restore_indexes.js --eval "data='/your/dump/path/tokumxIndexes.json' "
Now this script will start build Index Process.

Data Migration From Tokumx 1.5 To Percona MongoDB Server 3

I want to migrate from TokuMX 1.5 to Percona MongoDB server 3.11. Following Data Migration guide provided by percona .
which works fine, but at:
Step 12 : Restore the indexes (this may take a while). This step will
remove clustering options to the collections before inserting.
$./psmdb_restore_indexes.js --eval "
data='/your/dump/path/tokumxIndexes.json' "
My migration fails and gives the following error:
/mnt/tokumx-bkup/tokumxIndexes.json
2016-06-29T05:28:20.028+0000 E QUERY SyntaxError: Unexpected identifier
at /tmp/tokumx2_to_psmdb3_migration-master/psmdb_restore_indexes.js:78:1 at /mnt/tokumx-bkup/tokumxIndexes.json
2016-06-29T05:28:20.028+0000 E QUERY Error: error loading js file: /mnt/tokumx-bkup/tokumxIndexes.json
at /tmp/tokumx2_to_psmdb3_migration-master/psmdb_restore_indexes.js:78:1 at /tmp/tokumx2_to_psmdb3_migration-master/psmdb_restore_indexes.js:78
failed to load: /tmp/tokumx2_to_psmdb3_migration-master/psmdb_restore_indexes.js
Can someone please help me in resolving this issue?