Corda V2.0创建新交易时出现消息重试超限问题求助
Let’s dive into the issue you’re facing: your sender node hits max retries when sending a transaction, the receiver confirms the attachment was stored but has no transaction processing logs, and none of your 3 Raft notaries show any trace of the transaction. Here are targeted steps to diagnose and resolve this:
1. Validate Peer Connectivity & Transaction Routing
- First, confirm the sender node has the correct address for the receiver (
internal.peers.4qWch9xxxV). Run this in the Corda shell to check network parameters:
Make sure the receiver’s node ID is properly listed in the peers or notaries section (depending on your network setup).run networkParameters - Test direct network connectivity between sender and receiver on the Corda P2P port (default 10002) using:
If this fails, work with your ops team to unblock ports or fix DNS/resolution issues.nc -zv <receiver-node-ip> 10002
2. Investigate Attachment vs. Transaction Payload Mismatch
The receiver gets the attachment but no transaction logs—this suggests the transaction payload might not have been bundled correctly, or the receiver discarded it before processing:
- On the sender, verify the transaction was built with the correct attachment. List attachments via the shell and cross-reference the hash with your transaction builder code:
run listAttachments - Enable debug logging for the receiver’s messaging component by adding this to
log4j2.xml:
This will show detailed incoming message logs, including why the transaction payload might have been rejected.<Logger name="net.corda.node.messaging" level="DEBUG"/>
3. Audit Raft Notary Cluster Integration
Since none of the notaries have the transaction, it likely never reached the cluster or notary selection failed:
- Ensure your transaction builder uses the Raft notary service ID, not an individual node ID. In code, fetch the notary like this:
val notary = serviceHub.networkMapCache.notaryIdentities.first { it.name.organisation == "YourRaftNotaryService" } - Check the sender’s logs for errors related to
NotarySelectionServiceorRaftNotaryClient—these will indicate if notary selection failed. - Verify the Raft cluster is healthy by running this on any notary node:
Confirm all 3 nodes are inrun raftClusterStatusFOLLOWERorLEADERstate, with no ongoing leader election issues.
4. Check Message Redelivery & Deduplication
The sender’s warning mentions _AMQ_DUPL_ID, so message duplication handling might be interfering:
- Review the sender’s
node.conffor custom redelivery/deduplication settings. Temporarily revertmessaging.redelivery.max-retriesto the default (3) if you’ve modified it. - Check the receiver’s Artemis broker logs (
logs/artemis.log) for entries linked to message IDdd1d6efb-dd71-4d34-9686-fecdb8d72671—this will show if the message was rejected due to invalid payload, missing permissions, or broker-level issues.
5. Validate Permissions & Flow Logic
- Ensure both sender and receiver nodes have the necessary permissions to send/receive transactions. Double-check the
permissionssection in theirnode.conffiles. - If using a custom flow, verify you’re correctly calling
send()orinitiateFlow()for both the receiver and notary. A missing flow initiation step could prevent the transaction from reaching intended parties.
After working through these steps, you should be able to narrow down whether the issue stems from network blocks, payload errors, cluster health, or flow logic gaps. If you uncover specific log snippets or errors, feel free to share them for deeper analysis!
内容的提问来源于stack exchange,提问作者Javier Garcia Lozano

