Connecting to api.cerotrade.cl failed: Failed to directly connect: error trying to connect: tcp connect error: deadline has elapsed

Good day everyone,
I am trying to deploy my app to the mainnet, connecting to an API (just your average express, nginx, api, here is the repository https://github.com/Cero-Trade/API-CeroTrade).

Everything is working fine locally, I can access the api normally with Postman and I can ping the app with this ipv6 tester:

PING api.cerotrade.cl(2600:1f16:b33:c700:f175:4526:83db:bafb (2600:1f16:b33:c700:f175:4526:83db:bafb)) 56 data bytes
64 bytes from 2600:1f16:b33:c700:f175:4526:83db:bafb (2600:1f16:b33:c700:f175:4526:83db:bafb): icmp_seq=1 ttl=54 time=21.8 ms
64 bytes from 2600:1f16:b33:c700:f175:4526:83db:bafb (2600:1f16:b33:c700:f175:4526:83db:bafb): icmp_seq=2 ttl=54 time=21.1 ms
64 bytes from 2600:1f16:b33:c700:f175:4526:83db:bafb (2600:1f16:b33:c700:f175:4526:83db:bafb): icmp_seq=3 ttl=54 time=21.2 ms

— api.cerotrade.cl ping statistics —
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 21.114/21.370/21.793/0.300 ms

However, when trying to call the register method through the the mainnet I get this error:

rror: Call was rejected:
Request ID: 6cffb78e3b6d7f4d3072e0809d6c5caf1f7725fafd922af05b13a2dfa6e807ad
Reject code: 4
Reject text: Connecting to api.cerotrade.cl failed: Failed to directly connect: error trying to connect: tcp connect error: deadline has elapsed

Does anyone know what could be up?

This error means that the API connection has timed out. Yes, this error is most common when the domain is not IPv6 compatible.

It does not look like Cerotrade.cl is IPv6 compatible. Can you please check again?

I created api in a google cloud because they support IPV6, and from the google cloud I forward to the IPV4 api. Do not forget the idemponetncy when POSTING.

cerotrade.cl is not, api.cerotrade.cl is! according to this webpage atleast: PlainProxies - IPv6 Compatibility Checker

Both the domain and subdomain need to be on IPv6.

1 Like

I’ll try this out, thanks!

Hey, so I am still getting the same error, even though my domain is now IPv6 supported. Any ideas on what else could be up?

I can get back to you. Do you intend to make the repo public? Or do you have the HTTP Outcalls code snippet?

Just made it public, thanks for the heads up! Also our project repo is public GitHub - Cero-Trade/mvp1.0: Primera versión del MVP en Motoko por el Cero Team.

1 Like