danielzzz / node-ping

a poor man's ping library (using udp scanning) for node
MIT License
332 stars 105 forks source link

Error: spawn EPERM on Pterodactyl Server #163

Open light2k4 opened 1 year ago

light2k4 commented 1 year ago

image

light2k4 commented 1 year ago

this is my code

const ping = require('ping')
const proxyPing = await ping.promise.probe("play.maskfr.org");
console.log(proxyPing.avg)
mondwan commented 1 year ago

Usually, for EPERM, it means you don't have sufficient permissions to run the ping command in your host.

Can you try whether you can run system ping locally in a terminal?

On Sun, 20 Aug 2023, 03:26 Азукиов, @.***> wrote:

this is my code

const ping = require('ping')const proxyPing = await ping.promise.probe("play.maskfr.org");console.log(proxyPing.avg)

— Reply to this email directly, view it on GitHub https://github.com/danielzzz/node-ping/issues/163#issuecomment-1685158106, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA5YBIYF7GQPNGLF2OHYYMTXWFYWJANCNFSM6AAAAAA3W6ZCE4 . You are receiving this because you are subscribed to this thread.Message ID: @.***>

light2k4 commented 1 year ago

I just ran the ping IP command via SSH and it works perfectly.

mondwan commented 1 year ago

How about the one running ping via nodejs?

As my guess, EPERM related to the permissions. As long as you can figured out which part got permission denied, you find the solution

On Sun, 20 Aug 2023, 11:38 Азукиов, @.***> wrote:

I just ran the ping IP command via SSH and it works perfectly.

— Reply to this email directly, view it on GitHub https://github.com/danielzzz/node-ping/issues/163#issuecomment-1685250375, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA5YBIZODMPWEWUZZYJG4K3XWHSI3ANCNFSM6AAAAAA3W6ZCE4 . You are receiving this because you commented.Message ID: @.***>

mondwan commented 1 year ago

One more thing you can look for, which is The path of the ping executable.

In this library, we expect the ping executable located in the default system path like /bin etc. If your host setup is a little bit different, you can configure the path yourself. Please take a look the document in the readme if you need to configure the path

On Sun, 20 Aug 2023, 11:41 Mond Wan, @.***> wrote:

How about the one running ping via nodejs?

As my guess, EPERM related to the permissions. As long as you can figured out which part got permission denied, you find the solution

On Sun, 20 Aug 2023, 11:38 Азукиов, @.***> wrote:

I just ran the ping IP command via SSH and it works perfectly.

— Reply to this email directly, view it on GitHub https://github.com/danielzzz/node-ping/issues/163#issuecomment-1685250375, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA5YBIZODMPWEWUZZYJG4K3XWHSI3ANCNFSM6AAAAAA3W6ZCE4 . You are receiving this because you commented.Message ID: @.***>