AnsweredAssumed Answered

INFO  [webscripts.connector.RemoteClient] [http-8080-2] Error status 408 Read timed out

Question asked by nenad982 on Apr 7, 2014
Latest reply on Jan 26, 2018 by prakash@25
Hi all,

I am experiencing the following problem. I had been created script that will be wrapper script for Share site creation/update. It was required because Alfresco is just used as repository to other front-end application and I used
org.apache.commons.httpclient.HttpClient

and called alfresco's scripts that will do the work. So I can create a site in one call or update site in separate call. But I have one corner case when I am creating site with MODERATED visibility so in that situation because of permissions on site's document library I have first to create site with PUBLIC visibility and after that to update it to MODERATED (just after few lines of code). So I am creating record in db (creating Share site using Java API) and after few lines of code I am trying to update record (site) and change visibility from PUBLIC to MODERATED and I received:


java.net.SocketTimeoutException: Read timed out
       at java.net.SocketInputStream.socketRead0(Native Method)
       at java.net.SocketInputStream.read(SocketInputStream.java:152)
       at java.net.SocketInputStream.read(SocketInputStream.java:122)
       at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
       at java.io.BufferedInputStream.read(BufferedInputStream.java:254)
       at org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:78)
       at org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:106)
       at org.apache.commons.httpclient.HttpConnection.readLine(HttpConnection.java:1116)
       at org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1973)
       at org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1735)
       at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1098)
       at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
       at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
       at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
       at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
       at org.springframework.extensions.webscripts.connector.RemoteClient.service(RemoteClient.java:1050)
       at org.springframework.extensions.webscripts.connector.RemoteClient.call(RemoteClient.java:707)
       at org.springframework.extensions.webscripts.connector.HttpConnector.call(HttpConnector.java:143)
       at org.springframework.extensions.webscripts.connector.AuthenticatingConnector.call(AuthenticatingConnector.java:293)
       at org.springframework.extensions.webscripts.servlet.mvc.EndPointProxyController.handleRequestInternal(EndPointProxyContr
       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:790)
       at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
       at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
       at org.springframework.web.servlet.FrameworkServlet.doPut(FrameworkServlet.java:571)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:640)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
       at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
       at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
       at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
       at org.tuckey.web.filters.urlrewrite.NormalRewrittenUrl.doRewrite(NormalRewrittenUrl.java:195)
       at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:159)
       at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:141)
       at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:90)
       at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:417)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.alfresco.web.site.servlet.SSOAuthenticationFilter.doFilter(SSOAuthenticationFilter.java:374)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
       at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
       at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:877)
       at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:594)
       at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1675)
       at java.lang.Thread.run(Thread.java:744)


But after this error site has been updated as I expected and (visibility is MODERATED). So on UI I don't see any problems just in log file. Also what I noticed when I just create a site with PUBLIC visibility for example (without updating it after few code lines) everything is ok. And if I update a site afterwords to change visibility to MODERATED everything works as expected without errors in log. For updating site I am always using the same code snippet (when I am updating site after few lines of code after creation or when I update site as separate call).

I investigated this issue and I tried to change following options in MySQL db: innodb_locks_unsafe_for_binlog = 1 and innodb_lock_wait_timeout = 500 but nothing helped.

Do you have some suggestion?

Thanks…

Outcomes