Discussion:
how to specify a ip address when reggie starts
liang li
2008-05-04 02:21:14 UTC
Permalink
hi,all.
when i use jini starter kit 2.1, i occoured a problem,
i set more than one ip address for a network card on host A, as followed:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Intel(R) PRO/100 VE Network Connecti
on
Physical Address. . . . . . . . . : 00-20-ED-1E-DF-B1
DHCP Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 192.168.8.3
Subnet Mask . . . . . . . . . . . : 255.255.255.0
IP Address. . . . . . . . . . . . : 192.168.5.21
Subnet Mask . . . . . . . . . . . : 255.255.0.0
IP Address. . . . . . . . . . . . : 10.10.3.102
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 10.10.1.254
DNS Servers . . . . . . . . . . . : 10.15.1.1
192.168.8.3

there are two other lookup services running on the host B,C with
192.168.8.X,
when i start lookup service on host A, then some exception is printed on
host B and C, like this:
......
JoinManager - failure
java.rmi.ConnectIOException: I/O exception connecting to
BasicObjectEndpoint[6cd
012b8-ff8e-4684-9819-514fe3d93cbd,TcpEndpoint[10.10.3.102:3005]]; nested
excepti
on is:
java.net.NoRouteToHostException: No route to host: connect
at net.jini.jeri.BasicInvocationHandler.wrapSafeIOException(BasicInvocat
ionHandler.java:893)
at net.jini.jeri.BasicInvocationHandler.invokeRemoteMethodOnce(BasicInvo
cationHandler.java:711)
at net.jini.jeri.BasicInvocationHandler.invokeRemoteMethod(BasicInvocati
onHandler.java:659)
at net.jini.jeri.BasicInvocationHandler.invoke(BasicInvocationHandler.ja
va:528)
at com.sun.jini.reggie.$Proxy43.register(Unknown Source)
at com.sun.jini.reggie.RegistrarProxy.register(RegistrarProxy.java:107)
at net.jini.lookup.JoinManager$ProxyReg.register(JoinManager.java:1222)
at net.jini.lookup.JoinManager$RegisterTask.run(JoinManager.java:784)
at net.jini.lookup.JoinManager$ProxyRegTask.tryOnce(JoinManager.java:608
)
at com.sun.jini.thread.RetryTask.run(RetryTask.java:131)
at com.sun.jini.thread.TaskManager$TaskThread.run(TaskManager.java:331)
Caused by: java.net.NoRouteToHostException: No route to host: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:507)
at net.jini.jeri.tcp.TcpEndpoint$ConnectionEndpointImpl.connectToSocketA
ddress(TcpEndpoint.java:678)
at net.jini.jeri.tcp.TcpEndpoint$ConnectionEndpointImpl.connectToHost(Tc
pEndpoint.java:608)
at net.jini.jeri.tcp.TcpEndpoint$ConnectionEndpointImpl.connect(TcpEndpo
int.java:543)
at net.jini.jeri.connection.ConnectionManager.connect(ConnectionManager.
java:228)
at net.jini.jeri.connection.ConnectionManager$ReqIterator.next(Connectio
nManager.java:629)
at net.jini.jeri.BasicObjectEndpoint$1.next(BasicObjectEndpoint.java:371
)
at net.jini.jeri.BasicInvocationHandler.invokeRemoteMethodOnce(BasicInvo
cationHandler.java:708)
... 9 more
so i need to specify a ip (for example 192.168.8.3) when i start lookup
service on host A. however i dont know how to config after i googled.

could you help me?

best regards
byron lee

--------------------------------------------------------------------------
Getting Started: http://www.jini.org/wiki/Category:Getting_Started
Community Web Site: http://jini.org
jini-users Archive: http://archives.java.sun.com/archives/jini-users.html
Unsubscribing: email "signoff JINI-USERS" to ***@java.sun.com
Geoffrey Arnold
2008-05-04 02:58:08 UTC
Permalink
Hey Byron,

Assuming you're starting Reggie using the generated "Launch-All"
scripts, simply open the file
<path_to_jini_installation_directory>/installverify/support/startAll.config
on host A and change the value of the "host" variable to the desired
IP address.

