Unable to connect to the API

Hi,

Since the last week, our application cannot connect to the API using the same credentials and binaries as before.

This is a text of exception thrown by the network library:

A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 34.251.108.72:443

Are there any issues with the API servers or network connectivity? Is it online?

On 11th November our services moved to cloud servers.
If you are accessing our services based on IP address, they will be incorrect.
Please use name based addresses.
Is 34.251.108.72 your IP address? as I cannot find it in our logs.

The application is configured to access the API by the following URL: https://api.companieshouse.gov.uk.

I suppose, the IP address in the error message is a target host (API server) which is resolved by the domain name api.companieshouse.gov.uk.

The api has been working great but yesterday noticed the same issue as @Andrew_.
I have an Azure WebApp and it fails to connect to “https://api.companieshouse.gov.uk” although tested it locally with the same settings and it works. My CompaniesHouse application doesn’t have an ip restriction and also I don’t seem to have any firewall restriction in my Azure WebApp.
I was wondering if you are noticing any issue on your side.
Thanks

If you do an nslookup on api.companieshouse.gov.uk
you should get back 3 addresses
Currently they are :-
Address: 54.229.199.149
Address: 52.18.255.89
Address: 52.49.184.15

Can you perform an nslookup from your server that is running your application and ensure that your application is actually attempting to connect to us?

@MArkWilliams my app is trying to connect to 52.18.255.89.

@ian_cox Ian Are you using Azure to host your application, because we have found that we have exactly the same issue when accessing companies house api from the azure hosts.

@mark_hargreaves yes I am, but I have tried 2 different hosts with the same rest call and one works and the one I mention above doesn’t.

@MArkWilliams Could you check if there an issue between Azure and the Amazon Cloud (where you are hosting the api). Or have the Azure IP’s been firewalled? We are having similar issues to @ian_cox, see http://forum.aws.chdev.org/t/api-timed-out-from-azure-vm/1518

A number of IP address have been banned from accessing our services as they were ignoring our fair use policy.
If you would like to provide me with the IP addresses of your servers that cannot connect, I will check to see if they have been banned.

@MArkWilliams should be this one 51.140.180.76.
Is this a temporary ban or effective?

Temporary.
I have emailed you directly.

Thanks @MArkWilliams

Hi @MArkWilliams, having the same issues as the guys above, would you have a contact email to get in touch directly?

@MArkWilliams the outbound IPs of the application are the following:
51.140.180.76,51.140.191.115,51.140.176.159,51.140.176.11,51.140.185.39,51.140.177.87,51.140.185.119,51.140.188.39,51.140.188.241,51.140.183.68,51.140.184.173

For those, who want to check their IPs, do not mix a virtual IP which can be used for DNS configuration and outbound IPs for cases like this (How do I determine the outbound IP addresses of my Azure App Service).

I also tried to issue some request to the API from my local computer with the same configuration and they were processed without any issues. Two application instances on Azure in different regions still experience the same problem.

all 51.140 addresses were unbanned this morning at approx 10:30am.

1 Like

Hi,

On doing nslookup from our server we are getting 3 below IP’s
52.48.159.167;
52.210.25.47;
34.251.100.101

Do we have any other IP’s to be whitelisted from our side to connect to this service?

Thanks and Regards,
Selva

Hi @MArkWilliams We are currently integrating with Companies House and getting very similar errors from our development environment, but are able to make successful calls from other environments.
IT support on our side has advised that we should not have a firewall blocking the connection on our side.
Is it please possible to check if the address 172.30.103.125 has been banned from making calls?