cancel
Showing results for 
Search instead for 
Did you mean: 

Admin password randomly gets changed!

Awby
Champ on-the-rise
Champ on-the-rise

Greetings,

I'm using Alfresco 6.2.0-ga (Docker installation) in my VPS. It's running smothly but I always have this issue with my admin password gets changed randomly, and I have to reset it everytime from the Database.

I'm the only one who have the access to the VPS&Admin area, and when the password changes, I can't find anything in .bash_history.

There is not clear patters on when this happens, so I really confused.

Does anyone know this issue ? and is a complete reinstall would fix this issue?

Thank you in advice.

9 REPLIES 9

fedorow
Elite Collaborator
Elite Collaborator

Never, never, never do any changes in Alfresco database. It is better to forget you have it.

To change admin password assign admin rights to known user and reset it in admin console.

Instructions here:

https://docs.alfresco.com/6.2/concepts/admin-password.html

Awby
Champ on-the-rise
Champ on-the-rise

Hello,

I apologies, I think I reached a bad conclusion, the admin password did not change, I was just no able to login.

I'm running the docker image 6.2 on ubuntu 18.04, I checked http://localhost:8080/alfresco, and the link was not accessible, but http://localhost:8080/share was working.

I have checked docker ps, and all containers seems to be up.

CONTAINER ID        IMAGE                                     COMMAND                  CREATED             STATUS              PORTS                                                                                                NAMES
f96489130d54        alfresco/acs-community-ngnix:1.0.0        "/entrypoint.sh"         20 hours ago        Up 20 hours         80/tcp, 0.0.0.0:8080->8080/tcp                                                                       root_proxy_1
48234797b146        alfresco/alfresco-search-services:1.4.0   "/bin/sh -c '$DIST_D…"   20 hours ago        Up 20 hours         0.0.0.0:8083->8983/tcp                                                                               root_solr6_1
0054e35d5366        alfresco/alfresco-activemq:5.15.8         "/bin/sh -c '${ACTIV…"   20 hours ago        Up 20 hours         0.0.0.0:5672->5672/tcp, 0.0.0.0:8161->8161/tcp, 0.0.0.0:61613->61613/tcp, 0.0.0.0:61616->61616/tcp   root_activemq_1
2278de6d84bd        alfresco/alfresco-share:6.2.0             "/usr/local/tomcat/s…"   20 hours ago        Up 20 hours         8000/tcp, 8080/tcp                                                                                   root_share_1
825e78b07978        alfresco/alfresco-pdf-renderer:2.1.0      "/bin/sh -c 'java $J…"   20 hours ago        Up 20 hours         0.0.0.0:8090->8090/tcp                                                                               root_alfresco-pdf-renderer_1
5a60be8b62f2        alfresco/alfresco-imagemagick:2.1.0       "/bin/sh -c 'java $J…"   20 hours ago        Up 20 hours         0.0.0.0:8091->8090/tcp                                                                               root_imagemagick_1
47d41a85e117        alfresco/alfresco-libreoffice:2.1.0       "/bin/sh -c 'java $J…"   20 hours ago        Up 20 hours         0.0.0.0:8092->8090/tcp                                                                               root_libreoffice_1
c19dbd58adea        alfresco/alfresco-tika:2.1.0              "/bin/sh -c 'java $J…"   20 hours ago        Up 20 hours         0.0.0.0:8093->8090/tcp                                                                               root_tika_1
91a2248b156c        alfresco/alfresco-transform-misc:2.1.0    "/bin/sh -c 'java $J…"   20 hours ago        Up 20 hours         0.0.0.0:8094->8090/tcp                                                                               root_transform-misc_1
aeb78893f526        postgres:11.4                             "docker-entrypoint.s…"   20 hours ago        Up 20 hours         0.0.0.0:5432->5432/tcp                                                                               root_postgres_1

I restared the docker-compose, and I was able to login again.

Can you please help me? I had this issue for months now, and I have reinstalled Alfresco on new server but the same issue persists.

abhinavmishra14
World-Class Innovator
World-Class Innovator

Per your "docker ps" results, i dont see alfresco container running. This is the reason you are not able to login but you share login because share container is up and running correctly.

This could due to memory issues, At least 8 GB memory is required to run all containers.

Alfresco container seems to be getting crashed due to lack of memory.

Try 'docker stats' command and see the resource details and try increasing memory memory and restart all containers again.

You can find some additional details here: 

https://hub.alfresco.com/t5/alfresco-content-services-forum/new-to-alfresco-not-able-to-login-docker...

https://hub.alfresco.com/t5/alfresco-content-services-forum/question-about-alfresco-down-in-alfresco...

~Abhinav
(ACSCE, AWS SAA, Azure Admin)

Thank you for your reply.

