Avatar

API Authentication Error

1

Hello,

 

We are getting an error for specific GeoTab clients when trying to authenticate with their corresponding API credentials. We are using C#. The exact error message returned from GeoTab is:

 

System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: An attempt was made to access a socket in a way forbidden by its access permissions 23.251.151.228:443

There is already an existing ticket in the system but without resolution.

Vesko

Please sign in to leave a comment.

12 comments

0
Avatar

Hi Vesko,

Please update to the latest nuget package and see if that works. 1801 is rather old.

Rafael Nazareno 0 votes
0
Avatar

After we updated GeoTab Checkmate ObjectModel to the latest version 5.7.1901 and Geotab.Reflection to 5.7.1702 including all other associated controls we are still receiving the same exact error as before, though this time there is more information:

Rapid_Apps_Service.TaskGeoTabTripLogException: Error in GeoTab Trip Log Task ---> System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: An attempt was made to access a socket in a way forbidden by its access permissions 23.251.151.228:443
at System.Net.Sockets.Socket.InternalEndConnect(IAsyncResult asyncResult)
at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)

Please note that this error is happening to only 1 customer now: Central CP, whose GeoTab db name is: ccp

All other customers of ours are properly working

Vesko 0 votes
0
Avatar

You shouldn't need Geotab.Reflection nuget package as of version 1703. It was rolled into a single package (Geotab.Checkmate ObjectModel). You can remove that dependency.

Have you checked to see if any changes were made to your internal network around the time the error started? (firewalls, proxy, etc)

Steve Hansen 0 votes
0
Avatar

Thank you.

We've had this error all along from the very beginning we started using the GeoTab API. Nothing has been changed since. What is weird is that it consistently happens to only 3 out of 30 customers and we do not understand why. All other 27 GeoTab databases are operating and connecting properly when we authenticate. is there something in particular depending on where their databases are located or routed to?

 

Firstly, I would like to get clarity from you on what this specific message means and what could be causing it, so that we can begin to investigate solutions.

Vesko 0 votes
0
Avatar

Interestingly enough, if we try to authenticate from another server to those GeoTab databases we do not get this error. So, maybe the problem is routing related?

Vesko 0 votes
0
Avatar

OK, so after further investigation with out Internet host, it was confirmed that 2 of your Google Cloud IP addresses that are hosting your API are blocking our calling server: auth2.rapidappsinc.com with IP Address: 67.227.152.32.

The 2 IPs that are blocking our server are: 

my119.geotab.com (23.251.151.228)

my16.geotab.com (23.251.157.131)

So, please try to unblock our server from those 2 IP addresses and the problem will go away.

Let us know when it is done.

Vesko 0 votes
0
Avatar

Our Dev-Ops and Security teams have both looked and found nothing that should be blocking your requests to 23.251.151.228:443 or 23.251.157.131:443 on our end.

Steve Hansen 0 votes
1
Avatar

Just wanted to let you know that this issue is resolved. It appeared that our internal firewall had a blocking rule for a specific geographical zone that was causing this issue. We have modified it to allow your IP addresses. 

 

Thanks for your help and feedback.

Vesko 1 vote