I am getting the below error when I am trying to access the Twitter data through Streaming. I am not sure the root cause for it. I am using Filechannel to download the data from Twitter.
16/08/03 11:15:00 ERROR twitter.TwitterSource: Exception while streaming tweets
404:The URI requested is invalid or the resource requested, such as a user, does not exist.
Unknown URL. See Twitter Streaming API documentation at htp://dev.twitter.com/pages/streaming_api
Relevant discussions can be found on the Internet at:
htp://www.google.co.jp/search?q=ec814753 or
htp://www.google.co.jp/search?q=0a74cca1
TwitterException{exceptionCode=[ec814753-0a74cca1], statusCode=404, retryAfter=-1, rateLimitStatus=null, featureSpecificRateLimitStatus=null, version=2.2.6}
at twitter4j.internal.http.HttpClientImpl.request(HttpClientImpl.java:185)
at twitter4j.internal.http.HttpClientWrapper.request(HttpClientWrapper.java:65)
at twitter4j.internal.http.HttpClientWrapper.get(HttpClientWrapper.java:93)
at twitter4j.TwitterStreamImpl.getSampleStream(TwitterStreamImpl.java:160)
at twitter4j.TwitterStreamImpl$4.getStream(TwitterStreamImpl.java:149)
at twitter4j.TwitterStreamImpl$4.getStream(TwitterStreamImpl.java:147)
at twitter4j.TwitterStreamImpl$TwitterStreamConsumer.run(TwitterStreamImpl.java:426)
16/08/03 11:15:00 INFO twitter4j.TwitterStreamImpl: Establishing connection.
16/08/03 11:15:01 INFO twitter4j.TwitterStreamImpl: 404:The URI requested is invalid or the resource requested, such as a user, does not exist.
Unknown URL. See Twitter Streaming API documentation at htp://dev.twitter.com/pages/streaming_api
16/08/03 11:15:01 INFO twitter4j.TwitterStreamImpl: Waiting for 20000 milliseconds
16/08/03 11:15:21 ERROR twitter.TwitterSource: Exception while streaming tweets
404:The URI requested is invalid or the resource requested, such as a user, does not exist.
Unknown URL. See Twitter Streaming API documentation at htp://dev.twitter.com/pages/streaming_api
Relevant discussions can be found on the Internet at:
htp://www.google.co.jp/search?q=ec814753 or
htp://www.google.co.jp/search?q=0a74cca1
TwitterException{exceptionCode=[ec814753-0a74cca1], statusCode=404, retryAfter=-1, rateLimitStatus=null, featureSpecificRateLimitStatus=null, version=2.2.6}
at twitter4j.internal.http.HttpClientImpl.request(HttpClientImpl.java:185)
at twitter4j.internal.http.HttpClientWrapper.request(HttpClientWrapper.java:65)
at twitter4j.internal.http.HttpClientWrapper.get(HttpClientWrapper.java:93)
at twitter4j.TwitterStreamImpl.getSampleStream(TwitterStreamImpl.java:160)
at twitter4j.TwitterStreamImpl$4.getStream(TwitterStreamImpl.java:149)
at twitter4j.TwitterStreamImpl$4.getStream(TwitterStreamImpl.java:147)
at twitter4j.TwitterStreamImpl$TwitterStreamConsumer.run(TwitterStreamImpl.java:426)
16/08/03 11:15:21 INFO twitter4j.TwitterStreamImpl: Establishing connection.
16/08/03 11:15:23 INFO twitter4j.TwitterStreamImpl: 404:The URI requested is invalid or the resource requested, such as a user, does not exist.
Unknown URL. See Twitter Streaming API documentation at htp://dev.twitter.com/pages/streaming_api
16/08/03 11:15:23 INFO twitter4j.TwitterStreamImpl: Waiting for 40000 milliseconds
You need to verify the below fieldsbefore starting flume
TwitterAgent.sources.Twitter.consumerKey =
TwitterAgent.sources.Twitter.consumerSecret =
TwitterAgent.sources.Twitter.accessToken =
TwitterAgent.sources.Twitter.accessTokenSecret =
It is possible that the credentials are expired. Regenerate the access token and try again.
Related
I am using WSO2 for token generation. By using this console: https://localhost:9443/carbon/admin/login.jsp
I am calling http://localhost:9763**/oauth2/token** service by passing required parameters
<{username=[], password=[], grant_type=[password], client_id=[], client_secret=[], scope=[]},[Content-Type:"application/x-www-form-urlencoded"]> after 20th request its failing and giving below error.
{ErrorMessage: I/O error on POST request for "http://192.168.200.83:9763/oauth2/token": Connection reset; nested exception is java.net.SocketException: Connection reset.}
How can I increase the number of requests to be served from 20 to 50 or more?
We're having a Keycloak with the realm socialBetaTest when I try to initate the Client Initiated Account Linking with the following URL (link with twitter):
https://socialBeta.maio290.de/auth/realms/socialBetaTest/broker/twitter/link?client_id=frontend&redirect_uri=https://localhost:4200/&nonce=someString&hash=someHash
I am getting the following error in my KeyCloak stdout:
WARN [org.keycloak.events] (default task-42) type=CLIENT_INITIATED_ACCOUNT_LINKING_ERROR, realmId=social, clientId=frontend, userId={properUserID}, ipAddress=x.x.x.x, error=invalid_token, redirect_uri=https://localhost:4200/, username={someEmailAddress}
What I notice here, they realm isn't the proper one, why is it called "social" and not "socialBetaTest"? And why is the token invalid, when it was issued (iss in the JWT) by socialBetaTest? Since we don't provide the token by any parameter, I guess it's reading the token out from the cookie and/or local storage.
Does anyone know how to fix this issue?
When I send a comments thread. List request to the YouTube API
I get the following exception "But not for all videos":
Google.GoogleApiException: Google.Apis.Requests.RequestError
The API server failed to successfully process the request.
While this can be a transient error, it usually indicates that the requests input is invalid. Check the structure of the commentThread resource in the request body to ensure that it is valid. [400].
And for those videos I double checked the inputs sent with the request and I
make the request with the same data directly from the YouTube API requests trial section but everything goes right!
I want to know why this request becomes valid on some video ID's but invalid on the others ?
I'll appreciate any help.
Here is the full written log: System.AggregateException: One or more errors occurred. ---> Google.GoogleApiException: Google.Apis.Requests.RequestError
The API server failed to successfully process the request. While this can be a transient error, it usually indicates that the requests input is invalid. Check the structure of the commentThread resource in the request body to ensure that it is valid. [400]
Errors [
Message[The API server failed to successfully process the request. While this can be a transient error, it usually indicates that the requests input is invalid. Check the structure of the commentThread resource in the request body to ensure that it is valid.] Location[body - other] Reason[processingFailure] Domain[youtube.commentThread]
]
at Microsoft.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at Microsoft.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccess(Task task)
at Google.Apis.Requests.ClientServiceRequest`1.d__0.MoveNext() in c:\ApiaryDotnet\default\Src\GoogleApis\Apis\Requests\ClientServiceRequest.cs:line 0
--- End of inner exception stack trace ---
CommentThreads.list API doesn't need a request body as indicated in the API reference
Request body
Do not provide a request body when calling this method.
This may have caused the RequestError on your call. Try to remove any objects passed when calling this API, hopefully this would fix the issue.
I am stuck in something which i thought it is gonna be a very easy one.
I am trying to setup a Mule flow to connect with Salesforce and get OAUTH token.
<flow>
<sfdc:config-with-oauth consumerKey="thatgirliscute" consumerSecret="nosheishOT" doc:name="Salesforce (OAuth)" name="Salesforce__OAuth_" connectionTimeout="10000" readTimeout="10000">
<sfdc:oauth-callback-config domain="localhost" localPort="8081" path="callback"/>
</sfdc:config-with-oauth>
<flow name="salesforce-oauthFlow1" doc:name="salesforce-oauthFlow1">
<http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8081" doc:name="HTTP"/>
<sfdc:authorize accessTokenUrl="https://login.salesforce.com/services/oauth2/token" authorizationUrl="https://login.salesforce.com/services/oauth2/authorize" config-ref="Salesforce__OAuth_" display="PAGE" doc:name="Authorize at Salesforce"/>
</flow>
But I get an error message saying 'Unable to fetch access token. Message payload is of type: String'
Message : Unable to fetch access token. Message payload is of type: String
Code : MULE_ERROR--2
--------------------------------------------------------------------------------
Exception stack is:
1. Connection timed out: connect (java.net.ConnectException)
java.net.PlainSocketImpl:-2 (null)
2. Error found while consuming http resource at https://login.salesforce.com/services/oauth2/token (java.lang.RuntimeException)
org.mule.security.oauth.util.HttpUtilImpl:93 (null)
3. Unable to fetch access token. Message payload is of type: String (org.mule.api.MessagingException)
org.mule.security.oauth.processor.OAuth2FetchAccessTokenMessageProcessor:91 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/MessagingException.html)
--------------------------------------------------------------------------------
Root Exception stack trace:
java.net.ConnectException: Connection timed out: connect
Any pointers to resolve is of great help. thanks
-- EDIT : I am behind a corporate firewall - does it matters ? But i am able to successfully do the basic authentication with Salesforce connector. Only OAuTH is leading to a problem.
When i type in localhost:8081 i get redirected to
https://ap1.salesforce.com/setup/secur/RemoteAccessAuthorizationPage.apexp?source=l86Hcy6qEKtWNqzXVErZDlmcRQs0D_HBE55Mqtm_Al6fTUPSfuQ%3D%3D&display=page&sdtd=1
and then redirected automatically to below URL with error 'Unable to fetch access token. Message payload is of type: String' in the browser and the console reads as i have posted above.
http://localhost:8081/callback?display=page&code=aPrxaSyVmC8fBbfefEfQB5xrKXrrRhK3DiVFrPu5ia0Q%3D%3D&state=%3C%3CMULE_EVENT_ID%3D0-546bdbb1-0095-11e5-9fcb-2c4138b080c9%3E%3E
This was a bug in Mule and the Salesforce Connector 6.2 resolves it.
I am using YouTube API v3 for uploading video using Java API Client
I am getting following error several times - Although video is uploaded on YouTube-
IOException
javax.net.ssl.SSLException: Read error: ssl=0x79899a18: I/O error during system call, Connection timed out
at com.android.org.conscrypt.NativeCrypto.SSL_read(Native Method)
at com.android.org.conscrypt.OpenSSLSocketImpl$SSLInputStream.read(OpenSSLSocketImpl.java:689)
at java.io.BufferedInputStream.fillbuf(BufferedInputStream.java:168)
at java.io.BufferedInputStream.read(BufferedInputStream.java:227)
at com.android.okhttp.internal.Util.readAsciiLine(Util.java:316)
at com.android.okhttp.internal.http.RawHeaders.fromBytes(RawHeaders.java:308)
at com.android.okhttp.internal.http.HttpTransport.readResponseHeaders(HttpTransport.java:135)
at com.android.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java:644)
at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:347)
at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:296)
at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:503)
at com.android.okhttp.internal.http.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:136)
at com.google.api.client.http.javanet.NetHttpResponse.<init>(NetHttpResponse.java:36)
at com.google.api.client.http.javanet.NetHttpRequest.execute(NetHttpRequest.java:94)
at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:965)
at com.google.api.client.googleapis.media.MediaHttpUploader.executeCurrentRequestWithoutGZip(MediaHttpUploader.java:545)
at com.google.api.client.googleapis.media.MediaHttpUploader.resumableUpload(MediaHttpUploader.java:417)
at com.google.api.client.googleapis.media.MediaHttpUploader.upload(MediaHttpUploader.java:336)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:418)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:343)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:460)
at com.nexstreaming.sdk2.nexsns.Youtube$5.doInBackground(Youtube.java:475)
at com.nexstreaming.sdk2.nexsns.Youtube$5.doInBackground(Youtube.java:1)
at android.os.AsyncTask$2.call(AsyncTask.java:288)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:841)
How can I fix it ?
That could be related to a known bug
https://code.google.com/p/gdata-issues/issues/detail?id=5700