Open Jean-Baptiste-Lasselle opened 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]$
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]$
Hypothèse en cours de vérification :+1: Dans l'état de configuration initiale :
postgres
, (et cela ne peut être changé / configuré? question remise à des tests ultérieurs)postgres
, que depuis localhost, donc il faut pouvoir atteindre, par le réseau, l'hôte réseau dans lequel s'exécute le serveur.POSTGRES_PASSWORD
, pendant l'exécution du processus d'installation de postgresql, alors on devra utiliser le mot de passe, pour s'authentifier en tant que postgres
. Par défaut, l'utilisateur postgres
pourra s'authentifier sans que postgres n'exige de saisie de mot de passe.
en ai littéralement assez de cette image complétement bancale mdillon/postgres :+1:
POSTGRES_DB
POSTGRES_USER
POSTGRES_PASSWORD
De toute façon j'ai testé, qu'en utilisant ces variables de la manière suivante :
J'arrive à créer la bdd du nom que je souhaite sans problème
Superbe pile d'erreur pour info :