Menu

#66 Problem with ServentInfo.getInstance.getIP();

open-accepted
None
5
2007-01-09
2007-01-09
No

I currently use the call:

ServentInfo.getInstance.getIP();

To find the IP address of the servent. However, when the servent.props file is configured with a specific IP
address/hostname the call still returns localhost :-(

Discussion

  • Juanjo Aparicio Jara

    Logged In: YES
    user_id=228477
    Originator: NO

    Edit the servent.props file and make sure the following appears:
    watcher.period=30000
    watcher.url= http://gaudi.techideas.es:2727
    whatcher.start=start

    This enables the IP watcher. The url provided is that of a node that is currently up and running. You can use any as long as it will see you with your correct IP.

    That is, don't use the url of a node that is in the same private LAN as your node if what you want is to be able to guess your public IP.

    HTH

     
  • Juanjo Aparicio Jara

    • assigned_to: nobody --> clubifaximatic
    • status: open --> pending-accepted
     
  • Andy Edmonds

    Andy Edmonds - 2007-01-09
    • status: pending-accepted --> open-accepted
     
  • Andy Edmonds

    Andy Edmonds - 2007-01-09

    Logged In: YES
    user_id=1312564
    Originator: YES

    The issue is not to read the IP address as seen from external entities but to have the servent supply the IP/hostname specified in the servent.props file to the caller of the above method.

     

Log in to post a comment.

MongoDB Logo MongoDB