My VPS had already 8 GB of RAM and 2 CPU, I have upgrade it to 16 GB and 4 CPU, but the same issue persists, I can't login to the admin.

I have augmented the memory limit for the alfresco container :

8fcaee1a34a0        root_proxy_1                   0.00%               2.512MiB / 128MiB    1.96%               5.98kB / 4.86kB     0B / 0B             3
7045a3657c73        root_alfresco_1                0.31%               1.38GiB / 3.906GiB   35.34%              3.45MB / 193kB      0B / 0B             61
493df6d938f9        root_imagemagick_1             0.21%               248.6MiB / 1GiB      24.28%              4.07kB / 130kB      0B / 0B             30
527e128af323        root_solr6_1                   0.53%               639.8MiB / 2GiB      31.24%              38.3kB / 354kB      0B / 0B             93
ce6a0ebe3819        root_postgres_1                0.00%               8.316MiB / 512MiB    1.62%               138kB / 2.88MB      0B / 0B             7
c256a4e166f9        root_libreoffice_1             0.16%               255.2MiB / 1GiB      24.92%              3.7kB / 29.3kB      0B / 0B             39
b7b6aca458af        root_share_1                   0.17%               360.6MiB / 1GiB      35.21%              1.46kB / 0B         0B / 0B             45
29b1822f625c        root_alfresco-pdf-renderer_1   0.15%               237.2MiB / 1GiB      23.16%              3.24kB / 2.17kB     0B / 0B             30
5ba97b6199ea        root_transform-misc_1          0.14%               263.8MiB / 1GiB      25.76%              5.6kB / 6.53kB      0B / 0B             28
42717dda30fe        root_activemq_1                0.22%               234.8MiB / 1GiB      22.93%              2.04kB / 164B       0B / 0B             47
fc2cf3ef49e7        root_tika_1                    0.17%               252.8MiB / 1GiB      24.68%              7.45kB / 52.6kB     0B / 0B             28

So the old issue seems to be fixed, the container does sno crash anymore, but when I visit http://myIP:8080/ I get this error:

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

This is a fresh installtion on a fresh Ubuntu 18.04, the only modifications I did was to augment the mem_limit.

I have checked the file /usr/local/tomcat/shared/classes/alfresco-global.properties in the root_alfresco_1 container, and I found it empty.

Can you pelase help me fix this issue.

abhinavmishra14
World-Class Innovator
World-Class Innovator

Starnge, can you share your docker-compose.yml file and changes you made? I have not seen this error before. 

Also regarding alfresco-global.properties, it would be empty unless you copy or update the global properties file during image build. All properties are set via java arguments like this:

JAVA_OPTS: "
                -Ddb.driver=org.postgresql.Driver
                -Ddb.username=alfresco
                -Ddb.password=alfresco
                -Ddb.url=jdbc:postgresql://postgres:5432/alfresco
                -Dsolr.host=solr6
                -Dsolr.port=8983
                -Dsolr.secureComms=none
                -Dsolr.base.url=/solr
                -Dindex.subsystem.name=solr6
                -Dshare.host=127.0.0.1
                -Dshare.port=8080
                -Dalfresco.host=localhost
                -Dalfresco.port=8080
                -Daos.baseUrlOverwrite=http://localhost:8080/alfresco/aos
                -Dmessaging.broker.url=\"failover:(nio://activemq:61616)?timeout=3000&jms.useCompression=true\"
                -Ddeployment.method=DOCKER_COMPOSE
                -DlocalTransform.core-aio.url=http://transform-core-aio:8090/
                -Dalfresco-pdf-renderer.url=http://transform-core-aio:8090/
                -Djodconverter.url=http://transform-core-aio:8090/
                -Dimg.url=http://transform-core-aio:8090/
                -Dtika.url=http://transform-core-aio:8090/
                -Dtransform.misc.url=http://transform-core-aio:8090/
                -Dcsrf.filter.enabled=false
                -Xms1500m -Xmx1500m
                "

Can you also try this latest version of docker-compose and see if you are still getting the same error: 

https://github.com/Alfresco/acs-community-deployment/blob/master/docker-compose/docker-compose.yml

~Abhinav
(ACSCE, AWS SAA, Azure Admin)

Hello,

I have the lastest docker-compose version, and the only modification I did was to change the ram from 1500m to 4000m.

Here is the file.

# This docker-compose file will spin up an ACS cluster on a local host or on a server and it requires a minimum of 12GB Memory to distribute among containers.
# Limit container memory and assign X percentage to JVM.  There are couple of ways to allocate JVM Memory for ACS Containers
# For example: 'JAVA_OPTS: "$JAVA_OPTS -XX:+PrintFlagsFinal -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap"'
# See Oracle docs (https://docs.oracle.com/javase/9/gctuning/parallel-collector1.htm#JSGCT-GUID-CAB83393-3438-44ED-98F0-D15641B43C7D).
# If the container memory is not explicitly set then the flags above will set the max heap default to 1/4 of the container's memory, which may not be ideal.
# For performance tuning, assign the container memory and give a percentage of it to the JVM.

