SSL connection could not be established

Hello guys. I cant seem to figure out what is the problem here. I am doing GetSellerList Ebay API call. I have it in parallel for each but i can assure you I am not going over the limits. After like 10-40 calls i get this error:

Http client: The SSL connection could not be established, see inner exception.
System.Net.WebException: The SSL connection could not be established, see inner exception. ---> System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception. ---> System.Security.Authentication.AuthenticationException: Authentication failed because the remote party sent a TLS alert: 'IllegalParameter'. ---> System.ComponentModel.Win32Exception: The message received was unexpected or badly formatted.
	--- End of inner exception stack trace ---
   at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](Boolean receiveFirst, Byte[] reAuthenticationData, CancellationToken cancellationToken)
   at System.Net.Http.ConnectHelper.EstablishSslConnectionAsync(SslClientAuthenticationOptions sslOptions, HttpRequestMessage request, Boolean async, Stream stream, CancellationToken cancellationToken)
	--- End of inner exception stack trace ---
   at System.Net.Http.ConnectHelper.EstablishSslConnectionAsync(SslClientAuthenticationOptions sslOptions, HttpRequestMessage request, Boolean async, Stream stream, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(QueueItem queueItem)
   at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
   at System.Net.Http.AuthenticationHelper.SendWithAuthAsync(HttpRequestMessage request, Uri authUri, Boolean async, ICredentials credentials, Boolean preAuthenticate, Boolean isProxyAuth, Boolean doRequestAuth, HttpConnectionPool pool, CancellationToken cancellationToken)
   at System.Net.Http.DiagnosticsHandler.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.DecompressionHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
   at System.Net.HttpWebRequest.SendRequest(Boolean async)
   at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
	--- End of inner exception stack trace ---
   at UiPath.Web.Activities.HttpClient.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
   at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

Could someone please help me identify the problem? I am stuck on it for 2 weeks now and cant seem to figure it out :smiley: Thanks

I don’t really know about the eBay API, so I’m sort of swinging in the dark, but is it the kind of API where you first authenticate and then get a token to use for subsequent API calls? Maybe the token expires and then you get the connection issue.

1 Like

Double-check that your system trusts the certificate presented by eBay’s server. You might need to install any missing root certificates or intermediate certificates

refer to eBay’s API documentation for any specific requirements or limitations regarding TLS connections

@Povilas_Jonikas you can connect ebay support teat

https://developer.ebay.com/support/kb-article?KBid=5113

https://developer.ebay.com/develop/apis/api-call-limits

1 Like

@Povilas_Jonikas

How many parallel calls it can take with same auth key? Is there any linit or time limit?

It might be that a timelimit is there for the token

Cheers

1 Like

Hello @postwick and thanks for the response. Yes, it is that kind of an API call, but I monitor the API key expiration date and its not the problem. The workflow that i get the error takes around 40 minutes time to finish, the key lasts for 2 hours. I renew the key everytime i start the workflow.

Thanks @mukesh.singh for the answer. How could i check if my system trusts the certificate? Can you please explain? Thanks :slight_smile:

Thanks @Anil_G for the answer. It can make 300 api calls in 15 second interval. The thing is that i never go over 300. Even tho my workflow works in a loop. But lets say it makes 70 api calls. Then does deserializing activities, waits 15 seconds with a delay activity and go to other api call makings

The thing is that my workflow does the API calls as it should, but lets say about 3000 api calls in it throws the error with the SSL problems. I checked, that with the API i am using, i can make 2 million calls a day. There is just a time period, 300 api calls in 15 seconds. I can assure you guys I am not going over the limit

@Povilas_Jonikas

Try without parallel for each may be parallel calls is creating a problem

cheers

1 Like

You see, the thing is, that without parallel for each, the workflow completion time would go up dramatically and I cant let it happen. Could I replace it with something else to save time?

@Povilas_Jonikas

I understand …but is it working without parallel for each?

if yes then the throttle limits are hitting…practically they would be much less than the given limits…becasue of parallel api calls the api might block responses thingking it is a malware

so in parallel for each try to send less number of calls by segrregating them into chunks

cheers

@Povilas_Jonikas

Hi ,You mentioned 300 api calls in 15 seconds . Could u please try by increasing the time period of sending the api calls , I mean something higher than 15 seconds .