Jean-Baptiste-Lasselle / jbl-osm-original

I started from https://shinesolutions.com/2016/12/30/generating-high-res-maps-with-mapnik-and-docker/
Apache License 2.0
0 stars 0 forks source link

REFAIRE_TOUT_LE_CONTENEUR_POSTGIS #7

Open Jean-Baptiste-Lasselle opened 6 years ago

Jean-Baptiste-Lasselle commented 6 years ago

en ai littéralement assez de cette image complétement bancale mdillon/postgres :+1:

De toute façon j'ai testé, qu'en utilisant ces variables de la manière suivante :

docker run --name conteneurtest -itd --restart=always -e POSTGRES_DB=bddgeoloc -e POSTGRES_USER=renderer-user -e POSTGRES_PASSWORD=whereischarlie postgres:9.5.14
[bobby@pc-100 proto]$ docker exec -it conteneurtest sh -c "psql -U renderer-user --dbname=bddgeoloc --host=localhost --password"
# -- Sortie Standard obtenue 
# Password for user renderer-user: 
# psql (9.5.14)
# Type "help" for help.
# 
# bobby=# \q
[bobby@pc-100 proto]$

J'arrive à créer la bdd du nom que je souhaite sans problème

Superbe pile d'erreur pour info :

[bobby@pc-100 proto]$ docker logs -f postgis
LOG:  database system was shut down at 2018-10-26 01:30:01 UTC
LOG:  MultiXact member wraparound protections are now enabled
LOG:  database system is ready to accept connections
LOG:  autovacuum launcher started
^C
[bobby@pc-100 proto]$ docker logs -f rendereurpoulet
 ------------------------------------------------------------------------------------------- 
 VERIFICATION RENDERER ENNTRYPOINT : [MAPNIK_POSTGRES_USER=renderer-user] 
 VERIFICATION RENDERER ENNTRYPOINT : [MAPNIK_POSTGRES_DB=bddgeoloc] 
 VERIFICATION RENDERER ENNTRYPOINT : [MAPNIK_POSTGRES_DB_HOST=postgis] 
 VERIFICATION RENDERER ENNTRYPOINT : [MAPNIK_POSTGRES_PASSWORD=whereischarlie] 
 VERIFICATION RENDERER ENNTRYPOINT : [PGUSER=renderer-user] 
 VERIFICATION RENDERER ENNTRYPOINT  : [PGPASSWORD=whereischarlie] 
 ------------------------------------------------------------------------------------------- 

 ----- 
 VERIF JBL dans complie_style.sh de monsieur catactrophe aka 'domman84' [MAPNIK_POSTGRES_DB_HOST=postgis]
 VERIF JBL dans complie_style.sh de monsieur catactrophe aka 'domman84' [MAPNIK_POSTGRES_DB_PORT_NO=5432]
 VERIF JBL dans complie_style.sh de monsieur catactrophe aka 'domman84' [MAPNIK_POSTGRES_DB=bddgeoloc]
 VERIF JBL dans complie_style.sh de monsieur catactrophe aka 'domman84' [MAPNIK_POSTGRES_USER=renderer-user]
 VERIF JBL dans complie_style.sh de monsieur catactrophe aka 'domman84' [MAPNIK_POSTGRES_PASSWORD=whereischarlie]
 ----- 

DB successfully created, waiting for restart
Starting renderer
2018/10/26 01:39:43 app.go:266: [INFO] Serving debug data (/debug/vars) on %s... :9080
2018/10/26 01:39:43 app.go:267: [INFO] Serving monitoring xml data on %s... :9080
2018/10/26 01:39:43 renderselector.go:209: [DEBUG] ping error %v dial tcp 127.0.0.1:8090: getsockopt: connection refused
2018/10/26 01:39:43 renderselector.go:117: [DEBUG] '%v' is %v localhost:8090 Offline
2018/10/26 01:39:43 main.go:118: [INFO] Starting on %s... :8080
2018/10/26 01:39:43 app.go:266: [INFO] Serving debug data (/debug/vars) on %s... :9090
2018/10/26 01:39:43 app.go:267: [INFO] Serving monitoring xml data on %s... :9090
2018/10/26 01:39:44 render.go:35: [ERROR] Render child error: %v Exception: Postgis Plugin: FATAL:  database "bddgeoloc" does not exist

2018/10/26 01:39:44 render.go:35: [ERROR] Render child error: %v 

2018/10/26 01:39:44 render.go:35: [ERROR] Render child error: %v Connection string: 'host=postgis port=5432 dbname=bddgeoloc user=renderer-user connect_timeout=4'

2018/10/26 01:39:44 render.go:35: [ERROR] Render child error: %v   encountered during parsing of layer 'landcover-low-zoom' in Layer at line 334 of '/openstreetmap-carto/stylesheet.xml'

2018/10/26 01:39:44 render.go:35: [ERROR] Render child error: %v Exception: Postgis Plugin: FATAL:  database "bddgeoloc" does not exist

2018/10/26 01:39:44 render.go:35: [ERROR] Render child error: %v 

2018/10/26 01:39:44 render.go:35: [ERROR] Render child error: %v Connection string: 'host=postgis port=5432 dbname=bddgeoloc user=renderer-user connect_timeout=4'

2018/10/26 01:39:44 render.go:35: [ERROR] Render child error: %v   encountered during parsing of layer 'landcover-low-zoom' in Layer at line 334 of '/openstreetmap-carto/stylesheet.xml'

2018/10/26 01:39:44 main.go:91: [CRITICAL] Failed to create tile server: Failed to create some renders: [Invalid read uint64: EOF Invalid read uint64: EOF]
2018/10/26 01:40:13 renderselector.go:209: [DEBUG] ping error %v dial tcp 127.0.0.1:8090: getsockopt: connection refused
2018/10/26 01:40:13 renderselector.go:117: [DEBUG] '%v' is %v localhost:8090 Offline
2018/10/26 01:40:43 renderselector.go:209: [DEBUG] ping error %v dial tcp 127.0.0.1:8090: getsockopt: connection refused
2018/10/26 01:40:43 renderselector.go:117: [DEBUG] '%v' is %v localhost:8090 Offline
^C
[bobby@pc-100 proto]$ docker exec -it  postgis sh -c "psql -U renderer-user --dbname=bddgeoloc  "
psql: FATAL:  database "bddgeoloc" does not exist
[bobby@pc-100 proto]$ docker exec -it rendereurpoulet sh -c "psql -U renderer-user --dbname=bddgeoloc --host=postgis --password"
Password for user renderer-user: 
psql: FATAL:  database "bddgeoloc" does not exist
[bobby@pc-100 proto]$ 
Jean-Baptiste-Lasselle commented 6 years ago

MerciBobby

Jean-Baptiste-Lasselle commented 6 years ago

logs du dernier test :

[jibl@pc-100 proto]$ docker logs -f postgis
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale "en_US.utf8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".

Data page checksums are disabled.

fixing permissions on existing directory /var/lib/postgresql/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting dynamic shared memory implementation ... posix
creating configuration files ... ok
creating template1 database in /var/lib/postgresql/data/base/1 ... ok
initializing pg_authid ... ok
setting password ... ok
initializing dependencies ... ok
creating system views ... ok
loading system objects' descriptions ... ok
creating collations ... ok
creating conversions ... ok
creating dictionaries ... ok
setting privileges on built-in objects ... ok
creating information schema ... ok
loading PL/pgSQL server-side language ... ok
vacuuming database template1 ... ok
copying template1 to template0 ... ok
copying template1 to postgres ... ok
syncing data to disk ... ok

Success. You can now start the database server using:

    pg_ctl -D /var/lib/postgresql/data -l logfile start

WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.
waiting for server to start....LOG:  database system was shut down at 2018-10-26 20:33:25 UTC
LOG:  MultiXact member wraparound protections are now enabled
LOG:  database system is ready to accept connections
LOG:  autovacuum launcher started
 done
server started
psql: could not connect to server: Connection refused
    Is the server running on host "localhost" (127.0.0.1) and accepting
    TCP/IP connections on port 5432?
could not connect to server: Network is unreachable
    Is the server running on host "localhost" (::1) and accepting
    TCP/IP connections on port 5432?
