From: Bill B. <bi...@jb...> - 2002-11-23 01:36:25
|
Are you sure provider url is correct? Jboss is trying to MCast to find JNDI by the looks of this stack trace. = JBoss does this when it does not know (and I guess) can not find JNDI. Bill -----Original Message----- From: jbo...@li... = [mailto:jbo...@li...]On Behalf Of Gary Grobe Sent: Friday, November 22, 2002 3:25 PM To: jbo...@li... Subject: [JBoss-user] CommunicationException: Peek timed out Any ideas why I'd be getting the following errors from my remote = client? --- my log files [ERROR]: Could not get JNDI context [ERROR]: Could not get JNDI context [ERROR]: NamingException javax.naming.CommunicationException: Peek = timed out [Root exception is java.io.InterruptedIOException: Peek timed = out] --- console output javax.naming.CommunicationException: Peek timed out. Root exception is = java.io.InterruptedIOException: Peek timed out at java.net.PlainDatagramSocketImpl.peek(Native Method) at java.net.DatagramSocket.receive(DatagramSocket.java:349) at = org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:930) at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1017) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:447) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:440) at javax.naming.InitialContext.lookup(InitialContext.java:345) at com.neuroquest.cais.clients.fielder.Fielder.createPTP(Unknown = Source) at com.neuroquest.cais.clients.Fielder.Fielder.main(Unknown Source) --- my ~/conf/jndi.properties which is in the classpath java.naming.factory.initial=3Dorg.jnp.interfaces.NamingContextFactory java.naming.provider.url=3Djnp://192.168.0.10:1099/ java.naming.factory.url.pkgs=3Dorg.jboss.naming:org.jnp.interfaces #jnp.socketFactory=3Dorg.jnp.interfaces.TimedSocketFactory #jnp.timeout=3D0 #jnp.sotimeout=3D0 --- And here's the code that I'm trying to connect to the server with = (which destroys a queue if already registered, and then recreates it, = for those cases where the client may go down) ... // this is the jboss server I'm connecting to remotly String adaptorName =3D "jmx:" + props.getProperty("fielder.manager") + = ":rmi"; try { InitialContext ctx =3D new InitialContext(); RMIAdaptor adaptor =3D (RMIAdaptor) ctx.lookup(adaptorName); ObjectName name =3D new = ObjectName("jboss.mq:service=3DDestinationManager"); RemoteMBeanServer server =3D new RMIConnectorImpl(adaptor); ObjectName queName =3D new ObjectName("queue/myQueue"); boolean registered =3D server.isRegistered(queName); String[] sig =3D {"java.lang.String"}; Object[] arg =3D {props.getProperty("myQueue")}; if (registered) { log.info(Fielder.class, "already registered, destroying queue"); server.invoke(name, "destroyQueue", arg, sig); } log.info(Fielder.class, "creating queue"); server.invoke(name, "createQueue", arg, sig); --- It was suggested that I do the telnet command below to make sure the = naming server is there, and it is. $ telnet 192.168.0.10 1099 Trying 192.168.0.10... Connected to 192.168.0.10. Escape character is '^]'. =C2=AC=C3=AD ?sr ?java.rmi.MarshalledObject|=C2=BD?-=C3=ADc=C3=BC>? ?I = ?hash[locBytest ?[B[objBytesq ~ ?x p=C2=A74Y?ur ?[B=C2=AC=C3=B3?oT=C3=A0? xp %=C2=AC=C3=AD ?t = =C2=B6http://banshee:8083/q ~ q ~ uq ~ ? A=C2=AC=C3=AD ?sr org.jnp.server.NamingServer_Stub ?? xr = ?java.rmi.server.RemoteStub=C3=A9_=C3=9C=C3=89<=C3=A1e ?? xr ?java.rmi.server.RemoteObjectOa'`?a3?? xpw7 ?UnicastRef2 = ?172.17.66.55U Any help/advice/ideas much appreciated.=20 |