Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

permission denied #2

Open
sergiobaiao opened this issue Feb 13, 2023 · 19 comments
Open

permission denied #2

sergiobaiao opened this issue Feb 13, 2023 · 19 comments

Comments

@sergiobaiao
Copy link

Hi there,

Every single time i run the container i get this message at the end:

Error alfresco-docker-installer

EACCES: permission denied, open '/generated/.env'

Tried to run as root, with sudo, nothing changes. Can you help?

@aborroy
Copy link
Owner

aborroy commented Feb 13, 2023

Please, can you provide additional data to reproduce the issue.

What operative system are you using?
From what folder are you running the tool?
What Docker version are you using?
What is the sequence of commands you type?

Anything would help.

@sergiobaiao
Copy link
Author

Oracle Linux 8.4

I`ve created a /docker/alfresco-installer folder
Docker version 23.0.0, build e92dd87
$ docker run -it -v $(pwd):/generated angelborroy/alfresco-installer

I just changed the folder permissions to 777 and it seems to have worked. But now i cannot login to alfresco with the password i provided. Even if i leave the default password it cannot login

@aborroy
Copy link
Owner

aborroy commented Feb 13, 2023

How many RAM is allocated to Docker?

@sergiobaiao
Copy link
Author

16GB

@aborroy
Copy link
Owner

aborroy commented Feb 13, 2023

When everything is up & ready, what is the output of the command "docker ps"?

@sergiobaiao
Copy link
Author

docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
830e0cf48528 nginx:stable-alpine "/docker-entrypoint.…" 26 seconds ago Up 18 seconds 0.0.0.0:80->80/tcp, :::80->80/tcp alfresco-installer-proxy-1
ac822512aa3f alfresco/alfresco-content-app:3.1.0 "/docker-entrypoint.…" 26 seconds ago Up 20 seconds 8080/tcp alfresco-installer-content-app-1
508ec04b7ae7 alfresco-installer-alfresco "catalina.sh run -se…" 26 seconds ago Up 21 seconds 0.0.0.0:2121->2121/tcp, :::2121->2121/tcp, 8000/tcp, 8080/tcp, 0.0.0.0:2433-2434->2433-2434/tcp, :::2433-2434->2433-2434/tcp, 10001/tcp alfresco-installer-alfresco-1
11c9363f103b alfresco/alfresco-transform-core-aio:3.0.0 "/bin/sh -c 'java $J…" 26 seconds ago Up 24 seconds 8090/tcp alfresco-installer-transform-core-aio-1
7dbee8357c5b alfresco/alfresco-activemq:5.17.1-jre11-rockylinux8 "/bin/sh -c './init.…" 26 seconds ago Up 23 seconds 5672/tcp, 61613/tcp, 61616/tcp, 0.0.0.0:8161->8161/tcp, :::8161->8161/tcp alfresco-installer-activemq-1
f2d1c81e8e59 alfresco-installer-solr6 "/bin/sh -c '$DIST_D…" 26 seconds ago Up 24 seconds 8983/tcp, 10001/tcp alfresco-installer-solr6-1
2af3cd8abb3b alfresco-installer-ocrmypdf "/usr/sbin/sshd -D" 26 seconds ago Up 23 seconds 22/tcp alfresco-installer-ocrmypdf-1
6de39e8b04c3 alfresco-installer-share "/usr/local/tomcat/s…" 26 seconds ago Up 23 seconds 8000/tcp, 8080/tcp alfresco-installer-share-1
328f085136af angelborroy/alfresco-tengine-ocr:1.0.0 "/bin/sh -c 'java $J…" 26 seconds ago Up 24 seconds 8090/tcp alfresco-installer-transform-ocr-1

@aborroy
Copy link
Owner

aborroy commented Feb 13, 2023

It looks like all the services all up & ready and required amount of RAM is in place.

May you verify if your problem is described in this video?
https://www.youtube.com/watch?v=Dfd4bISsV-Y

@sergiobaiao
Copy link
Author

When logging in to content app it show this:
image

and on share:
image

all containers are running ok:

image

the only thing i could find was in the end of start.sh:

image

@aborroy
Copy link
Owner

aborroy commented Feb 13, 2023

May you share generated files ".env" and "docker-compose.yml"?

@sergiobaiao
Copy link
Author

Docker Image versions

ALFRESCO_CE_TAG=7.3.0
SEARCH_CE_TAG=2.0.5.1
SHARE_TAG=7.3.0.1
ACA_TAG=3.1.0
POSTGRES_TAG=14.4
MARIADB_TAG=10.5
TRANSFORM_ENGINE_TAG=3.0.0
ACTIVEMQ_TAG=5.17.1-jre11-rockylinux8

Server properties

SERVER_NAME=localhost

@sergiobaiao
Copy link
Author

cat docker-compose.yml

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

version: "2"

services:
alfresco:
build:
context: ./alfresco
args:
ALFRESCO_TAG: ${ALFRESCO_CE_TAG}
DB: postgres
SOLR_COMMS: secret
mem_limit: 7488m
depends_on:
- postgres
environment:
JAVA_TOOL_OPTIONS: "
-Dencryption.keystore.type=JCEKS
-Dencryption.cipherAlgorithm=DESede/CBC/PKCS5Padding
-Dencryption.keyAlgorithm=DESede
-Dencryption.keystore.location=/usr/local/tomcat/shared/classes/alfresco/extension/keystore/keystore
-Dmetadata-keystore.password=mp6yc0UD9e
-Dmetadata-keystore.aliases=metadata
-Dmetadata-keystore.metadata.password=oKIWzVdEdA
-Dmetadata-keystore.metadata.algorithm=DESede
"
JAVA_OPTS : '
-Ddb.username=alfresco
-Ddb.password=alfresco
-Ddb.driver=org.postgresql.Driver
-Ddb.url=jdbc:postgresql://postgres:5432/alfresco
-Dalfresco_user_store.adminpassword=69ffa414146a749020c7f32ea5eddba7
-Dsystem.preferred.password.encoding=bcrypt10
-Dsolr.host=solr6
-Dsolr.port=8983
-Dsolr.port.ssl=8983
-Dsolr.secureComms=secret
-Dsolr.baseUrl=/solr
-Dindex.subsystem.name=solr6
-Dsolr.sharedSecret=w7gdywcny69
-Dalfresco.host=${SERVER_NAME}
-Dalfresco.port=80
-Dapi-explorer.url=http://${SERVER_NAME}:80/api-explorer
-Dalfresco.protocol=http
-Dshare.host=${SERVER_NAME}
-Dshare.port=80
-Dshare.protocol=http
-Daos.baseUrlOverwrite=http://${SERVER_NAME}/alfresco/aos
-Dmessaging.broker.url="failover:(nio://activemq:61616)?timeout=3000&jms.useCompression=true"
-Ddeployment.method=DOCKER_COMPOSE
-Dcsrf.filter.enabled=false
-Dftp.enabled=true
-Dftp.port=2121
-Dftp.dataPortFrom=2433
-Dftp.dataPortTo=2434
-Dopencmis.server.override=true
-Dopencmis.server.value=http://${SERVER_NAME}:80
-DlocalTransform.core-aio.url=http://transform-core-aio:8090/
-DlocalTransform.ocr.url=http://transform-ocr:8090/
-Dcsrf.filter.enabled=false
-Dalfresco.restApi.basicAuthScheme=true
-Dauthentication.protection.enabled=false
-XX:+UseG1GC -XX:+UseStringDeduplication
-Dgoogledocs.enabled=true
-Xms6976m -Xmx6976m
-Docr.command=/opt/alfresco/bin/ocrmypdf.sh
-Docr.output.verbose=true
-Docr.output.file.prefix.command=
-Docr.extra.commands="-j1 --author keensoft --rotate-pages -l spa+eng+fra --deskew --clean --skip-text"
-Docr.server.os=linux
-XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80
'
volumes:
- ./data/alf-repo-data:/usr/local/tomcat/alf_data
- ./logs/alfresco:/usr/local/tomcat/logs
- ./data/ocr/input:/ocr_input
- ./data/ocr/output:/ocr_output

    ports:
        - 2121:2121
        - 2433:2433
        - 2434:2434

transform-core-aio:
    image: alfresco/alfresco-transform-core-aio:${TRANSFORM_ENGINE_TAG}
    mem_limit: 2048m
    environment:
        JAVA_OPTS: "
          -XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80
          -Dserver.tomcat.threads.max=12
          -Dserver.tomcat.threads.min=4
          -Dlogging.level.org.alfresco.transform.common.TransformerDebug=ERROR
        "

share:
    build:
      context: ./share
      args:
        SHARE_TAG: ${SHARE_TAG}
        SERVER_NAME: ${SERVER_NAME}
    mem_limit: 1872m
    environment:
        REPO_HOST: "alfresco"
        REPO_PORT: "8080"
        CSRF_FILTER_REFERER: "http://localhost:80/.*"
        CSRF_FILTER_ORIGIN: "http://localhost:80"
        JAVA_OPTS: "
            -Xms1744m -Xmx1744m
            -Dalfresco.context=alfresco
            -Dalfresco.protocol=http
            -XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80
            "
    volumes:
        - ./logs/share:/usr/local/tomcat/logs


postgres:
    image: postgres:${POSTGRES_TAG}
    mem_limit: 1872m
    environment:
        - POSTGRES_PASSWORD=alfresco
        - POSTGRES_USER=alfresco
        - POSTGRES_DB=alfresco
    command: "
        postgres
          -c max_connections=200
          -c logging_collector=on
          -c log_min_messages=LOG
          -c log_directory=/var/log/postgresql"
    ports:
        - 5432:5432
    volumes:
        - ./data/postgres-data:/var/lib/postgresql/data
        - ./logs/postgres:/var/log/postgresql


solr6:
    build:
      context: ./search
      args:
        SEARCH_TAG: ${SEARCH_CE_TAG}
        SOLR_HOSTNAME: solr6
        ALFRESCO_HOSTNAME: alfresco
        ALFRESCO_COMMS: secret
        CROSS_LOCALE: "true"
        DISABLE_CONTENT_INDEXING: "false"
    mem_limit: 3744m
    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"
        SOLR_JAVA_MEM: "-Xms3488m -Xmx3488m"
        SOLR_OPTS: "
            -XX:NewSize=1616m
            -XX:MaxNewSize=1616m
            -Dalfresco.secureComms.secret=w7gdywcny69
        "
    volumes:
        - ./data/solr-data:/opt/alfresco-search-services/data



activemq:
    image: alfresco/alfresco-activemq:${ACTIVEMQ_TAG}
    mem_limit: 1g
    ports:
        - 8161:8161
    volumes:
        - ./data/activemq-data:/opt/activemq/data


content-app:
    image: alfresco/alfresco-content-app:${ACA_TAG}
    mem_limit: 256m
    environment:
        APP_BASE_SHARE_URL: "http://${SERVER_NAME}:80/#/preview/s"
    depends_on:
        - alfresco

# HTTP proxy to provide HTTP Default port access to services
# SOLR API and SOLR Web Console are protected to avoid unauthenticated access
proxy:
    image: nginx:stable-alpine
    mem_limit: 128m
    depends_on:
        - alfresco
        - solr6
        - share
        - content-app
    volumes:
        - ./config/nginx.conf:/etc/nginx/nginx.conf
        - ./config/nginx.htpasswd:/etc/nginx/conf.d/nginx.htpasswd
    ports:
        - 80:80






ocrmypdf:
    build: ./ocrmypdf
    mem_limit: 512m
    hostname: ocrmypdf
    volumes:
        - ./data/ocr/input:/ocr_input
        - ./data/ocr/output:/ocr_output



transform-ocr:
    image: angelborroy/alfresco-tengine-ocr:1.0.0
    mem_limit: 1536m
    environment:
      JAVA_OPTS: "
          -XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80
          -Dserver.tomcat.threads.max=4
          -Dserver.tomcat.threads.min=1
        "

@sergiobaiao
Copy link
Author

i've made some changes on the docker-compose.yml file. Instead of building, i used the default images from alfresco.
After replacing the build fields for the image from alfresco default's community-docker-compose.yml, it worked. But i don't know if i will miss the addons after doing this or if this will give me problems.

@phabx003
Copy link

phabx003 commented Jun 9, 2023

Hi, I have the same problem. I can't login on /localhost/share. Please I need your help. Thank

@aissamb
Copy link

aissamb commented Jun 17, 2023

Most of the errors are related to permissions.

  1. alfresco-installer
    docker try to generate files with uid/gid: 501, if you are using an account with different uid (1000 for eg.) you will get the error.

To avoid the permission denied (/generated) I created a user by forcing the uid/gid before running alfresco-installer.

  1. docker compose up/login problem
    Is seems that's working, but if you pay attention to the displayed log, most error are "permission denied" ones.
    You can check the documentation to fix it
    https://github.com/Alfresco/alfresco-docker-installer#docker-volumes

I extracted the fixes here:

sudo chown -R 33007 data/solr-data
sudo chown -R 999 data/postgres-data
sudo chown -R 999 logs/postgres
sudo chown -R 33000 data/alf-repo-data
sudo chown -R 33000 logs/alfresco
sudo chown -R 33007 data/solr-data

@phabx003
Copy link

Thank, I try it now.

@phabx003
Copy link

Please... uid/gid of the user will be same as the docker group or will just have 501 ?

@phabx003
Copy link

I tried but I have the same problems.

1 similar comment
@phabx003
Copy link

I tried but I have the same problems.

@BHuck74
Copy link

BHuck74 commented Sep 7, 2023

Dear all,

I've tried to get Alfresco running for 3 days now and I'm now close to give up and look for another tool.
I first tested Alfresco from the regular site. It worked, but I did not understand why there is just no volume management taken into account 🤷‍♂️ Anyway, after this first disappointment, I went to this docker-compose installer but still struggling for jours to get it work. I've tried almost everything but I'm still stuck at login windows, my admin credentials not being accepted. Not a surprise because I see a bunch of Java exceptions in container logs. First issue was about Postgres not being able to create alfresco database. Was not able to solve the permission issue (btw I don't understand how that could happen), then I switched desperately to MariaDB that went up clean but still not able to connect. I've the following error looping endless :
alfresco_solr6 container
ERROR (org.alfresco.solr.AlfrescoCoreAdminHandler@5d332969_Worker-40) [ ] o.a.s.t.AbstractTracker [alfresco / ACL@706871301 / IT #1694077190000] Tracking failure.

At that point, I just have no idea how I could investigate further... Any clue would be appreciated.

Running on Ubuntu 20.04.6 LTS / 32 Gb RAM

# Docker Image versions
ALFRESCO_CE_TAG=7.4.1
SEARCH_CE_TAG=2.0.8
SHARE_TAG=7.4.1
ACA_TAG=4.1.0
POSTGRES_TAG=14.4
MARIADB_TAG=10.5
TRANSFORM_ENGINE_TAG=4.0.0
ACTIVEMQ_TAG=5.17.1-jre11-rockylinux8

# Server properties
SERVER_NAME=[privacy]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants