11-01-2020 05:41 PM
Hi Everyone!
I am just trying to get this project going for a POC. But I am having trouble with solr. It keeps throwing errors. I followed the instructions stated on this read me https://github.com/Alfresco/alfresco-docker-installer but I end up getting the error below
2020-11-01 22:15:50.018 ERROR (org.alfresco.solr.AlfrescoCoreAdminHandler@648ee871_Worker-27) [ ] o.a.s.t.ShardStatePublisher Unable to publish this node state. A failure condition has been met during the outbound subscription message encoding process. See the stacktrace below for further details. java.net.UnknownHostException: alfresco ...
Please see ther solr portion of the docker-compose file below. What should the property SOLR_ALFRESCO_HOST be assigned to? alfresco is definately not a host, I see where the error is going with this.
solr6: build: context: ./search args: SEARCH_TAG: $SEARCH_CE_TAG SOLR_HOSTNAME: solr6 ALFRESCO_HOSTNAME: localhost ALFRESCO_COMMS: none CROSS_LOCALE: "true" mem_limit: 1184m 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: "-Xms928m -Xmx928m" SOLR_OPTS: " -XX:NewSize=336m -XX:MaxNewSize=336m " volumes: - ./data/solr-data:/opt/alfresco-search-services/data
I can't figure out what is missing.
I initially followed the solution that I accepted here. That document at least got me to the point of actually reaching the login screen but I could not login because of the same exception that I posted above.
Need to move forward with this. SEND HELP!
11-02-2020 05:07 PM
I am not sure how you checked the docker-compose.yml living here: https://github.com/Alfresco/acs-community-deployment/blob/master/docker-compose/docker-compose.yml
There is a major difference between what you shared and this
However, based on the logs you have shared it looks like the alfresco container did not start correctly. This could be likely due to memory issues.
Can you run following commands and share what you see?
To see what all containers running: docker ps OR To see all containers including the exited containers: docker ps -a
check resources: docker stats
Minimum 12GB or more, memory is required depending on the memory limits set in the docker compose file.
Some details can be found here as well:
11-02-2020 06:37 AM
Hi @flowthinks
This is looking more like an Alfresco repo rather than a SOLR issue.
Could you report on what the Alfresco log is reporting?
Thanks,
11-02-2020 04:21 PM
Hi @EddieMay Below is the installer input I gave. Initially the acs version was 6.2. Downgraded but that did not help.
This is the output when I ran the start script
./start.sh Start docker compose Building alfresco Step 1/14 : ARG ALFRESCO_TAG Step 2/14 : FROM alfresco/alfresco-content-repository-community:${ALFRESCO_TAG} ---> 6edaf25aded1 Step 3/14 : ARG TOMCAT_DIR=/usr/local/tomcat ---> Using cache ---> 0f60d6b52b6e Step 4/14 : USER root ---> Using cache ---> 472ad55bcb5f Step 5/14 : RUN mkdir -p $TOMCAT_DIR/amps ---> Using cache ---> 4ad6d7bd88c8 Step 6/14 : COPY modules/amps $TOMCAT_DIR/amps ---> Using cache ---> 23f53a8af002 Step 7/14 : COPY modules/jars $TOMCAT_DIR/webapps/alfresco/WEB-INF/lib ---> Using cache ---> 4b892371306d Step 8/14 : RUN java -jar $TOMCAT_DIR/alfresco-mmt/alfresco-mmt*.jar install $TOMCAT_DIR/amps $TOMCAT_DIR/webapps/alfresco -directory -nobackup -force ---> Using cache ---> fa225943513b Step 9/14 : ARG API_EXPLORER_TAG ---> Using cache ---> d3b0981b1cd4 Step 10/14 : ENV API_EXPLORER_TAG $API_EXPLORER_TAG ---> Using cache ---> 7e3223ec96c2 Step 11/14 : RUN yum -y update && yum -y install wget && yum clean all && set -x && wget https://artifacts.alfresco.com/nexus/service/local/repositories/releases/content/org/alfresco/api-explorer/${API_EXPLORER_TAG}/api-explorer-${API_EXPLORER_TAG}.war -O /usr/local/tomcat/webapps/api-explorer.war ---> Using cache ---> 82da8985041c Step 12/14 : ARG DB ---> Using cache ---> c7ff7dbc13d8 Step 13/14 : ENV DB $DB ---> Using cache ---> 9e511c3d5aad Step 14/14 : RUN if [ "$DB" == "mariadb" ] ; then set -x && yum install -y wget && yum clean all && wget -P /tmp/ http://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-8.0.13.tar.gz && tar xvf /tmp/mysql-connector-java-8.0.13.tar.gz -C /tmp/ && cp /tmp/mysql-connector-java-8.0.13/mysql-connector-java-8.0.13.jar $TOMCAT_DIR/lib/ && rm -rf /tmp/mysql-connector-java-8.0.13.tar.gz /tmp/mysql-connector-java-8.0.13; fi ---> Using cache ---> e77e290730c1 Successfully built e77e290730c1 Successfully tagged alfresco-installer_alfresco:latest Building solr6 Step 1/13 : ARG SEARCH_TAG Step 2/13 : FROM alfresco/alfresco-search-services:${SEARCH_TAG} ---> c877e77771f4 Step 3/13 : ARG ALFRESCO_HOSTNAME ---> Using cache ---> 99a4288f3f2e Step 4/13 : ARG SOLR_HOSTNAME ---> Using cache ---> 8b992f830cd0 Step 5/13 : ENV ALFRESCO_HOSTNAME $ALFRESCO_HOSTNAME ---> Using cache ---> 4eb812669759 Step 6/13 : ENV SOLR_HOSTNAME $SOLR_HOSTNAME ---> Using cache ---> 60fde1dd0f13 Step 7/13 : RUN sed -i '/^bash.*/i sed -i "'"s/alfresco.host=localhost/alfresco.host=${ALFRESCO_HOSTNAME}/g"'" ${DIST_DIR}/solrhome/templates/rerank/conf/solrcore.properties\n' ${DIST_DIR}/solr/bin/search_config_setup.sh && sed -i '/^bash.*/i sed -i "'"s/solr.host=localhost/solr.host=${SOLR_HOSTNAME}/g"'" ${DIST_DIR}/solrhome/conf/shared.properties\n' ${DIST_DIR}/solr/bin/search_config_setup.sh ---> Using cache ---> 7fe375562adf Step 8/13 : ARG CROSS_LOCALE ---> Using cache ---> 1a92cbdf976b Step 9/13 : ENV CROSS_LOCALE $CROSS_LOCALE ---> Using cache ---> 4e6399938efb Step 10/13 : RUN if [ "$CROSS_LOCALE" == "true" ] ; then sed -i '/^bash.*/i sed -i "'"/alfresco.cross.locale.datatype/s/^#//g"'" $DIST_DIR/solrhome/conf/shared.properties\n' ${DIST_DIR}/solr/bin/search_config_setup.sh; fi ---> Using cache ---> 4a1ccb669788 Step 11/13 : ARG ALFRESCO_COMMS ---> Using cache ---> ed04a0e6be57 Step 12/13 : ENV ALFRESCO_COMMS $ALFRESCO_COMMS ---> Using cache ---> 83f1bc5cde58 Step 13/13 : RUN if [ "$ALFRESCO_COMMS" == "https" ] ; then sed -i '/^bash.*/i sed -i "'"s/alfresco.secureComms=none/alfresco.secureComms=https/g"'" ${DIST_DIR}/solrhome/templates/rerank/conf/solrcore.properties\n' ${DIST_DIR}/solr/bin/search_config_setup.sh; else sed -i '/^bash.*/i sed -i "'"s/alfresco.secureComms=https/alfresco.secureComms=none/g"'" ${DIST_DIR}/solrhome/templates/rerank/conf/solrcore.properties\n' ${DIST_DIR}/solr/bin/search_config_setup.sh; fi ---> Using cache ---> c2629736d825 Successfully built c2629736d825 Successfully tagged alfresco-installer_solr6:latest Building share Step 1/10 : ARG SHARE_TAG Step 2/10 : FROM alfresco/alfresco-share:${SHARE_TAG} ---> 0dfa83b79029 Step 3/10 : ARG TOMCAT_DIR=/usr/local/tomcat ---> Using cache ---> 6b003149880f Step 4/10 : ARG SERVER_NAME ---> Using cache ---> dc06776efb13 Step 5/10 : USER root ---> Using cache ---> 791682cbb16d Step 6/10 : RUN mkdir -p $TOMCAT_DIR/amps ---> Using cache ---> 519f888e829b Step 7/10 : COPY modules/amps $TOMCAT_DIR/amps ---> Using cache ---> 97a058d64e2d Step 8/10 : COPY modules/jars $TOMCAT_DIR/webapps/share/WEB-INF/lib ---> Using cache ---> 9fa8be8c4822 Step 9/10 : RUN java -jar $TOMCAT_DIR/alfresco-mmt/alfresco-mmt*.jar install $TOMCAT_DIR/amps $TOMCAT_DIR/webapps/share -directory -nobackup -force ---> Using cache ---> c08f2d093448 Step 10/10 : COPY web-extension/share-config-custom-dev.xml $TOMCAT_DIR/shared/classes/alfresco/web-extension/ ---> Using cache ---> 9163262eca2f Successfully built 9163262eca2f Successfully tagged alfresco-installer_share:latest alfresco-installer_share_1 is up-to-date alfresco-installer_postgres_1 is up-to-date Starting alfresco-installer_alfresco_1 ... Starting alfresco-installer_alfresco_1 ... done alfresco-installer_content-app_1 is up-to-date alfresco-installer_proxy_1 is up-to-date Waiting for alfresco to boot ... waiting for 1 resources: http://localhost:80/alfresco/ making HTTP(S) head request to url:http://localhost:80/alfresco/ ... HTTP(S) error for http://localhost:80/alfresco/ Error: Request failed with status code 502 making HTTP(S) head request to url:http://localhost:80/alfresco/ ... making HTTP(S) head request to url:http://localhost:80/alfresco/ ... HTTP(S) error for http://localhost:80/alfresco/ Error: Request failed with status code 502 HTTP(S) error for http://localhost:80/alfresco/ Error: Request failed with status code 502 making HTTP(S) head request to url:http://localhost:80/alfresco/ ... making HTTP(S) head request to url:http://localhost:80/alfresco/ ... making HTTP(S) head request to url:http://localhost:80/alfresco/ ... HTTP(S) error for http://localhost:80/alfresco/ Error: Request failed with status code 502 HTTP(S) error for http://localhost:80/alfresco/ Error: Request failed with status code 502 making HTTP(S) head request to url:http://localhost:80/alfresco/ ... HTTP(S) error for http://localhost:80/alfresco/ Error: Request failed with status code 502 HTTP(S) error for http://localhost:80/alfresco/ Error: Request failed with status code 502 making HTTP(S) head request to url:http://localhost:80/alfresco/ ... HTTP(S) error for http://localhost:80/alfresco/ Error: Request failed with status code 502 making HTTP(S) head request to url:http://localhost:80/alfresco/ ... HTTP(S) error for http://localhost:80/alfresco/ Error: Request failed with status code 502 making HTTP(S) head request to url:http://localhost:80/alfresco/ ...
Below is the stack trace that I mentioned in the issue description again.
solr6_1 | at org.quartz.core.JobRunShell.run(JobRunShell.java:202) solr6_1 | at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573) solr6_1 | 2020-11-02 21:14:30.005 ERROR (org.alfresco.solr.AlfrescoCoreAdminHandler@28cb9120_Worker-12) [ ] o.a.s.t.AbstractTracker Tracking failed for AclTracker - alfresco solr6_1 | java.net.UnknownHostException: alfresco solr6_1 | at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:220) solr6_1 | at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:403) solr6_1 | at java.base/java.net.Socket.connect(Socket.java:591) solr6_1 | at java.base/java.net.Socket.connect(Socket.java:540) solr6_1 | at java.base/java.net.Socket.<init>(Socket.java:436) solr6_1 | at java.base/java.net.Socket.<init>(Socket.java:288) solr6_1 | at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:80) solr6_1 | at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:122) solr6_1 | at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707) solr6_1 | at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361) solr6_1 | at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387) solr6_1 | at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171) solr6_1 | at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397) solr6_1 | at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323) solr6_1 | at org.alfresco.httpclient.AbstractHttpClient.executeMethod(AbstractHttpClient.java:135) solr6_1 | at org.alfresco.httpclient.AbstractHttpClient.sendRemoteRequest(AbstractHttpClient.java:111) solr6_1 | at org.alfresco.httpclient.HttpClientFactory$DefaultHttpClient.sendRequest(HttpClientFactory.java:430) solr6_1 | at org.alfresco.solr.client.SOLRAPIClient.getAclChangeSets(SOLRAPIClient.java:166) solr6_1 | at org.alfresco.solr.tracker.AclTracker.checkRepoAndIndexConsistency(AclTracker.java:326) solr6_1 | at org.alfresco.solr.tracker.AclTracker.trackRepository(AclTracker.java:303) solr6_1 | at org.alfresco.solr.tracker.AclTracker.doTrack(AclTracker.java:95) solr6_1 | at org.alfresco.solr.tracker.AbstractTracker.track(AbstractTracker.java:215) solr6_1 | at org.alfresco.solr.tracker.TrackerJob.execute(TrackerJob.java:47) solr6_1 | at org.quartz.core.JobRunShell.run(JobRunShell.java:202) solr6_1 |
@abhinavmishra14 This is the docker-compose file that was generated with the acs version 6.1.
I copied and pasted the the contents of the yml file you sent a link to in your response and there was no difference compared to the file I have. Only white space characters.
# 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 API_EXPLORER_TAG: ${API_EXPLORER_TAG} mem_limit: 4416m environment: JAVA_OPTS : ' -Ddb.username=alfresco -Ddb.password=alfresco -Ddb.driver=org.postgresql.Driver -Ddb.url=jdbc:postgresql://postgres:5432/alfresco -Dsolr.host=solr6 -Dsolr.secureComms=none -Dsolr.baseUrl=/solr -Dindex.subsystem.name=solr6 -Dalfresco.host=${SERVER_NAME} -Dalfresco.port=80 -Dshare.host=${SERVER_NAME} -Dshare.port=80 -Daos.baseUrlOverwrite=http://${SERVER_NAME}/alfresco/aos -Ddeployment.method=DOCKER_COMPOSE -Dcsrf.filter.enabled=false -Dopencmis.server.override=true -Dopencmis.server.value=http://${SERVER_NAME}:80 -Dalfresco.restApi.basicAuthScheme=true -Dmessaging.subsystem.autoStart=false -Dauthentication.protection.enabled=false -XX:+UseG1GC -XX:+UseStringDeduplication -Xms3904m -Xmx3904m ' volumes: - ./data/alf-repo-data:/usr/local/tomcat/alf_data - ./logs/alfresco:/usr/local/tomcat/logs solr6: build: context: ./search args: SEARCH_TAG: $SEARCH_CE_TAG SOLR_HOSTNAME: solr6 ALFRESCO_HOSTNAME: alfresco ALFRESCO_COMMS: none CROSS_LOCALE: "true" mem_limit: 2208m 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: "-Xms1952m -Xmx1952m" SOLR_OPTS: " -XX:NewSize=848m -XX:MaxNewSize=848m " volumes: - ./data/solr-data:/opt/alfresco-search-services/data share: build: context: ./share args: SHARE_TAG: ${SHARE_TAG} SERVER_NAME: ${SERVER_NAME} mem_limit: 1104m environment: REPO_HOST: "alfresco" REPO_PORT: "8080" JAVA_OPTS: " -Xms976m -Xmx976m -Dalfresco.context=alfresco -Dalfresco.protocol=http " volumes: - ./logs/share:/usr/local/tomcat/logs postgres: image: postgres:${POSTGRES_TAG} mem_limit: 1104m 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 content-app: image: alfresco/alfresco-content-app:${ACA_TAG} mem_limit: 256m 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: angelborroy/acs-proxy:1.2.0 mem_limit: 128m environment: - PORT=80 depends_on: - alfresco - solr6 - share - content-app volumes: - ./config/nginx.htpasswd:/etc/nginx/conf.d/nginx.htpasswd ports: - 80:80
I really hope this helps help me!
Thank you
11-02-2020 05:07 PM
I am not sure how you checked the docker-compose.yml living here: https://github.com/Alfresco/acs-community-deployment/blob/master/docker-compose/docker-compose.yml
There is a major difference between what you shared and this
However, based on the logs you have shared it looks like the alfresco container did not start correctly. This could be likely due to memory issues.
Can you run following commands and share what you see?
To see what all containers running: docker ps OR To see all containers including the exited containers: docker ps -a
check resources: docker stats
Minimum 12GB or more, memory is required depending on the memory limits set in the docker compose file.
Some details can be found here as well:
11-11-2020 03:13 PM
That is correct. Thank you. My RAM allocation to docker is inefficient.
11-11-2020 03:17 PM
Glad to hear that you are able to figure out the issue. Good luck.
11-02-2020 11:39 AM
2020-11-01 22:15:50.018 ERROR (org.alfresco.solr.AlfrescoCoreAdminHandler@648ee871_Worker-27) [ ] o.a.s.t.ShardStatePublisher Unable to publish this node state. A failure condition has been met during the outbound subscription message encoding process. See the stacktrace below for further details. java.net.UnknownHostException: alfresco ...Please see ther solr portion of the docker-compose file below. What should the property SOLR_ALFRESCO_HOST be assigned to? alfresco is definately not a host, I see where the error is going with this.
solr6: build: context: ./search args: SEARCH_TAG: $SEARCH_CE_TAG SOLR_HOSTNAME: solr6 ALFRESCO_HOSTNAME: localhost ALFRESCO_COMMS: none CROSS_LOCALE: "true" mem_limit: 1184m 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: "-Xms928m -Xmx928m" SOLR_OPTS: " -XX:NewSize=336m -XX:MaxNewSize=336m " volumes: - ./data/solr-data:/opt/alfresco-search-services/dataI can't figure out what is missing.
I initially followed the solution that I accepted here. That document at least got me to the point of actually reaching the login screen but I could not login because of the same exception that I posted above.
Need to move forward with this. SEND HELP!
Can you share the full docker-compose.yml file generated via alfresco-docker-installer tool?
I would recommed to use this docker-compose.yml file: https://github.com/Alfresco/acs-community-deployment/blob/master/docker-compose/docker-compose.yml
and see if everything works as expected. Then go back to the tool only if you have requirement such as ssl, proxy, ftp etc. types of specific needs.
05-20-2022 04:48 PM
I had similar issues. Using the current specifications for community-docker-compose.yml solved it for me. Also if the docker engine is having less space then maybe increasing the resource space can also help.
Explore our Alfresco products with the links below. Use labels to filter content by product module.