mirror of
https://github.com/plankanban/planka.git
synced 2026-02-24 19:08:59 +03:00
Planka can't connect to database #102
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Jummit on GitHub (May 12, 2021).
I followed the installation instructions on my new Arch machine, but I get this error in the log:
The database seems to have started up correctly:
@nickbe commented on GitHub (May 13, 2021):
EHOSTUNREACH probably means that the host cannot be found. Our own database runs on localhost and localhost is used for the connection. So I would probably change 172.16.0.2 to localhost
@Jummit commented on GitHub (May 13, 2021):
Where do I change the address of the database? I have this in my
docker-compose.yml:- DATABASE_URL=postgresql://postgres@postgres/planka@BHWarrior commented on GitHub (May 14, 2021):
I have the same problem and don't know how to solve this. My full log:
@meltyshev commented on GitHub (May 14, 2021):
@benyhirmansyah, it looks like everything is ok in your log
@meltyshev commented on GitHub (May 14, 2021):
@Jummit, do you use the default docker-compose config?
@BHWarrior commented on GitHub (May 14, 2021):
But when I try
curl http://127.0.0.1:3000, I got this:curl: (56) Recv failure: Connection reset by peerAlso, when I tried on browser, I got 502 Bad Gateway on nginx response.
@BHWarrior commented on GitHub (May 14, 2021):
It's because my ConfigServer Security & Firewall (csf) setting. Sorry... Once I disable the firewall, it's working. I'll check my config again so I can enable my firewall together with planka.
@Jummit commented on GitHub (May 16, 2021):
Yes. I don't know where to make it connect to localhost.
@forrestab commented on GitHub (Jun 2, 2021):
@Jummit I had to specify a different ip address to postgres for my setup, I used the following uri:
You can find more about the connection uris here under 33.1.1.2. Connection URIs. Hope this helps.
@Jummit commented on GitHub (Jun 2, 2021):
Sorry, but I don't understand docker or the planka codebase well enough to know where to change that url. Is it in
docker_compose.ymlor somewhere else?@forrestab commented on GitHub (Jun 25, 2021):
@Jummit this would be the
DATABASE_URLenv variable in your docker-compose.yml file.@Jummit commented on GitHub (Jun 25, 2021):
Setting DATABASE_URL to
postgresql://localhost/plankadoesn't work.I tried that and got an EHOSTUNREACH error with this url:
DATABASE_URL=postgresql://jummit:Password@jummit/plankacurl http://127.0.0.1:3000results in
curl: (56) Recv failure: Connection reset by peer@forrestab commented on GitHub (Jul 12, 2021):
@Jummit going on the statement above where you said you were using the docker-compose from this repo, I would assume the connection string to the postgres db would contain the service name, i.e. postgres.
When I said that I had to specify a different ip address to connect to my db instance, it was because my db instance wasnt on the same docker network as my planka instance. But if you are running
docker-compose upthen docker-compose creates a network for that script and all services configured in it, so you should be good to use the service name.@Jummit commented on GitHub (Dec 1, 2021):
I'll close this issue since it was resolved after doing a clean install.