Upgrade Alfresco 5.2 to 6.1

cancel
Showing results for 
Search instead for 
Did you mean: 
marcog
Partner

Upgrade Alfresco 5.2 to 6.1

Jump to solution

I am upgrading from version 5.2 Community to version docker 6.1 Community.
In version 5.2 I use an external Postregsql 10.6 (not installed with Alfresco) on port 5432.
And I want to keep the same alfresco database and the same version of Postgresql.
Alf_data is on another device mounted on the Server. I use CentOs 7. Everything works normally.
In the upgrade I downloaded a docker-compose.yml and changed some bad properties it didn't work reporting the following error when starting the solr6 container:

solr6_1 | 2020-02-10 19:16:36.821 ERROR (org.alfresco.solr.AlfrescoCoreAdminHandler@6f012914_Worker-24) [ ] o.a.s.t.AbstractTracker Tracking failed for ModelTracker - alfresco
solr6_1 | java.net.NoRouteToHostException: No route to host (Host unreachable)
solr6_1 | at java.base/java.net.PlainSocketImpl.socketConnect(Native Method)
solr6_1 | at java.base/java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:399)
solr6_1 | at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:242)
solr6_1 | at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:224)
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.getModelsDiff(SOLRAPIClient.java:1179)
solr6_1 | at org.alfresco.solr.tracker.ModelTracker.trackModelsImpl(ModelTracker.java:291)
solr6_1 | at org.alfresco.solr.tracker.ModelTracker.trackModels(ModelTracker.java:249)
solr6_1 | at org.alfresco.solr.tracker.ModelTracker.doTrack(ModelTracker.java:209)
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 | at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)

The server already has the firewall disabled and below I have the docker-compose.yml configuration

version: "2"
services:
alfresco:
image: alfresco/alfresco-content-repository-community:6.1.2-ga
mem_limit: 1500m
environment:
JAVA_OPTS : "
-Ddb.driver=org.postgresql.Driver
-Ddb.username=alfresco
-Ddb.password=xxxxxxxxxx
-Ddb.url=jdbcSmiley Tongueostgresql://localhost:5432/alfresco
-Dsolr.host=solr6
-Dsolr.port=8983
-Dsolr.secureComms=none
-Dsolr.base.url=/solr
-Dindex.subsystem.name=solr6
-Dshare.host=localhost
-Dalfresco.port=8082
-Daos.baseUrlOverwrite=http://localhost:8082/alfresco/aos
-Dmessaging.broker.url=\"failoverSmiley Sadnio://activemq:61616)?timeout=3000&jms.useCompression=true\"
-Ddeployment.method=DOCKER_COMPOSE
-Dcsrf.filter.enabled=false
-Xms1g -Xmx1g
"
ports:
- 8082:8080
volumes:
- /dados/opt/alf_data_backup:/usr/local/tomcat/alf_data

share:
image: alfresco/alfresco-share:6.1.0-RC3
mem_limit: 1g
environment:
- REPO_HOST=alfresco
- REPO_PORT=8080
- "CATALINA_OPTS= -Xms500m -Xmx500m"
ports:
- 8080:8080

solr6:
image: alfresco/alfresco-search-services:1.3.0-RC2
mem_limit: 2500m
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=-Xms2g -Xmx2g"
ports:
- 8083:8983 #Browser port

activemq:
image: alfresco/alfresco-activemq:5.15.6
mem_limit: 2048m
ports:
- 8161:8161 # Web Console
- 5672:5672 # AMQP
- 61616:61616 # OpenWire
- 61613:61613 # STOMP

I direct the containers to the local Postgresql and the alf_data to the local device. All other engines I am requesting that new ones be installed.
Has anyone encountered this migration and this problem?
Does anyone have any roadmap for this migration, not using a Database in Container?

Grateful for everyone's attention.

2 Solutions

Accepted Solutions
abhinavmishra14
Advanced

Re: Upgrade Alfresco 5.2 to 6.1

Jump to solution

You need to find out what error you see when your ACS starts. If its not able to connect to external postgres, then either host is not correct or port is not open. You need to tail the startup log and find out the cause.

When it downloads and starts internal postgres (when you used default docker-compose.yml), and acs starts successfuly in this case that means it is able to establish the connection internally. But there could be a problem connecting to a host outside the docker container. In your case, you have used "localhost". Trying referring to IP if that works. 

Use this command get the machine ip.

$ docker-machine ip default

~Abhinav
(ACSCE, AWS SAA, Azure Admin)

View solution in original post

marcog
Partner

Re: Upgrade Alfresco 5.2 to 6.1

Jump to solution

OK.
I will check this and return with the status.

Thanks

Marco

View solution in original post

6 Replies
abhinavmishra14
Advanced

Re: Upgrade Alfresco 5.2 to 6.1

Jump to solution

Looks like solr is not able to connect to ACS endpoint. Can you check if ACS was started correctly? Were you able to see acs connecting to postgres db successuly while it was starting up? 

run following command to see if all the services are running fine: 

docker-compose ps 

It would result this kind of output if all the services are up and running:

Additonally take a look at this post to see if you had followed all necessary steps required for upgrade: https://hub.alfresco.com/t5/alfresco-content-services-forum/upgrade-alfresco-5-0-to-6-0/m-p/295825

~Abhinav
(ACSCE, AWS SAA, Azure Admin)
marcog
Partner

Re: Upgrade Alfresco 5.2 to 6.1

Jump to solution

Thanks for the feedback,
but when I run the docker-compose ps, he informs me that alfresco_1 is on Exit and the others on Up.

Is the connection configuration to the external database correct?

Otherwise would I have to use Postgresql in Container?

abhinavmishra14
Advanced

Re: Upgrade Alfresco 5.2 to 6.1

Jump to solution

Which means ACS did not start correctly. Trying restarting again and tail the logs to see if you can locate any failures while startup. Failure log will only tell what's going on.

~Abhinav
(ACSCE, AWS SAA, Azure Admin)
marcog
Partner

Re: Upgrade Alfresco 5.2 to 6.1

Jump to solution

I'm sorry Abhinavmishra14.

I believed it would be very simple to point the docker-compose.yml to external Databases.

In the simplest concept of using docker-compose.yml is there an error in the docker-compose that I am using?

When I use the docker-compose in its default form (downloading GitHub) Alfresco is successfully installed, it only generates the problem when I try to connect to an existing Database and not using the Postgresql native Container.

abhinavmishra14
Advanced

Re: Upgrade Alfresco 5.2 to 6.1

Jump to solution

You need to find out what error you see when your ACS starts. If its not able to connect to external postgres, then either host is not correct or port is not open. You need to tail the startup log and find out the cause.

When it downloads and starts internal postgres (when you used default docker-compose.yml), and acs starts successfuly in this case that means it is able to establish the connection internally. But there could be a problem connecting to a host outside the docker container. In your case, you have used "localhost". Trying referring to IP if that works. 

Use this command get the machine ip.

$ docker-machine ip default

~Abhinav
(ACSCE, AWS SAA, Azure Admin)
marcog
Partner

Re: Upgrade Alfresco 5.2 to 6.1

Jump to solution

OK.
I will check this and return with the status.

Thanks

Marco