Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Alfresco] Solr requests failed with 403 #1054

Open
nubarron81 opened this issue Jul 24, 2023 · 13 comments
Open

[Alfresco] Solr requests failed with 403 #1054

nubarron81 opened this issue Jul 24, 2023 · 13 comments
Assignees
Labels
alfresco on-hold Issues or Pull Requests with this label will never be considered stale tech-issues The user has a technical issue about an application

Comments

@nubarron81
Copy link

nubarron81 commented Jul 24, 2023

Platform

Virtual Machine

bndiagnostic ID know more about bndiagnostic ID

11c1a430-62bc-e35c-b7f3-c9016c581aed

bndiagnostic output

✓ Mariadb: No issues found
✓ Resources: No issues found
? Connectivity: Found possible issues
✓ Processes: No issues found
? Apache: Found possible issues

[Connectivity]

Server ports 22, 80 and/or 443 are not publicly accessible. Please check the
following guide to open server ports for remote access:

https://docs.bitnami.com/general/faq/administration/use-firewall/

[Apache]

Found recent error or warning messages in the Apache error log.

Press [Enter] to continue:
[Mon Jul 24 07:23:42.694331 2023] [proxy_ajp:error] [pid 535:tid 
140564079048448] (70007)The timeout specified has expired: AH01030: 
ajp_ilink_receive() can't receive header

[Mon Jul 24 07:23:42.694428 2023] [proxy_ajp:error] [pid 535:tid 
140564079048448] [client **ip_address**:50338] AH00992: ajp_read_header: 
ajp_ilink_receive failed

[Mon Jul 24 07:23:42.694442 2023] [proxy_ajp:error] [pid 535:tid 
140564079048448] (70007)The timeout specified has expired: [client 
**ip_address**:50338] AH00878: read response failed from [::1]:8009 
(localhost:8009)

bndiagnostic was not useful. Could you please tell us why?

The suggested guides are not related with my issue

Describe your issue as much as you can

Category manager error:

JavaException: org.alfresco.repo.search.QueryParserException: 06240041 Solr request failed with 403 /solr/alfresco/alfresco?wt=json&fl=DBID%2Cscore&rows=1000&df=TEXT&start=0&locale=es_ES&alternativeDic=DEFAULT_DICTIONARY&fq=%7B%21afts%7DAUTHORITY_FILTER_FROM_JSON&fq=%7B%21afts%7DTENANT_FILTER_FROM_JSON

Tag manager error:

06240002 Wrapped Exception (with status template): 06240051 Failed to execute script 'classpath*:alfresco/templates/webscripts/org/alfresco/repository/tagging/tags.get.js': 06240050 Solr request failed with 403 /solr/alfresco/alfresco?wt=json&fl=DBID%2Cscore&rows=1000&df=TEXT&start=0&locale=es_ES&alternativeDic=DEFAULT_DICTIONARY&fq=%7B%21afts%7DAUTHORITY_FILTER_FROM_JSON&fq=%7B%21afts%7DTENANT_FILTER_FROM_JSON

Tried to apply the solution of #877

@nubarron81 nubarron81 added the tech-issues The user has a technical issue about an application label Jul 24, 2023
@github-actions github-actions bot added the triage Triage is needed label Jul 24, 2023
@jotamartos
Copy link
Collaborator

Hi,

That seems to be a specific error of the application when accessing Solr. We suggest you contact the Alfresco's support team to know more about the issue and how to debug it. We will keep this ticket open to allow other Bitnami users post the solution to this issue in case they also ran into it.

Thanks

@github-actions
Copy link

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

@github-actions github-actions bot added the stale 15 days without activity label Aug 10, 2023
@github-actions
Copy link

Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.

@bitnami-bot bitnami-bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 16, 2023
@nubarron81
Copy link
Author

Upgraded to the last Bitnami release. Founded that the secret in /etc/systemd/system/bitnami.alfresco-search-services.service "ExecStart=/opt/bitnami/alfresco-search-services/solr/bin/solr start -a -Dalfresco.secureComms=secret -Dalfresco.secureComms.secret=bitnami" is not the same than the configured in /opt/bitnami/tomcat/shared/classes/alfresco-global.properties
Once changed, not get 403 error, now 404.

@jotamartos
Copy link
Collaborator

Hi @nubarron81,

I just checked that the secret's configuration is wrong as you mentioned. I'm going to investigate this and will update this ticket when having more information.

@github-actions github-actions bot removed the stale 15 days without activity label Aug 31, 2023
@jotamartos
Copy link
Collaborator

Hi @nubarron81,

Apart from confirming the issues configuring the secret in the service and the conf file, we also reproduced the issue when accessing the category manager under admin tools. I created a task for the team to review it and release a new version of the solution with the fix. I can't provide you with an ETA but will update this ticket once we have more information.

@github-actions github-actions bot added on-hold Issues or Pull Requests with this label will never be considered stale and removed triage Triage is needed labels Sep 4, 2023
@david-windsock
Copy link

