Page 2 of 2 FirstFirst 12
Results 11 to 18 of 18

Thread: Facing Connection Issue while OAuth dance

  1. #11
    Join Date
    Feb 2012
    Posts
    23

    Default

    Code:
    org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:424) ~[org.springframework.web.servlet-3.1.0.RELEASE.jar:3.1.0.RELEASE]
    	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:900) [org.springframework.web.servlet-3.1.0.RELEASE.jar:3.1.0.RELEASE]
    	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:827) [org.springframework.web.servlet-3.1.0.RELEASE.jar:3.1.0.RELEASE]
    	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882) [org.springframework.web.servlet-3.1.0.RELEASE.jar:3.1.0.RELEASE]
    	at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778) [org.springframework.web.servlet-3.1.0.RELEASE.jar:3.1.0.RELEASE]
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) [javax.servlet_1.0.0.0_2-5.jar:2.5]
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) [javax.servlet_1.0.0.0_2-5.jar:2.5]
    	at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227) [weblogic.jar:10.3.0.0]
    	at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125) [weblogic.jar:10.3.0.0]
    	at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292) [weblogic.jar:10.3.0.0]
    	at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26) [weblogic.jar:10.3.0.0]
    	at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42) [weblogic.jar:10.3.0.0]
    	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:366) [org.springframework.security.web-3.0.4.RELEASE.jar:3.0.4.RELEASE]
    	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109) [org.springframework.security.web-3.0.4.RELEASE.jar:3.0.4.RELEASE]
    	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83) [org.springframework.security.web-3.0.4.RELEASE.jar:3.0.4.RELEASE]
    	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378) [org.springframework.security.web-3.0.4.RELEASE.jar:3.0.4.RELEASE]
    	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97) [org.springframework.security.web-3.0.4.RELEASE.jar:3.0.4.RELEASE]
    	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378) [org.springframework.security.web-3.0.4.RELEASE.jar:3.0.4.RELEASE]
    	at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:100) [org.springframework.security.web-3.0.4.RELEASE.jar:3.0.4.RELEASE]
    	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378) [org.springframework.security.web-3.0.4.RELEASE.jar:3.0.4.RELEASE]
    	at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:78) [org.springframework.security.web-3.0.4.RELEASE.jar:3.0.4.RELEASE]
    	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378) [org.springframework.security.web-3.0.4.RELEASE.jar:3.0.4.RELEASE]
    	at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:35) [org.springframework.security.web-3.0.4.RELEASE.jar:3.0.4.RELEASE]
    	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378) [org.springframework.security.web-3.0.4.RELEASE.jar:3.0.4.RELEASE]
    	at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:187) [org.springframework.security.web-3.0.4.RELEASE.jar:3.0.4.RELEASE]
    	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378) [org.springframework.security.web-3.0.4.RELEASE.jar:3.0.4.RELEASE]
    	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79) [org.springframework.security.web-3.0.4.RELEASE.jar:3.0.4.RELEASE]
    	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378) [org.springframework.security.web-3.0.4.RELEASE.jar:3.0.4.RELEASE]
    	at org.springframework.security.web.access.channel.ChannelProcessingFilter.doFilter(ChannelProcessingFilter.java:109) [org.springframework.security.web-3.0.4.RELEASE.jar:3.0.4.RELEASE]
    	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378) [org.springframework.security.web-3.0.4.RELEASE.jar:3.0.4.RELEASE]
    	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:167) [org.springframework.security.web-3.0.4.RELEASE.jar:3.0.4.RELEASE]
    	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346) [org.springframework.web-3.1.0.RELEASE.jar:3.1.0.RELEASE]
    	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259) [org.springframework.web-3.1.0.RELEASE.jar:3.1.0.RELEASE]
    	at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42) [weblogic.jar:10.3.0.0]
    	at uk.co.airmiles.web.utils.filter.CheckSessionCookieEnabledFilter.doFilter(CheckSessionCookieEnabledFilter.java:61) [web-utils-2.0-SNAPSHOT.jar:na]
    	at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42) [weblogic.jar:10.3.0.0]
    	at uk.co.airmiles.web.utils.filter.BookingJourneyFlowFilter.doFilter(BookingJourneyFlowFilter.java:91) [web-utils-2.0-SNAPSHOT.jar:na]
    	at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42) [weblogic.jar:10.3.0.0]
    	at uk.co.airmiles.web.utils.filter.LogDiagnosticContextFilter.doFilter(LogDiagnosticContextFilter.java:49) [web-utils-2.0-SNAPSHOT.jar:na]
    	at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42) [weblogic.jar:10.3.0.0]
    	at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3496) [weblogic.jar:10.3.0.0]
    	at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) [com.bea.core.weblogic.security.identity_1.1.0.0.jar:1.1.0.0]
    	at weblogic.security.service.SecurityManager.runAs(Unknown Source) [com.bea.core.weblogic.security.wls_1.0.0.0_5-0-2-0.jar:5.0.2.0]
    	at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180) [weblogic.jar:10.3.0.0]
    	at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086) [weblogic.jar:10.3.0.0]
    	at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406) [weblogic.jar:10.3.0.0]
    	at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201) [com.bea.core.weblogic.workmanager_1.4.0.0.jar:1.4.0.0]
    	at weblogic.work.ExecuteThread.run(ExecuteThread.java:173) [com.bea.core.weblogic.workmanager_1.4.0.0.jar:1.4.0.0]
    Caused by: org.apache.http.conn.HttpHostConnectException: Connection to https://graph.facebook.com refused
    	at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:127) ~[httpclient-4.0.jar:4.0]
    Last edited by habuma; Feb 20th, 2012 at 03:16 PM.

  2. #12
    Join Date
    Feb 2012
    Posts
    23

    Default

    Code:
    at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:147) ~[httpclient-4.0.jar:4.0]
    	at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:101) ~[httpclient-4.0.jar:4.0]
    	at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:381) ~[httpclient-4.0.jar:4.0]
    	at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:641) ~[httpclient-4.0.jar:4.0]
    	at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:576) ~[httpclient-4.0.jar:4.0]
    	at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:554) ~[httpclient-4.0.jar:4.0]
    	at org.springframework.social.support.HttpComponentsClientHttpRequest.executeInternal(HttpComponentsClientHttpRequest.java:81) ~[spring-social-core-1.0.0.RELEASE.jar:na]
    	at org.springframework.social.support.AbstractBufferingClientHttpRequest.executeInternal(AbstractBufferingClientHttpRequest.java:48) ~[spring-social-core-1.0.0.RELEASE.jar:na]
    	at org.springframework.http.client.AbstractClientHttpRequest.execute(AbstractClientHttpRequest.java:49) ~[org.springframework.web-3.1.0.RELEASE.jar:3.1.0.RELEASE]
    	at org.springframework.http.client.InterceptingClientHttpRequest$RequestExecution.execute(InterceptingClientHttpRequest.java:91) ~[org.springframework.web-3.1.0.RELEASE.jar:3.1.0.RELEASE]
    	at org.springframework.social.oauth2.OAuth2RequestInterceptor.intercept(OAuth2RequestInterceptor.java:45) ~[spring-social-core-1.0.0.RELEASE.jar:na]
    	at org.springframework.http.client.InterceptingClientHttpRequest$RequestExecution.execute(InterceptingClientHttpRequest.java:81) ~[org.springframework.web-3.1.0.RELEASE.jar:3.1.0.RELEASE]
    	at org.springframework.http.client.InterceptingClientHttpRequest.executeInternal(InterceptingClientHttpRequest.java:67) ~[org.springframework.web-3.1.0.RELEASE.jar:3.1.0.RELEASE]
    	at org.springframework.http.client.AbstractBufferingClientHttpRequest.executeInternal(AbstractBufferingClientHttpRequest.java:46) ~[org.springframework.web-3.1.0.RELEASE.jar:3.1.0.RELEASE]
    	at org.springframework.http.client.AbstractClientHttpRequest.execute(AbstractClientHttpRequest.java:49) ~[org.springframework.web-3.1.0.RELEASE.jar:3.1.0.RELEASE]
    	at org.springframework.social.support.BufferingClientHttpRequest.executeInternal(BufferingClientHttpRequest.java:57) ~[spring-social-core-1.0.0.RELEASE.jar:na]
    	at org.springframework.social.support.AbstractBufferingClientHttpRequest.executeInternal(AbstractBufferingClientHttpRequest.java:48) ~[spring-social-core-1.0.0.RELEASE.jar:na]
    	at org.springframework.http.client.AbstractClientHttpRequest.execute(AbstractClientHttpRequest.java:49) ~[org.springframework.web-3.1.0.RELEASE.jar:3.1.0.RELEASE]
    	at org.springframework.http.client.InterceptingClientHttpRequest$RequestExecution.execute(InterceptingClientHttpRequest.java:91) ~[org.springframework.web-3.1.0.RELEASE.jar:3.1.0.RELEASE]
    	at org.springframework.social.oauth2.OAuth2RequestInterceptor.intercept(OAuth2RequestInterceptor.java:45) ~[spring-social-core-1.0.0.RELEASE.jar:na]
    	at org.springframework.http.client.InterceptingClientHttpRequest$RequestExecution.execute(InterceptingClientHttpRequest.java:81) ~[org.springframework.web-3.1.0.RELEASE.jar:3.1.0.RELEASE]
    	at org.springframework.http.client.InterceptingClientHttpRequest.executeInternal(InterceptingClientHttpRequest.java:67) ~[org.springframework.web-3.1.0.RELEASE.jar:3.1.0.RELEASE]
    	at org.springframework.http.client.AbstractBufferingClientHttpRequest.executeInternal(AbstractBufferingClientHttpRequest.java:46) ~[org.springframework.web-3.1.0.RELEASE.jar:3.1.0.RELEASE]
    	at org.springframework.http.client.AbstractClientHttpRequest.execute(AbstractClientHttpRequest.java:49) ~[org.springframework.web-3.1.0.RELEASE.jar:3.1.0.RELEASE]
    	at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:438) ~[org.springframework.web-3.1.0.RELEASE.jar:3.1.0.RELEASE]
    	... 61 common frames omitted
    Caused by: java.net.ConnectException: Connection timed out: connect
    	at java.net.PlainSocketImpl.socketConnect(Native Method) ~[na:1.6.0_05]
    	at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) ~[na:1.6.0_05]
    	at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195) ~[na:1.6.0_05]
    	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) ~[na:1.6.0_05]
    	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) ~[na:1.6.0_05]
    	at java.net.Socket.connect(Socket.java:519) ~[na:1.6.0_05]
    	at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:550) ~[na:1.6]
    	at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:333) ~[httpclient-4.0.jar:4.0]
    	at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:123) ~[httpclient-4.0.jar:4.0]
    	... 86 common frames omitted
    Can you make out now what the issue can be????
    Last edited by habuma; Feb 20th, 2012 at 03:17 PM.

  3. #13
    Join Date
    Feb 2012
    Posts
    23

    Default

    Hi Sir,

    I customized several spring files to run in Debug mode to find exact point of error.

    Following error i recieved :
    Code:
    Class : SimpleClientHttpRequest (of spring framework)
    protected ClientHttpResponse executeInternal(HttpHeaders headers, ByteArrayOutputStream byteArrayOutputStream) throws IOException {
    		for (Map.Entry<String, List<String>> entry : headers.entrySet()) {
    			String headerName = entry.getKey();
    			for (String headerValue : entry.getValue()) {
    				this.connection.addRequestProperty(headerName, headerValue);
    			}
    		}
    		this.connection.connect();
    		if (byteArrayOutputStream.toByteArray().length > 0) {
    			FileCopyUtils.copy(byteArrayOutputStream.toByteArray(), connection.getOutputStream());
    		}
    		return new SimpleClientHttpResponse(this.connection);
    	}
    
    My code terminates at line : this.connection.connect(); giving an error :
    com.sun.jdi.InternalException : Get error code in reply :35 occured retrieving 'this' from stack frame
    
    Other logs for your reference :
    sessionId=L4qTPBCJbpFpqFCFc1pLdpzjJNZ1Hd6QpZxhpQMzR1bbpkqVWWnF!1870199365!1329709673343 - Enter checkExecuted
    2012-02-20 04:00:49,288 [[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'] - DEBUG xxx.web.mvc.controller.facebook.CustomSimpleClientHttpRequest sessionId=L4qTPBCJbpFpqFCFc1pLdpzjJNZ1Hd6QpZxhpQMzR1bbpkqVWWnF!1870199365!1329709673343 - Exit checkExecuted
    2012-02-20 04:00:49,288 [[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'] - DEBUG xxx.web.mvc.controller.facebook.CustomSimpleClientHttpRequest sessionId=L4qTPBCJbpFpqFCFc1pLdpzjJNZ1Hd6QpZxhpQMzR1bbpkqVWWnF!1870199365!1329709673343 - Enter executeInternal
    2012-02-20 04:00:49,725 [[STUCK] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] - DEBUG xxx.web.mvc.controller.facebook.CustomSimpleClientHttpRequest sessionId=L4qTPBCJbpFpqFCFc1pLdpzjJNZ1Hd6QpZxhpQMzR1bbpkqVWWnF!1870199365!1329709673343 - Exception thrown in executeInternal: java.net.ConnectException: Tried all: 1 addresses, but could not connect over HTTPS to server: graph.facebook.com port: 443
    2012-02-20 04:00:49,725 [[STUCK] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] - DEBUG xxx.web.mvc.controller.facebook.CustomSimpleClientHttpRequest sessionId=L4qTPBCJbpFpqFCFc1pLdpzjJNZ1Hd6QpZxhpQMzR1bbpkqVWWnF!1870199365!1329709673343 - Exception thrown in execute: java.net.ConnectException: Tried all: 1 addresses, but could not connect over HTTPS to server: graph.facebook.com port: 443
    2012-02-20 04:00:49,725 [[STUCK] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] - DEBUG xxx.web.mvc.controller.facebook.CustomRestTemplate sessionId=L4qTPBCJbpFpqFCFc1pLdpzjJNZ1Hd6QpZxhpQMzR1bbpkqVWWnF!1870199365!1329709673343 - Exception thrown in doExecute: org.springframework.web.client.ResourceAccessException: I/O error: Tried all: 1 addresses, but could not connect over HTTPS to server: graph.facebook.com port: 443; nested exception is java.net.ConnectException: Tried all: 1 addresses, but could not connect over HTTPS to server: graph.facebook.com port: 443
    2012-02-20 04:00:49,725 [[STUCK] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] - WARN  xxx.web.mvc.controller.facebook.CustomConnectController sessionId=L4qTPBCJbpFpqFCFc1pLdpzjJNZ1Hd6QpZxhpQMzR1bbpkqVWWnF!1870199365!1329709673343 - Exception while handling OAuth2 callback (I/O error: Tried all: 1 addresses, but could not connect over HTTPS to server: graph.facebook.com port: 443; nested exception is java.net.ConnectException: Tried all: 1 addresses, but could not connect over HTTPS to server: graph.facebook.com port: 443). Redirecting to facebook connection status page.
    Please help me Sir. Its 6 days, I am struck with this issue

    Waiting for your reply... Thanks
    Last edited by habuma; Feb 20th, 2012 at 03:18 PM.

  4. #14
    Join Date
    Aug 2004
    Posts
    1,099

    Default

    Well, the things in that long stack trace (the one where you're fetching friends with a hard-coded access token) that stand out to me are the parts that say "java.net.ConnectException: Connection timed out: connect" and "Caused by: org.apache.http.conn.HttpHostConnectException: Connection to https://graph.facebook.com refused". This tells me that there was some some trouble connecting to https://graph.facebook.com. But why? I don't know.

    My guess is that whatever it is would also be the cause of the problem you originally described.

    Connection problems like that could be a number of things. You might get that if graph.facebook.com is down--not likely, although it has happened a few times. More likely there's a network problem on your end that prevents your app from accessing https://graph.facebook.com. Could be a proxy issue, or some goofy DNS issue...there's no way for me to know for sure.

    But let's try a simple test to diagnose it. Try running the following 3 lines of code (in a main method or test method):

    Code:
    RestTemplate rest = new RestTemplate();
    String result = rest.getForObject("https://graph.facebook.com/738140579", String.class);
    System.out.println(result);
    Ideally, run this from the same machine you were getting the errors from. If this is a network problem as I suspect, you should get a similar exception from these 3 lines as you got from your app. If not, then you should see a few bits of info from my Facebook profile.
    Craig Walls
    Spring Social Project Lead

  5. #15
    Join Date
    Feb 2012
    Posts
    23

    Default

    Thanks a lot Sir, I will be checking this & post the result on this thread. Personally, I also came to this conclusion yesterday.

    One observation. When you asked me running spring-social-shocase project on my system, I wasent able to do so as I was facing some build issues.
    Anyhow, when I tried running the spring-social-showcase at my home, I was able to run it successfully, whereas when I tried that running in this env & ran on Tomcat server, co-incidencely I got the same error message "I/O error, connection timed out" & that too after getting the user verification, means while getting access token. SO it seems this should solve my issue.

    If not, I will again get back to you.

    Thanks a lot sir for your help

  6. #16
    Join Date
    Feb 2012
    Posts
    23

    Default

    Thanks a lot Craig for your help. Its confirmed that it was a network issue.

    Spring Social rocks like all other flavors of spring.

  7. #17
    Join Date
    Aug 2004
    Posts
    1,099

    Default

    I'm glad you sorted it out. Even more happy that it wasn't a problem in Spring Social. :-) And I'm even happier that you think Spring Social rocks.
    Craig Walls
    Spring Social Project Lead

  8. #18
    Join Date
    Feb 2012
    Posts
    23

    Default

    Sir,

    It makes me also proud to say Spring rocks... Last to last year, i cleared Core Spring Certification when I had started leaning spring. Now using many flavors of it & closely watching its beauty, I am a fan of it.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •