mettli / libjingle

Automatically exported from code.google.com/p/libjingle
0 stars 0 forks source link

Fail running pcp app in libjingle 0.6.13 #334

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. The goal of my work is to be able to build p2p nodes streaming video to each 
other. I started with pcp (file transfer app).

Using guide line from a previous question i.e.
http://code.google.com/p/libjingle/issues/detail?id=320

I modified libjingle.scons and was able to successfully build pcp app.

Now i am trying to transfer a .txt file between two instances of pcp on the 
same machine (I know the same binary can be used but from different locations 
as advised in the documentation).

2. First i started a file receiver / listener. Logs are attached as receiver 
file. It logged in successfully and was listening for incoming connections.

i.e. $ ./pcp jinglelib@gmail.com 

3. Second i tried a instance of pcp to send a file. It gets through 
successfully to the login stage but latter fails to establish a p2p connection. 
This is as much as i could gather.

i.e. $ ./libjingle-0.6.13/talk/build/dbg/staging/pcp jinglelib@gmail.com 
fayyaztestfile.txt jinglelib@gmail.com:jingle_out.txt

I have tried this using two different gmail id's as well. But it doesn't make 
any difference.

What is the expected output? What do you see instead?

The file should be transferred successfully. However, it fails to establish a 
p2p connection though google xmpp server authentication is successful. Finally 
the sender logs out.

What version of the product are you using? On what operating system?

libjingle 0.6.13 on Fedora 14 64 bit machine.

Please provide any additional information below.

I know that pcp has been discontinued since 0.4. However, i have tried 
extensively to build older versions of libjingle without any success. 0.6 was 
the only one in which after going through many issues, i was able to build and 
run.

Any help in this regard would be really appreciated.

Thanks,
Fayyaz

Original issue reported on code.google.com by fayya...@gmail.com on 5 Apr 2012 at 7:54

Attachments:

GoogleCodeExporter commented 9 years ago
Can any one provide at least some clue? I recently tried disabling ip tables 
too. But it didn't make any difference to the output.

Thanks

Original comment by fayya...@gmail.com on 9 Apr 2012 at 4:47

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I am running into the same problem. Have you been able to trace down a solution?

Thanks,
KMC

Original comment by Cummings.Kyle.M on 22 Jun 2012 at 1:23

GoogleCodeExporter commented 9 years ago
Also, looking at the posted 'receiver.txt' it appears that your receiver end 
waits for a response. Is this happening for your code? Or does it terminate 
after some period of time without you killing it? My receiver side seems to 
terminate within 5-6 seconds of being run.

Thanks again,
KMC

Original comment by Cummings.Kyle.M on 22 Jun 2012 at 1:26

GoogleCodeExporter commented 9 years ago
No i wasn't successful in running pcp application though i compiled it 
successfully using libjingle version 0.6.14 by modifying the configuration 
file. I left working on it at that point.

And yes receiver.txt kept waiting rather it kept printing logs every few 
seconds and i had to break with ctrl-c

Termination used to happen in my case when authentication with gmail server was 
failing. Once that is successful (which was the case with me), it just never 
was able to transfer the file

Original comment by fayya...@gmail.com on 26 Jun 2012 at 11:42

GoogleCodeExporter commented 9 years ago
Fayya/Anyone Else Trying To Get PCP Working,

