Circleci Migration Issues (Postgres)


#1

Can you give me docker image with postgres 9.6 and port 5432 for python 3.6?
I’m getting various errors while i’m trying to change the configuration according to the errors.

The problem is psql is unable to find or connect to database. The default database url seems to have been changed from version 1 to 2, previously in 1.0 it was “postgres://ubuntu:@127.0.0.1:5432/circle_test”.

Now I’m using image: circleci/postgres:9.6.5-alpine-ram with database url “postgres://root@127.0.0.1:5433/circle_test”(port seems to be 5433 for this image).
Is this the proper url where “root” is username and “circle_test” is database? or What are default username and database name for above image?

Also I believe the port was hard coded somewhere in our application, so if you can give me a docker image for postgres 9.6 with port 5432 for python 3.6 and its default username and database name, it would be really helpful.

Errors I got are:
1.)(Before)

‘psql fatal role “circleci” not found.’

2.)(Currently after some changes)

psql: 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”?

I hope I made some sense.
I can provide you with whatever the information you want or even yml config files if necessary.

(“https://circleci.com/docs/2.0/databases/#postgresql-database-testing-example”, followed this link but didn’t help).

This has been pending since a month and has to be resolved soon. Please help.
Thank You.


#2

There are a number of examples in this forum - search for “postgres”. Something came up in the last week or so, I seem to recall.


#3

Please give link, I couldn’t find and hence had to post


#4

It was this one.

Aside: when posting questions anywhere on the web, format them if you can - making them readable is a form of helping others to help you. In particular, double Enter creates a paragraph break, which you can use to separate a long post into sections.

  1. If you have a list, use a real
  2. ordered list
  3. like so

If you have an error, use a quote block:

psql: could not connect to server: No such file or directory

The markup language here is called Markdown, and it is well worth learning. There’s emoji too. :smiley_cat:


#6

OK, well, carry on searching. If you get stuck, drop the secondary container and install Postgres in your primary container - it’s just apt-get to grab it, and possibly a command to start it. That will at least get you running.

Note that you are unlikely to be bumping into CircleCI-specific issues - these are just Linux issues, which can be debugged just as if you were experiencing them on a local machine.


#7

I hope you read the post . Also check the link attached. You can ask someone else to look into it if you can’t. I asked for some information, not to resolve the errors.


#8

I hope you read the post

I did! :smirk_cat:

You can ask someone else to look into it if you can’t.

I can, but I won’t - I am a volunteer here. Your level of entitlement is rather too high for me, so I will drop out of this thread.

I have given you a suggestion on how to get Postgres working temporarily, and if your work is genuinely urgent, you would do well to take it.


#9

Thank You very much