# \[solved\] Services stopped using docker

**URL:** <https://forum.pydio.com/t/solved-services-stopped-using-docker/1995>\
**Category:** Pydio Cells\
**Created:** [January 2, 2019, 7:18am UTC](https://forum.pydio.com/t/solved-services-stopped-using-docker/1995 "2019-01-02T07:18:37Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![valmar](https://avatars.discourse-cdn.com/v4/letter/v/b19c9b/32.png) [@valmar](https://forum.pydio.com/u/valmar)\
**Post date:** [January 2, 2019, 7:18am UTC](https://forum.pydio.com/t/solved-services-stopped-using-docker/1995/1 "2019-01-02T07:18:37Z")

</div>

I have a setup using docker compose. However, if I stop and restart the container, very often I find myself unable to do any file operations. If I log in as admin and I go into the Storage tab, I see that all the data services have a “Services Stopped” error.

The main way for me to solve this is to stop, delete and recreate the container 5-10 times until the error goes away. Is there a way to start and stop the services from within the interface? Also, can we find out what is causing the services to die?

---

<div class="post-metadata">

**Author:** ![zayn](https://avatars.discourse-cdn.com/v4/letter/z/a87d85/32.png) [@zayn](https://forum.pydio.com/u/zayn)\
**Post date:** [January 2, 2019, 8:32am UTC](https://forum.pydio.com/t/solved-services-stopped-using-docker/1995/2 "2019-01-02T08:32:47Z")

</div>

Hi,  
could you tell me your pydio version?  
when you stay stop and restart the container do you mean that you stop it with `docker-compose stop` or just the container via the docker?

Also are you using a volume to persist your data?

---

<div class="post-metadata">

**Author:** ![valmar](https://avatars.discourse-cdn.com/v4/letter/v/b19c9b/32.png) [@valmar](https://forum.pydio.com/u/valmar)\
**Post date:** [January 2, 2019, 6:08pm UTC](https://forum.pydio.com/t/solved-services-stopped-using-docker/1995/3 "2019-01-02T18:08:57Z")

</div>

Wow thanks for the very quick answer. I’m very keen on making Pydio run well and finally remove Nextcloud.

Yes, I am using docker compose. I stop and restart (and recreate the container with:

```
docker-compose stop pydio

docker-compose rm pydio

docker-compose up --force-recreate -d

```

I persist the data by using a host directory for the following volume :

/dir/on/host:/root/.config/pydio/cells

---

<div class="post-metadata">

**Author:** ![valmar](https://avatars.discourse-cdn.com/v4/letter/v/b19c9b/32.png) [@valmar](https://forum.pydio.com/u/valmar)\
**Post date:** [January 3, 2019, 12:17am UTC](https://forum.pydio.com/t/solved-services-stopped-using-docker/1995/4 "2019-01-03T00:17:44Z")

</div>

Uhm, previously, I was running Pydio on a 2 CPU, 8GB VPS together with other services. Today I moved Pydio Cells to his own 2 CPU, 8 GB machine where it can run alone, and I did not experience any problem with the services. Maybe they were just dying because they were resource-starved…

---

<div class="post-metadata">

**Author:** ![zayn](https://avatars.discourse-cdn.com/v4/letter/z/a87d85/32.png) [@zayn](https://forum.pydio.com/u/zayn)\
**Post date:** [January 3, 2019, 8:00am UTC](https://forum.pydio.com/t/solved-services-stopped-using-docker/1995/5 "2019-01-03T08:00:54Z")

</div>

Hi,  
ok let me know if it happens again, but as long as you persist your data, you can easily just restart a new container.

If you ever happen to face the error, could you take a look at the container logs (cells) and see if there was an error that popped out.

---

<div class="post-metadata">

**Author:** ![Jean\_Simeoni](https://yyz2.discourse-cdn.com/flex032/user_avatar/forum.pydio.com/jean_simeoni/32/678_2.png) [@Jean\_Simeoni](https://forum.pydio.com/u/Jean_Simeoni)\
**Post date:** [January 9, 2019, 12:39pm UTC](https://forum.pydio.com/t/solved-services-stopped-using-docker/1995/6 "2019-01-09T12:39:55Z")

</div>

I believe I’ve found the problem here… I was facing the same issue and actually what happened was that after a server reboot, docker restarted the containers I have with different IP addresses. I was then seeing in the container logs some messages indicating a problem with the peer IP address for the storage.

What I did to fix it was create an isolated network for the pydio container and set a fixed IP address for it. Then I updated all references to the old IP address in the pydio.json config file to the new fixed IP, like this one:

```
"pydio.grpc.data.sync.cellsdata": {
    ...
    "PeerAddress": "172.30.0.2",
    ...
},

```

Notice that I’ve mounted my volume as following: `<host path>:/root/.config` in order to make all configuration persistent.

Honestly I’m not sure if there is a better way to handle this, but at least for me this solution is working fine. 😉

---

<div class="post-metadata">

**Author:** ![valmar](https://avatars.discourse-cdn.com/v4/letter/v/b19c9b/32.png) [@valmar](https://forum.pydio.com/u/valmar)\
**Post date:** [January 9, 2019, 1:11pm UTC](https://forum.pydio.com/t/solved-services-stopped-using-docker/1995/7 "2019-01-09T13:11:16Z")

</div>

Jean, thank you for the information. That would also explain why I don’t have any problems if I run the two containers in their own VPS.

Could you please let me know how you set up the isolated network? I am using docker-compose.

Thank you in advance

---

<div class="post-metadata">

**Author:** ![Jean\_Simeoni](https://yyz2.discourse-cdn.com/flex032/user_avatar/forum.pydio.com/jean_simeoni/32/678_2.png) [@Jean\_Simeoni](https://forum.pydio.com/u/Jean_Simeoni)\
**Post date:** [January 9, 2019, 2:28pm UTC](https://forum.pydio.com/t/solved-services-stopped-using-docker/1995/8 "2019-01-09T14:28:43Z")

</div>

Valmar, I’ve been using Portainer to create my containers, networks and other stuff, but I believe in a docker compose file things should be something like this:

```
services:
  cells:
    image: pydio/cells:latest
    volumes: 
      - <host path>:/root/.config
    ports:
      - 8080:8080
    environment:
      - CELLS_BIND=<bind ip and port>
      - CELLS_EXTERNAL=<external ip and port>
      - CELLS_NO_SSL=<ssl enabled/disabled>
    networks:
      cells_net:
        ipv4_address: 172.30.0.2

networks:
  cells_net:
    driver: bridge
    ipam:
      driver: default
      config:
        - subnet: 172.30.0.0/24
          gateway: 172.30.0.1

```

Let me know if this works for you.

---

<div class="post-metadata">

**Author:** ![zayn](https://avatars.discourse-cdn.com/v4/letter/z/a87d85/32.png) [@zayn](https://forum.pydio.com/u/zayn)\
**Post date:** [January 9, 2019, 2:48pm UTC](https://forum.pydio.com/t/solved-services-stopped-using-docker/1995/9 "2019-01-09T14:48:02Z")

</div>

Hi,  
thank you for your contribution, so it seems to be on docker’s side.  
I will add in the troubleshooting section an indication on that.

---

<div class="post-metadata">

**Author:** ![valmar](https://avatars.discourse-cdn.com/v4/letter/v/b19c9b/32.png) [@valmar](https://forum.pydio.com/u/valmar)\
**Post date:** [January 10, 2019, 10:26am UTC](https://forum.pydio.com/t/solved-services-stopped-using-docker/1995/10 "2019-01-10T10:26:04Z")

</div>

@zayn@Jean_Simeoni I confirm that this solved the service problems for me, even if I run cells on machine where other containers are running

---

<div class="post-metadata">

**Author:** ![kvaps](https://yyz2.discourse-cdn.com/flex032/user_avatar/forum.pydio.com/kvaps/32/645_2.png) [@kvaps](https://forum.pydio.com/u/kvaps)\
**Post date:** [January 13, 2019, 4:34pm UTC](https://forum.pydio.com/t/solved-services-stopped-using-docker/1995/11 "2019-01-13T16:34:24Z")

</div>

Same problem here, setting

```auto
"PeerAddress": "127.0.0.1",

```

does not helps at all

 ![image](https://canada1.discourse-cdn.com/flex032/uploads/pydio/original/1X/debcec9f7a3c043df801a4c9b4e05ec2d4b2b443.png)

---

<div class="post-metadata">

**Author:** ![valmar](https://avatars.discourse-cdn.com/v4/letter/v/b19c9b/32.png) [@valmar](https://forum.pydio.com/u/valmar)\
**Post date:** [January 13, 2019, 4:55pm UTC](https://forum.pydio.com/t/solved-services-stopped-using-docker/1995/12 "2019-01-13T16:55:28Z")

</div>

One must create a separate network then the problem goes away (at least for me)

---

<div class="post-metadata">

**Author:** ![kvaps](https://yyz2.discourse-cdn.com/flex032/user_avatar/forum.pydio.com/kvaps/32/645_2.png) [@kvaps](https://forum.pydio.com/u/kvaps)\
**Post date:** [January 13, 2019, 5:07pm UTC](https://forum.pydio.com/t/solved-services-stopped-using-docker/1995/13 "2019-01-13T17:07:53Z")

</div>

This is not a solution. Eg. I use Kubernetes which is always use dynamic IPs.  
We should count that containers are always have dynamic IPs nature. Pydio should counut on that and add some option to control this behavior.

---

<div class="post-metadata">

**Author:** ![kvaps](https://yyz2.discourse-cdn.com/flex032/user_avatar/forum.pydio.com/kvaps/32/645_2.png) [@kvaps](https://forum.pydio.com/u/kvaps)\
**Post date:** [January 13, 2019, 6:06pm UTC](https://forum.pydio.com/t/solved-services-stopped-using-docker/1995/14 "2019-01-13T18:06:38Z")

</div>

found temporary workaround:

```auto
env:
- name: CELLS_NO_SSL
  value: "0"
- name: CELLS_BIND
  value: "0.0.0.0:8080"
- name: CELLS_EXTERNAL
  value: "files.example.org"
- name: MY_POD_IP
  valueFrom:
    fieldRef:
      fieldPath: status.podIP
command: ['/bin/sh', '-c', 'sed -i "/PeerAddress/ s/: .*/: \"$MY_POD_IP\",/g" /root/.config/pydio/cells/pydio.json; exec /bin/docker-entrypoint.sh cells start']

```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex032/uploads/pydio/original/2X/6/61f19fa52ec15fd4250db51aea351adba0e831fd.png) [@system](https://forum.pydio.com/u/system)\
**Post date:** [May 16, 2023, 10:30am UTC](https://forum.pydio.com/t/solved-services-stopped-using-docker/1995/16 "2023-05-16T10:30:10Z")

</div>

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