# Cannot link to a non running container

**URL:** https://discuss.tryton.org/t/cannot-link-to-a-non-running-container/3101
**Category:** User
**Tags:** docker
**Created:** [August 6, 2020, 2:15pm UTC](https://discuss.tryton.org/t/cannot-link-to-a-non-running-container/3101 "2020-08-06T14:15:06Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![herrdeh](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/herrdeh/32/821_2.png) [@herrdeh](https://discuss.tryton.org/u/herrdeh)
#### Post date: [August 6, 2020, 2:15pm UTC](https://discuss.tryton.org/t/cannot-link-to-a-non-running-container/3101/1 "2020-08-06T14:15:06Z")

</div>

Me again… ):  
As I had trouble to replay a modified database to the tryton-postgres container, I tried to create a new tryton-postgres container. I removed the old one and then carried out the instructions from the installation site:

```
$ docker run --name tryton-postgres -e POSTGRES_PASSWORD=mysecretpassword -e POSTGRES_DB=tryton -d postgres
$ docker run --link tryton-postgres:postgres -e DB_PASSWORD=mysecretpassword -it tryton/tryton trytond-admin -d tryton --all

```

Then I replayed the sql dump, the only error message is:  
ERROR: role “grptryton” does not exist

Restarted tryton-postgres and got a running tryton-postgres container:  
$ sudo docker ps  
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES  
e6b93444d180 postgres “docker-entrypoint.s…” 3 minutes ago Up 3 minutes 5432/tcp tryton-postgres

Now, when starting tryton:  
$ sudo docker start tryton  
Error response from daemon: Cannot link to a non running container: /tryton-postgres AS /tryton/postgres  
Error: failed to start containers: tryton

What can I do?

Thanks lot in advance,  
Wolf

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [August 6, 2020, 9:58pm UTC](https://discuss.tryton.org/t/cannot-link-to-a-non-running-container/3101/2 "2020-08-06T21:58:49Z")

</div>

> [@herrdeh](#):
>
> Then I replayed the sql dump, the only error message is:  
> ERROR: role “grptryton” does not exist

If you restore a backup, you should not initialize the database (which means no running trytond-admin).  
The error about missing role should not be a problem as long as you restore the database using the same role that will be used by trytond.

> [@herrdeh](#):
>
> Now, when starting tryton:  
> $ sudo docker start tryton  
> Error response from daemon: Cannot link to a non running container: /tryton-postgres AS /tryton/postgres  
> Error: failed to start containers: tryton

I guess you must remove the previous tryton container as it is still linked to the old postgres container.

---

<div class="post-metadata">

### Author: ![herrdeh](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/herrdeh/32/821_2.png) [@herrdeh](https://discuss.tryton.org/u/herrdeh)
#### Post date: [August 7, 2020, 10:39am UTC](https://discuss.tryton.org/t/cannot-link-to-a-non-running-container/3101/3 "2020-08-07T10:39:52Z")

</div>

Yess! (-;  
Creating a new tryton container which then links to the postgres did it.

As always - I’m very grateful!  
Cheers,  
Wolf

---

<div class="post-metadata">

### Author: ![system](https://discuss-cdn.tryton.org/uploads/default/original/1X/c6f8ec0a40525cdcd50058c734283450a4b3d38b.png) [@system](https://discuss.tryton.org/u/system)
#### Post date: [September 6, 2020, 10:48am UTC](https://discuss.tryton.org/t/cannot-link-to-a-non-running-container/3101/4 "2020-09-06T10:48:11Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