I was finally about to get this all working on v0.6.14. Having done that, I 
know why this failed for you, if you are interested. You correctly started the 
receiver instance, however, when you run the sender instance you did not 
provide the full JID of the receiver email. Once you login for the receiver, 
search for: "logged in as" and take the resource (everything after the ".com/". 
Then, add that to the end of the sender arguments. 

In the specific code that you posted, the receiver 
(jinglelib@gmail.com/pcp2D4322E5) has a resource of pcp2D4322E5. Thus, when you 
set up the sender, it should look like this: .../pcp jinglelib@gmail.com 
fayyaztestfile.txt jinglelib@gmail.com/pcp2D4322E5:jingle_out.txt

This is because the priority of the email is set to "-1," which in XMPP code 
means that only messages/information/requests being sent to the email will NOT 
be passed to it unless the full JID is provided. That is why you were getting 
the 503: service unavailable error.

If you get fix this and then get an Assertion error when the tunnel is trying 
to connect/establish (look at Issue 371 for reference), then Issue 135 is the 
solution to that problem.

Original comment by Cummings.Kyle.M on 10 Jul 2012 at 5:27

GoogleCodeExporter commented 9 years ago
Great news! Thanks a lot Cummings.

I really appreciate your feedback. It has been a while since i moved on from 
this one. But i definitely would like to work it out and will let you know.

Regards,
Fayyaz

Original comment by fayya...@gmail.com on 10 Jul 2012 at 8:19

GoogleCodeExporter commented 9 years ago
Hi, 
I am new to scons. Can you share what needs to be added to libjingle.scons file 
to build pcp.exe? 

Thanks! 

Original comment by praveenk...@gmail.com on 11 Jul 2012 at 1:03

GoogleCodeExporter commented 9 years ago
In the scons file, scroll down to: 

talk.App(env, name = "call",

and copy that whole definition section. Then, paste that all between the "call" 
App and the relayserver App sections. 
Change: 

talk.App(env, name = "call",
to
talk.App(env, name = "pcp", 

Then delete everything within the 'srcs = [...' section of the "pcp" App and 
add (including the comma): 

examples/pcp/pcp_main.cc",

Original comment by Cummings.Kyle.M on 11 Jul 2012 at 1:21

GoogleCodeExporter commented 9 years ago
Sorry, the quote in the last line got deleted. It should be:

"examples/pcp/pcp_main.cc",

Original comment by Cummings.Kyle.M on 11 Jul 2012 at 1:23

GoogleCodeExporter commented 9 years ago
Great that works! Thanks! 

Original comment by praveenk...@gmail.com on 11 Jul 2012 at 5:26

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Please show me how compiler pcp_main.cc
I was compiler & build project libjingle(0.6.14) on Ubuntu(12.04)
I was installed pcp by: sudo apt-get install pcp.
Then,I run: $ path_to_pcp/ thaitam.fetel.2406@gmail.com
It display: "cannot connect to PMCD on host "pcp 
thaitam.fetel.2406@gmail.com:connect timed out"
Help me solution it.
Thanks very much.

Original comment by thaitam....@gmail.com on 9 Aug 2012 at 3:35

GoogleCodeExporter commented 9 years ago
I do not know why you are installing pcp via apt-get. You build the pcp example 
by adding the following to the libjingle.scons file:
talk.App(env, name = "pcp",
         posix_libs = [
           "crypto",
           "ssl",
         ],
         srcs = [
           "examples/pcp/pcp_main.cc",
         ],
     libs = [
           "jingle",
           "expat",
           "srtp",
           "xmpphelp",
         ],
)

Then follow the instructions in the README file to build the program.

Original comment by Cummings.Kyle.M on 9 Aug 2012 at 4:06

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I begin fist with logging.
i.e $ ./pcp jinglelib@gmail.com 
But it cannot logging.It display"failed to connect".Log in attach a file 
"receiver".
Help me solution this problem.
Thanks.

Original comment by thaitam....@gmail.com on 9 Aug 2012 at 6:07

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
jinglelib@gmail.com was originally a valid gmail id i was using to authenticate 
with xmpp servers. Obviously you dont know the password.

You should use any gmail id, enter id first then when prompted for password use 
that.

Be sure that you have enabled open SSL earlier which should be part of 
instructions given in README file. Without that you cannot authenticate with 
gmail.

Original comment by fayya...@gmail.com on 9 Aug 2012 at 7:08

GoogleCodeExporter commented 9 years ago
Yes.
$ ./pcp jinglelib@gmail.com is example.
Actully i run: $ ./pcp thaitam.fetel.2406@gmail.com
And i sure have enable openSSL v 1.0.
But it still fail

Original comment by thaitam....@gmail.com on 9 Aug 2012 at 7:26

GoogleCodeExporter commented 9 years ago
In README file it instruction: To build with new OpenSSL features, you need to 
add the
    "HAS_OPENSSL_1_0" to the cppdefine under the
    "talk.Library(env, name = jingle..." section in the "libjingle.scons" file.
But in the "libjingle.scons" file in libjingle(0.6.14) have available 
"HAS_OPENSSL_1_0" to the cppdefine under the "talk.Library(env, name = 
jingle...".

Original comment by thaitam....@gmail.com on 9 Aug 2012 at 7:49

GoogleCodeExporter commented 9 years ago
When you say that it is still failing, it is giving you the same "[006:595] 
RECV <<<<<<<<<<<<<<<<<<<<<<<<< : Fri Aug 10 00:53:40 2012
[006:595]    <failure xmlns="urn:ietf:params:xml:ns:xmpp-sasl">
[006:595]      <not-authorized/>
[006:595]    </failure>
logged out...
error: Failed to connect"

If so and you have the "HAS_OPEN_SSL_1_0" in the scons file, the openssl files 
in the third party folder and have built the pcp example with these, then the 
only thing that I can think of is that you are providing wrong credentials (the 
provided password does not match the e-mail address). 

Original comment by Cummings.Kyle.M on 9 Aug 2012 at 8:38

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I have problem the same as Fayyaz.Althought i fix code in the 
tunnelsessionclient.cc At line 173.I detele line 173 and 172.Then I add new 
lines:
talk_base::StreamInterface* resStream = tunnel->GetStream();    // must be called 
//prior to Accept in order install the SSLStreamAdapter
session->Accept(answer);
return resStream;
Then i recompiler libjingle.
I also have provided full JID. $ ./project/libjingle/talk/build/dbg/staging/pcp 
thaitam.fetel.2406@gmail.com a thaitam.fetel.2406@gmail.com/pcp1C7FC2C2:b
I run on 1 host.I open 2 terminal and sender file a(plain text document) in 
directoty: Home; file b(plain text document) in directory : desktop.
what' wrong?
Please help me.
Thanks!

Original comment by thaitam....@gmail.com on 10 Aug 2012 at 2:55

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
In Issue 371:
1. Compile Libjingle 0.6.14 as described in the README
2. From Libjingle/talk, execute: ./build/dbg/staging/pcp --verbose 
receiver@gmail.com
3. Read full resource from receiver@gmail.com connection
4. From Libjingle/talk/build/dbg/staging, execute: ./pcp --verbose 
sender@gmail.com file_read.extension receiver@gmail.com/(full 
resource):file_write.extension
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
I don't undertand meaning file_read & file_write.Can i use serder & receiver 
the same gmail:thaitam.fetel.2406@gmail.com.
My file is a(plain text document).i can only put a in commentline?

Original comment by thaitam....@gmail.com on 10 Aug 2012 at 3:39

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
The file_read argument is the file that is to be read and transmitted to the 
other user, and file_write is the file that is to be written by the receiver. 
So, if I wanted to send a jpeg, called "cabernet", to you and you wanted it 
called "greatest_wine", then the command would be 
./pcp --verbose sender@gmail.com cabernet.jpeg receiver@gmail.com/(full 
resource):greatest_wine.jpeg

I am not sure if you can use the same e-mail, I never thought about trying that 
because I figured it would not work. I never was able to get text documents to 
work over the pcp example and never bothered to figure out why since I am using 
the program to send jpegs.

Original comment by Cummings.Kyle.M on 10 Aug 2012 at 3:30

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Yes.I thanks Cummings very much.
I have success sender file on 2 VM using pcp example in 1 Lan.Now I test it in 
2 Lan.
I hope it run correct.

Original comment by thaitam....@gmail.com on 11 Aug 2012 at 6:18

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Hi Cummings & Fayyaz.
Now i want send file from Ubuntu and receiver by Android phone.
Please show me way do it!

Original comment by thaitam....@gmail.com on 15 Aug 2012 at 5:35

GoogleCodeExporter commented 9 years ago
I want run pcp example on android phone (receiver) & Ubuntu(sender).
So do this,i must write code JNI from pcp_main.cc
But i don't know write JNI code.
Can Cummings & Fayyaz help me?Or instruction me write  JNI/Wrapper class.
Thanks very much.

Original comment by thaitam....@gmail.com on 15 Aug 2012 at 10:18

GoogleCodeExporter commented 9 years ago
When I was developing programs using JNI, I was able to pick up how by using 
http://java.sun.com/docs/books/jni/download/jni.pdf and 
http://home.pacifier.com/~mmead/jni/cs510ajp/index.html as guides/references. 
It is not a very difficult thing to learn, it just takes a bit to get used to 
the terminology used.

Original comment by Cummings.Kyle.M on 15 Aug 2012 at 2:59

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]