cancel
Showing results for 
Search instead for 
Did you mean: 

Status 404 after applying new AMP

mbel
Star Contributor
Star Contributor

Hello,

I have the following issue:

I created maven alfresco amp project with 'Hello World' message which was generated automatically and then built it to an amp.file.

After that I copied it to .\amps folder and then ran apply_amps.bat.

Then I could't access any URL in alfresco- I receive 404 error.

I checked the logs:

alfrescotomcat-stdout.txt

2016-11-01 01:11:00,186  ERROR [solr.tracker.AbstractTracker] [SolrTrackerScheduler_Worker-29] Model tracking failed

org.alfresco.error.AlfrescoRuntimeException: 10010020 GetModelsDiff return status is 404

  at org.alfresco.solr.client.SOLRAPIClient.getModelsDiff(SOLRAPIClient.java:1157)

  at org.alfresco.solr.tracker.ModelTracker.trackModelsImpl(ModelTracker.java:249)

  at org.alfresco.solr.tracker.ModelTracker.trackModels(ModelTracker.java:207)

  at org.alfresco.solr.tracker.ModelTracker.ensureFirstModelSync(ModelTracker.java:229)

  at org.alfresco.solr.component.EnsureModelsComponent.prepare(EnsureModelsComponent.java:80)

  at org.apache.solr.handler.component.AlfrescoSearchHandler.handleRequestBody(AlfrescoSearchHandler.java:283)

  at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)

  at org.alfresco.solr.Cloud.getResponse(Cloud.java:159)

  at org.alfresco.solr.Cloud.getSolrDocumentList(Cloud.java:143)

  at org.alfresco.solr.SolrInformationServer.getDocsWithUncleanContent(SolrInformationServer.java:715)

  at org.alfresco.solr.tracker.ContentTracker.doTrack(ContentTracker.java:74)

  at org.alfresco.solr.tracker.AbstractTracker.track(AbstractTracker.java:185)

  at org.alfresco.solr.tracker.TrackerJob.execute(TrackerJob.java:47)

  at org.quartz.core.JobRunShell.run(JobRunShell.java:216)

  at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:563)

2016-11-01 01:11:00,217  ERROR [solr.tracker.AbstractTracker] [SolrTrackerScheduler_Worker-33] Tracking failed

org.alfresco.error.AlfrescoRuntimeException: 10010021 GetModelsDiff return status is 404

  at org.alfresco.solr.client.SOLRAPIClient.getModelsDiff(SOLRAPIClient.java:1157)

  at org.alfresco.solr.tracker.ModelTracker.trackModelsImpl(ModelTracker.java:249)

  at org.alfresco.solr.tracker.ModelTracker.trackModels(ModelTracker.java:207)

  at org.alfresco.solr.tracker.ModelTracker.doTrack(ModelTracker.java:167)

  at org.alfresco.solr.tracker.AbstractTracker.track(AbstractTracker.java:185)

  at org.alfresco.solr.tracker.TrackerJob.execute(TrackerJob.java:47)

  at org.quartz.core.JobRunShell.run(JobRunShell.java:216)

  at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:563)

in localhost_access_log:

127.0.0.1 - - [01/Nov/2016:01:11:45 -0700] "POST /alfresco/service/api/solr/modelsdiff HTTP/1.1" 404 1021

127.0.0.1 - - [01/Nov/2016:01:12:00 -0700] "GET /alfresco/service/api/solr/aclchangesets?fromId=0&toId=2000&maxResults=1 HTTP/1.1" 404 1027

127.0.0.1 - - [01/Nov/2016:01:12:00 -0700] "POST /alfresco/service/api/solr/modelsdiff HTTP/1.1" 404 1021

127.0.0.1 - - [01/Nov/2016:01:12:00 -0700] "GET /alfresco/service/api/solr/aclchangesets?fromId=0&toId=2000&maxResults=1 HTTP/1.1" 404 1027

127.0.0.1 - - [01/Nov/2016:01:12:00 -0700] "POST /alfresco/service/api/solr/modelsdiff HTTP/1.1" 404 1021

127.0.0.1 - - [01/Nov/2016:01:12:00 -0700] "POST /alfresco/service/api/solr/modelsdiff HTTP/1.1" 404 1021

I haven't done anything with solr, so I don't know why I receive this error.

Could you please advise what I did wrong when applied the amp or have to do something more ?

Thank you in advance.

1 ACCEPTED ANSWER

mbel
Star Contributor
Star Contributor

I just fixed the issue.

Before installing the amp, I deleted the old 'alfresco' folder in dir \tomcat\webapps and it generated a new one.

I am not sure if this is the right way, but now everything runs fine!

Thank you for your prompt reply anyway.

View answer in original post

9 REPLIES 9

afaust
Legendary Innovator
Legendary Innovator

There isn't really an issue with SOLR, but with the Repository-tier and the APIs it provides that SOLR calls. Your Repository web application (/alfresco) hasn't started up correctly. There might be a message about an issue in the alfresco.log file that prevents the successful startup. The AMP may have introduced an incompatible configuration.

openpj
Elite Collaborator
Elite Collaborator

I think that the real error is there in your log file, could you please share a wide log snippet?

The error that you have shared now is only a result of the main now but I think that it is not present here.

mbel
Star Contributor
Star Contributor

I just fixed the issue.

Before installing the amp, I deleted the old 'alfresco' folder in dir \tomcat\webapps and it generated a new one.

I am not sure if this is the right way, but now everything runs fine!

Thank you for your prompt reply anyway.

iwkse
Star Contributor
Star Contributor

That's what you're always supposed to do when apply amps to a war package. If you don't delete alfresco (and share if it's the case) folder the war package will not be extracted and will use the current one.

mbel
Star Contributor
Star Contributor

Thank you.

I think it should be included in Alfresco documentation, because in Installing an AMP documentation is written only for tomcat's temp and work folders.

cesarista
World-Class Innovator
World-Class Innovator

Hi:

I would say, that this is done by default by apply_amp.[sh|bat] script (at least .sh in linux), while if you did it via java -jar alfresco-mmt.jar command you need to delete /alfresco and /share contexts. For example in:

build-tomcat-bundles/apply_amps.bat at master · wabson/build-tomcat-bundles · GitHub

you can see that apply_amps.bat has the corresponding rmdir lines at the final of the script.

Regards.

--C.

mbel
Star Contributor
Star Contributor

Yes, I saw it now.

However, after re-installed Alfresco , I didn't run the  apply_amps.bat , just installed the custom amp manually through the cmd.

If I run the script, I receive the above Solr error....

cesarista
World-Class Innovator
World-Class Innovator

Do you stop alfresco service, before installing custom amp ?

As commented before about SOLR error, the AMP may introduce incompatible configuration.

Regards.

--C.

mbel
Star Contributor
Star Contributor

Yes, I did stop it.

What configuration you mean exactly?

I just generated the alfresco-amp maven archetype with Hello message and build it to amp file with mvn clean install -Pamp-to-war.

Or there should be done something more?