I did not modify my security policy.

Since I sent my last message, I've also found another
trick for remote hosts on RH Linux boxes (and I think 
other *nix boxes).  

Make sure you remove the host name aliase from the
127.0.0.1 address in the hosts file.  RMI is very name
aware, so having the host name resolve to the proper
IP address is very important.

I think I found it on an earlier posting in this
forum, but it was very late, so I don't recall.
--- "Michael C. Lee Jr." <[EMAIL PROTECTED]> wrote:
> What about your security policy?
> Mike Lee
> 
> ----- Original Message ----- 
> From: "Drew Gulino" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, February 04, 2003 1:02 AM
> Subject: rmiregistry
> -J-D:java.rmi.server.hostname=myhostname
> 
> 
> > I was having real troubles connecting two win2k
> > systems distributing JMeter.  I was getting:
> > 
> > 02/04/2003 12:42:27 AM ERROR - jmeter.engine: 
> > java.rmi.ConnectException: Connection refused to
> host:
> > 192.168.1.1; 
> > 
> > I changed the rmiregistry command to:
> > rmiregistry
> -J-D:java.rmi.server.hostname=myhostname
> > 
> > I also had to load  'rmiregistry' and 'jmeter -s'
> on
> > the controlling machine and the controlled
> machine,
> > even though I wasn't running threads the
> controlling
> > machine.  I think the documentation is not clear
> on
> > this point.
> > 
> > Here's where I found the idea of using the
> rmiregistry
> > parameter:
> > From: [EMAIL PROTECTED] ([EMAIL PROTECTED])
> > Search Result 1
> > Subject: Solution for: RMI "Connection refused to
> > host" error
> > Newsgroups: comp.lang.java.programmer
> > This is the only article in this thread
> > View: Original Format
> > Date: 2000-10-19 17:30:11 PST
> > 
> > This problem stumped me for several hours, so
> > hopefully I can save
> > someone else the headache I went through
> diagnosing
> > this.  I had an
> > client app that had no trouble executing a method
> on
> > an RMI server when
> > the two were run locally, but if I ran the RMI
> server
> > on a different
> > machine, I got the exception
> > 
> >         java.net.ConnectException: Connection
> refused
> > java.rmi.ConnectException: Connection refused to
> host:
> > [localhost:1786]; nested exception is:
> >         java.net.ConnectException: Connection
> refused
> >         at
> sun/rmi/transport/tcp/TCPChannel.openSocket
> > (TCPChannel.java:283)
> >         at
> > sun/rmi/transport/tcp/TCPChannel.createConnection
> > (TCPChannel.java:150)
> >         at
> > sun/rmi/transport/tcp/TCPChannel.newConnection
> > (TCPChannel.java:123)
> >         at sun/rmi/server/UnicastRef.newCall
> > (UnicastRef.java:67)
> > 
> > I was using the proper remote RMI server name (not
> > localhost) and my
> > Naming.lookup() call suceeded, so I was
> communicating
> > with the remote
> > RMI server; it just refused my connection.  Also I
> > used the
> > Windows "netstat -a" command on the server
> machine,
> > and port 1786 was
> > indeed being used on that machine but not on the
> > client, so that was
> > further confirmation that the refusal was coming
> from
> > the RMI server.
> > 
> > The problem was with the command I was using to
> start
> > the RMI server.
> > I was starting it with the flag
> >   -D:java.rmi.server.hostname=localhost
> > when I changed the flag to
> >   -D:java.rmi.server.hostname=johnb
> > (where "johnb" is the name of the server machine
> where
> > I was starting
> > the RMI server), everything worked.
> > 
> > Hope this helps someone
> > 
> > 
> > 
> > 
> > 
> > __________________________________________________
> > Do you Yahoo!?
> > Yahoo! Mail Plus - Powerful. Affordable. Sign up
> now.
> > http://mailplus.yahoo.com
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> > 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to