Skip to main content

JxtaSocket timeout

4 replies [Last post]
thanhlb
Offline
Joined: 2004-04-07

Dear all,

I got tutorials from JXTA homepage and I can not run JxtaSocket example. This raise TimeoutException.
* The message of ServerSocket.java:
Starting ServerSocket
Waiting for connection
--> maybe OK on Server side.

* And exception here with ClientSocket.java:
Run #1
Connecting to the server
Open SOCKET..NetPeerGroup
java.net.SocketTimeoutException: Connection timeout (resolve)
at net.jxta.socket.JxtaSocket.connect(JxtaSocket.java:658)
at net.jxta.socket.JxtaSocket.connect(JxtaSocket.java:579)
at net.jxta.socket.JxtaSocket.connect(JxtaSocket.java:567)
at net.jxta.socket.JxtaSocket.(JxtaSocket.java:335)
at SocketClient.run(SocketClient.java:80)
at SocketClient.main(SocketClient.java:149)

Could you tell me why this exception occurs?

Thanks

-Thanh

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
drrsatzteil
Offline
Joined: 2007-03-23

Hi thanhlb,

Are you trying to exchange messages between peers in a NAT environment?

It seems that you don't have a relay peer configured so that there is no route from one peer to another.

Greetings,
Thomas

thanhlb
Offline
Joined: 2004-04-07

Hi Thomas,

Thanks for your reply.

I am current testing JXTASocket on LAN, and this LAN is not managed by any firewall. So I think I don't need Peer Relay, it is right?

Thanh

Message was edited by: thanhlb

zilchinger
Offline
Joined: 2007-07-17

Hi,
I have got a similar problem.
I'am using JXTA 2.5 and I did the JXTAServerSocker Tutorial from the Developer Draft.
I am testing my Client and Server in a LAN and everything works fine. But sometims the problem is, that i don't get a connection to the JXTAServerSocket, so the Client gets a timeout after a view seconds. If I try it again, it works for some requests, than I have the same problem...!

Does anybody know, what the problem is?
If the problem occures, I get the following warning:
WARNUNG: [urn:jxta:jxta-NetGroup "NetPeerGroup"[1] / urn:jxta:jxta-WorldGroup "World PeerGroup"[1]] Discarding net.jxta.endpoint.Message@6934571(7){244}. No listener for PipeService/urn:jxta:uuid-59616261646162614E50472050325033FADD3EAADFD348D1B073941301B4E6B904
17.07.2007 13:30:18 net.jxta.impl.pipe.InputPipeImpl

Thanks,
Stefan

thanhlb
Offline
Joined: 2004-04-07

Hi Stefan,
Could you try this code? The domain of JXTA changed so some links is not correct.

https://jxta-guide.dev.java.net/source/browse/jxta-guide/trunk/src/examp...

Great day.

-Thanh