TrustedChain and MCC integration
The TrustedChain MQTT broker is accessible only within the MCC network. You must run an MCC node to send messages to TrustedChain. Follow the steps below to configure your MCC node.
Install the MCC node
Install the MCC node following the quick start guide.
Share your network certificate
Contact Staex engineers and share your network certificate. Your can find it in CAS on the network page.
Please wait until the confirmation to proceed.
Add TrustedChain network to your MCC node
Create a file containing TrustedChain network certificate:
echo "hEg1B8QjhWbGfHbd1DN7+WngsYhSZ4vJPz9RZWYFmIYD/NouM8UB++gD++gDeqHCzPsmaMK+iA24qlbsLSJQQnG7DBSSLvNxpV8bM6pgcldcqCkmyf/zqsl1wMiEVR7DjqRt8BnMrguO8FyMBA==" | sudo tee /etc/mcc/network-certificate-tc.txt > /dev/null
Edit your MCC node configuration file /etc/mcc/mcc.conf
and add the following line:
network-certificates = /etc/mcc/network-certificate.txt, /etc/mcc/network-certificate-tc.txt
Restart the MCC node:
sudo systemctl restart mcc
Create a tunnel to TrustedChain
Preparare your network private key (it was shown to you in CAS during the network creation), and run the following command:
sudo mcc create-tunnel --remote-node twtyk66sdkk4rve3v9rpatgbrrd92715tzvspgg4fpjtg6gb9c90 --role client --name tcmqtt
If the command succeeds, it will print two endpoint IDs like this:
server endpoint: f1t5y0mkhvw2s8nyrz7xbsa9jgmj0z38c6tr3drexs1wewjwdz0g
client endpoint: scmhygm53q3wkwpy82pnwn4915cth86dhrvy8mrrejtg905dpveg
Try to resolve TrustedChain address
Now the tunnel is created, you can try to resolve TrustedChain tcmqtt.staex
address:
getent hosts tcmqtt.staex
The command should print an IP address like 10.83.0.5
.
You can connect to TrustedChain MQTT broker using internal MCC network.
Troubleshooting
- Verify that the MCC node is running:
sudo systemctl status mcc
- Verify that the MCC config contains a parent and a certificate:
parents = public.staex.io
network-certificates = /etc/mcc/network-certificate.txt, /etc/mcc/network-certificate-tc.txt
- Inspect the MCC logs for any errors:
sudo journalctl -u mcc
- Contact Staex engineers.