Staex logostaexDocs
Docs/TrustedChain and MCC Integration

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.

Share Your Network Certificate#

Contact Staex engineers and share your network certificate. You can find it in CAS (https://cas.staex.io) 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:

bash
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:

shell
network-certificates = /etc/mcc/network-certificate.txt, /etc/mcc/network-certificate-tc.txt

Restart the MCC node:

bash
sudo systemctl restart mcc

Create 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:

bash
sudo mcc create-tunnel --remote-node twtyk66sdkk4rve3v9rpatgbrrd92715tzvspgg4fpjtg6gb9c90 --role client --name tcmqtt

If the command succeeds, it will print two endpoint IDs like this:

shell
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:

bash
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#

  1. Verify that the MCC node is running: sudo systemctl status mcc
  2. Verify that the MCC config contains a parent and a certificate:
shell
parents = public.staex.io
network-certificates = /etc/mcc/network-certificate.txt, /etc/mcc/network-certificate-tc.txt
  1. Inspect the MCC logs for any errors: sudo journalctl -u mcc
  2. Contact Staex engineers.