Re: [JXTA discuss] How to start the tutorial client server examples on a single machine?

Bruce Rosenthal <[email protected]> Fri, 19 Aug 2005 10:24:49 -0700
Newsgroups gmane.comp.java.jxta.general
Message-ID <[email protected]>
--------------040302090500060005080406
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

So I am a few steps before this trying to get caught up.

Background: Running the PipeService sample in NetBeans IDE 4.1 (all 
samples for that matter). Added the jxta distribution jars to my 
Library. I have the PipeExample in a top source directory with 
PipeListener under that directory.

Currently, my PipeListener compiles fine as does the PipeExample. When I 
run, however, pipexample.adv is not found. I have a copy of this file in 
both of the source directories mentioned above, and also in the 
<PROJECT_HOME>/build directories where the two classes are (and these 
also follow the same directory structure as the source so PipeListener 
is under the PipeExample directory.

The .jxta directory is located currently at the folder level above 
PipeExample, so the structure is:

JxtaApps1
    .jxta
    PipeExample
       PipeListener

What is wrong?

Bruce Rosenthal

Cédric Hyppolite wrote:

> Alex,
>
> IMHO the jxta setup would still fail with an automatic port selection  
> since the .jxta directories would still be shared by the two peers.
>
> Regards,
>
> Cedric
>
>
> Le 19 août 05 à 15:03, Alex Lynch a écrit :
>
>> Dont change the ports on both peers to the same thing. Make them  
>> different or they will collide.
>> This problems should be detected and avoided by the configuration  
>> optimizers. This is a very important problem, because it causes  many 
>> newbie testers to think that jxta doesn't work.
>>
>> Please, please, someone contact whomever is responsible for the  jxta 
>> auto config process and ask him to include a tcp port  availability 
>> check (it should be simple, just loop over  ServerSockets and 
>> IOExceptions until you find an open port).
>>
>> Thanks,
>>
>> Alex
>>
>> Hartmut Benz wrote:
>>
>>
>>> Hi,
>>>
>>> Both peers default to the same ports...
>>> From memory:
>>> Clean out one of the directories (the .jxta) and start again.
>>> When the configuration screen comes up, go to the "advances" tab  
>>> and  change the two instances of 9701 to something else, e.g. 19701.
>>> Hartmut
>>>
>>> On Thu, 18 Aug 2005 21:13:53 +0200, Bikash Agarwalla   
>>> <[email protected]> wrote:
>>>
>>>
>>>> Sorry if you receive multiple copies - I have trying the example   
>>>> included in the jxta programmer tutorial - "PipeService". I keep  
>>>> getting  the error "java.net.BindException: Address already in use
>>>> " when I run the client and server on the same machine. I have  
>>>> tried to  run the client and server from different directories  (as 
>>>> recommended in  the tutorial), but I still get the same error  as 
>>>> follows:
>>>> "<FATAL 2005-08-18 15:12:29,527   
>>>> IncomingUnicastServer::openServerSocket:368> Cannot bind  
>>>> ServerSocket on  /0.0.0.0:9701"
>>>>
>>>> It seems both client and server are trying to bind to port 9701  
>>>> for the  default peer group initialization. How do I get around  
>>>> this problem?
>>>>
>>>> Thanks for your help.
>>>> Bikash
>>>>
>>>>
>>>> -------------------------------------------------------------------- -
>>>> To unsubscribe, e-mail: [email protected]
>>>> For additional commands, e-mail: [email protected]
>>>>
>>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [email protected]
>>> For additional commands, e-mail: [email protected]
>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
>>
>
> Ciao,
>
> Cédric
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>


--------------040302090500060005080406
Content-Type: text/plain; charset=us-ascii

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
--------------040302090500060005080406--