Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

http://${targetIP}/peers requests are timing out for ips mentioned in network.js #11

Open
llk23r opened this issue Feb 15, 2024 · 1 comment

Comments

@llk23r
Copy link

llk23r commented Feb 15, 2024

let cores = config.array('cores', ['3.142.136.148', '18.118.26.31', '3.133.161.241', '18.220.31.138', '3.145.43.113'])
has the following ips mentioned:
['3.142.136.148', '18.118.26.31', '3.133.161.241', '18.220.31.138', '3.145.43.113']

And the requests to http://${targetIP}/peers are failing where targetIP is one of the above IPs.

The following script:

const axios = require('axios');
const _ = require('lodash');
const IP_ADDRESSES = ["3.142.136.148", "18.118.26.31", "3.133.161.241", "18.220.31.138", "3.145.43.113"];
const TOTAL_ATTEMPTS = 100;

async function testRandomPeerEndpoints() {
  let successCount = 0, failureCount = 0;
  for (let i = 0; i < TOTAL_ATTEMPTS; i++) {
    const randomIp = _.sample(IP_ADDRESSES);
    try {
      console.log(`Attempt ${i + 1}: Testing ${randomIp}...`);
      await axios.get(`http://${randomIp}/peers`, {timeout: 30000}); // 30 seconds timeout
      console.log(`Success for ${randomIp}`);
      successCount++;
    } catch (error) {
      console.log(`Failed for ${randomIp}: `, error.message);
      failureCount++;
    }
  }
  console.log(`\nSummary: ${successCount} successes, ${failureCount} failures out of ${TOTAL_ATTEMPTS} attempts.`);
}

testRandomPeerEndpoints();

Produces the following result:
Screenshot 2024-02-15 at 7 43 55 PM

None of the IPs seem to be responding 😕
Please share if I'm doing something incorrectly here. Many thanks!

@fatelgit
Copy link

Same here. Seems like the project is dead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants