Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / May 2004

Tip: Looking for answers? Try searching our database.

impossible rmi connect to 127.0.0.1 in linux

Thread view: 
depo - 05 May 2004 15:06 GMT
hi
it is impossible to connect via rmi with a local java server (but ok
from remote) using ipaddress or 127.0.0.1 url

my client exception is:

AgentAndCall::service call remote  exception
//127.0.0.1:1101/SocketAlarmSS Unknown host: 172.16.241.97 ; nested
exception is:
       java.net.UnknownHostException: 172.16.241.97

The used javaPolicy file is:

grant {
 permission java.security.AllPermission;
};

/*
grant codeBase "file:${java.home}/lib/ext/*" {
 permission java.security.AllPermission;
};

grant {
 permission java.lang.RuntimePermission "stopThread";
 permission java.net.SocketPermission "*:1-", "listen, accept,
connect, listen, resolve";
 permission java.util.PropertyPermission "java.version", "read";
 permission java.util.PropertyPermission "java.vendor", "read";
 permission java.util.PropertyPermission "java.vendor.url", "read";
 permission java.util.PropertyPermission "java.class.version",
"read";
 permission java.util.PropertyPermission "os.name", "read";
 permission java.util.PropertyPermission "os.version", "read";
 permission java.util.PropertyPermission "os.arch", "read";
 permission java.util.PropertyPermission "file.separator", "read";
 permission java.util.PropertyPermission "path.separator", "read";
 permission java.util.PropertyPermission "line.separator", "read";
 permission java.util.PropertyPermission
"java.specification.version", "read";
 permission java.util.PropertyPermission "java.specification.vendor",
"read";
 permission java.util.PropertyPermission "java.specification.name",
"read";
 permission java.util.PropertyPermission
"java.vm.specification.version", "read";
 permission java.util.PropertyPermission
"java.vm.specification.vendor", "read";
 permission java.util.PropertyPermission
"java.vm.specification.name", "read";
 permission java.util.PropertyPermission "java.vm.version", "read";
 permission java.util.PropertyPermission "java.vm.vendor", "read";
 permission java.util.PropertyPermission "java.vm.name", "read";
 permission java.util.PropertyPermission "user.dir", "read";
 permission java.util.PropertyPermission "JAVLIN_HOME", "read";
 permission java.io.FilePermission "<<ALL FILES>>", "read, write,
delete";
 permission java.util.PropertyPermission "*", "read, write";
};
*/

it seems to be commented
Can you help me?
thanks
Nigel Wade - 07 May 2004 11:52 GMT
> hi
> it is impossible to connect via rmi with a local java server (but ok
[quoted text clipped - 6 lines]
> exception is:
>         java.net.UnknownHostException: 172.16.241.97

It looks like your /etc/hosts or DNS is messed up. I don't see how 127.0.0.1
could ever resolve to 172.16.241.97 if it wasn't.

I've seen this with Fedora Core 1. It messes up /etc/hosts if you specify
static hostname/IP info at installation.

Check for something in /etc/hosts like this:

127.0.0.1       F.Q.D.N  hostname  localhost.localdomain localhost
172.16.241.97   F.Q.D.N  hostname

and change it to:
127.0.0.1       localhost.localdomain localhost
172.16.241.97   F.Q.D.N  hostname

Signature

Nigel Wade, System Administrator, Space Plasma Physics Group,
            University of Leicester, Leicester, LE1 7RH, UK
E-mail :    nmw@ion.le.ac.uk
Phone :     +44 (0)116 2523548, Fax : +44 (0)116 2523555

depo - 10 May 2004 09:11 GMT
/IP info at installation.

> Check for something in /etc/hosts like this:
>
[quoted text clipped - 4 lines]
> 127.0.0.1       localhost.localdomain localhost
> 172.16.241.97   F.Q.D.N  hostname

i used
127.0.0.1       localhost.localdomain localhost
172.16.241.97   ivpc1117  hostname

so for me  F.Q.D.N=ivpc1117
i see that if i call /bin/domainname i obtain nothing.Is this the error?
My  F.Q.D.N is hostname and this not seems correct......
Can you help my?
thanks
Nigel Wade - 10 May 2004 11:34 GMT
> /IP info at installation.
>
[quoted text clipped - 12 lines]
>
> so for me  F.Q.D.N=ivpc1117

The FQDN should be a fully qualified name. E.g. a machine in our domain
might be called linux-box. It's FQDN would be linux-box.ion.le.ac.uk. The
entry in /etc/hosts should read:

143.210.44.??? linux-box.ion.le.ac.uk linux-box

But that's a side issue. I still don't understand why, when you ask to
connect to 127.0.0.1, RMI has attempted to connect to 172.16.241.97. They
are different addresses on different interfaces. One should not resolve to
the other. Also, 172.16.241.97 shouldn't be unknown...

> i see that if i call /bin/domainname i obtain nothing.Is this the error?

domainname is to do with NIS, not hostnames/DNS. A confusing nomenclature.

> My  F.Q.D.N is hostname and this not seems correct......
> Can you help my?
> thanks

Signature

Nigel Wade, System Administrator, Space Plasma Physics Group,
            University of Leicester, Leicester, LE1 7RH, UK
E-mail :    nmw@ion.le.ac.uk
Phone :     +44 (0)116 2523548, Fax : +44 (0)116 2523555

depo - 11 May 2004 18:41 GMT
> > /IP info at installation.
> >
[quoted text clipped - 6 lines]
> >>127.0.0.1       localhost.localdomain localhost
> >>172.16.241.97   F.Q.D.N  hostname

I follow your suggest but i obtain the same error
It is also impossible for me connecting from localhost with rsh (it is
possible from remote)
Nigel Wade - 12 May 2004 10:33 GMT
>>>/IP info at installation.
>>>
[quoted text clipped - 10 lines]
> It is also impossible for me connecting from localhost with rsh (it is
> possible from remote)

It certainly sounds like your networking is messed up in some way. That's
really off-topic for a java newsgroup.

Try a linux group, or even better, a forum for the specific Linux distro you
have. There may be some issue of which they are aware.

Signature

Nigel Wade, System Administrator, Space Plasma Physics Group,
            University of Leicester, Leicester, LE1 7RH, UK
E-mail :    nmw@ion.le.ac.uk
Phone :     +44 (0)116 2523548, Fax : +44 (0)116 2523555



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.