cn-uofbasel / ccn-lite

CCN-lite, a lightweight implementation of the CCNx protocol and its variations
ISC License
74 stars 63 forks source link

Content is not sent consistently #264

Closed pgetsos closed 6 years ago

pgetsos commented 6 years ago

First of all, I'd like to apologise if it's a problem due to my misunderstanding of the way CCN-Lite is supposed to be working or setup.

I have a problem when asking for content from another node, while the content exists. It seems to randomly either return the content or timeout, and re-running the peek command may or may not change this result.

Even by just following the tutorial on one machine, if I run the command in succession multiple times (with or without some time from peek to peek) I get both results, e.x.:

>pgetsos@pgetsos-VirtualBox:/Documents$ $CCNL_HOME/build/bin/ccn-lite-peek -s ndn2013 -u 127.0.0.1/9998 "/ndn/test/mycontent"   | $CCNL_HOME/build/bin/ccn-lite-pktdump -f 2
[W] 3.0010: re-sending interest
[W] 6.0050: re-sending interest
timeout
pgetsos@pgetsos-VirtualBox:/Documents$ $CCNL_HOME/build/bin/ccn-lite-peek -s ndn2013 -u 127.0.0.1/9998 "/ndn/test/mycontent"   | $CCNL_HOME/build/bin/ccn-lite-pktdump -f 2
This is a test!
pgetsos@pgetsos-VirtualBox:/Documents$ $CCNL_HOME/build/bin/ccn-lite-peek -s ndn2013 -u 127.0.0.1/9998 "/ndn/test/mycontent"   | $CCNL_HOME/build/bin/ccn-lite-pktdump -f 2
This is a test!
pgetsos@pgetsos-VirtualBox:/Documents$ $CCNL_HOME/build/bin/ccn-lite-peek -s ndn2013 -u 127.0.0.1/9998 "/ndn/test/mycontent"   | $CCNL_HOME/build/bin/ccn-lite-pktdump -f 2
[W] 3.0040: re-sending interest
This is a test!
pgetsos@pgetsos-VirtualBox:/Documents$ $CCNL_HOME/build/bin/ccn-lite-peek -s ndn2013 -u 127.0.0.1/9998 "/ndn/test/mycontent"   | $CCNL_HOME/build/bin/ccn-lite-pktdump -f 2
[W] 3.0050: re-sending interest
[W] 6.0080: re-sending interest
timeout
pgetsos@pgetsos-VirtualBox:/Documents$ $CCNL_HOME/build/bin/ccn-lite-peek -s ndn2013 -u 127.0.0.1/9998 "/ndn/test/mycontent"   | $CCNL_HOME/build/bin/ccn-lite-pktdump -f 2
[W] 3.0040: re-sending interest
[W] 6.0070: re-sending interest
timeout

I use the latest commit, but the problem has existed in past version as well (at least since February I think, when I started working with CCN-Lite)

blacksheeep commented 6 years ago

I think, the problem here is, that the nonce is not randomized correctly. Can you please verify that the debug output of the ccn-lite-relay shows sth like "duplicated nonce"?

pgetsos commented 6 years ago

Yes, many times it is shown. Is there any way to avoid it?

blacksheeep commented 6 years ago

This occurs when peek for some reasons do not generate a correct random nonce. Using the latest Version from the Repository should avoid this problem (please inform me if it does not).

Additionally, you can disable

-DUSE_DUP_CHECK

in src/CMakeLists.txt. After that you should delete the buildtree to completely recreate it, since CMake sometimes caches active Flags.

Christopher Scherb, MSc University of Basel Computer Network Group Room 04.004 Spiegelgasse 1 CH-4051 Basel, Switzerland E-Mail: christopher.scherb@unibas.ch

On Fri, Jun 8, 2018 at 7:13 PM Petros Getsopoulos notifications@github.com wrote:

Yes, many times it is shown. Is there any way to avoid it?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/cn-uofbasel/ccn-lite/issues/264#issuecomment-395861019, or mute the thread https://github.com/notifications/unsubscribe-auth/ADeQ_REK-MBLo5xmYFvJBy26llvB1mkuks5t6szJgaJpZM4USbKV .

pgetsos commented 6 years ago

Thank you for your quick response, I will be able to try it after Monday and will let you know

mfrey commented 6 years ago

Any update on this issue, @pgetsos ? TIA

pgetsos commented 6 years ago

Sorry for the late answer, I never saw the notification and forgot to update. Everything seems fine now, thank you again!