Connection between core node and relay node fail

Hi everyone!
I have learnt how to setup stake pool in this course https://cardano-foundation.gitbook.io/stake-pool-course/stake-pool-guide/stake-pool/corenode-start

I using Amazon EC2 to host there nodes. But when i run core node, it’s fail for relay node to connect to core node.

In relay node, it says :

[ip-172-3:cardano.node.IpSubscription:Info:165] [2021-07-07 10:51:30.10 UTC] IPs: 0.0.0.0:0 [52.0.169.106:3001] Trying to connect to 52.0.169.106:3001
[ip-172-3:cardano.node.IpSubscription:Notice:165] [2021-07-07 10:51:30.10 UTC] IPs: 0.0.0.0:0 [52.0.169.106:3001] Waiting 0.025s before attempting a new connection
[ip-172-3:cardano.node.IpSubscription:Info:14287] [2021-07-07 10:51:30.10 UTC] IPs: 0.0.0.0:0 [52.0.169.106:3001] Connection Attempt Start, destination 52.0.169.106:3001
[ip-172-3:cardano.node.IpSubscription:Notice:14287] [2021-07-07 10:51:30.10 UTC] IPs: 0.0.0.0:0 [52.0.169.106:3001] Connection Attempt End, destination 52.0.169.106:3001 outcome: ConnectSuccessLast
[ip-172-3:cardano.node.IpSubscription:Info:14287] [2021-07-07 10:51:30.14 UTC] IPs: 0.0.0.0:0 [52.0.169.106:3001] Closed socket to 52.0.169.106:3001
[ip-172-3:cardano.node.IpSubscription:Info:165] [2021-07-07 10:51:31.14 UTC] IPs: 0.0.0.0:0 [52.0.169.106:3001] Restarting Subscription after 1.045980199s desired valency 1 current valency 0

I think it needs to sync blockchain but nothing new. In core node , it’s failed too

[ip-172-3:cardano.node.LeadershipCheck:Info:793] [2021-07-07 10:47:09.01 UTC] {“credentials”:“Cardano”,“kind”:“TraceStartLeadershipCheck”,“delegMapSize”:1464,“slot”:31285613,“chainDensity”:3.4998138e-2,“utxoSize”:78469}
[ip-172-3:cardano.node.ForgeTime:Info:793] [2021-07-07 10:47:09.01 UTC] fromList
[ip-172-3:cardano.node.ForgeTime:Info:793] [2021-07-07 10:47:09.01 UTC] fromList
[ip-172-3:cardano.node.ForgeTime:Info:793] [2021-07-07 10:47:09.01 UTC] fromList
[ip-172-3:cardano.node.Forge:Error:793] [2021-07-07 10:47:09.01 UTC] fromList [(“credentials”,String “Cardano”),(“val”,Object (fromList [(“kind”,String “TraceNoLedgerView”),(“slot”,Number 3.1285613e7)]))]
[ip-172-3:cardano.node.ForgeTime:Info:793] [2021-07-07 10:47:09.01 UTC] fromList

This is the topology.json file in relay node:

{ “Producers”: [ { “addr” : “52.0.169.106”, “port” : 3001, “valency” : 1 }, { “addr”: “relays-new.cardano-testnet.iohkdev.io”, “port”: 3000, “continent”: “Europe”, “state”: “GB”, “valency” : 1 } ] }

And the topology.json file in core node:

{
“Producers”: [
{
“addr”: “3.225.159.56”,
“port”: 3001,
“valency”: 1
}
]
}

When I check connection between two node by telnet. It’s successed.

Please help me solve this problem!

Topology looks fine, let them sync first and check again.

I run the nodes again but it still failed

This message is from relay node :

[ip-172-3:cardano.node.IpSubscription:Error:496] [2021-07-07 12:37:22.28 UTC] IPs: 0.0.0.0:0 [52.0.169.106:3001] Application Exception: 52.0.169.106:3001 ExceededTimeLimit (ChainSync (Header (HardForkBlock (’: * ByronBlock (’: * (ShelleyBlock (ShelleyEra StandardCrypto)) (’: * (ShelleyBlock (ShelleyMAEra ‘Allegra StandardCrypto)) (’: * (ShelleyBlock (ShelleyMAEra ‘Mary StandardCrypto)) (’ *))))))) (Tip HardForkBlock (’: * ByronBlock (’: * (ShelleyBlock (ShelleyEra StandardCrypto)) (’: * (ShelleyBlock (ShelleyMAEra ‘Allegra StandardCrypto)) (’: * (ShelleyBlock (ShelleyMAEra ‘Mary StandardCrypto)) (’ *))))))) (ServerAgency TokNext TokMustReply)
[ip-172-3:cardano.node.ErrorPolicy:Notice:174] [2021-07-07 12:37:22.28 UTC] IP 52.0.169.106:3001 ErrorPolicySuspendConsumer (Just (ApplicationExceptionTrace ExceededTimeLimit (ChainSync (Header (HardForkBlock (’: * ByronBlock (’: * (ShelleyBlock (ShelleyEra StandardCrypto)) (’: * (ShelleyBlock (ShelleyMAEra ‘Allegra StandardCrypto)) (’: * (ShelleyBlock (ShelleyMAEra ‘Mary StandardCrypto)) (’ *))))))) (Tip HardForkBlock (’: * ByronBlock (’: * (ShelleyBlock (ShelleyEra StandardCrypto)) (’: * (ShelleyBlock (ShelleyMAEra ‘Allegra StandardCrypto)) (’: * (ShelleyBlock (ShelleyMAEra ‘Mary StandardCrypto)) (’ *))))))) (ServerAgency TokNext TokMustReply))) 20s

.This message is from core node :

[ip-172-3:cardano.node.LeadershipCheck:Info:157] [2021-07-07 12:32:50.00 UTC] {“credentials”:“Cardano”,“kind”:“TraceStartLeadershipCheck”,“delegMapSize”:1997,“slot”:31291954,“chainDensity”:2.9968629e-2,“utxoSize”:214072}
[ip-172-3:cardano.node.ForgeTime:Info:157] [2021-07-07 12:32:50.00 UTC] fromList
[ip-172-3:cardano.node.ForgeTime:Info:157] [2021-07-07 12:32:50.00 UTC] fromList
[ip-172-3:cardano.node.ForgeTime:Info:157] [2021-07-07 12:32:50.00 UTC] fromList
[ip-172-3:cardano.node.ForgeTime:Info:157] [2021-07-07 12:32:50.00 UTC] fromList

I run with this command :
relay node :

 cardano-node run \
 --topology testnet-topology.json \
 --database-path db \
 --socket-path db/node.socket \
 --host-addr 0.0.0.0 \
 --port 3001 \
 --config testnet-config.json\

core node :

cardano-node run
–topology testnet-topology.json
–database-path ./db
–socket-path ./db/node.socket
–host-addr 0.0.0.0
–port 3001
–config testnet-config.json
–shelley-kes-key kes.skey
–shelley-vrf-key vrf.skey
–shelley-operational-certificate node.cert

Both run commands seem correct. Your topology files are correct.
Are your nodes fully synced?