Cannot start RMI Server


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 6 of 6

Thread: Cannot start RMI Server

  1. #1
    Join Date
    Sep 2006
    Posts
    3

    Cannot start RMI Server

    Hi,

    I am trying to start my run my RMI server that i have created, but seem to be unable to even start the server. I did start the rmiregistry and then attempt to start my server. Btw, i used msdos to start my rmiregistry and to start my server.

    My friend has tried the coding and it works on his computer. I am thinking that it is my computer configuration but i do not know where exactly is the problem.

    Here are some of the errors:

    java.net.ConnectException: Connection refused: connect
    at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)
    at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
    at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
    at sun.rmi.server.UnicastRef.newCall(Unknown Source)
    at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
    at java.rmi.Naming.rebind(Unknown Source)
    at addRmi.AddServerApp.main(AddServerApp.java:10)
    by: java.net.ConnectException: Connection refused: connect
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(Unknown Source)
    at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
    at java.net.PlainSocketImpl.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at java.net.Socket.<init>(Unknown Source)
    at java.net.Socket.<init>(Unknown Source)
    at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown S

  2. #2
    Join Date
    Oct 2004
    Posts
    311
    Looks like your application is not allowed to connect to the RMI registry. Do you have a firewal installed? if so, try running it with the firewall disabled.
    If this fixes the problem, you might want to consider opening up the port on which your RMI resgistry is listening for connections.

  3. #3
    Join Date
    Sep 2006
    Posts
    3
    Hi ractoc,

    I did try running the application with and without the firewall disabled but it still does not work. How do i know what port my rmi registry is running on and how do i open a port for it to use? Thanks

    shaoen01

  4. #4
    Join Date
    Oct 2004
    Posts
    311
    There is a default port, which you should be able to find through either reading the documentation or through google, there is also a way to set your own custom port. How this is done can also be found in the documentation or through googl.

    Mark

  5. #5
    Join Date
    Sep 2006
    Posts
    3
    Hi,

    The default port is 1099, but it does not conflict with other applications because they do not use 1099. And so there should be no need to set up a custom port right?

  6. #6
    Join Date
    Jul 2004
    Posts
    1

    Lightbulb

    hi, have you checked you JVM's policy file;-)

Similar Threads

  1. URGENT: FTP Client / Server using RMI
    By lwinn213 in forum Java
    Replies: 2
    Last Post: 10-23-2008, 02:14 PM
  2. Replies: 2
    Last Post: 06-12-2001, 11:49 AM
  3. Start / stop Dialup server for win 95/98 programatically
    By Bogdan Zamfir in forum VB Classic
    Replies: 0
    Last Post: 05-10-2001, 07:54 PM
  4. Replies: 7
    Last Post: 09-15-2000, 09:44 AM
  5. Replies: 0
    Last Post: 05-08-2000, 07:26 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center