Failed to send AJP message

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

Failed to send AJP message

I am getting the above exception:

2017-10-10 17:40:05,050  INFO  [webscripts.connector.RemoteClient] [ajp-apr-8009-exec-7] Exception calling (GET) http://mydomain:8080/alfresco/s/api/task-instances?authority=testfaculty&properties=bpm_priority,bpm...
 2017-10-10 17:40:05,051  INFO  [webscripts.connector.RemoteClient] [ajp-apr-8009-exec-7] Error status 500 java.io.IOException: Failed to send AJP message
 org.apache.catalina.connector.ClientAbortException: java.io.IOException: Failed to send AJP message
        at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:410)
        at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:480)
        at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:366)
        at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:435)
        at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:423)
        at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:91)
        at org.springframework.extensions.webscripts.connector.RemoteClient.copyResponseStreamOutput(RemoteClient.java:1379)
        at org.alfresco.web.scripts.SlingshotRemoteClient.copyResponseStreamOutput(SlingshotRemoteClient.java:199)
        at org.springframework.extensions.webscripts.connector.RemoteClient.service(RemoteClient.java:1269)
        at org.springframework.extensions.webscripts.connector.RemoteClient.call(RemoteClient.java:801)
        at org.springframework.extensions.webscripts.connector.HttpConnector.call(HttpConnector.java:143)
        at org.springframework.extensions.webscripts.servlet.mvc.EndPointProxyController.handleRequestInternal(EndPointProxyController.java:328)
        at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
        at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:933)
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:867)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:951)
        at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:842)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
        at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:827)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:743)
        at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:485)
        at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:410)
        at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:337)
        at org.tuckey.web.filters.urlrewrite.NormalRewrittenUrl.doRewrite(NormalRewrittenUrl.java:213)
        at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:171)
        at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
        at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
        at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:389)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.springframework.extensions.webscripts.servlet.SecurityHeadersFilter.doFilter(SecurityHeadersFilter.java:177)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.springframework.extensions.webscripts.servlet.CSRFFilter.doFilter(CSRFFilter.java:322)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.alfresco.web.site.servlet.SSOAuthenticationFilter.doFilter(SSOAuthenticationFilter.java:561)
        at org.alfresco.web.site.servlet.SSOAuthenticationFilter.doFilter(SSOAuthenticationFilter.java:443)
        at org.springframework.extensions.webscripts.servlet.BeanProxyFilter.doFilter(BeanProxyFilter.java:80)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.alfresco.web.site.servlet.MTAuthenticationFilter.doFilter(MTAuthenticationFilter.java:81)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:218)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:506)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445)
        at org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:188)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
        at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2549)
        at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2538)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: Failed to send AJP message
        at org.apache.coyote.ajp.AjpAprProcessor.output(AjpAprProcessor.java:297)
        at org.apache.coyote.ajp.AbstractAjpProcessor$SocketOutputBuffer.doWrite(AbstractAjpProcessor.java:1275)
        at org.apache.coyote.Response.doWrite(Response.java:499)
        at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:405)
        ... 65 more

But i cannot see any misfunctionalities. Any ideas?

Just upgraded to 2017.07

5 Replies
Highlighted
Advanced II

Re: Failed to send AJP message

Hello.

Are you sure you followed the right steps to perform the upgrade?

Do you have any customization on that server?

Active Member II

Re: Failed to send AJP message

We cannot seem to find any misfunctionalites for now. User's profiles are ok, documents, workflows work. our amps work.

For more info, below i am attaching parts of our configurations. 

shared/classes/alfresco/web-extension/share-config-custom.xml
<connector>
   <id>alfrescoHeader</id>
   <name>Alfresco Connector</name>
    <description>Connects to an Alfresco instance using header and cookie-based authentication</description>
    <class>org.alfresco.web.site.servlet.SlingshotAlfrescoConnector</class>
    <userHeader>X-Alfresco-Remote-User</userHeader>
</connector>

...
<endpoint>

   <id>alfresco-api</id>
   <parent-id>alfresco</parent-id>
   <name>Alfresco Public API - user access</name>
   <description>Access to Alfresco Repository Public API that require user authentication.
               This makes use of the authentication that is provided by parent 'alfresco' endpoint.</description>
   <connector-id>alfrescoHeader</connector-id>
   <endpoint-url>http://mydomain:8080/alfresco/api</endpoint-url>
   <identity>user</identity>
   <external-auth>true</external-auth>
</endpoint>

We have set an apache2 as a proxy on 80, and 443, and external SSO authentication.

/etc/apache2/sites-enabled/mydomain-ssl.conf
Listen my.ip:443
<VirtualHost my.ip:443>
   ...
   ProxyPass /alfresco ajp://127.0.0.1:8009/alfresco connectiontimeout=1200 timeout=1200
   ProxyPassReverse /alfresco ajp://127.0.0.1:8009/alfresco
   ...

  <Location /alfresco>
     AuthType shibboleth
     ShibRequireSession On
     require valid-user
     RequestHeader set X-Alfresco-Remote-User %{uid}e
  </Location>
</VirtualHost>

The connectors

tomcat/conf/server.xml
<Connector port="8080" URIEncoding="UTF-8" protocol="HTTP/1.1" connectionTimeout="20000"
  
maxHttpHeaderSize="32768" />
<Connector port="8009" URIEncoding="UTF-8" protocol="AJP/1.3" tomcatAuthentication="false"
   
redirectPort="8443" packetSize="65536" maxHttpHeaderSize="32768" />
<Connector port="8443" URIEncoding="UTF-8" protocol="org.apache.coyote.http11.Http11Protocol"
   SSLEnabled="true"
maxThreads="150" scheme="https"
   keystoreFile="/opt/alfresco-community/alf_data/keystore/ssl.keystore"
   keystorePass="thepass" keystoreType="JCEKS" s
ecure="true" connectionTimeout="240000"
   truststoreFile="/opt/alfresco-community/alf_data/keystore/ssl.truststore"
   truststorePass="thepass" truststoreType="JCEKS"
clientAuth="want"
   allowUnsafeLegacyRenegotiation="true"
   maxHttpHeaderSize="32768" SSLProtocols="TLSv1" />

Hope to enlight you. How can we find how this request is produced?

Highlighted
Active Member II

Re: Failed to send AJP message

Also they all seem to come from the same authority. We use this authority for our tests, and the errors are still printed, although we are not doing something with this user.

Highlighted
Active Member II

Re: Failed to send AJP message

we restarted apache2 and tomcat, have not connected with this user and we get still the same error!

Below some properties related to the database:

db.pool.initial=10
db.pool.min=10
db.pool.idle=50
db.pool.validate.return=false
db.pool.validate.borrow=true
db.pool.evict.validate=false
db.pool.abandoned.detect=false
db.pool.abandoned.time=300
db.pool.abandoned.log=false
db.pool.max=275
db.pool.validate.query=SELECT 1
# credits to loftux: alfresco-ubuntu-install/alfresco-global.properties at master · loftuxab/alfresco-ubuntu-install · Gi... 
Highlighted
Advanced II

Re: Failed to send AJP message

You can use the following sample file as a reference in order to check if you have all the endpoints set

alfresco-ubuntu-install/share-config-custom.xml at master · loftuxab/alfresco-ubuntu-install · GitHu...