Closed conbainbridge closed 4 years ago
pushkin start seems to power up the container, but it says this in regards to test_db:
2020-07-31 16:18:36.940 UTC [199] FATAL: password authentication failed for user "postgres"
2020-07-31 16:18:36.940 UTC [199] DETAIL: Password does not match for user "postgres".
Connection matched pg_hba.conf line 95: "host all all all md5"
Still guessing this might be an issue with my global postgres though still confused how Docker is getting influenced by it.
Can you confirm that your docker-compose has this text:
` test_db: image: 'postgres:11' environment: POSTGRES_PASSWORD: example POSTGRES_DB: test_db ports:
and that your pushkin.yaml has this:
# databases configs experiments can use databases: localtestdb: user: 'postgres' pass: 'example' url: 'localhost' name: 'test_db'
If that matches exactly, can you please pop in your docker-compose here just so I can double-check that there isn't anything else weird lying around?
Another thing you can try is using a late v0 of the CLI with compatible site and experiment templates. (You should be able to figure out which ones those are by looking at the version noters on github, and just finding the last one before the notes say 'upgrading to be compatible with cli v1'). If you can get things to work with an earlier version, maybe we can figure out what's going on that way.
The pushkin.yaml and docker-compose.dev.yml do indeed have these (and this issue happens to any pushkin site I try to run, even when I build a new one). Below is my docker-compose.dev.yml:
version: '3.1'
volumes:
message_queue_volume: null
test_db_volume: null
services:
api:
build: ./api
environment:
- 'AMQP_ADDRESS=amqp://message-queue:5672'
- PORT=3000
expose:
- '3000'
links:
- message-queue
message-queue:
image: 'rabbitmq:3.6-management'
expose:
- 5672
- 15672
ports:
- 15672
environment:
CONFD_ARGS: '--interval 5'
RABBITMQ_CLUSTER_PARTITION_HANDLING: autoheal
RABBITMQ_NET_TICKTIME: '60'
RABBITMQ_ERLANG_COOKIE: message-queue-cookie
RABBITMQ_NODENAME: rabbitmqnode@localhost
volumes:
- 'message_queue_volume:/var/lib/rabbitmq'
server:
build: ./front-end
environment:
API_PORT: '3000'
ports:
- '80:80'
- '433:433'
links:
- api
test_db:
image: 'postgres:11'
environment:
POSTGRES_PASSWORD: example
POSTGRES_DB: test_db
ports:
- '5432:5432'
volumes:
- 'test_db_volume:/var/lib/postgresql/data'
healthcheck:
test:
- CMD-SHELL
- pg_isready -U postgres
interval: 10s
timeout: 5s
retries: 5
reading_worker:
image: reading_worker
links:
- message-queue
- test_db
environment:
- 'AMQP_ADDRESS=amqp://message-queue:5672'
- DB_USER=postgres
- DB_PASS=
- DB_URL=test_db
- DB_NAME=test_db
labels:
isPushkinWorker: true
I also noticed this pop up in Docker desktop, which makes me wonder if some global postgres configurations are messed up, since user should be postgres instead of root.
2020-07-31 17:00:43.605 UTC [96] FATAL: role "root" does not exist
Can you pop in your pushkin.yaml as well?
pushkin.yaml:
# main directories relative to project root ('..')
experimentsDir: 'experiments'
coreDir: 'pushkin'
# databases configs experiments can use
databases:
localtestdb:
user: 'postgres'
pass: 'example'
url: 'localhost'
name: 'test_db'
Is the 'root' role used anywhere?
I didn't think so, thinking about it I believe that line in the Docker logs may have come up because I went into the container from terminal to try to figure out what it thought the password should be.
Issue was Postgres clogging port 5432. Running the following line in terminal fixes this:
sudo pkill -u postgres
If anyone else runs into a similar issue and finds this thread, to check if this solution will work for you, confirm Postgres is in port 5432 using:
sudo lsof -i tcp:5432
When running
pushkin prep
, the test_db fails to setup and throws this error, regardless of whether or not I have run pushkin armageddon and restarted Docker first:The following is the logs output from Docker desktop:
And the specs of the container (the top section header that got chopped off by the window size is the "Environment"):