简体   繁体   中英

java.net.SocketTimeoutException: Read timed out on WSO2 Identity Server OAuth Token Validation

When trying to OAuth Token Validation of LDAP user from WSO2 ESB to WSO2 IS the following error has occured at ESB some times.

    {org.apache.axis2.transport.http.HTTPSender} -  Unable to sendViaPost to url
    [https://identityserver.com/services/OAuth2TokenValidationService] 
    {org.apache.axis2.transport.http.HTTPSender} java.net.SocketTimeoutException: 
    Read timed out

The OAuth Token validation succesfully worked First few times after server start and after the above error occures.

What will be the reason for above error? How can fix this?

Update

The identity server logs shows the following error at the same time.

 TID: [0] [IS] [2013-12-19 05:04:52,904] ERROR {java.lang.Class} - 
 Access Denied. Failed authorization attempt to access service 'OAuth2TokenValidationService' operation 'validate' by 'LDAP/admin' {java.lang.Class}
    TID: [0] [IS] [2013-12-19 05:04:52,904] ERROR {org.apache.axis2.engine.AxisEngine} -  Access Denied. {org.apache.axis2.engine.AxisEngine}
    org.apache.axis2.AxisFault: Access Denied.
        at org.wso2.carbon.server.admin.module.handler.AuthorizationHandler.doAuthorization(AuthorizationHandler.java:124)
        at org.wso2.carbon.server.admin.module.handler.AuthorizationHandler.invoke(AuthorizationHandler.java:88)
        at org.apache.axis2.engine.Phase.invokeHandler(Phase.java:340)
        at org.apache.axis2.engine.Phase.invoke(Phase.java:313)
        at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:261)
        at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:167)
        at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172)

Why this Access Denied error some times. It succesfully login some other times.??

According to the error, it seems to be that ESB can not send the message to following url. Sometimes this service takes much time to response back to the ESB (more than 30s). Then we can guess, issue may be in the WSO2IS side.. Could you can see any error or any logs in WSO2IS side? If not, could you enable debug logs in the WSO2IS and see. you can use log4j.properties file for that. If it is late to response, by looking at the time stamp in the log4j logs, we can get some idea on where the bottleneck has happened.

https://identityserver.com/services/OAuth2TokenValidationService

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM