impossible rmi connect to 127.0.0.1 in linux


D

depo

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
 
Ad

Advertisements

N

Nigel Wade

depo said:
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

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
 
D

depo

/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

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
 
N

Nigel Wade

depo said:
/IP info at installation.



i used
127.0.0.1 localhost.localdomain localhost
172.16.241.97 ivpc1117 hostname

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.
 
D

depo

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)
 
Ad

Advertisements

N

Nigel Wade

depo said:
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)

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.
 
Ad

Advertisements


Top