david-windsock commented Oct 25, 2023

We experienced the same problem, but after got it working for hours. The 403 error comes after a VM reboot. The only change to the VM was the password for Alfresco admin and bitnami user. Maybe this is related? We tried 7.2 and 7.4 versions.

Anyway, the #868 issue seems to be the same...

@github-actions github-actions bot removed the on-hold Issues or Pull Requests with this label will never be considered stale label Oct 25, 2023
@github-actions github-actions bot added the triage Triage is needed label Oct 25, 2023
@github-actions github-actions bot added on-hold Issues or Pull Requests with this label will never be considered stale and removed triage Triage is needed labels Oct 26, 2023
@AsierraDEV
Copy link

Came across alfresco's documentation
https://docs.alfresco.com/insight-engine/latest/install/options/

where it warns about:

"From version 2.0, you cannot install Search and Insight Engine without mutual TLS (plain HTTP) because it is no longer supported"

So solution must come about configuring the appliance so alfresco and solr use TLS.

I think this is why, after using secret, we get a 404 instead of a 403

Upgraded to the last Bitnami release. Founded that the secret in /etc/systemd/system/bitnami.alfresco-search-services.service "ExecStart=/opt/bitnami/alfresco-search-services/solr/bin/solr start -a -Dalfresco.secureComms=secret -Dalfresco.secureComms.secret=bitnami" is not the same than the configured in /opt/bitnami/tomcat/shared/classes/alfresco-global.properties Once changed, not get 403 error, now 404.

@jotamartos
Copy link
Collaborator

Hi @AsierraDEV,

Thanks for the information. We recently released Alfresco 23.x. Could you please check if the problem persists in that version?

@david-windsock
Copy link

Hi @jotamartos

We tried again but the problem persists:

02260002 Wrapped Exception (with status template): 02260037 Failed to execute script 'classpath*:alfresco/templates/webscripts/org/alfresco/repository/tagging/tags.get.js': 02260036 Solr request failed with 403 /solr/alfresco/alfresco?wt=json&fl=DBID%2Cscore&rows=1000&df=TEXT&start=0&locale=es_ES&alternativeDic=DEFAULT_DICTIONARY&fq=%7B%21afts%7DAUTHORITY_FILTER_FROM_JSON&fq=%7B%21afts%7DTENANT_FILTER_FROM_JSON

This message appears on the tag manager page...

@AsierraDEV
Copy link

Hi @AsierraDEV,

Thanks for the information. We recently released Alfresco 23.x. Could you please check if the problem persists in that version?

Hi, I've tested version 23-23.2.1-r95 debian and problem persist.

Alfresco properties still tries to use shared secret. There is no valid keystore generated

@AsierraDEV
Copy link

AsierraDEV commented Apr 26, 2024

Upgraded to the last Bitnami release. Founded that the secret in /etc/systemd/system/bitnami.alfresco-search-services.service "ExecStart=/opt/bitnami/alfresco-search-services/solr/bin/solr start -a -Dalfresco.secureComms=secret -Dalfresco.secureComms.secret=bitnami" is not the same than the configured in /opt/bitnami/tomcat/shared/classes/alfresco-global.properties Once changed, not get 403 error, now 404.

Hi again. Got solr working finally. The problem is that I've done so many things that I'm not sure what got it working finally.

I had to create the alfresco solr cores:

  • Stop solr service bitnami.alfresco-search-services stop

  • Edited file /etc/systemd/system/bitnami.alfresco-search-services.service and removed parameters on startup, leaving just "_ExecStart=/opt/bitnami/alfresco-search-services/solr/bin/solr start -Dcreate.alfresco.defaults=alfresco,archive"

  • start solr: service bitnami.alfresco-search-services start

  • Check solr logs and directories in /opt/bitnami/alfresco-search-services/solrhome. There should by newly create alfresco and archive

  • Stop solr

  • Edited file /etc/systemd/system/bitnami.alfresco-search-services.service and removed parameters on startup, leaving just "_ExecStart=/opt/bitnami/alfresco-search-services/solr/bin/solr start -Dalfresco.secureComms.secret=bitnami"

  • Start solr

After that, searchin in alfresco is working, even solr status still gives error 403.

Now I have to work on changing the secret by editing service file, alfresco-global-properties and solr.properties.

Hope this helps.

I have a instalation on my dev machine, on a virtualbox virtual machine. May be first boot on the machine didn't create the solr cores.

Maybe the problem fix is just stop solr, execute point 7 of https://docs.alfresco.com/insight-engine/latest/install/options/ , when using option Install without mutual TLS - HTTP with secret word (zip)., and then start solr

@jotamartos
Copy link
Collaborator

I'll add that information to the task I created and will increase the priority for the team to check it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
alfresco on-hold Issues or Pull Requests with this label will never be considered stale tech-issues The user has a technical issue about an application
Projects
None yet
Development

No branches or pull requests

6 participants