# New postgres db, can't reach Forest Admin panel

**URL:** <https://community.forestadmin.com/t/new-postgres-db-cant-reach-forest-admin-panel/1378>\
**Category:** Help me!\
**Tags:** setup\
**Created:** [November 27, 2020, 1:27pm UTC](https://community.forestadmin.com/t/new-postgres-db-cant-reach-forest-admin-panel/1378 "2020-11-27T13:27:04Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ElieM](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/eliem/32/1130_2.png) [@ElieM](https://community.forestadmin.com/u/ElieM)\
**Post date:** [November 27, 2020, 1:27pm UTC](https://community.forestadmin.com/t/new-postgres-db-cant-reach-forest-admin-panel/1378/1 "2020-11-27T13:27:04Z")

</div>

## Expected behavior

I want to test forest admin with a simple postgres DB I created following theses steps [https://www.postgresqltutorial.com/install-postgresql-linux/](https://www.postgresqltutorial.com/install-postgresql-linux/)

## Actual behavior

I was able to link my data to Forest admin (with docker, on port 5433). When I run [http://localhost:3310](http://localhost:3310) it says my app is running but when I want to log to Forest Admin on [http://app.forestadmin.com/](http://app.forestadmin.com/) I first have to login and it then says `Your server encountered an error`

## Failure Logs

```javascript
[forest] 🌳🌳🌳 Unexpected error: connect ECONNREFUSED 127.0.0.1:5433
SequelizeConnectionRefusedError: connect ECONNREFUSED 127.0.0.1:5433
    at connection.connect.err (/usr/src/app/node_modules/sequelize/lib/dialects/postgres/connection-manager.js:170:24)
    at Connection.connectingErrorHandler (/usr/src/app/node_modules/pg/lib/client.js:213:14)
    at Connection.emit (events.js:198:13)
    at Socket.reportStreamError (/usr/src/app/node_modules/pg/lib/connection.js:57:10)
    at Socket.emit (events.js:198:13)
    at emitErrorNT (internal/streams/destroy.js:91:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
    at process._tickCallback (internal/process/next_tick.js:63:19)

```

## Context

I’m running on Ubuntu

---

<div class="post-metadata">

**Author:** ![anon39848301](https://avatars.discourse-cdn.com/v4/letter/a/b9e5f3/32.png) [@anon39848301](https://community.forestadmin.com/u/anon39848301)\
**Post date:** [November 27, 2020, 1:32pm UTC](https://community.forestadmin.com/t/new-postgres-db-cant-reach-forest-admin-panel/1378/2 "2020-11-27T13:32:14Z")

</div>

Hi @ElieM, and welcome to our community 👋,

The errors indicate that the connection between your lumber project and your database errored.

In order to assist you in this process, I have a few questions:

Are you able to connect to this database with another client app with the connection string generated in your `.env`, like Postico?  
Also, are you using docker for both database & your lumber project?  
If you can, could you provide the commands you used to run your database & your lumber project?

Thanks in advance

---

<div class="post-metadata">

**Author:** ![ElieM](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/eliem/32/1130_2.png) [@ElieM](https://community.forestadmin.com/u/ElieM)\
**Post date:** [November 27, 2020, 1:45pm UTC](https://community.forestadmin.com/t/new-postgres-db-cant-reach-forest-admin-panel/1378/3 "2020-11-27T13:45:21Z")

</div>

Hi @anon39848301, thanks for your quick answer 🙂  
For now I only tested my database in command line using psql. For docker I followed the command line Forest Admin shows on the tutorial:  
`docker pull forestadmin/lumber`

```javascript
docker run \                    
  -v `pwd`:/usr/src/app --init \
  --network host \
  -e DATABASE_SCHEMA="public" \
  -e DATABASE_SSL="false" \
  -e DATABASE_URL="postgres://postgres:postgres@localhost:5433/dvdrental" \
  -e APP_NAME="films2" \
  -e FOREST_EMAIL="elie.mietkiewicz@matters.tech" \
  -e FOREST_TOKEN="eyJraWQiOiJ6d0VjbU5LVVpV[...]" \
  -e APPLICATION_HOST="localhost" \
  -e APPLICATION_PORT="3310" \
  -ti forestadmin/lumber

```

Let me know if you need anything else

---

<div class="post-metadata">

**Author:** ![anon39848301](https://avatars.discourse-cdn.com/v4/letter/a/b9e5f3/32.png) [@anon39848301](https://community.forestadmin.com/u/anon39848301)\
**Post date:** [November 27, 2020, 1:57pm UTC](https://community.forestadmin.com/t/new-postgres-db-cant-reach-forest-admin-panel/1378/4 "2020-11-27T13:57:39Z")

</div>

Thanks, I just wanted to be sure the `--network host` was here since you are running ubuntu 🙂

I can’t find any issue here, this looks ok to me. I assume `psql postgresql://postgres:postgres@localhost:5433/dvdrental` works fine from your host then?

`dvdrental` is a pretty common database, so I’ll do a test real quick on my end to check if everything is ok on my end or if I’m able to reproduce.

In the meantime, I would suggest to check if within the lumber container you are able to run `psql postgresql://postgres:postgres@localhost:5433/dvdrental` just to make sure there are no issue with the connection between your database and the lumber container. Also, you could give a shot at replacing `localhost` with `127.0.0.1` or even `0.0.0.0`, just to make sure there are no docker issues involved here.

EDIT: I’m not able to reproduce on my end using the `dvdrental` database on a setup with a local `postgresql` & dockerized lumber project. Let me know if my previous suggestion helped, otherwise we might have more things to look into 🙏

---

<div class="post-metadata">

**Author:** ![ElieM](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/eliem/32/1130_2.png) [@ElieM](https://community.forestadmin.com/u/ElieM)\
**Post date:** [November 27, 2020, 2:18pm UTC](https://community.forestadmin.com/t/new-postgres-db-cant-reach-forest-admin-panel/1378/5 "2020-11-27T14:18:43Z")

</div>

The command you gave me run fine. I tried again with the npm config instead and everything worked fine so I guess it’s a problem with my docker env rather than my forest admin config. Should be enough for my tests anyway 🙂

---

<div class="post-metadata">

**Author:** ![anon39848301](https://avatars.discourse-cdn.com/v4/letter/a/b9e5f3/32.png) [@anon39848301](https://community.forestadmin.com/u/anon39848301)\
**Post date:** [November 27, 2020, 2:23pm UTC](https://community.forestadmin.com/t/new-postgres-db-cant-reach-forest-admin-panel/1378/6 "2020-11-27T14:23:28Z")

</div>

Ubuntu does not handle `host.docker.internal` and the onboarding process contains linux specific step, which might explain why you encountered an issue here. I’ll still further investigate this issue on my end.

I guess running your project with `npm` rather than docker is not an issue if your database is already running locally 🙂

Don’t hesitate if you are still encountering issue with this process!
