Problem running AIO project from SDK 3

cancel
Showing results for 
Search instead for 
Did you mean: 
akafortes
Active Member II

Problem running AIO project from SDK 3

Jump to solution

I have installed the Community Edition 201702 using the Ubuntu Installer, as suggested to me in a previous question I've asked (Problem installing Community Edition 201702)

Then I've created an AIO using

mvn archetype:generate -DarchetypeGroupId=org.alfresco.maven.archetype -DarchetypeArtifactId=alfresco-allinone-archetype -DarchetypeVersion=3.0.0 -DinteractiveMode=false -DgroupId=com.acme.alfresco -DartifactId=my-aio-project

from the Announcing Alfresco SDK 3.0 blog post. The output of the above command is in the "sdk3_aio.txt" file.

Then I cd in the folder of the created project, make the run.sh executable and then I run it.
At some point I start seeing errors like this:

 2017-04-06 10:08:00,966  ERROR [solr.tracker.AbstractTracker] [org.alfresco.solr.AlfrescoCoreAdminHandler@4795c238_Worker-1] Model tracking failed
org.alfresco.error.AlfrescoRuntimeException: 03060000 GetModelsDiff return status is 403
     at org.alfresco.solr.client.SOLRAPIClient.getModelsDiff(SOLRAPIClient.java:1181)
     at org.alfresco.solr.tracker.ModelTracker.trackModelsImpl(ModelTracker.java:256)
     at org.alfresco.solr.tracker.ModelTracker.trackModels(ModelTracker.java:214)
     at org.alfresco.solr.tracker.ModelTracker.ensureFirstModelSync(ModelTracker.java:236)
     at org.alfresco.solr.tracker.CoreWatcherJob.registerForCore(CoreWatcherJob.java:145)
     at org.alfresco.solr.tracker.CoreWatcherJob.execute(CoreWatcherJob.java:82)
     at org.quartz.core.JobRunShell.run(JobRunShell.java:216)
     at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:563)

And it just continues like this(different exception numbers etc) until I just stop it with Ctrl+C. I've included the output, after I executed run.sh, in the "sdk3_run.txt"

Does anyone know what the problem is?
I'm trying to follow some steps from the documentation to make some custom content models and in the "Create.." menu of the Share UI and in all of the them it tells me that I have to create an AIO project first and use that.

1 Solution

Accepted Solutions
ohej
Established Member II

Re: Problem running AIO project from SDK 3

Jump to solution

That would explain it. If you already have the community installer running then you will get into conflicts. Essentially what you are seeing right now is that Solr is trying to access your community installer, where it would normally be accessing the platform that is running as part of the SDK.

The SDK with all-in-one will start both the repository platform, solr and share. If you already have them running via the installer, then you will get into some unfortunate conflicts. Solution: Shut down the installer that is running - or change the port of the SDK project.

Can you let me know a bit more about what you are trying to achieve? Are you developing a customisation or extension on top of the platform? If so, you should only be using the SDK. If you are exploring the platform use the installer.

Overall you want to keep the installer separate from your SDK project. The SDK will allow you to build customisations and extensions and it will run them in a self-contained environment (embedded database and Tomcat server). Once you've developed them, you can then deploy the artifacts created by the SDK (either a JAR or an AMP) into your production environment. 

View solution in original post

5 Replies
ohej
Established Member II

Re: Problem running AIO project from SDK 3

Jump to solution

Hi

This is an interesting issue. It seems Solr can't connect to Alfresco, but everything seems fine looking at the output (btw, thanks for including that, makes it much easier).

Can you let me know which Maven / Java version you're running? The output from "mvn -version" would be fine. 

In addition, can you check alf_data_dev/solr/workspace-SpacesStore/conf/solrcore.properties? Verify that it has the correct data.dir.root -  as well as alfresco.host and alfresco.port? 

Despite the errors, are you able to log in to Share on http://localhost:8080/share ?

What do you see if you access http://localhost:8080/alfresco/service/api/solr/aclchangesets ?

akafortes
Active Member II

Re: Problem running AIO project from SDK 3

Jump to solution

Hello,

this is my mvn -version output

Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T18:41:47+02:00)
Maven home: /home/administrator/libs/maven/apache-maven-3.3.9
Java version: 1.8.0_121, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-oracle/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.4.0-62-generic", arch: "amd64", family: "unix"

data.dir.root

data.dir.root=/home/administrator/alfresco/aio-3-alf/alf_data_dev/solr/index

alfresco.host and alfresco.port

alfresco.host=localhost
alfresco.port=8080

Should I change the localhost to the IP of the server?

I'm able to login to http://<server-ip>:8080/share (although I think it's the Share from the original installation of Alfresco and not from the AIO)

http://<server-ip>:8080/alfresco/service/api/solr/aclchangesets  returns

HTTP Status 403 - X509 Authentication failure‍
type Status report
message X509 Authentication failure
description Access to the specified resource has been forbidden.‍‍‍‍‍‍‍

In general, I am a little confused about how to use the the AIO project. Since I already have an instance of Alfresco running on the 8080 port right from the start of my installation, how is the AIO going to run instead of this?

My Alfresco installation is in "/opt/alfresco/" and I have created the AIO in "/home/administrator/alfresco/aio-3-alf/". Should I have created the AIO in the installation folder of Alfresco? Should I change the port of the AIO in its settings?

Not really sure on that subject which might as well be the reason for these errors, don't really know 

ohej
Established Member II

Re: Problem running AIO project from SDK 3

Jump to solution

That would explain it. If you already have the community installer running then you will get into conflicts. Essentially what you are seeing right now is that Solr is trying to access your community installer, where it would normally be accessing the platform that is running as part of the SDK.

The SDK with all-in-one will start both the repository platform, solr and share. If you already have them running via the installer, then you will get into some unfortunate conflicts. Solution: Shut down the installer that is running - or change the port of the SDK project.

Can you let me know a bit more about what you are trying to achieve? Are you developing a customisation or extension on top of the platform? If so, you should only be using the SDK. If you are exploring the platform use the installer.

Overall you want to keep the installer separate from your SDK project. The SDK will allow you to build customisations and extensions and it will run them in a self-contained environment (embedded database and Tomcat server). Once you've developed them, you can then deploy the artifacts created by the SDK (either a JAR or an AMP) into your production environment. 

akafortes
Active Member II

Re: Problem running AIO project from SDK 3

Jump to solution

We are going to use Alfresco, in my company, so I am trying to create custom content model(etc) to use in our implementation.

So, if I understand correctly, I should use the AIO project to create and test all the custom types and other customisations I want to achieve and then, after I'm done, transfer the JARs/AMPS/WARs to the original Alfresco installations. Is that correct?

ohej
Established Member II

Re: Problem running AIO project from SDK 3

Jump to solution

Yes, that would be the correct approach Smiley Happy