# Using version 2 as 3 does not support resource constraint options (cpu_*, mem_* limits) for non swarm mode in Compose
version: "2"

services:
    alfresco:
        image: alfresco/alfresco-content-repository-community:6.2.0-ga
        mem_limit: 4000m
        environment:
            JAVA_OPTS: "
                -Ddb.driver=org.postgresql.Driver
                -Ddb.username=alfresco
                -Ddb.password=alfresco
                -Ddb.url=jdbc:postgresql://postgres:5432/alfresco
                -Dsolr.host=solr6
                -Dsolr.port=8983
                -Dsolr.secureComms=none
                -Dsolr.base.url=/solr
                -Dindex.subsystem.name=solr6
                -Dshare.host=127.0.0.1
                -Dshare.port=8080
                -Dalfresco.host=localhost
                -Dalfresco.port=8080
                -Daos.baseUrlOverwrite=http://localhost:8080/alfresco/aos
                -Dmessaging.broker.url=\"failover:(nio://activemq:61616)?timeout=3000&jms.useCompression=true\"
                -Ddeployment.method=DOCKER_COMPOSE

                -Dlocal.transform.service.enabled=true
                -DlocalTransform.pdfrenderer.url=http://alfresco-pdf-renderer:8090/
                -DlocalTransform.imagemagick.url=http://imagemagick:8090/
                -DlocalTransform.libreoffice.url=http://libreoffice:8090/
                -DlocalTransform.tika.url=http://tika:8090/
                -DlocalTransform.misc.url=http://transform-misc:8090/

                -Dlegacy.transform.service.enabled=true
                -Dalfresco-pdf-renderer.url=http://alfresco-pdf-renderer:8090/
                -Djodconverter.url=http://libreoffice:8090/
                -Dimg.url=http://imagemagick:8090/
                -Dtika.url=http://tika:8090/
                -Dtransform.misc.url=http://transform-misc:8090/

                -Dcsrf.filter.enabled=false
                -Xms1500m -Xmx1500m
                "

    alfresco-pdf-renderer:
        image: alfresco/alfresco-pdf-renderer:2.1.0
        mem_limit: 1g
        environment:
            JAVA_OPTS: " -Xms256m -Xmx512m"
        ports:
            - 8090:8090

    imagemagick:
        image: alfresco/alfresco-imagemagick:2.1.0
        mem_limit: 1g
        environment:
            JAVA_OPTS: " -Xms256m -Xmx512m"
        ports:
            - 8091:8090

    libreoffice:
        image: alfresco/alfresco-libreoffice:2.1.0
        mem_limit: 1g
        environment:
            JAVA_OPTS: " -Xms256m -Xmx512m"
        ports:
            - 8092:8090

    tika:
        image: alfresco/alfresco-tika:2.1.0
        mem_limit: 1g
        environment:
            JAVA_OPTS: " -Xms256m -Xmx512m"
        ports:
            - 8093:8090

    transform-misc:
        image: alfresco/alfresco-transform-misc:2.1.0
        mem_limit: 1g
        environment:
            JAVA_OPTS: " -Xms256m -Xmx512m"
        ports:
            - 8094:8090

    share:
        image: alfresco/alfresco-share:6.2.0
        mem_limit: 1g
        environment:
            REPO_HOST: "alfresco"
            REPO_PORT: "8080"
            JAVA_OPTS: "
                -Xms500m
                -Xmx500m
                -Dalfresco.host=localhost
                -Dalfresco.port=8080
                -Dalfresco.context=alfresco
                -Dalfresco.protocol=http
                "

    postgres:
        image: postgres:11.4
        mem_limit: 512m
        environment:
            - POSTGRES_PASSWORD=alfresco
            - POSTGRES_USER=alfresco
            - POSTGRES_DB=alfresco
        command: postgres -c max_connections=300 -c log_min_messages=LOG
        ports:
            - 5432:5432

    solr6:
        image: alfresco/alfresco-search-services:1.4.0
        mem_limit: 2g
        environment:
            #Solr needs to know how to register itself with Alfresco
            - SOLR_ALFRESCO_HOST=alfresco
            - SOLR_ALFRESCO_PORT=8080
            #Alfresco needs to know how to call solr
            - SOLR_SOLR_HOST=solr6
            - SOLR_SOLR_PORT=8983
            #Create the default alfresco and archive cores
            - SOLR_CREATE_ALFRESCO_DEFAULTS=alfresco,archive
            #HTTP by default
            - ALFRESCO_SECURE_COMMS=none
            - "SOLR_JAVA_MEM=-Xms2g -Xmx2g"
        ports:
            - 8083:8983 #Browser port

    activemq:
        image: alfresco/alfresco-activemq:5.15.8
        mem_limit: 1g
        ports:
            - 8161:8161 # Web Console
            - 5672:5672 # AMQP
            - 61616:61616 # OpenWire
            - 61613:61613 # STOMP
            
    proxy:
        image: alfresco/acs-community-ngnix:1.0.0
        mem_limit: 128m
        depends_on:
            - alfresco
        ports:
            - 8080:8080
        links:
            - alfresco
            - share   