LOG:  database system was interrupted; last known up at 2018-10-26 20:33:28 UTC
LOG:  database system was not properly shut down; automatic recovery in progress
LOG:  invalid record length at 0/1707500
LOG:  redo is not required
LOG:  MultiXact member wraparound protections are now enabled
LOG:  database system is ready to accept connections
LOG:  autovacuum launcher started
FATAL:  database "bddgeoloc" does not exist
FATAL:  database "bddgeoloc" does not exist
^C
[jibl@pc-100 proto]$ docker exec -it postgis sh -c "psql --dbname=gis"
psql: FATAL:  database "gis" does not exist
[jibl@pc-100 proto]$ docker exec -it postgis sh -c "psql --dbname=bddgeoloc"
psql: FATAL:  database "bddgeoloc" does not exist
[jibl@pc-100 proto]$ docker exec -it postgis sh -c "psql -U renderer-user--dbname=bddgeoloc"
psql: FATAL:  role "renderer-user--dbname=bddgeoloc" does not exist
[jibl@pc-100 proto]$ docker exec -it postgis sh -c "psql -U renderer-user --dbname=bddgeoloc"
psql: FATAL:  database "bddgeoloc" does not exist
[jibl@pc-100 proto]$ docker exec -it postgis sh -c "psql -U renderer-user --dbname=bddgeoloc -W"
Password for user renderer-user: 
psql: FATAL:  database "bddgeoloc" does not exist
[jibl@pc-100 proto]$ docker exec -it postgis sh -c "pg_isready"
localhost:5432 - accepting connections
[jibl@pc-100 proto]$ docker exec -it postgis sh -c "psql -U renderer-user --dbname=postgres -W"
Password for user renderer-user: 
psql (9.5.14)
Type "help" for help.

postgres=# \q
[jibl@pc-100 proto]$ docker exec -it postgis sh -c "psql -U renderer-user --dbname=renderer-user -W"
Password for user renderer-user: 
psql: FATAL:  database "renderer-user" does not exist
[jibl@pc-100 proto]$ docker exec -it postgis sh -c "pg_isready"
localhost:5432 - accepting connections
[jibl@pc-100 proto]$ 
Jean-Baptiste-Lasselle commented 6 years ago

Ok, donc là, c'est sû, il y a quelque chose que je n'ai pas compris, concernant PostGreSQL, et que je dois éclaircir :

LOG:  database system was shut down at 2018-10-27 01:35:38 UTC
LOG:  MultiXact member wraparound protections are now enabled
LOG:  database system is ready to accept connections
LOG:  autovacuum launcher started
FATAL:  role "dba-user" does not exist
FATAL:  role "dba-user" does not exist
^C
[jibl@pc-100 proto]$ docker exec -it jblpostgis sh -c "psql --dbname=bddgeoloc"
psql: FATAL:  role "root" does not exist
[jibl@pc-100 proto]$ docker exec -it jblpostgis sh -c "psql -U dba-user--dbname=bddgeoloc"
psql: FATAL:  role "dba-user--dbname=bddgeoloc" does not exist
[jibl@pc-100 proto]$ docker exec -it jblpostgis sh -c "psql -U dba-user --dbname=bddgeoloc"
psql: FATAL:  role "dba-user" does not exist
[jibl@pc-100 proto]$ docker exec -it jblpostgis sh -c "psql -U dba-user --dbname=bddgeoloc -W"
Password for user dba-user: 
psql: FATAL:  role "dba-user" does not exist
[jibl@pc-100 proto]$ docker exec -it jblpostgis sh -c "psql -U renderer-user --dbname=bddgeoloc -W"
Password for user renderer-user: 
psql: FATAL:  database "bddgeoloc" does not exist
[jibl@pc-100 proto]$ docker exec -it jblpostgis sh -c "psql -U renderer-user --dbname=renderer -W"
Password for user renderer-user: 
psql: FATAL:  database "renderer" does not exist
[jibl@pc-100 proto]$ docker exec -it jblpostgis sh -c "psql -U renderer-user --dbname=postgres -W"
Password for user renderer-user: 
psql (9.5.14)
Type "help" for help.

postgres=# \q
[jibl@pc-100 proto]$ 
Jean-Baptiste-Lasselle commented 6 years ago

Hypothèse en cours de vérification :+1: Dans l'état de configuration initiale :