Re: how to specify a ip address when reggie starts
liang li <[email protected]> Mon, 5 May 2008 09:44:56 +0800
| Newsgroups | gmane.comp.java.sun.jini |
|---|---|
| Message-ID | <[email protected]> |
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
2008/5/4, Geoffrey Arnold <[email protected]>:
>
> 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.
>
> On Sun, May 4, 2008 at 1:26 AM, liang li <[email protected]> wrote:
> > 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
> >
> >
> > 2008/5/4, Geoffrey Arnold <[email protected]>:
> >
> >
> > > 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.
> > >
> > > On Sat, May 3, 2008 at 10:21 PM, liang li <[email protected]> wrote:
> > > > 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 [email protected]
> > >
> >
> >
>
--------------------------------------------------------------------------
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 [email protected]