Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5974257
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T20:55:04+00:00 2026-05-22T20:55:04+00:00

I am trying to run a simple rmi application. However I’ve run into unexplainable

  • 0

I am trying to run a simple rmi application. However I’ve run into unexplainable (to me) error.

I have my object CheckerImplementation that implements remote interface Checker. I am trying to set it up with this code [Instance() returns an object of CheckerImplementation type]:

            try 
            {
                Checker stub = (Checker) UnicastRemoteObject.exportObject(Instance(), 0);

                // Bind the remote object's stub in the registry
                Registry registry = LocateRegistry.getRegistry();
                registry.bind("Checker", stub);

                System.err.println("Server ready");
            } 
            catch (Exception e) 
            {
                System.err.println("Server exception: " + e.toString());
                e.printStackTrace();
            }

When run, i get the following exception:

java.rmi.ConnectException: Connection refused to host: 10.105.124.34; nested exception is: 
java.net.ConnectException: Connection refused: connect
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:601)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:198)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:184)
at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:322)
at sun.rmi.registry.RegistryImpl_Stub.bind(Unknown Source)
at Checker.CheckerImplementation.main(CheckerImplementation.java:172)
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:529)
at java.net.Socket.connect(Socket.java:478)
at java.net.Socket.<init>(Socket.java:375)
at java.net.Socket.<init>(Socket.java:189)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:595)
... 5 more

Why is Java trying to connect to 10.105.124.34 anyway? That is not localhost. What could be the raeason and how can this be fixed?

After doing some experimentation i figured out that 10.105.124.34 is indeed my IP adress. But the question remains: why not 127.0.0.1?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T20:55:05+00:00Added an answer on May 22, 2026 at 8:55 pm

    Are you sure 10.105.124.34 isn’t your local IP? Run ifconfig/ipconfig. This is the code responsible for choosing this address (java.rmi.registry.LocateRegistry#getRegistry):

    if (port <= 0)
        port = Registry.REGISTRY_PORT;
    
    if (host == null || host.length() == 0) {
        // If host is blank (as returned by "file:" URL in 1.0.2 used in
        // java.rmi.Naming), try to convert to real local host name so
        // that the RegistryImpl's checkAccess will not fail.
        try {
           host = java.net.InetAddress.getLocalHost().getHostAddress();
        } catch (Exception e) {
           // If that failed, at least try "" (localhost) anyway...
           host = "";
        }
    

    To wrap it up: you need RMI registry (server) running locally on your computer. Apparently you are trying to connect to it (port 1099) but none is running.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to run a simple multiple processes application in Python. The main
I am trying to run a simple SQLITE application on Windows Mobile developed with
I'm trying to run a simple test with Selenium that somebody over in QA
I'm trying to run a c++ 2d array (pretty simple file) and it works
I'm trying to run a LINQ to SQL query that returns a result in
I am trying to run xcopy that copies files excluding .obj, etc. What I
I'm trying to run an ASP.NET 2.0 application on an XP machine. As far
I'm trying run a simple Java/MySQL web app tutorial in NetBeans. I am able
I am trying to run simple perl dbi example script to connect to mysql
I am trying to run a simple SQL statement with DB2 and am having

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.