You are here

Hardcoded paths (/bin/ping)

10 posts / 0 new
Last post
huevo5050
Offline
Donator
Joined: 1 year
Last seen: 7 months
Hardcoded paths (/bin/ping)

Hi, i'm getting some problems with /bin/ping hardcoded path. I workaround it but I ignore if another hardcoded paths could appears in future.

Is there some chance that do you use binaries from the generic PATH variable?

Regards.

Blackbear199
Offline
Blackbear199's picture
WG++ Team memberDonator
Joined: 9 years
Last seen: 8 hours

/bin/ping?
webgrab doesnt use this path.

huevo5050
Offline
Donator
Joined: 1 year
Last seen: 7 months

Absolutely it does. Before license update. You can check yourself: run mono with --trace=ALL. I had an early "Object reference not set to an instance of an object" error. Traced it, get /bin/ping not found, copy iputils ping in /bin/ping path and then everything works.

Blackbear199
Offline
Blackbear199's picture
WG++ Team memberDonator
Joined: 9 years
Last seen: 8 hours

must be a distro thing,webgrab pings bing.com(i think) to check for a internet connection.
i just checked my nas and ping is located in /bin folder.
first i have ever seen this issue.
i wonder why its elsewhere for you?
according to what your saying if you opened a terminal and tried ping google.com it shouldnt work because it cant find the ping binary which makes no sense.
i think u have a distro problem.

huevo5050
Offline
Donator
Joined: 1 year
Last seen: 7 months

ping google.com in my distro works because the shell can found ping in my PATH, not necessarily in /bin. That's the point of my question: Could be possible that wg++ delegates the look of binaries path to PATH environment variable and not assume/hardcode a fixed path? Thanks for your fast replies. Regards.

Blackbear199
Offline
Blackbear199's picture
WG++ Team memberDonator
Joined: 9 years
Last seen: 8 hours

ok,i see what u mean now.
i will pass this along to the creator.
what linux distro are you using?

Blackbear199
Offline
Blackbear199's picture
WG++ Team memberDonator
Joined: 9 years
Last seen: 8 hours

one more quick quest.
have you tried V4.x or V5.x that use dotnet?
i assume this issue is there also?
V4.x needs dotnet 5.0 runtime libraries
V5.x needs dotnet 6.0 runtime libraries

V3.x are no longer being updated btw.

huevo5050
Offline
Donator
Joined: 1 year
Last seen: 7 months

Sounds great!! Thanks again.

I use NixOS. Is some different to other distros but introduces a lot of very interesting concepts. NixOS appart maybe you could be more interested in Nix standalone as a linux/darwin, OS agnostic, functional, package manager.

EDIT:

Well, I started with V5.0, then V4, finally go back to V3. But I have the same crash in the three. Finally I solved it in version 3 so I can assume that was same problem in all of them (not tested). I also stay in V3 because I encounter V5 and V4 distribution tar.gz some way incomplete (but because i;m not familiar with sw yet).

Blackbear199
Offline
Blackbear199's picture
WG++ Team memberDonator
Joined: 9 years
Last seen: 8 hours

talked to the creator,

private static bool IsConnectedToInternet()
{
string host = "bing.com";
bool result = false;
Ping p = new();
try
{
PingReply reply = p.Send(host, 3000);
if (reply.Status == IPStatus.Success)
return true;
}
catch { }
return result;
}

as u can see the code just calls the ping request.
i am guessing its mono searching for the ping binary in the /bin directory?
best suggestion i can think of is add a symbolic link for it.
as i mentioned above this issue has never been mentioned before and from other linux users.

huevo5050
Offline
Donator
Joined: 1 year
Last seen: 7 months

Hi thanks for your in-deep reply. It is clear that the fault is upstream. In any case i get finally to make it work running NixOs and also I developed a module to configure it as a service. I will debug it during some time and share here for Linux users who wants to use Nix Package Manager.

Log in or register to post comments

Brought to you by Jan van Straaten

Program Development - Jan van Straaten ------- Web design - Francis De Paemeleere
Supported by: servercare.nl