Geoff.
Post by liang li
hi,all.
when i use jini starter kit 2.1, i occoured a problem,
Description . . . . . . . . . . . : Intel(R) PRO/100 VE Network Connecti
on
Physical Address. . . . . . . . . : 00-20-ED-1E-DF-B1
DHCP Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 192.168.8.3
Subnet Mask . . . . . . . . . . . : 255.255.255.0
IP Address. . . . . . . . . . . . : 192.168.5.21
Subnet Mask . . . . . . . . . . . : 255.255.0.0
IP Address. . . . . . . . . . . . : 10.10.3.102
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 10.10.1.254
DNS Servers . . . . . . . . . . . : 10.15.1.1
192.168.8.3
there are two other lookup services running on the host B,C with
192.168.8.X,
when i start lookup service on host A, then some exception is printed on
......
JoinManager - failure
java.rmi.ConnectIOException: I/O exception connecting to
BasicObjectEndpoint[6cd
012b8-ff8e-4684-9819-514fe3d93cbd,TcpEndpoint[10.10.3.102:3005]]; nested
excepti
java.net.NoRouteToHostException: No route to host: connect
at net.jini.jeri.BasicInvocationHandler.wrapSafeIOException(BasicInvocat
ionHandler.java:893)
at net.jini.jeri.BasicInvocationHandler.invokeRemoteMethodOnce(BasicInvo
cationHandler.java:711)
at net.jini.jeri.BasicInvocationHandler.invokeRemoteMethod(BasicInvocati
onHandler.java:659)
at net.jini.jeri.BasicInvocationHandler.invoke(BasicInvocationHandler.ja
va:528)
at com.sun.jini.reggie.$Proxy43.register(Unknown Source)
at com.sun.jini.reggie.RegistrarProxy.register(RegistrarProxy.java:107)
at net.jini.lookup.JoinManager$ProxyReg.register(JoinManager.java:1222)
at net.jini.lookup.JoinManager$RegisterTask.run(JoinManager.java:784)
at net.jini.lookup.JoinManager$ProxyRegTask.tryOnce(JoinManager.java:608
)
at com.sun.jini.thread.RetryTask.run(RetryTask.java:131)
at com.sun.jini.thread.TaskManager$TaskThread.run(TaskManager.java:331)
Caused by: java.net.NoRouteToHostException: No route to host: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:507)
at net.jini.jeri.tcp.TcpEndpoint$ConnectionEndpointImpl.connectToSocketA
ddress(TcpEndpoint.java:678)
at net.jini.jeri.tcp.TcpEndpoint$ConnectionEndpointImpl.connectToHost(Tc
pEndpoint.java:608)
at net.jini.jeri.tcp.TcpEndpoint$ConnectionEndpointImpl.connect(TcpEndpo
int.java:543)
at net.jini.jeri.connection.ConnectionManager.connect(ConnectionManager.
java:228)
at net.jini.jeri.connection.ConnectionManager$ReqIterator.next(Connectio
nManager.java:629)
at net.jini.jeri.BasicObjectEndpoint$1.next(BasicObjectEndpoint.java:371
)
at net.jini.jeri.BasicInvocationHandler.invokeRemoteMethodOnce(BasicInvo
cationHandler.java:708)
... 9 more
so i need to specify a ip (for example 192.168.8.3) when i start lookup
service on host A. however i dont know how to config after i googled.
could you help me?
best regards
byron lee
--------------------------------------------------------------------------
Getting Started: http://www.jini.org/wiki/Category:Getting_Started Community
http://archives.java.sun.com/archives/jini-users.html Unsubscribing: email
--------------------------------------------------------------------------
Getting Started: http://www.jini.org/wiki/Category:Getting_Started
Community Web Site: http://jini.org
jini-users Archive: http://archives.java.sun.com/archives/jini-users.html
Unsubscribing: email "signoff JINI-USERS" to ***@java.sun.com
liang li
2008-05-04 05:26:01 UTC
Permalink
hi Geoffrey,
thank you for your reply.
this is the content that i modified:

import com.sun.jini.start.NonActivatableServiceDescriptor;
import com.sun.jini.start.ServiceDescriptor;
import com.sun.jini.config.ConfigUtil;

com.sun.jini.start {
private static policy =
"C:\\jini2_1\\installverify\\support\\jsk-all.policy";
private static host = *"192.168.8.3";
* private static port = "8081";
private static jskdl = " http://" + host + ":" + port + "/jsk-dl.jar";

serviceDescriptors = new ServiceDescriptor[]{
new NonActivatableServiceDescriptor(
"",
policy,
"C:\\jini2_1\\lib\\classserver.jar",
"com.sun.jini.tool.ClassServer",
new String[]{"-port", port, "-dir",
"C:\\jini2_1\\lib-dl",
"-verbose"}),

new NonActivatableServiceDescriptor(
"http://" + host + ":" + port + "/browser-dl.jar" + jskdl,
policy,
"C:\\jini2_1\\lib\\browser.jar",
"com.sun.jini.example.browser.Browser",
new String[] {
"C:\\jini2_1\\installverify\\support\\browser.config" }),

new NonActivatableServiceDescriptor(
"http://" + host + ":" + port + "/reggie-dl.jar" + jskdl + "
http://" + host + ":" + port + "/jigcs-dl.jar",
policy,
"C:\\jini2_1\\lib\\reggie.jar;C:\\jini2_1\\lib\\jigcs.jar",
"com.sun.jini.reggie.TransientRegistrarImpl",
new String[]
{"C:\\jini2_1\\installverify\\support\\reggie.config" }),
......
when i tried, the same exception is thrown like before.
is there any wrong thing?

best regards
byron lee
Post by Geoffrey Arnold
Hey Byron,
Assuming you're starting Reggie using the generated "Launch-All"
scripts, simply open the file
<path_to_jini_installation_directory>/installverify/support/startAll.config
on host A and change the value of the "host" variable to the desired
IP address.
Geoff.
Post by liang li
hi,all.
when i use jini starter kit 2.1, i occoured a problem,
i set more than one ip address for a network card on host A, as
Description . . . . . . . . . . . : Intel(R) PRO/100 VE Network Connecti
on
Physical Address. . . . . . . . . : 00-20-ED-1E-DF-B1
DHCP Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 192.168.8.3
Subnet Mask . . . . . . . . . . . : 255.255.255.0
IP Address. . . . . . . . . . . . : 192.168.5.21
Subnet Mask . . . . . . . . . . . : 255.255.0.0
IP Address. . . . . . . . . . . . : 10.10.3.102
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 10.10.1.254
DNS Servers . . . . . . . . . . . : 10.15.1.1
192.168.8.3
there are two other lookup services running on the host B,C with
192.168.8.X,
when i start lookup service on host A, then some exception is printed on
......
JoinManager - failure
java.rmi.ConnectIOException: I/O exception connecting to
BasicObjectEndpoint[6cd
012b8-ff8e-4684-9819-514fe3d93cbd,TcpEndpoint[10.10.3.102:3005]]; nested
excepti
java.net.NoRouteToHostException: No route to host: connect
at
net.jini.jeri.BasicInvocationHandler.wrapSafeIOException(BasicInvocat
Post by liang li
ionHandler.java:893)
at net.jini.jeri.BasicInvocationHandler.invokeRemoteMethodOnce(BasicInvo
cationHandler.java:711)
at net.jini.jeri.BasicInvocationHandler.invokeRemoteMethod(BasicInvocati
onHandler.java:659)
at net.jini.jeri.BasicInvocationHandler.invoke(BasicInvocationHandler.ja
va:528)
at com.sun.jini.reggie.$Proxy43.register(Unknown Source)
at com.sun.jini.reggie.RegistrarProxy.register(RegistrarProxy.java:107)
at net.jini.lookup.JoinManager$ProxyReg.register(JoinManager.java:1222)
at net.jini.lookup.JoinManager$RegisterTask.run(JoinManager.java:784)
at net.jini.lookup.JoinManager$ProxyRegTask.tryOnce(JoinManager.java:608
)
at com.sun.jini.thread.RetryTask.run(RetryTask.java:131)
at com.sun.jini.thread.TaskManager$TaskThread.run(TaskManager.java:331)
Caused by: java.net.NoRouteToHostException: No route to host: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:507)
at net.jini.jeri.tcp.TcpEndpoint$ConnectionEndpointImpl.connectToSocketA
ddress(TcpEndpoint.java:678)
at net.jini.jeri.tcp.TcpEndpoint$ConnectionEndpointImpl.connectToHost(Tc
pEndpoint.java:608)
at net.jini.jeri.tcp.TcpEndpoint$ConnectionEndpointImpl.connect(TcpEndpo
int.java:543)
at net.jini.jeri.connection.ConnectionManager.connect(ConnectionManager.
java:228)
at net.jini.jeri.connection.ConnectionManager$ReqIterator.next(Connectio
nManager.java:629)
at net.jini.jeri.BasicObjectEndpoint$1.next(BasicObjectEndpoint.java:371
)
at net.jini.jeri.BasicInvocationHandler.invokeRemoteMethodOnce(BasicInvo
cationHandler.java:708)
... 9 more
so i need to specify a ip (for example 192.168.8.3) when i start lookup
service on host A. however i dont know how to config after i googled.
could you help me?
best regards
byron lee
--------------------------------------------------------------------------
Post by liang li
Getting Started: http://www.jini.org/wiki/Category:Getting_StartedCommunity
email
--------------------------------------------------------------------------
Getting Started: http://www.jini.org/wiki/Category:Getting_Started
Community Web Site: http://jini.org
jini-users Archive: http://archives.java.sun.com/archives/jini-users.html
Unsubscribing: email "signoff JINI-USERS" to ***@java.sun.com
Geoffrey Arnold
2008-05-04 15:28:15 UTC
Permalink
Hi Byron,

My previous answer was incomplete. You will also need to specify the
"serviceExporter" attribute in each service configuration (ie.
reggie.config, outrigger.config, etc.):

serviceExporter = new BasicJeriExporter(
TcpServerEndpoint.getInstance("<your_ip_address>", 0),
new BasicILFactory()
);

Be sure to add the imports to the beginning of each file:

import net.jini.jeri.BasicJeriExporter;
import net.jini.jeri.tcp.TcpServerEndpoint;
import net.jini.jeri.BasicILFactory;

For more information, take a look at the man pages for each service:

$JINI_HOME/doc/manpages-index.html

Geoff.
Post by liang li
hi Geoffrey,
thank you for your reply.
import com.sun.jini.start.NonActivatableServiceDescriptor;
import com.sun.jini.start.ServiceDescriptor;
import com.sun.jini.config.ConfigUtil;
com.sun.jini.start {
private static policy =
"C:\\jini2_1\\installverify\\support\\jsk-all.policy";
private static host = "192.168.8.3";
private static port = "8081";
private static jskdl = " http://" + host + ":" + port + "/jsk-dl.jar";
serviceDescriptors = new ServiceDescriptor[]{
new NonActivatableServiceDescriptor(
"",
policy,
"C:\\jini2_1\\lib\\classserver.jar",
"com.sun.jini.tool.ClassServer",
new String[]{"-port", port, "-dir",
"C:\\jini2_1\\lib-dl",
"-verbose"}),
new NonActivatableServiceDescriptor(
"http://" + host + ":" + port + "/browser-dl.jar" + jskdl,
policy,
"C:\\jini2_1\\lib\\browser.jar",
"com.sun.jini.example.browser.Browser",
new String[] {
"C:\\jini2_1\\installverify\\support\\browser.config" }),
new NonActivatableServiceDescriptor(
"http://" + host + ":" + port + "/reggie-dl.jar" + jskdl + "
http://" + host + ":" + port + "/jigcs-dl.jar",
policy,
"C:\\jini2_1\\lib\\reggie.jar;C:\\jini2_1\\lib\\jigcs.jar",
"com.sun.jini.reggie.TransientRegistrarImpl",
new String[]
{"C:\\jini2_1\\installverify\\support\\reggie.config" }),
......
when i tried, the same exception is thrown like before.
is there any wrong thing?
best regards
byron lee
Post by Geoffrey Arnold
Hey Byron,
Assuming you're starting Reggie using the generated "Launch-All"
scripts, simply open the file
<path_to_jini_installation_directory>/installverify/support/startAll.config
Post by Geoffrey Arnold
on host A and change the value of the "host" variable to the desired
IP address.
Geoff.
Post by liang li
hi,all.
when i use jini starter kit 2.1, i occoured a problem,
i set more than one ip address for a network card on host A, as
Description . . . . . . . . . . . : Intel(R) PRO/100 VE Network Connecti
on
Physical Address. . . . . . . . . : 00-20-ED-1E-DF-B1
DHCP Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 192.168.8.3
Subnet Mask . . . . . . . . . . . : 255.255.255.0
IP Address. . . . . . . . . . . . : 192.168.5.21
Subnet Mask . . . . . . . . . . . : 255.255.0.0
IP Address. . . . . . . . . . . . : 10.10.3.102
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 10.10.1.254
DNS Servers . . . . . . . . . . . : 10.15.1.1
192.168.8.3
there are two other lookup services running on the host B,C with
192.168.8.X,
when i start lookup service on host A, then some exception is printed on
......
JoinManager - failure
java.rmi.ConnectIOException: I/O exception connecting to
BasicObjectEndpoint[6cd
012b8-ff8e-4684-9819-514fe3d93cbd,TcpEndpoint[10.10.3.102:3005]]; nested
excepti
java.net.NoRouteToHostException: No route to host: connect
at
net.jini.jeri.BasicInvocationHandler.wrapSafeIOException(BasicInvocat
Post by Geoffrey Arnold
Post by liang li
ionHandler.java:893)
at net.jini.jeri.BasicInvocationHandler.invokeRemoteMethodOnce(BasicInvo
cationHandler.java:711)
at net.jini.jeri.BasicInvocationHandler.invokeRemoteMethod(BasicInvocati
onHandler.java:659)
at net.jini.jeri.BasicInvocationHandler.invoke(BasicInvocationHandler.ja
va:528)
at com.sun.jini.reggie.$Proxy43.register(Unknown Source)
at com.sun.jini.reggie.RegistrarProxy.register(RegistrarProxy.java:107)
at net.jini.lookup.JoinManager$ProxyReg.register(JoinManager.java:1222)
at net.jini.lookup.JoinManager$RegisterTask.run(JoinManager.java:784)
at net.jini.lookup.JoinManager$ProxyRegTask.tryOnce(JoinManager.java:608
)
at com.sun.jini.thread.RetryTask.run(RetryTask.java:131)
at com.sun.jini.thread.TaskManager$TaskThread.run(TaskManager.java:331)
Caused by: java.net.NoRouteToHostException: No route to host: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:507)
at net.jini.jeri.tcp.TcpEndpoint$ConnectionEndpointImpl.connectToSocketA
ddress(TcpEndpoint.java:678)
at net.jini.jeri.tcp.TcpEndpoint$ConnectionEndpointImpl.connectToHost(Tc
pEndpoint.java:608)
at net.jini.jeri.tcp.TcpEndpoint$ConnectionEndpointImpl.connect(TcpEndpo
int.java:543)
at net.jini.jeri.connection.ConnectionManager.connect(ConnectionManager.
java:228)
at net.jini.jeri.connection.ConnectionManager$ReqIterator.next(Connectio
nManager.java:629)
at net.jini.jeri.BasicObjectEndpoint$1.next(BasicObjectEndpoint.java:371
)
at net.jini.jeri.BasicInvocationHandler.invokeRemoteMethodOnce(BasicInvo
cationHandler.java:708)
... 9 more
so i need to specify a ip (for example 192.168.8.3) when i start lookup
service on host A. however i dont know how to config after i googled.
could you help me?
best regards
byron lee
--------------------------------------------------------------------------
Post by Geoffrey Arnold
Post by liang li
Getting Started: http://www.jini.org/wiki/Category:Getting_Started
Community
email
--------------------------------------------------------------------------
Getting Started: http://www.jini.org/wiki/Category:Getting_Started
Community Web Site: http://jini.org
jini-users Archive: http://archives.java.sun.com/archives/jini-users.html
Unsubscribing: email "signoff JINI-USERS" to ***@java.sun.com
liang li
2008-05-05 01:44:56 UTC
Permalink
hi,Geoff,
when i heard from your letter, i was so exited.
i tried right now, the following is part of my reggie.config

import java.net.NetworkInterface;
import net.jini.core.entry.Entry;
import net.jini.lookup.entry.Location;
import com.wri.hy.jigcs.LookupEntry4Cm;
import net.jini.core.discovery.LookupLocator;
import com.wri.hy.jigcs.entry.NodeEntry;
import com.wri.hy.jigcs.entry.NetworkEntry;
import net.jini.jeri.BasicJeriExporter;
import net.jini.jeri.tcp.TcpServerEndpoint;
import net.jini.jeri.BasicILFactory;


com.sun.jini.reggie {
//initialLookupGroups = new String[] { "hb"};

serviceExporter = new BasicJeriExporter(TcpServerEndpoint.getInstance("
192.168.8.3", 0), new BasicILFactory());

initialLookupLocators = new LookupLocator[]{new LookupLocator("jini://
192.168.8.1")};

initialMemberGroups = new String[] { "hb"};
......
however, i found service browser (in host 192.168.8.1) displyed that the
ServiceRegistrar is marked (stale service).

i found service browser (in host 192.168.8.3) displyed that the
ServiceRegistrar is normal.
i am sure i browsered the same reggie(192.168.8.1).
need your help again!

best regards
byron
Post by Geoffrey Arnold
Hi Byron,
My previous answer was incomplete. You will also need to specify the
"serviceExporter" attribute in each service configuration (ie.
serviceExporter = new BasicJeriExporter(
TcpServerEndpoint.getInstance("<your_ip_address>", 0),
new BasicILFactory()
);
import net.jini.jeri.BasicJeriExporter;
import net.jini.jeri.tcp.TcpServerEndpoint;
import net.jini.jeri.BasicILFactory;
$JINI_HOME/doc/manpages-index.html
Geoff.
Post by liang li
hi Geoffrey,
thank you for your reply.
import com.sun.jini.start.NonActivatableServiceDescriptor;
import com.sun.jini.start.ServiceDescriptor;
import com.sun.jini.config.ConfigUtil;
com.sun.jini.start {
private static policy =
"C:\\jini2_1\\installverify\\support\\jsk-all.policy";
private static host = "192.168.8.3";
private static port = "8081";
private static jskdl = " http://" + host + ":" + port +
"/jsk-dl.jar";
Post by liang li
serviceDescriptors = new ServiceDescriptor[]{
new NonActivatableServiceDescriptor(
"",
policy,
"C:\\jini2_1\\lib\\classserver.jar",
"com.sun.jini.tool.ClassServer",
new String[]{"-port", port, "-dir",
"C:\\jini2_1\\lib-dl",
"-verbose"}),
new NonActivatableServiceDescriptor(
"http://" + host + ":" + port + "/browser-dl.jar" + jskdl,
policy,
"C:\\jini2_1\\lib\\browser.jar",
"com.sun.jini.example.browser.Browser",
new String[] {
"C:\\jini2_1\\installverify\\support\\browser.config" }),
new NonActivatableServiceDescriptor(
"http://" + host + ":" + port + "/reggie-dl.jar" + jskdl + "
http://" + host + ":" + port + "/jigcs-dl.jar",
policy,
"C:\\jini2_1\\lib\\reggie.jar;C:\\jini2_1\\lib\\jigcs.jar",
"com.sun.jini.reggie.TransientRegistrarImpl",
new String[]
{"C:\\jini2_1\\installverify\\support\\reggie.config" }),
......
when i tried, the same exception is thrown like before.
is there any wrong thing?
best regards
byron lee
Post by Geoffrey Arnold
Hey Byron,
Assuming you're starting Reggie using the generated "Launch-All"
scripts, simply open the file
<path_to_jini_installation_directory>/installverify/support/startAll.config
Post by liang li
Post by Geoffrey Arnold
on host A and change the value of the "host" variable to the desired
IP address.
Geoff.
Post by liang li
hi,all.
when i use jini starter kit 2.1, i occoured a problem,
i set more than one ip address for a network card on host A, as
Description . . . . . . . . . . . : Intel(R) PRO/100 VE Network
Connecti
Post by liang li
Post by Geoffrey Arnold
Post by liang li
on
Physical Address. . . . . . . . . : 00-20-ED-1E-DF-B1
DHCP Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 192.168.8.3
Subnet Mask . . . . . . . . . . . : 255.255.255.0
IP Address. . . . . . . . . . . . : 192.168.5.21
Subnet Mask . . . . . . . . . . . : 255.255.0.0
IP Address. . . . . . . . . . . . : 10.10.3.102
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 10.10.1.254
DNS Servers . . . . . . . . . . . : 10.15.1.1
192.168.8.3
there are two other lookup services running on the host B,C with
192.168.8.X,
when i start lookup service on host A, then some exception is
printed on
Post by liang li
Post by Geoffrey Arnold
Post by liang li
......
JoinManager - failure
java.rmi.ConnectIOException: I/O exception connecting to
BasicObjectEndpoint[6cd
012b8-ff8e-4684-9819-514fe3d93cbd,TcpEndpoint[10.10.3.102:3005]];
nested
Post by liang li
Post by Geoffrey Arnold
Post by liang li
excepti
java.net.NoRouteToHostException: No route to host: connect
at
net.jini.jeri.BasicInvocationHandler.wrapSafeIOException(BasicInvocat
Post by Geoffrey Arnold
Post by liang li
ionHandler.java:893)
at
net.jini.jeri.BasicInvocationHandler.invokeRemoteMethodOnce(BasicInvo
Post by liang li
Post by Geoffrey Arnold
Post by liang li
cationHandler.java:711)
at
net.jini.jeri.BasicInvocationHandler.invokeRemoteMethod(BasicInvocati
Post by liang li
Post by Geoffrey Arnold
Post by liang li
onHandler.java:659)
at
net.jini.jeri.BasicInvocationHandler.invoke(BasicInvocationHandler.ja
Post by liang li
Post by Geoffrey Arnold
Post by liang li
va:528)
at com.sun.jini.reggie.$Proxy43.register(Unknown Source)
at
com.sun.jini.reggie.RegistrarProxy.register(RegistrarProxy.java:107)
Post by liang li
Post by Geoffrey Arnold
Post by liang li
at
net.jini.lookup.JoinManager$ProxyReg.register(JoinManager.java:1222)
Post by liang li
Post by Geoffrey Arnold
Post by liang li
at
net.jini.lookup.JoinManager$RegisterTask.run(JoinManager.java:784)
Post by liang li
Post by Geoffrey Arnold
Post by liang li
at
net.jini.lookup.JoinManager$ProxyRegTask.tryOnce(JoinManager.java:608
Post by liang li
Post by Geoffrey Arnold
Post by liang li
)
at com.sun.jini.thread.RetryTask.run(RetryTask.java:131)
at
com.sun.jini.thread.TaskManager$TaskThread.run(TaskManager.java:331)
connect
Post by liang li
Post by Geoffrey Arnold
Post by liang li
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
Post by liang li
Post by Geoffrey Arnold
Post by liang li
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:507)
at
net.jini.jeri.tcp.TcpEndpoint$ConnectionEndpointImpl.connectToSocketA
Post by liang li
Post by Geoffrey Arnold
Post by liang li
ddress(TcpEndpoint.java:678)
at
net.jini.jeri.tcp.TcpEndpoint$ConnectionEndpointImpl.connectToHost(Tc
Post by liang li
Post by Geoffrey Arnold
Post by liang li
pEndpoint.java:608)
at
net.jini.jeri.tcp.TcpEndpoint$ConnectionEndpointImpl.connect(TcpEndpo
Post by liang li
Post by Geoffrey Arnold
Post by liang li
int.java:543)
at
net.jini.jeri.connection.ConnectionManager.connect(ConnectionManager.
Post by liang li
Post by Geoffrey Arnold
Post by liang li
java:228)
at
net.jini.jeri.connection.ConnectionManager$ReqIterator.next(Connectio
Post by liang li
Post by Geoffrey Arnold
Post by liang li
nManager.java:629)
at
net.jini.jeri.BasicObjectEndpoint$1.next(BasicObjectEndpoint.java:371
Post by liang li
Post by Geoffrey Arnold
Post by liang li
)
at
net.jini.jeri.BasicInvocationHandler.invokeRemoteMethodOnce(BasicInvo
Post by liang li
Post by Geoffrey Arnold
Post by liang li
cationHandler.java:708)
... 9 more
so i need to specify a ip (for example 192.168.8.3) when i start
lookup
Post by liang li
Post by Geoffrey Arnold
Post by liang li
service on host A. however i dont know how to config after i
googled.
Post by liang li
Post by Geoffrey Arnold
Post by liang li
could you help me?
best regards
byron lee
--------------------------------------------------------------------------
Post by liang li
Post by Geoffrey Arnold
Post by liang li
Getting Started: http://www.jini.org/wiki/Category:Getting_Started
Community
email
--------------------------------------------------------------------------
Getting Started: http://www.jini.org/wiki/Category:Getting_Started
Community Web Site: http://jini.org
jini-users Archive: http://archives.java.sun.com/archives/jini-users.html
Unsubscribing: email "signoff JINI-USERS" to ***@java.sun.com
Geoffrey Arnold
2008-05-05 14:47:54 UTC
Permalink
Hi Byron,

If you look in the console window of the service browser you should
see a stack trace. Could you please post that trace?

Thanks,
Geoff.
Post by liang li
hi,Geoff,
when i heard from your letter, i was so exited.
i tried right now, the following is part of my reggie.config
import java.net.NetworkInterface;
import net.jini.core.entry.Entry;
import net.jini.lookup.entry.Location;
import com.wri.hy.jigcs.LookupEntry4Cm;
import net.jini.core.discovery.LookupLocator;
import com.wri.hy.jigcs.entry.NodeEntry;
import com.wri.hy.jigcs.entry.NetworkEntry;
import net.jini.jeri.BasicJeriExporter;
import net.jini.jeri.tcp.TcpServerEndpoint;
import net.jini.jeri.BasicILFactory;
com.sun.jini.reggie {
//initialLookupGroups = new String[] { "hb"};
serviceExporter = new
BasicJeriExporter(TcpServerEndpoint.getInstance("192.168.8.3", 0), new
BasicILFactory());
initialLookupLocators = new LookupLocator[]{new
LookupLocator("jini://192.168.8.1")};
initialMemberGroups = new String[] { "hb"};
......
however, i found service browser (in host 192.168.8.1) displyed that the
ServiceRegistrar is marked (stale service).
i found service browser (in host 192.168.8.3) displyed that the
ServiceRegistrar is normal.
i am sure i browsered the same reggie(192.168.8.1).
need your help again!
best regards
byron
Post by Geoffrey Arnold
Hi Byron,
My previous answer was incomplete. You will also need to specify the
"serviceExporter" attribute in each service configuration (ie.
serviceExporter = new BasicJeriExporter(
TcpServerEndpoint.getInstance("<your_ip_address>", 0),
new BasicILFactory()
);
import net.jini.jeri.BasicJeriExporter;
import net.jini.jeri.tcp.TcpServerEndpoint;
import net.jini.jeri.BasicILFactory;
$JINI_HOME/doc/manpages-index.html
Geoff.
Post by liang li
hi Geoffrey,
thank you for your reply.
import com.sun.jini.start.NonActivatableServiceDescriptor;
import com.sun.jini.start.ServiceDescriptor;
import com.sun.jini.config.ConfigUtil;
com.sun.jini.start {
private static policy =
"C:\\jini2_1\\installverify\\support\\jsk-all.policy";
private static host = "192.168.8.3";
private static port = "8081";
private static jskdl = " http://" + host + ":" + port +
"/jsk-dl.jar";
Post by Geoffrey Arnold
Post by liang li
serviceDescriptors = new ServiceDescriptor[]{
new NonActivatableServiceDescriptor(
"",
policy,
"C:\\jini2_1\\lib\\classserver.jar",
"com.sun.jini.tool.ClassServer",
new String[]{"-port", port, "-dir",
"C:\\jini2_1\\lib-dl",
"-verbose"}),
new NonActivatableServiceDescriptor(
"http://" + host + ":" + port + "/browser-dl.jar" + jskdl,
policy,
"C:\\jini2_1\\lib\\browser.jar",
"com.sun.jini.example.browser.Browser",
new String[] {
"C:\\jini2_1\\installverify\\support\\browser.config" }),
new NonActivatableServiceDescriptor(
"http://" + host + ":" + port + "/reggie-dl.jar" + jskdl + "
http://" + host + ":" + port + "/jigcs-dl.jar",
policy,
"C:\\jini2_1\\lib\\reggie.jar;C:\\jini2_1\\lib\\jigcs.jar",
"com.sun.jini.reggie.TransientRegistrarImpl",
new String[]
{"C:\\jini2_1\\installverify\\support\\reggie.config" }),
......
when i tried, the same exception is thrown like before.
is there any wrong thing?
best regards
byron lee
Post by Geoffrey Arnold
Hey Byron,
Assuming you're starting Reggie using the generated "Launch-All"
scripts, simply open the file
<path_to_jini_installation_directory>/installverify/support/startAll.config
Post by Geoffrey Arnold
Post by liang li
Post by Geoffrey Arnold
on host A and change the value of the "host" variable to the desired
IP address.
Geoff.
Post by liang li
hi,all.
when i use jini starter kit 2.1, i occoured a problem,
i set more than one ip address for a network card on host A, as
Description . . . . . . . . . . . : Intel(R) PRO/100 VE Network
Connecti
Post by Geoffrey Arnold
Post by liang li
Post by Geoffrey Arnold
Post by liang li
on
Physical Address. . . . . . . . . : 00-20-ED-1E-DF-B1
DHCP Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 192.168.8.3
Subnet Mask . . . . . . . . . . . : 255.255.255.0
IP Address. . . . . . . . . . . . : 192.168.5.21
Subnet Mask . . . . . . . . . . . : 255.255.0.0
IP Address. . . . . . . . . . . . : 10.10.3.102
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 10.10.1.254
DNS Servers . . . . . . . . . . . : 10.15.1.1
192.168.8.3
there are two other lookup services running on the host B,C with
192.168.8.X,
when i start lookup service on host A, then some exception is
printed on
Post by Geoffrey Arnold
Post by liang li
Post by Geoffrey Arnold
Post by liang li
......
JoinManager - failure
java.rmi.ConnectIOException: I/O exception connecting to
BasicObjectEndpoint[6cd
012b8-ff8e-4684-9819-514fe3d93cbd,TcpEndpoint[10.10.3.102:3005]];
nested
Post by Geoffrey Arnold
Post by liang li
Post by Geoffrey Arnold
Post by liang li
excepti
java.net.NoRouteToHostException: No route to host: connect
at
net.jini.jeri.BasicInvocationHandler.wrapSafeIOException(BasicInvocat
Post by Geoffrey Arnold
Post by liang li
ionHandler.java:893)
at
net.jini.jeri.BasicInvocationHandler.invokeRemoteMethodOnce(BasicInvo
Post by Geoffrey Arnold
Post by liang li
Post by Geoffrey Arnold
Post by liang li
cationHandler.java:711)
at
net.jini.jeri.BasicInvocationHandler.invokeRemoteMethod(BasicInvocati
Post by Geoffrey Arnold
Post by liang li
Post by Geoffrey Arnold
Post by liang li
onHandler.java:659)
at
net.jini.jeri.BasicInvocationHandler.invoke(BasicInvocationHandler.ja
Post by Geoffrey Arnold
Post by liang li
Post by Geoffrey Arnold
Post by liang li
va:528)
at com.sun.jini.reggie.$Proxy43.register(Unknown Source)
at
com.sun.jini.reggie.RegistrarProxy.register(RegistrarProxy.java:107)
Post by Geoffrey Arnold
Post by liang li
Post by Geoffrey Arnold
Post by liang li
at
net.jini.lookup.JoinManager$ProxyReg.register(JoinManager.java:1222)
Post by Geoffrey Arnold
Post by liang li
Post by Geoffrey Arnold
Post by liang li
at
net.jini.lookup.JoinManager$RegisterTask.run(JoinManager.java:784)
Post by Geoffrey Arnold
Post by liang li
Post by Geoffrey Arnold
Post by liang li
at
net.jini.lookup.JoinManager$ProxyRegTask.tryOnce(JoinManager.java:608
Post by Geoffrey Arnold
Post by liang li
Post by Geoffrey Arnold
Post by liang li
)
at com.sun.jini.thread.RetryTask.run(RetryTask.java:131)
at
com.sun.jini.thread.TaskManager$TaskThread.run(TaskManager.java:331)
connect
Post by Geoffrey Arnold
Post by liang li
Post by Geoffrey Arnold
Post by liang li
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
Post by Geoffrey Arnold
Post by liang li
Post by Geoffrey Arnold
Post by liang li
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:507)
at
net.jini.jeri.tcp.TcpEndpoint$ConnectionEndpointImpl.connectToSocketA
Post by Geoffrey Arnold
Post by liang li
Post by Geoffrey Arnold
Post by liang li
ddress(TcpEndpoint.java:678)
at
net.jini.jeri.tcp.TcpEndpoint$ConnectionEndpointImpl.connectToHost(Tc
Post by Geoffrey Arnold
Post by liang li
Post by Geoffrey Arnold
Post by liang li
pEndpoint.java:608)
at
net.jini.jeri.tcp.TcpEndpoint$ConnectionEndpointImpl.connect(TcpEndpo
Post by Geoffrey Arnold
Post by liang li
Post by Geoffrey Arnold
Post by liang li
int.java:543)
at
net.jini.jeri.connection.ConnectionManager.connect(ConnectionManager.
Post by Geoffrey Arnold
Post by liang li
Post by Geoffrey Arnold
Post by liang li
java:228)
at
net.jini.jeri.connection.ConnectionManager$ReqIterator.next(Connectio
Post by Geoffrey Arnold
Post by liang li
Post by Geoffrey Arnold
Post by liang li
nManager.java:629)
at
net.jini.jeri.BasicObjectEndpoint$1.next(BasicObjectEndpoint.java:371
Post by Geoffrey Arnold
Post by liang li
Post by Geoffrey Arnold
Post by liang li
)
at
net.jini.jeri.BasicInvocationHandler.invokeRemoteMethodOnce(BasicInvo
Post by Geoffrey Arnold
Post by liang li
Post by Geoffrey Arnold
Post by liang li
cationHandler.java:708)
... 9 more
so i need to specify a ip (for example 192.168.8.3) when i start
lookup
Post by Geoffrey Arnold
Post by liang li
Post by Geoffrey Arnold
Post by liang li
service on host A. however i dont know how to config after i
googled.
Post by Geoffrey Arnold
Post by liang li
Post by Geoffrey Arnold
Post by liang li
could you help me?
best regards
byron lee
--------------------------------------------------------------------------
Post by Geoffrey Arnold
Post by liang li
Post by Geoffrey Arnold
Post by liang li
Getting Started: http://www.jini.org/wiki/Category:Getting_Started
Community
email
--------------------------------------------------------------------------
Getting Started: http://www.jini.org/wiki/Category:Getting_Started
Community Web Site: http://jini.org
jini-users Archive: http://archives.java.sun.com/archives/jini-users.html
Unsubscribing: email "signoff JINI-USERS" to ***@java.sun.com
Loading...