[GeoNode-devel] AuthenticationServiceException: Communication with GeoNode failed Caused by: java.net.SocketTimeoutException: Read timed out

Ken Abryl Eleazar Salanio kasalanio at dream.upd.edu.ph
Tue Jan 26 01:07:41 PST 2016


I found this in the code snippet for the GeoNodeSecurityProvider.java
<https://github.com/GeoNode/geoserver-geonode-ext/blob/master/src/main/java/org/geonode/security/GeoNodeSecurityProvider.java>
:
>
> protected GeoNodeSecurityClient configuredClient(String baseUrl) {
>         HTTPClient httpClient = new *HTTPClient(10, 1000, 1000);*
>         String securityClientDatabaseURL =
> GeoServerExtensions.getProperty("org.geonode.security.databaseSecurityClient.url");
>
>         GeoNodeSecurityClient configured;
>         String securityClient = "default";
>         if (securityClientDatabaseURL == null) {
>             DefaultSecurityClient defaultClient = new
> DefaultSecurityClient(baseUrl, httpClient);
>             configured = defaultClient;
>         } else {
>             securityClient = "database";
>             BasicDataSource dataSource = new BasicDataSource();
>             dataSource.setDriverClassName("org.postgresql.Driver");
>             dataSource.setUrl(securityClientDatabaseURL);
>             configured = new DatabaseSecurityClient(dataSource, baseUrl,
> httpClient);
>         }
>         Logging.getLogger(getClass()).log(Level.INFO, "using geonode {0}
> security client", securityClient);
>         return configured;
>     }
>
 Does this mean that the timeout is not configurable?

On Tue, Jan 26, 2016 at 5:05 PM, Ken Abryl Eleazar Salanio <
kasalanio at dream.upd.edu.ph> wrote:

> I found this in the code snippet for the GeoNodeSecurityProvider.java:
>
> On Tue, Jan 26, 2016 at 11:31 AM, Ken Abryl Eleazar Salanio <
> kasalanio at dream.upd.edu.ph> wrote:
>
>> Just a follow-up question on this. How can I adjust the timeout settings
>> on the HTTPclient used by GeoNodeSecurityClient java class? It seems that
>> the problem stems from the /layers/acls JSON being too large when GeoServer
>> asks for it from GeoNode. Adjusting the timeout on the Tomcat server.xml
>> doesn't seem to help. Thanks!
>>
>> On Mon, Jan 18, 2016 at 5:40 PM, Ken Abryl Eleazar Salanio <
>> kasalanio at dream.upd.edu.ph> wrote:
>>
>>> OK, thanks! Will try looking for it then.
>>>
>>> On Mon, Jan 18, 2016 at 5:34 PM, Simone Dalmasso <
>>> simone.dalmasso at gmail.com> wrote:
>>>
>>>> Not as far as I know unless there is something on the server preventing
>>>> that.
>>>>
>>>> 2016-01-18 10:09 GMT+01:00 Ken Abryl Eleazar Salanio <
>>>> kasalanio at dream.upd.edu.ph>:
>>>>
>>>>> Yep, I've edited the config.xml to specify the geonode base location.
>>>>> If the location cannot be found, geoserver outputs a "Caused by:
>>>>> java.net.UnknownHostException: <hostname>". However in this case, it's a
>>>>> socket timeout. Geoserver sees the location, but cannot finish the
>>>>> authentication. Is it possible that apache or java blocks the connection
>>>>> until it times out?
>>>>>
>>>>> On Mon, Jan 18, 2016 at 4:48 PM, Simone Dalmasso <
>>>>> simone.dalmasso at gmail.com> wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> yes is in the geoserver data
>>>>>> dir/security/auth/geonodeAuthProvider/config.xml. There you have to put the
>>>>>> geonode base location.
>>>>>>
>>>>>> Regards
>>>>>>
>>>>>> 2016-01-18 9:47 GMT+01:00 Ken Abryl Eleazar Salanio <
>>>>>> kasalanio at dream.upd.edu.ph>:
>>>>>>
>>>>>>> WARN [geonode.security] - Error connecting to the GeoNode server for
>>>>>>>> authentication purposes
>>>>>>>> org.springframework.security.authentication.AuthenticationServiceException:
>>>>>>>> Communication with GeoNode failed
>>>>>>>>     at
>>>>>>>> org.geonode.security.GeoNodeAuthenticationProvider.authenticate(GeoNodeAuthenticationProvider.java:61)
>>>>>>>>     at
>>>>>>>> org.geoserver.security.GeoServerAuthenticationProvider.authenticate(GeoServerAuthenticationProvider.java:57)
>>>>>>>>     at
>>>>>>>> org.springframework.security.authentication.ProviderManager.authenticate(ProviderManager.java:156)
>>>>>>>>     at
>>>>>>>> org.geonode.security.GeoNodeAnonymousProcessingFilter.doFilter(GeoNodeAnonymousProcessingFilter.java:63)
>>>>>>>>     at
>>>>>>>> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
>>>>>>>>     at
>>>>>>>> org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)
>>>>>>>>     at
>>>>>>>> org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150)
>>>>>>>>     at
>>>>>>>> org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)
>>>>>>>>     at
>>>>>>>> org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)
>>>>>>>>     at
>>>>>>>> org.geoserver.security.filter.GeoServerBasicAuthenticationFilter.doFilter(GeoServerBasicAuthenticationFilter.java:82)
>>>>>>>>     at
>>>>>>>> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
>>>>>>>>     at
>>>>>>>> org.geonode.security.GeoNodeCookieProcessingFilter.doFilter(GeoNodeCookieProcessingFilter.java:107)
>>>>>>>>     at
>>>>>>>> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
>>>>>>>>     at
>>>>>>>> org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)
>>>>>>>>     at
>>>>>>>> org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
>>>>>>>>     at
>>>>>>>> org.geoserver.security.filter.GeoServerSecurityContextPersistenceFilter$1.doFilter(GeoServerSecurityContextPersistenceFilter.java:52)
>>>>>>>>     at
>>>>>>>> org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)
>>>>>>>>     at
>>>>>>>> org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)
>>>>>>>>     at
>>>>>>>> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
>>>>>>>>     at
>>>>>>>> org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173)
>>>>>>>>     at
>>>>>>>> org.geoserver.security.GeoServerSecurityFilterChainProxy.doFilter(GeoServerSecurityFilterChainProxy.java:134)
>>>>>>>>     at
>>>>>>>> org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
>>>>>>>>     at
>>>>>>>> org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
>>>>>>>>     at
>>>>>>>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
>>>>>>>>     at
>>>>>>>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
>>>>>>>>     at
>>>>>>>> org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:75)
>>>>>>>>     at
>>>>>>>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
>>>>>>>>     at
>>>>>>>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
>>>>>>>>     at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:42)
>>>>>>>>     at
>>>>>>>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
>>>>>>>>     at
>>>>>>>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
>>>>>>>>     at
>>>>>>>> org.geoserver.filters.SessionDebugFilter.doFilter(SessionDebugFilter.java:47)
>>>>>>>>     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:220)
>>>>>>>>     at
>>>>>>>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
>>>>>>>>     at
>>>>>>>> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
>>>>>>>>     at
>>>>>>>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
>>>>>>>>     at
>>>>>>>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
>>>>>>>>     at
>>>>>>>> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
>>>>>>>>     at
>>>>>>>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
>>>>>>>>     at
>>>>>>>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
>>>>>>>>     at
>>>>>>>> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
>>>>>>>>     at
>>>>>>>> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
>>>>>>>>     at
>>>>>>>> org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:315)
>>>>>>>>     at
>>>>>>>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>>>>>>>>     at
>>>>>>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>>>>>>>>     at java.lang.Thread.run(Thread.java:745)
>>>>>>>> Caused by: 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.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.readLine(MultiThreadedHttpConnectionManager.java:1413)
>>>>>>>>     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.geonode.security.HTTPClient.sendGET(HTTPClient.java:70)
>>>>>>>>     at
>>>>>>>> org.geonode.security.DefaultSecurityClient.authenticate(DefaultSecurityClient.java:152)
>>>>>>>>     at
>>>>>>>> org.geonode.security.DefaultSecurityClient.authenticateAnonymous(DefaultSecurityClient.java:135)
>>>>>>>>     at
>>>>>>>> org.geonode.security.GeoNodeAuthenticationProvider.authenticate(GeoNodeAuthenticationProvider.java:48)
>>>>>>>>     ... 47 more
>>>>>>>>
>>>>>>>
>>>>>>> My question is, what geonode URI does geoserver use for
>>>>>>> authentication, so that I may check if it is being blocked somewhere?
>>>>>>> Thanks!
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Mon, Jan 18, 2016 at 4:45 PM, Ken Abryl Eleazar Salanio <
>>>>>>> kasalanio at dream.upd.edu.ph> wrote:
>>>>>>>
>>>>>>>> Hi, I've installed a development version of geonode and i'm running
>>>>>>>> the geoserver using tomcat 7. It worked for quite a while but I've recently
>>>>>>>> encountered this error and can't seem to debug it:
>>>>>>>>
>>>>>>>> --
>>>>>>>> Ken Abryl Eleazar S. Salanio
>>>>>>>>
>>>>>>>> *Computer Programmer III*
>>>>>>>> *Data Archiving and Distribution Component*
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Ken Abryl Eleazar S. Salanio
>>>>>>>
>>>>>>> *Computer Programmer III*
>>>>>>> *Data Archiving and Distribution Component*
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> geonode-devel mailing list
>>>>>>> geonode-devel at lists.osgeo.org
>>>>>>> http://lists.osgeo.org/mailman/listinfo/geonode-devel
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Simone
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Ken Abryl Eleazar S. Salanio
>>>>>
>>>>> *Computer Programmer III*
>>>>> *Data Archiving and Distribution Component*
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Simone
>>>>
>>>
>>>
>>>
>>> --
>>> Ken Abryl Eleazar S. Salanio
>>>
>>> *Computer Programmer III*
>>> *Data Archiving and Distribution Component*
>>>
>>
>>
>>
>> --
>> Ken Abryl Eleazar S. Salanio
>>
>> *Computer Programmer III*
>> *Data Archiving and Distribution Component*
>>
>
>
>
> --
> Ken Abryl Eleazar S. Salanio
>
> *Computer Programmer III*
> *Data Archiving and Distribution Component*
>



-- 
Ken Abryl Eleazar S. Salanio

*Computer Programmer III*
*Data Archiving and Distribution Component*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-devel/attachments/20160126/cfbd1ca6/attachment-0001.html>


More information about the geonode-devel mailing list