I think my VPS was down (the issue from Datacenter), when it was online again I ran docker-compose start

and I still have this issue.

I already have data in this installation, what should I do in this situation?

Please help. Thank you.

abhinavmishra14
World-Class Innovator
World-Class Innovator

Your docker-compose file looks ok. I tried launching containers using your docker compose and it worked fine. I did not see any short of password change like situation. Its always admin:admin 

Here is docker ps and docker stats outputs, notice the memory limit set by you highlighted in docker stats o/p. 

imagedocker psimagedocker stats

Now you are saying you have data, where you are keeping data? 

As per the docker compose you have shared, System will bootstrap always and all tables and samples site/users/groups etc. will be created everytime when you stop containers and start again. There are no volumes mounted so your content files/indexes etc. can be persisted. 

Use docker volumes or bind mount to persist the content files/indexs/db data etc. 

~Abhinav
(ACSCE, AWS SAA, Azure Admin)

Thank you for your reply.

Unforutnatly I did not find a solution to the last issue, so I just restored an old backup.

I have one more last questions to ask you please.

About SMTP configurations, if I add the configuration in /usr/local/tomcat/shared/classes/alfresco-global.properties

Is docker restart the only thing nessecary ? or do I need to rebuild the containers like when changing docker-compose.yml?

Thank you again for your time and help.

abhinavmishra14
World-Class Innovator
World-Class Innovator

I would suggest to keep all your properties in docker-compose.yml file under JAVA_OPTS, so that even if you stop and launch all containers again you won't loose any settings. Here is an example of outbound SMTP props:

JAVA_OPTS: "
                -Ddb.driver=org.postgresql.Driver
                -Ddb.username=alfresco
                -Ddb.password=alfresco
                -Ddb.url=jdbc:postgresql://postgres:5432/alfresco
                -Dsolr.host=solr6
                -Dsolr.port=8983
                -Dsolr.secureComms=none
                -Dsolr.base.url=/solr
                -Dindex.subsystem.name=solr6
                -Dshare.host=127.0.0.1
                -Dshare.port=8080
                -Dalfresco.host=localhost
                -Dalfresco.port=8080
                -Daos.baseUrlOverwrite=http://localhost:8080/alfresco/aos
                -Dmessaging.broker.url=\"failover:(nio://activemq:61616)?timeout=3000&jms.useCompression=true\"
                -Ddeployment.method=DOCKER_COMPOSE
                -Dlocal.transform.service.enabled=true
                -DlocalTransform.pdfrenderer.url=http://alfresco-pdf-renderer:8090/
                -DlocalTransform.imagemagick.url=http://imagemagick:8090/
                -DlocalTransform.libreoffice.url=http://libreoffice:8090/
                -DlocalTransform.tika.url=http://tika:8090/
                -DlocalTransform.misc.url=http://transform-misc:8090/
                -Dlegacy.transform.service.enabled=true
                -Dalfresco-pdf-renderer.url=http://alfresco-pdf-renderer:8090/
                -Djodconverter.url=http://libreoffice:8090/
                -Dimg.url=http://imagemagick:8090/
                -Dtika.url=http://tika:8090/
                -Dtransform.misc.url=http://transform-misc:8090/
                -Dcsrf.filter.enabled=false
		-Dmail.host=smtp #smtp service
		-Dmail.port=25
		-Dmail.encoding=UTF-8
		-Dmail.from.default=admin@alfresco.com
		-Dmail.username=anonymous
-Dmail.password=
-Dmail.protocol=smtp
-Dmail.smtps.starttls.enable=false
-Dmail.smtps.auth=false
-Xms1500m -Xmx1500m "

You can use this image for testing: https://hub.docker.com/r/mwader/postfix-relay/

Docker-compose service:

smtp:
     image: mwader/postfix-relay
     mem_limit: 128m

There a discussion around mail config here : https://hub.alfresco.com/t5/alfresco-content-services-forum/tomcat-server-with-installation-by-docke...

~Abhinav
(ACSCE, AWS SAA, Azure Admin)