Skip to main content

No RendezVous found for the peer group NetPeerGroup

1 reply [Last post]
phantasmo
Offline
Joined: 2007-03-09

Hi all :)
I'm trying to run ExampleClientSocket which uses p2psockets library, but here's what I get:

[Signing In] Using JXTA_HOME = .\.jxta
:132> JXTA_HOME = file:/C:/Documents%20and%20Settings/Veggen/jxta/.jxta/
Log4J [user default] requested, not adjusting logging priority
Log4J [user default] requested, not adjusting logging priority
Waiting for RendezVous Connection.
java.lang.RuntimeException: No RendezVous found for the peer group NetPeerGroup
at org.p2psockets.P2PNetwork.contactRendezVous(P2PNetwork.java:441)
at org.p2psockets.P2PNetwork.signin(P2PNetwork.java:309)
at org.p2psockets.P2PNetwork.signin(P2PNetwork.java:254)
at jxta.ExampleServerSocket.main(ExampleServerSocket.java:19)
Java Result: 1

I have no experience in JXTA, that's why I was hoping p2psockets would help me... Anyway, does anyone have any ide what could be wrong here?? I just copy/pasted the code, didn't know if there was anything that should be changed... Here's the code in case you need it:

package jxta;

import java.io.InputStream;
import java.io.OutputStream;
import java.io.DataOutputStream;
import java.io.DataInputStream;
import java.net.Socket;
import org.p2psockets.P2PSocket;
import org.p2psockets.P2PNetwork;

public class ExampleClientSocket {
public static void main(String args[]) {
try {
System.out.println("Signing into the P2P network..");
P2PNetwork.signin("clientpeer", "clientpeerpassword", "TestNetwork", true);

System.out.println("Connecting to server socket! at " + "www.nike.laborpolicy:100...");
Socket socket = new P2PSocket("www.nike.laborpolicy", 100);
System.out.println("Connected.");

DataInputStream in = new DataInputStream(socket.getInputStream());
DataOutputStream out = new DataOutputStream(socket.getOutputStream());
String results = in.readUTF();
System.out.println("Message from server: " + results);
out.writeUTF("Hello server world!");

// shut everything down
socket.close();
}

catch (Exception e) {
e.printStackTrace();
System.exit(1);
}
}
}

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
tra
Offline
Joined: 2003-06-16

The Socket API is now directly available from the core JXTA platform. You
don't need the p2psocket abstraction. Check the JXTA socket tutorial
on jxta.org.

B.

> Hi all :)
> I'm trying to run ExampleClientSocket which uses
> p2psockets library, but here's what I get:
>
> > P2PNetwork::signin:274> [Signing In] Using JXTA_HOME
> = .\.jxta
> > NullConfigurator:::132> JXTA_HOME =
> file:/C:/Documents%20and%20Settings/Veggen/jxta/.jxta/
>
> > NullConfigurator::adjustLog4JPriority:316> Log4J
> [user default] requested, not adjusting logging
> priority
> > NullConfigurator::adjustLog4JPriority:316> Log4J
> [user default] requested, not adjusting logging
> priority
> > P2PNetwork::contactRendezVous:431> Waiting for
> RendezVous Connection.
> java.lang.RuntimeException: No RendezVous found for
> the peer group NetPeerGroup
> at
> org.p2psockets.P2PNetwork.contactRendezVous(P2PNetwork
> .java:441)
> at
> org.p2psockets.P2PNetwork.signin(P2PNetwork.java:309)
> at
> org.p2psockets.P2PNetwork.signin(P2PNetwork.java:254)
> at
> jxta.ExampleServerSocket.main(ExampleServerSocket.java
> :19)
> Java Result: 1
>
> I have no experience in JXTA, that's why I was hoping
> p2psockets would help me... Anyway, does anyone have
> any ide what could be wrong here?? I just copy/pasted
> the code, didn't know if there was anything that
> should be changed... Here's the code in case you need
> it:
>
> package jxta;
>
> import java.io.InputStream;
> import java.io.OutputStream;
> import java.io.DataOutputStream;
> import java.io.DataInputStream;
> import java.net.Socket;
> import org.p2psockets.P2PSocket;
> import org.p2psockets.P2PNetwork;
>
> public class ExampleClientSocket {
> public static void main(String args[]) {
> try {
> System.out.println("Signing into the P2P
> network..");
> P2PNetwork.signin("clientpeer",
> "clientpeerpassword", "TestNetwork", true);
>
> System.out.println("Connecting to server
> socket! at " + "www.nike.laborpolicy:100...");
> Socket socket = new
> P2PSocket("www.nike.laborpolicy", 100);
> System.out.println("Connected.");
>
> DataInputStream in = new
> DataInputStream(socket.getInputStream());
> DataOutputStream out = new
> DataOutputStream(socket.getOutputStream());
> String results = in.readUTF();
> System.out.println("Message from server: " +
> results);
> out.writeUTF("Hello server world!");
> // shut everything down
> socket.close();
> }
>
> catch (Exception e) {
> e.printStackTrace();
> System.exit(1);
> }
> }