I keep getting a ‘connection refused’ error when I try to connect to my algorand node (running on Ubuntu 18.04) over my LAN.
So far I have…
- Checked $ALGORAND_DATA/algod.net to find the API endpoint (Running on 8080)
- Copied the API key from $ALGORAND_DATA/algod.token to my code
- Opened port 8080 for all incoming connections
- Ensured that algod was listening on 8080 using sudo netstat -tulpn
const algosdk = require(‘algosdk’);
const algodToken = ‘API Key’;
const algodServer = ‘http://LAN IP’;
const algodPort = 8080;
const algodClient = new algosdk.Algodv2(algodToken, algodServer, algodPort);
(async () => {
let status = await algodClient.status().do(); console.log('Algorand node status: %o', status);
})();
I am stuck and not sure what to do next to troubleshoot my problem, any advice is much appreciated?