Hi, I hope you can help. I am quite new to Talend and am trying to use the connection for Google Analytics. I have created all the relevant connections in Google Developer Console and have added the service email address to my Google Analytics account but can't seem to get any data back, just a time out error. Any advice would be appreciated. Thanks Starting job GoogleAnalytics at 17:25 04/12/2015.
connecting to socket on port 3773 connected WARN:Got error:connect timed out INFO:Retry request in 1000ms WARN:Got error:connect timed out ERROR:All repetition of requests failed:connect timed out Exception in component tGoogleAnalyticsInput_1 java.net.SocketTimeoutException: connect timed out at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source) at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source) at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source) at java.net.AbstractPlainSocketImpl.connect(Unknown Source) at java.net.PlainSocketImpl.connect(Unknown Source) at java.net.SocksSocketImpl.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at sun.security.ssl.SSLSocketImpl.connect(Unknown Source) at sun.net.NetworkClient.doConnect(Unknown Source) at sun.net.www.http.HttpClient.openServer(Unknown Source) at sun.net.www.http.HttpClient.openServer(Unknown Source) at sun.net.www.protocol.https.HttpsClient.<init>(Unknown Source) at sun.net.www.protocol.https.HttpsClient.New(Unknown Source) at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source) at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(Unknown Source) at com.google.api.client.http.javanet.NetHttpRequest.execute(NetHttpRequest.java:77) at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:972) at com.google.api.client.auth.oauth2.TokenRequest.executeUnparsed(TokenRequest.java:283) at com.google.api.client.auth.oauth2.TokenRequest.execute(TokenRequest.java:307) at com.google.api.client.googleapis.auth.oauth2.GoogleCredential.executeRefreshToken(GoogleCredential.java:384) at com.google.api.client.auth.oauth2.Credential.refreshToken(Credential.java:489) at com.google.api.client.auth.oauth2.Credential.intercept(Credential.java:217) at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:859) at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:419) at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:352) at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:469) at de.jlo.talendcomp.googleanalytics.GoogleAnalyticsInput.doExecute(GoogleAnalyticsInput.java:446) at de.jlo.talendcomp.googleanalytics.GoogleAnalyticsInput.executeDataQuery(GoogleAnalyticsInput.java:383) at de.jlo.talendcomp.googleanalytics.GoogleAnalyticsInput.executeQuery(GoogleAnalyticsInput.java:434) at local_project.googleanalytics_0_1.GoogleAnalytics.tGoogleAnalyticsInput_1Process(GoogleAnalytics.java:1195) at local_project.googleanalytics_0_1.GoogleAnalytics.runJobInTOS(GoogleAnalytics.java:1642) at local_project.googleanalytics_0_1.GoogleAnalytics.main(GoogleAnalytics.java:1487) disconnected Job GoogleAnalytics ended at 17:26 04/12/2015.
Hi, Is your network Ok with you? Can you connect to Google Analytics successfully without using Talend Tool? The tGoogleAnalyticsInput is a custom component written by Talend community user and shared on Talend Exchange. Feel free to contact to the author jan.lolling directly. Best regards Sabrina
-- Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Hi, Is this post has been solved? If yes, how did you solve it? I encountered exactly the same error.I double checked my network and I can access the internet. I also adjusted the time so that they are in sync with GA server but no luck. Any advice would be appreciated. Regards, Cris
Hi Jaafer, the problem is not caused by the component, you have a network problem. The URLs are fix defined within the API classes and therefore it is also not a configuration problem on your side. Please try to ping this server: www.googleapis.com Please also take care you have no disturbing firewall configuration. Sometimes - especially in companies you have to setup a proxy. If you need to setup a proxy in your job please use the components tSetProxy.
Hi jlolling, Thank you for replying. I tried to ping : www.googleapis.com but I cant he told me request timed out. As you have said I'm in companies and I'll try to use the tSetProxy component. If this is the solution I'll tell you. Best Regards, jaafer
This is a typical situation. The next problem could happen in companies is sometimes, they do not allow transparent https connections and their proxy decrypt the content and encrypt it with a self made certificate. This is a terrible practice and allow the company to read what users send in encrypted channels. In such a case you have to import the company certificate in the java trust store - but you cannot be sure it will work.
Hi jlolling, I configured the tSetProxy and used my company proxy parameters. When I run the job I get this error : sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target Maybe we are using a none trusted certification ? Best regards, jaafer
Yes, you are right, that is exactly what I told you. Your company uses a https proxy and replace the original certificate with a company certificate - obviously a self signed one without binding to a real root certificate. You have to download this and install it on a trust store. Unfortunately my component doe not provide the settings to use an trust store. Use the component tSetKeystore to establish a keystore.
Hi jlolling, So I should download our self signed certificate and install it in a truststore or add it to the JVM keystore which is under my folder : C:\Program Files\Java\jdk......\jre\lib\security\cacerts. Because maybe I didn't understand well the tSetkeyStore component in which I should provide him with trustStore and keystore. Thank you again for your help. Best Regards, jaafer
Hi all, I want to say that I resolved this problem. So I wanted to share it: first you need to configure the component tSetProxy with the informations of your proxy server. If you're using a self signed certificate like me so you need to add it to the JVM keystore : download your certificate and I used a software called portecle-1.9 to add it to my JVM keystore you'll find it here : C:\Program Files\Java\jdk......\jre\lib\security\cacerts. Finally just restart talend and that's all and I want to thank jlolling again for his nice components. Best Regards, jaafer