cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco CE : Deploy Alfresco Repository and Search Services (SOLR) on separate machines

WorawutS
Champ in-the-making
Champ in-the-making

Dear All,

I have deployed Alfresco Content Services Community Edition with the latest version using Docker Compose on AWS EC2 instance and I would like to deploy Alfresco Repository and Search Services (SOLR) on separate machines as picture below.

image

After that on SOLR6 container is showing error logs with java.net. ConnectException: Connection refused (Connection refused)

image

I’m not sure that they are able to separate services into 2 machines or not? because I tried to find information from the internet and forums on hub but I haven’t seen solution to deploy them.  Please kindly advise how can I proceed further? 

3 REPLIES 3

angelborroy
Community Manager Community Manager
Community Manager

It works.

Just need to verify the repository host and port is included in SOLR configuration files or environment variables. That should be the public IP or the IP inside your VPC. Also check the port (8080 by default) is open in AWS.

Hyland Developer Evangelist

WorawutS
Champ in-the-making
Champ in-the-making

Hi @angelborroy , Thank you for your guidance Smiley Happy

After checked on Security Group that I allowed all connections on TCP port but this error stills

I tried to login solr6 with an ip of Alfresco Repository server : http://{alfresco_host}:8083/solr but it showing ERR_CONNECTION_REFUSED.

image

After I login with an ip of Solr6 server : https://{solr6_host}:8983/solr, it works.

Image

My docker-compose files that I use as belows

# Alfresco Repository

# 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: 7.2.0 DB: postgres SOLR_COMMS: https TRUSTSTORE_TYPE: JCEKS TRUSTSTORE_PASS: truststore KEYSTORE_TYPE: JCEKS KEYSTORE_PASS: keystore mem_limit: 2g 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 -Dssl-keystore.password=keystore -Dssl-keystore.aliases=ssl-alfresco-ca,ssl-repo -Dssl-keystore.ssl-alfresco-ca.password=keystore -Dssl-keystore.ssl-repo.password=keystore -Dssl-truststore.password=truststore -Dssl-truststore.aliases=alfresco-ca,ssl-repo-client -Dssl-truststore.alfresco-ca.password=truststore -Dssl-truststore.ssl-repo-client.password=truststore " JAVA_OPTS : " -Ddb.username=alfresco -Ddb.password=alfresco -Ddb.driver=org.postgresql.Driver -Ddb.url=jdbc:postgresql://postgres:5432/alfresco -Dalfresco_user_store.adminpassword=209c6174da490caeb422f3fa5a7ae634 -Dsystem.preferred.password.encoding=bcrypt10 -Dsolr.host=10.123.124.57 -Dsolr.port=8983 -Dsolr.port.ssl=8983 -Dsolr.secureComms=https -Dsolr.baseUrl=/solr -Dindex.subsystem.name=solr6 -Ddir.keystore=/usr/local/tomcat/keystore -Dalfresco.encryption.ssl.keystore.type=JCEKS -Dalfresco.encryption.ssl.truststore.type=JCEKS -Dalfresco.host=10.123.122.86 -Dalfresco.port=443 -Dapi-explorer.url=https://10.123.122.86:443/api-explorer -Dalfresco.protocol=https -Dshare.host=10.123.122.86 -Dshare.port=443 -Dshare.protocol=https -Daos.baseUrlOverwrite=https://10.123.122.86/alfresco/aos -Dmessaging.broker.url=\"failover:(nio://activemq:61616)?timeout=3000&jms.useCompression=true\" -Ddeployment.method=DOCKER_COMPOSE -Dcsrf.filter.enabled=false -Dopencmis.server.override=true -Dopencmis.server.value=https://10.123.122.86:443 -DlocalTransform.core-aio.url=http://transform-core-aio:8090/ -Dcsrf.filter.enabled=false -Dalfresco.restApi.basicAuthScheme=true -Dauthentication.protection.enabled=false -XX:+UseG1GC -XX:+UseStringDeduplication -Dgoogledocs.enabled=true -XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80 " volumes: - ./keystores/alfresco:/usr/local/tomcat/keystore transform-core-aio: image: alfresco/alfresco-transform-core-aio:2.5.7 mem_limit: 2000m environment: JAVA_OPTS: " -XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80" share: build: context: ./share args: SHARE_TAG: 7.2.0 SERVER_NAME: 10.123.122.86 mem_limit: 1g environment: REPO_HOST: "alfresco" REPO_PORT: "8080" JAVA_OPTS: " -XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80 -Dalfresco.context=alfresco -Dalfresco.protocol=https -XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80 " activemq: image: alfresco/alfresco-activemq:5.16.4-jre11-centos7 mem_limit: 1g ports: - "8161:8161" # Web Console - "5672:5672" # AMQP - "61616:61616" # OpenWire - "61613:61613" # STOMP # HTTP proxy to provide HTTP Default port access to services # SOLR API and SOLR Web Console are protected to avoid unauthenticated access proxy: image: alfresco/alfresco-acs-nginx:3.2.0 mem_limit: 128m environment: DISABLE_PROMETHEUS: "true" DISABLE_SYNCSERVICE: "true" DISABLE_ADW: "true" depends_on: - alfresco links: - alfresco - share # volumes: # - ./config/nginx.conf:/etc/nginx/nginx.conf # - ./config/nginx.htpasswd:/etc/nginx/conf.d/nginx.htpasswd ports: - 8080:8080 postgres: image: postgres:13.3 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
# Using version 2 as 3 does not support resource constraint options (cpu_*, mem_* limits) for non swarm mode in Compose
version: "2"

services:    
    solr6:
        build:
          context: ./search
          args:
            SEARCH_TAG: 2.0.3
            SOLR_HOSTNAME: solr6
            ALFRESCO_HOSTNAME: 10.123.122.86
            ALFRESCO_COMMS: https
            TRUSTSTORE_TYPE: JCEKS
            KEYSTORE_TYPE: JCEKS
            CROSS_LOCALE: "false"
        mem_limit: 5g
        environment:
            #Solr needs to know how to register itself with Alfresco
            SOLR_ALFRESCO_HOST: "10.123.122.86"
            SOLR_ALFRESCO_PORT:  "8080"
            #Alfresco needs to know how to call solr
            SOLR_SOLR_HOST: "10.123.124.57"
            SOLR_SOLR_PORT: "8983"
            #Create the default alfresco and archive cores
            SOLR_CREATE_ALFRESCO_DEFAULTS: "alfresco,archive"
            SOLR_JAVA_MEM: "-Xms4900m -Xmx4900m"
            SOLR_SSL_TRUST_STORE: "/opt/alfresco-search-services/keystore/ssl-repo-client.truststore"
            SOLR_SSL_TRUST_STORE_PASSWORD: "truststore"
            SOLR_SSL_TRUST_STORE_TYPE: "JCEKS"
            SOLR_SSL_KEY_STORE: "/opt/alfresco-search-services/keystore/ssl-repo-client.keystore"
            SOLR_SSL_KEY_STORE_PASSWORD: "keystore"
            SOLR_SSL_KEY_STORE_TYPE: "JCEKS"
            SOLR_SSL_NEED_CLIENT_AUTH: "true"
            JAVA_TOOL_OPTIONS: "
                -Dsolr.jetty.truststore.password=truststore
                -Dsolr.jetty.keystore.password=keystore
                -Dssl-keystore.password=keystore
                -Dssl-keystore.aliases=ssl-alfresco-ca,ssl-repo-client
                -Dssl-keystore.ssl-alfresco-ca.password=keystore
                -Dssl-keystore.ssl-repo-client.password=keystore
                -Dssl-truststore.password=truststore
                -Dssl-truststore.aliases=ssl-alfresco-ca,ssl-repo,ssl-repo-client
                -Dssl-truststore.ssl-alfresco-ca.password=truststore
                -Dssl-truststore.ssl-repo.password=truststore
                -Dssl-truststore.ssl-repo-client.password=truststore
                "
            SOLR_OPTS: "
                -XX:NewSize=4900m
                -XX:MaxNewSize=4900m
                -Dsolr.ssl.checkPeerName=false
                -Dsolr.allow.unsafe.resourceloading=true
                "
        volumes:
            - ./keystores/solr:/opt/alfresco-search-services/keystore
        ports:
            - 8983:8983

Do I need to config Nginx to forward port to the ip of solr6 host?

Thanks for your kind help.

AidenZ
Champ in-the-making
Champ in-the-making

I also encountered this problem, I wonder if you solved it?