Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

IP address keeps changing

 
Agr Raj
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone. My IP address keeps changing every time I connect to the Internet. I need the ip address for RMI Connection.

Naming.lookup("rmi://127.0.0.1/Compute")

I need to put my IP address in the above but dont know how to go about it.

Thankx.
 
Tim Moores
Bartender
Pie
Posts: 2496
10
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You want to access the machine from remote, over the internet? IN that case, check out services like DynDNS. Or do you want to connect from some other machine on your local network?
 
Campbell Ritchie
Sheriff
Pie
Posts: 47288
52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wecome to the Ranch

So does mine. I think there is dynamic and static IP assignment.
I tried googling and this was the first hit. I don’t know how helpful it will be. It is full of annoying abbreviations which confirm we are right to have this FAQ.
 
naga eswar
Ranch Hand
Posts: 122
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if i am correct you can use the below code to fetch local IPaddress


 
Agr Raj
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guys thank you for your Greetings.

Let me explain the problem more clearly
When i run the application on the same machine using the IP address as 127.0.0.1 it works well. But, when i run the client on a separate machine using the current IP address that is 120.138.114.167 I get some sxception saying Connection refused to host address 120.138.114.167. I tried running the same application after turning my firewall off but still got the same exception

Note: the IP address that i have is dynamic that means it keeps changing every time I restart my router. I manually update the client file whenever the IP changes.
 
Tim Moores
Bartender
Pie
Posts: 2496
10
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's how I understood the question. What are the answers to the 2 questions I asked?
 
Agr Raj
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim Moores wrote:That's how I understood the question. What are the answers to the 2 questions I asked?


I want to connect from some other machine to my local network
 
Tim Moores
Bartender
Pie
Posts: 2496
10
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Let me emphasize what I'm asking:
You want to access the machine from remote, over the internet? ... Or do you want to connect from some other machine on your local network?
 
Agr Raj
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim Moores wrote:Let me emphasize what I'm asking:
You want to access the machine from remote, over the internet? ... Or do you want to connect from some other machine on your local network?


over the internet
 
Tim Moores
Bartender
Pie
Posts: 2496
10
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Then DynDNS (or some service like it) is the answer.
 
Agr Raj
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is the server class



The Client Class



The Remote Interface



Runs perfectly on the same machine.
Then,
I changed the IP address in the ClientClass to 111.119.254.32, turned the firewall off and tried accessing the server from a different machine over the Internet and got the following error
Connection refused to host: 111.119.254.32 and some more nested Exception

Please help me spot where I'm Going wrong.


 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic