[solved] Services stopped using docker


#1

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?


#2

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?


#3

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


#4

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…


#5

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.


#6

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. :wink:


#7

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


#8

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.


#9

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.


#10

@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


#11

Same problem here, setting

"PeerAddress": "127.0.0.1",

does not helps at all


Pydio cells 1.2.2 freeze on loading screen after installation
#12

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


#13

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.


#14

found temporary workaround:

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']