Cannot find Alfresco Repository after docker-compose down

cancel
Showing results for 
Search instead for 
Did you mean: 
addon0
Member II

Cannot find Alfresco Repository after docker-compose down

Hello,

I've installed the Alfresco community version service just by docker-compose up months ago.

Several days ago, after doing docker-compose up, I stupidly did docker-compose down instead of the docker-compose stop just for stopping the service. And when I restart the service, I can't log in my account though the login page(localhost:8080/share) is working. And localhost:8080 alert an error:

"Cannot find Alfresco Repository on this server. (Does this application have access to alfresco-global.properties? Does this application have cross-context permissions?)"

I deployed alfresco by docker on another Ubuntu server through VMware, and I use docker ps, the docker services running are the same as the physical computer. But the physical one alerts that error.

I did docker-compose down on the virtual Ubuntu, and the files I uploaded on alfresco just disappear when I restart it.

I wonder if my data will be deleted after docker-compose down. If not, how can I recover them?

Still waiting for helping. Thanks.

6 Replies
angelborroy
Alfresco Employee

Re: Cannot find Alfresco Repository after docker-compose down

It's not easy to understand what's happening there.

docker-compose down does not remove any data from your Docker Volumes, the information still should be present there.

I suggest you to inspect the logs and the volumes in order to gather additional hints on the problem.

Hyland Developer Evangelist
addon0
Member II

Re: Cannot find Alfresco Repository after docker-compose down


@angelborroy wrote:

It's not easy to understand what's happening there.

docker-compose down does not remove any data from your Docker Volumes, the information still should be present there.

I suggest you to inspect the logs and the volumes in order to gather additional hints on the problem.


Thank you so much.

I tried to execute docker-compose down on another computer and I found that container, overlay2, network, and volumes folders which under /var/lib/docker had been changed their last modified date, some subfolders are deleted.

Then I did docker ps -a, it shows the alfresco service has gone. (I searched Docker documentation, It seems that because of the docker-compose down would delete the containers and network folders)

When I did docker-compose up -d to start alfresco service at this time, It seems a new alfresco service had been built, what I had uploaded on the last alfresco has been gone.

I think this alert Cannot find Alfresco Repository should be due to the subfolders having been deleted.

I tried to back up the folders before executing docker-compose down, and restore them after doing docker-compose down. Then restart docker service, and docker-compose up, It seems the data could be recovered.

I wonder if I could just use disk tools to recover these folders to get the service work as before?

 

Here is my alfresco log. But I can't understand them immediately, It seems that springframework was been corrupted?

The log file contains too many characters, can't paste them all in this reply. So I post them as photos.

alfresco log.png

alfresco log part1.png

alfresco log part2.png

alfresco log part3.png

alfresco log part4.png

alfresco log part5.png

fedorow
Senior Member II

Re: Cannot find Alfresco Repository after docker-compose down


@addon0 wrote:

...

I did docker-compose down on the virtual Ubuntu, and the files I uploaded on alfresco just disappear when I restart it.


Hope Angel is right and you have a persistant volumes. Because, if you use docker-compose.yml without persistant volumes like this one, all data was stored inside containers. docker-compose down coommand remove all containters and their data. So after down/up the system will be clean.

Hope in your case data could stay in the droped docker volumes without names or trash docker folders.

Use 

docker volume ls

and 

docker volume inspect <VOLUME>

commands to find droped volumes from your services (containers). I never tried to do so and can't tall you it is possible to restore data in this way. Read this topic for more information. Founded folders copy to the VM and mount it as a volumes to the containers.

To make data indepandent from containers, named or persistant volumes must be used. For example, persistant volumes:

services:
    alfresco:
        ...
        volumes: 
            - ./data/alf-repo-data:/usr/local/tomcat/alf_data

    postgres:
        ...
        volumes: 
            - ./data/postgres-data:/var/lib/postgresql/data

    solr6:
        ...
        volumes: 
            - ./data/solr-data:/opt/alfresco-search-services/data
addon0
Member II

Re: Cannot find Alfresco Repository after docker-compose down

Thanks for your reply.

Unfortunately, I just did docker-compose up command to build service, didn't realize that I need to persistent volumes before. I checked the .yml file, and it didn't define the volume path.

I had recovered some deleted files using disk tools these days, but the service still didn't start up as I wish. And it seems because of symbolic links under /var/lib/docker/overlay2 or something else.

addon0
Member II

Re: Cannot find Alfresco Repository after docker-compose down

@fedorow wrote:
...

Because, if you use docker-compose.yml without persistant volumes like this one, all data was stored inside containers.


I just noticed that you mentioned if I didn't have persistent volumes in docker-compose.yml then that all data would be stored inside containers. Did you mean that all data was stored under /var/lib/docker/containers folder?

After docker-compose down, I found that containers, overlay2, images folders had changed their modified date. So I wonder if I could just restore these folders, then the service could work as before?

fedorow
Senior Member II

Re: Cannot find Alfresco Repository after docker-compose down

I'm not said it is possible, only expressed some hope and the direction to investigate.

Unfortunately looks like this is the end. Is it possible to undo docker rm CONTAINER?