Marzo 28, 2024

Alfresco tips & tricks – #9 GetModelsDiff return status is 500

Su Alfresco 4.0 può presentarsi un problema dovuto al troncamento della response JSON a 4096 bytes sul canale di comunicazione SSL Solr-Alfresco utilizzato per le transazioni di indicizzazione. Questa anomalia si verifica spesso su installazioni bundle di Alfresco e Solr sullo stesso Tomcat application server. Ecco un’estratto dell’eccezione.

ERROR [extensions.webscripts.AbstractRuntime] Exception from executeScript - redirecting to status template error: 02290002 Invalid JSON
org.springframework.extensions.webscripts.WebScriptException: 02290002 Invalid JSON
[...]
Caused by: org.json.JSONException: Unterminated string at character 4096
[...]
SEVERE: Job (Solr.CoreTracker-archive threw an exception.
org.quartz.SchedulerException: Job threw an unhandled exception. 
[See nested exception: org.alfresco.error.AlfrescoRuntimeException:
 02290000 GetModelsDiff return status is 500]
at org.quartz.core.JobRunShell.run(JobRunShell.java:227)

Per risolvere il problema è sufficiente disabilitare il limite massimo sul POST bufferizzato dal Tomcat container durante l’autenticazione. Di default il valore è impostato a 4096 bytes ma è sufficiente aggiungere il parametro maxSavePostSize=-1 nella definizione del connettore SSL di Tomcat, nel file {TOMCAT_HOME}/conf/server.xml

<Connector port="8443" protocol="org.apache.coyote.http11.Http11Protocol" 
SSLEnabled="true" maxThreads="150" scheme="https" 
keystoreFile="D:/alfresco/solr/solr_data/keystore/ssl.keystore" 
keystorePass="XXXXXXX" keystoreType="JCEKS" secure="true"
connectionTimeout="240000" 
truststoreFile="D:/alfresco/solr/solr_data/keystore/ssl.truststore" 
truststorePass="XXXXXXX" truststoreType="JCEKS"
 clientAuth="false" sslProtocol="TLS" maxSavePostSize="-1" />

Leave a Reply

Your email address will not be published.