Closed walter-weinmann closed 3 years ago
@walter-weinmann by this alone, I can't know what it happened in docker container.
can you share command when you create container? and, docker logs too.
and, docker environment arguments changed on v2.1.3 it is compatible with official PostgreSQL image.
before
$ docker run -i -t -v myvolume:/home/agens/AgensGraph/data bitnine/agensgraph:v2.1.0 agens
after
# POSTGRES_PASSWORD is required.
$ docker run -d \
--name agensgraph \
-e POSTGRES_PASSWORD=agensgraph \
-p 5432:5432 \
-v myvolume:/var/lib/postgresql/data \
bitnine/agensgraph:v2.1.3
https://github.com/bitnine-oss/agensgraph-docker/blob/master/README.md
Docker create db_seeder_db (AgensGraph v2.1.3)
docker network create db_seeder_net
docker create --name db_seeder_db --network db_seeder_net -e POSTGRES_PASSWORD=agensgraph -p 5432:5432 -t bitnine/agensgraph:v2.1.3 agens
Unable to find image 'bitnine/agensgraph:v2.1.3' locally
v2.1.3: Pulling from bitnine/agensgraph
9aae54b2144e: Pull complete
27841435e408: Pull complete
9cfe3e80c409: Pull complete
5d4f4806379c: Pull complete
1b0633c7604f: Pull complete
6dec3b2d2469: Pull complete
c05eab982d3c: Pull complete
480125fe3169: Pull complete
8ad3cfe01611: Pull complete
Digest: sha256:536255a071314a1284c465d1aa07bad6a83cb27d492e5f1863501557f5541411
Status: Downloaded newer image for bitnine/agensgraph:v2.1.3
6dab301e83d018864f8b6c5abf3e73b3cfb207e522d33688ccfe3037615602de
Docker start db_seeder_db (AgensGraph v2.1.3) ...
docker start db_seeder_db
db_seeder_db
DOCKER AgensGraph was ready in 36 seconds
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
0e9718387f0c portainer/portainer-ce "/portainer" 6 weeks ago Up 19 minutes 0.0.0.0:8000->8000/tcp, 0.0.0.0:9000->9000/tcp portainer
agens: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
@walter-weinmann
Currently,
docker create --name db_seeder_db --network db_seeder_net -e POSTGRES_PASSWORD=agensgraph -p 5432:5432 -t bitnine/agensgraph:v2.1.3 agens
Suggests, ( without command )
docker create --name db_seeder_db --network db_seeder_net -e POSTGRES_PASSWORD=agensgraph -p 5432:5432 -t bitnine/agensgraph:v2.1.3
because, i defined that CMD ["postgres"]
without ag_ctl
.
so, you don't need to send agens command.
Older than v2.1.3 requires to execute some command that do not want to exit for remaining container is running. so, In the document, run agens.
but, Newer version is wait that postgres process is exiting.
Older : https://github.com/bitnine-oss/agensgraph-docker/blob/3a857cb8fbd6e5810d5fd655aa3b2756808a259f/AgensBrowser/entrypoint.sh Newer : https://github.com/bitnine-oss/agensgraph-docker/blob/master/2.1/alpine/docker-entrypoint.sh
Now I get the following:
org.postgresql.util.PSQLException: FATAL: password authentication failed for user "agens"
default user name is postgres, so if you want to change user name.
then, use POSTGRES_USER
enviroment arguement.
# https://hub.docker.com/_/postgres
POSTGRES_USER
This optional environment variable is used in conjunction with POSTGRES_PASSWORD to set a user and its password. This variable will create the specified user with superuser power and a database with the same name. If it is not specified, then the default user of postgres will be used.
Be aware that if this parameter is specified, PostgreSQL will still show The files belonging to this database system will be owned by user "postgres" during initialization. This refers to the Linux system user (from /etc/passwd in the image) that the postgres daemon runs as, and as such is unrelated to the POSTGRES_USER option. See the section titled "Arbitrary --user Notes" for more details.
docker create --name db_seeder_db --network db_seeder_net -e POSTGRES_PASSWORD=agensgraph -e POSTGRES_USER=agens -p 5432:5432 -t bitnine/agensgraph:v2.1.3
I finally got it - thank you very much for the very generous support - Happy Easter !!!
Docker image v2.1.1 is fine