TrustedChain and MCC Integration
Configure an MCC node to send messages to the TrustedChain MQTT broker.
Overview#
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.
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/nullEdit 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.txtRestart the MCC node:
sudo systemctl restart mccCreate a Tunnel to TrustedChain#
Prepare 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 tcmqttIf the command succeeds, it will print two endpoint IDs like this:
server endpoint: f1t5y0mkhvw2s8nyrz7xbsa9jgmj0z38c6tr3drexs1wewjwdz0g
client endpoint: scmhygm53q3wkwpy82pnwn4915cth86dhrvy8mrrejtg905dpvegTry to Resolve TrustedChain Address#
Now the tunnel is created, you can try to resolve TrustedChain tcmqtt.staex address:
getent hosts tcmqtt.staexThe 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.