Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #39638
| Path | csiph.com!aioe.org!.POSTED.5Avcpu9drOe6MAssky6/+Q.user.gioia.aioe.org!not-for-mail |
|---|---|
| From | Arne Vajhøj <arne@vajhoej.dk> |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: InetAddress.isReachable() ? |
| Date | Fri, 23 Oct 2020 13:14:36 -0400 |
| Organization | Aioe.org NNTP Server |
| Lines | 20 |
| Message-ID | <rmv31v$vvl$1@gioia.aioe.org> (permalink) |
| References | <rmv1lf$pmq$1@dont-email.me> |
| NNTP-Posting-Host | 5Avcpu9drOe6MAssky6/+Q.user.gioia.aioe.org |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8; format=flowed |
| Content-Transfer-Encoding | 8bit |
| X-Complaints-To | abuse@aioe.org |
| User-Agent | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 |
| Content-Language | en-US |
| X-Notice | Filtered by postfilter v. 0.9.2 |
| Xref | csiph.com comp.lang.java.programmer:39638 |
Show key headers only | View raw
On 10/23/2020 12:50 PM, Knute Johnson wrote: > InetAddress.isReachable() only works if I run Java as root. Any idea > how to make it work with a regular user? The docs say "A typical > implementation will use ICMP ECHO REQUESTs if the privilege can be > obtained". I'm assuming that's why it won't work as a regular user. Is it worth it? The method can return false and the service you want to use can be available (firewall blocking ICMP and Echo but not application protocol). The method can return true and the service you want to use can be unavailable (OS running but server application down). I think you would be better of connecting to the service you want to use and handle errors there. Arne
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
InetAddress.isReachable() ? Knute Johnson <knute2020@585ranch.com> - 2020-10-23 11:50 -0500
Re: InetAddress.isReachable() ? Arne Vajhøj <arne@vajhoej.dk> - 2020-10-23 13:14 -0400
Re: InetAddress.isReachable() ? Knute Johnson <knute2020@585ranch.com> - 2020-10-23 18:10 -0500
Re: InetAddress.isReachable() ? Arne Vajhøj <arne@vajhoej.dk> - 2020-10-23 20:30 -0400
Re: InetAddress.isReachable() ? Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2020-10-23 19:38 -0500
Re: InetAddress.isReachable() ? Martin Gregorie <martin@mydomain.invalid> - 2020-10-24 11:45 +0000
Re: InetAddress.isReachable() ? Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2020-10-29 15:23 -0500
Re: InetAddress.isReachable() ? Martin Gregorie <martin@mydomain.invalid> - 2020-10-29 21:36 +0000
Re: InetAddress.isReachable() ? Arne Vajhøj <arne@vajhoej.dk> - 2020-10-29 21:47 -0400
Re: InetAddress.isReachable() ? Knute Johnson <knute2020@585ranch.com> - 2020-11-01 10:30 -0600
csiph-web