Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Help needed with tinode server docker installation

192 views
Skip to first unread message

Shailendra Maurya

unread,
Sep 3, 2023, 4:33:35 AM9/3/23
to Tinode General
I followed the installation instructions given at: https://github.com/tinode/chat/blob/master/docker/README.md
(Except the optional ones)

But, when I tried running the container, it shows following error on tinode-srv log:

2023/09/03 07:40:18 Database adapter: 'postgres'; version: 113
2023/09/03 07:40:18 Failed to init DB adapter: failed to connect to `host=localhost user=postgres database=tinode`: dial error (dial tcp [::1]:5432: connect: network is unreachable)
./init-db failed. Quitting.
2023/09/03 08:00:01 Database adapter: 'postgres'; version: 113
2023/09/03 08:00:01 Failed to init DB adapter: failed to connect to `host=localhost user=postgres database=tinode`: dial error (dial tcp [::1]:5432: connect: network is unreachable)
./init-db failed. Quitting.

What's gone wrong??

Thanks in advance :-)

Gene Sokolov

unread,
Sep 3, 2023, 11:15:18 AM9/3/23
to tin...@googlegroups.com
It looks like your setup expects postgress to be in the same container as Tinode server. Obviously, it's not there: 

connect: network is unreachable

--
You received this message because you are subscribed to the Google Groups "Tinode General" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tinode+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tinode/62b40202-b112-4e83-a42e-17bed6b92c2cn%40googlegroups.com.

James Richardson

unread,
Nov 19, 2024, 10:31:43 AM11/19/24
to Tinode General
I am having this exact same issue. Is something missing in the documentation here: https://github.com/tinode/chat/blob/master/docker/README.md

Step 1. Install Docker
Step 2: `docker network create tinode-net`
Step 3: `docker run --name postgres --network tinode-net --restart always --env POSTGRES_PASSWORD=<my_secret> -d postgres:13` (for Postgres)
Step 4: `$ docker run -p 6060:6060 -d --name tinode-srv --network tinode-net tinode/tinode-postgres:latest` (again, for Postgres)

The Docs make it seem like it should be that simple. But what happens is the tinode-srv container runs for a few seconds and then dies. Checking the logs for that container:
```
2024/11/19 15:21:27 Database adapter: 'postgres'; version: 113
2024/11/19 15:21:27 Failed to init DB adapter: failed to connect to `host=localhost user=postgres database=tinode`: dial error (dial tcp [::1]:5432: connect: connection refused)
```

The postgres container is running on port: 5432:
```
CONTAINER ID   IMAGE         COMMAND                  CREATED         STATUS         PORTS      NAMES
2507188f0740   postgres:13   "docker-entrypoint.s…"   7 minutes ago   Up 7 minutes   5432/tcp   postgres
```

I also tried creating a docker-compose.yml file and dumping the postgres and tinode-srv services in there. I get the exact same issue/behavior.

Based on the official Docs linked above, these are two separate containers, using the same docker network. I'm not understanding why they are not seeing each other.

For Step 3, I changed the default password of "postgres" to my own passphrase. Is that the problem? Is the tinode-srv container actually expecting to connect to postgres with that default password?


Reply all
Reply to author
Forward
0 new messages