1 Reply Latest reply: May 21, 2013 11:57 PM by Nelash Jindal RSS

    Getting  *Failed external authentication*  while integrating with facebook

    Nelash Jindal
      Hi,

      I am trying to integrate my app with facebook but i am getting Failed external authentication error.

      Can anybody tell why I am getting this error.

      Here are the logs:

      013-05-21 15:21:10,819 [http-bio-8090-exec-2] ERROR com.fatwire.cos.sso.external.dispatcher.ExternalInfrastructureImpl - Cannot return content by URL https://graph.facebook.com/oauth/access_token?client_id=171456803019530&client_secret=5bec0d20e7a7856d1467fca8ba085c2a&code=AQAeDVMGCehAajbja22j7tbn1BS8opjNSlQu1Am8g999Job-u3KJr_7uqkNptycmc9q5mIG2zWw9S-P4NMeBGBLivDVTCo6aC8_mSwsE7HyJkzqyBUf872HblCiNXMbEqgc8GbDf6IrEzEa8DNPaNQPiQdQmJVdosJKlt0mdEf3_iR47iC9wKmFpyvSAp1IgdW_6xDW5A-yMAal61lCzrV1eeAQNR_SiTd08T6UaJKws24c1VyICyMMwyA3kg8zz-bLc126Tr6aSaFu90HXesn62cNpEP6wOrFHhJwlIJPElw-6SRY31xX9f9AHadKh5s1c&redirect_uri=http%3A%2F%2F10.180.57.81%3A8090%2Fcos%2Fexternal-auth%2Ffacebook-share%2F
      java.net.ConnectException: Connection timed out: connect
           at java.net.PlainSocketImpl.socketConnect(Native Method)
           at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
           at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
           at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
           at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
           at java.net.Socket.connect(Socket.java:529)
           at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:559)
           at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:141)
           at sun.net.NetworkClient.doConnect(NetworkClient.java:163)
           at sun.net.www.http.HttpClient.openServer(HttpClient.java:394)
           at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)
           at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:272)
           at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:329)
           at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:172)
           at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:911)
           at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:158)
           at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1172)
           at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:234)
           at com.fatwire.cos.sso.external.dispatcher.ExternalInfrastructureImpl.getURLContent(ExternalInfrastructureImpl.java:165)
           at com.fatwire.cos.sso.external.dispatcher.facebook.ShareProcessor.getAccessToken(ShareProcessor.java:112)
           at com.fatwire.cos.sso.external.dispatcher.facebook.ShareProcessor.processRequest(ShareProcessor.java:56)
           at com.fatwire.cos.sso.external.dispatcher.ExternalAuthenticatorImpl.authenticate(ExternalAuthenticatorImpl.java:43)
           at com.fatwire.cos.sso.external.dispatcher.ExternalAuthDispatcher.processAuthenticationRequest(ExternalAuthDispatcher.java:70)
           at com.fatwire.cos.sso.external.dispatcher.supportservlet.ExternalAuthDispatcherServlet.doGet(ExternalAuthDispatcherServlet.java:38)
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
           at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:263)
           at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:178)
           at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91)
           at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:62)
           at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168)
           at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
           at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168)
           at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
           at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168)
           at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
           at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168)
           at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
           at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168)
           at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
           at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168)
           at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
           at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168)
           at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
           at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168)
           at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
           at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168)
           at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
           at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168)
           at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
           at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168)
           at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
           at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168)
           at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
           at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168)
           at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
           at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168)
           at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
           at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168)
           at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
           at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168)
           at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
           at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168)
           at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
           at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168)
           at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
           at com.fatwire.cos.comments.service.filters.RestFilter.doFilter(RestFilter.java:141)
           at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163)
           at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
           at com.fatwire.cos.core.i18n.ResourceFilter.doFilter(ResourceFilter.java:45)
           at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163)
           at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
           at com.fatwire.cos.core.sso.SSOContextFilter.doFilter(SSOContextFilter.java:64)
           at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163)
           at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
           at com.fatwire.wem.sso.cas.filter.CASFilter.doFilter(CASFilter.java:509)
           at com.fatwire.wem.sso.SSOFilter.doFilter(SSOFilter.java:51)
           at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163)
           at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
           at com.fatwire.cos.core.sso.GeneralPreparationsFilter.doFilter(GeneralPreparationsFilter.java:68)
           at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163)
           at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
           at com.fatwire.cos.core.util.web.StartupGuardFilter.doFilter(StartupGuardFilter.java:42)
           at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163)
           at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
           at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118)
           at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
           at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
           at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
           at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
           at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
           at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
           at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
           at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
           at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
           at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
           at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
           at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
           at java.lang.Thread.run(Thread.java:662)
      2013-05-21 15:21:10,831 [http-bio-8090-exec-2] ERROR com.fatwire.cos.sso.external.dispatcher.ExternalAuthDispatcher - Failed external authentication
      java.lang.RuntimeException: java.lang.RuntimeException: java.net.ConnectException: Connection timed out: connect
           at com.fatwire.cos.sso.external.dispatcher.facebook.ShareProcessor.processRequest(ShareProcessor.java:92)
           at com.fatwire.cos.sso.external.dispatcher.ExternalAuthenticatorImpl.authenticate(ExternalAuthenticatorImpl.java:43)
           at com.fatwire.cos.sso.external.dispatcher.ExternalAuthDispatcher.processAuthenticationRequest(ExternalAuthDispatcher.java:70)
           at com.fatwire.cos.sso.external.dispatcher.supportservlet.ExternalAuthDispatcherServlet.doGet(ExternalAuthDispatcherServlet.java:38)
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
           at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:263)
           at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:178)
           at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91)
           at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:62)
           at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168)
           at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
           at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168)
           at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
           at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168)
           at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
           at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168)
           at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
           at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168)
           at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
           at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168)
           at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
           at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168)
           at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
           at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168)
           at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
           at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168)
           at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
           at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168)
           at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
           at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168)
           at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
           at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168)
           at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
           at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168)
           at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
           at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168)
           at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
           at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168)
           at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
           at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168)
           at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
           at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168)
           at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
           at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168)
           at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
           at com.fatwire.cos.comments.service.filters.RestFilter.doFilter(RestFilter.java:141)
           at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163)
           at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
           at com.fatwire.cos.core.i18n.ResourceFilter.doFilter(ResourceFilter.java:45)
           at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163)
           at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
           at com.fatwire.cos.core.sso.SSOContextFilter.doFilter(SSOContextFilter.java:64)
           at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163)
           at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
           at com.fatwire.wem.sso.cas.filter.CASFilter.doFilter(CASFilter.java:509)
           at com.fatwire.wem.sso.SSOFilter.doFilter(SSOFilter.java:51)
           at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163)
           at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
           at com.fatwire.cos.core.sso.GeneralPreparationsFilter.doFilter(GeneralPreparationsFilter.java:68)
           at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163)
           at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
           at com.fatwire.cos.core.util.web.StartupGuardFilter.doFilter(StartupGuardFilter.java:42)
           at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163)
           at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
           at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118)
           at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
           at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
           at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
           at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
           at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
           at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
           at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
           at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
           at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
           at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
           at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
           at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
           at java.lang.Thread.run(Thread.java:662)
      Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection timed out: connect
           at com.fatwire.cos.sso.external.dispatcher.ExternalInfrastructureImpl.getURLContent(ExternalInfrastructureImpl.java:177)
           at com.fatwire.cos.sso.external.dispatcher.facebook.ShareProcessor.getAccessToken(ShareProcessor.java:112)
           at com.fatwire.cos.sso.external.dispatcher.facebook.ShareProcessor.processRequest(ShareProcessor.java:56)
           ... 82 more
      Caused by: java.net.ConnectException: Connection timed out: connect
           at java.net.PlainSocketImpl.socketConnect(Native Method)
           at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
           at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
           at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
           at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
           at java.net.Socket.connect(Socket.java:529)
           at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:559)
           at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:141)
           at sun.net.NetworkClient.doConnect(NetworkClient.java:163)
           at sun.net.www.http.HttpClient.openServer(HttpClient.java:394)
           at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)
           at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:272)
           at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:329)
           at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:172)
           at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:911)
           at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:158)
           at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1172)
           at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:234)
           at com.fatwire.cos.sso.external.dispatcher.ExternalInfrastructureImpl.getURLContent(ExternalInfrastructureImpl.java:165)


      Any help will be highly appreciated.

      Thanks,
      Nelash Jindal