MLDonkey Forum Index
Homepage •  Bugs •  Tasks •  Patches •  SF.net Project Page •  ChangeLog •  German forum •  Links •  Wiki •  Downloads
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
[SOLVED] KAD bootstrapping and more
Goto page 1, 2  Next
 
Post new topic   Reply to topic    MLDonkey Forum Index -> Problems with MLDonkey Client (in general, and ed2k, kad, overnet)
View previous topic :: View next topic  
Author Message
rpns
neophyte


Joined: 26 Oct 2010
Posts: 7

PostPosted: Tue Oct 26, 2010 4:23 pm    Post subject: [SOLVED] KAD bootstrapping and more Reply with quote

Hi, all.

I have encountered the following problem using v. 3.0.0 on Linux.
Kad has never got enough peers despite any known peers list I could obtain.
Code:

 web_infos = [
  (kad, 0, "http://upd.emule-security.net/nodes.dat");
  (kad, 0, "http://kademlia.ru/download/nodes.dat");
...]


Files have been successfully downloaded
Code:

Eval command: vwi

kind / period / url / state :
kad ; 0 ; http://upd.emule-security.net/nodes.dat; File loaded
kad ; 0 ; http://kademlia.ru/download/nodes.dat; File loaded
...


However, there are some weird errors during processing them (from the log):
Code:

2010/10/26 19:10:32 [dMain] loading kad from web_infos/nodes.dat
(binary garbage)
2010/10/26 19:10:32 [KAD] BAD LINE ocl: (binary garbage)
2010/10/26 19:10:32 [KAD] BAD LINE ocl: (binary garbage)

and a moment later (I'm not sure if this is connected with Kad):
Code:

2010/10/26 19:10:47 [DNS] could not resolve (binary garbage), check URL  (binary garbage)


This issue looks like an unsolved problem here (in Russian):
http://mldonkey.sourceforge.net/forums/viewtopic.php?t=5301

I'd appreciate any help!


Last edited by rpns on Tue Nov 30, 2010 10:41 pm; edited 3 times in total
Back to top
View user's profile Send private message
ygrek
professional


Joined: 20 Mar 2010
Posts: 521

PostPosted: Tue Oct 26, 2010 10:29 pm    Post subject: Reply with quote

Obviously nodes.dat format has changed. Try this patch : http://repo.or.cz/w/mldonkey.git/patch/2b5c947
You will need at least 3.0.5 or current CVS for the patch to apply cleanly or get directly the git snapshot with the patch applied.
_________________
Download | Report bugs | git mirror
Back to top
View user's profile Send private message Visit poster's website
rpns
neophyte


Joined: 26 Oct 2010
Posts: 7

PostPosted: Fri Oct 29, 2010 12:01 am    Post subject: Reply with quote

Thank you, ygrek!

I have applied your patch against v 3.0.5 and the client now works as expected.

I'm looking forward to the next release. Smile

P.S. Since this is a forum, not a bugtracker, I'll ask another question.
Even started with the empty directory, the (patched) v.3.0.5 says on terminating
Code:

2010/10/29 03:29:19 [cCO] Options correctly saved
2010/10/29 03:29:19 [cCO] Sources correctly saved
2010/10/29 03:29:19 [cCO] Tar: skipping bittorrent.ini, error Gzip.Error("error during compression")
2010/10/29 03:29:19 [cCO] Exception Failure("Tar: skipped bittorrent.ini due to backup errors") while options backup
2010/10/29 03:29:19 [cCO] Options backup as .tar.gz correctly saved

In fact, the created tar.gz. archive contains bittorrent.ini.

This is not normal, is it?
Back to top
View user's profile Send private message
ygrek
professional


Joined: 20 Mar 2010
Posts: 521

PostPosted: Sat Oct 30, 2010 11:00 am    Post subject: Reply with quote

Quote:
This is not normal, is it?

Yep. Actually I remember seeing this message myself, but I didn't pay attention and now it doesn't reproduce. Can you send me bittorrent.ini which causes problems?
_________________
Download | Report bugs | git mirror
Back to top
View user's profile Send private message Visit poster's website
spiralvoice
Sage


Joined: 06 Jan 2003
Posts: 3982
Location: Germany

PostPosted: Sat Oct 30, 2010 4:18 pm    Post subject: Reply with quote

ygrek wrote:
Try this patch : http://repo.or.cz/w/mldonkey.git/patch/2b5c947

ygrek posted the patch on Savannah: https://savannah.nongnu.org/patch/?7364

I just added some Makefile stuff there, please test.
_________________
Link overview and precompiled cores here: http://mldonkey.sourceforge.net/DownloadLinks
Back to top
View user's profile Send private message
rpns
neophyte


Joined: 26 Oct 2010
Posts: 7

PostPosted: Sun Oct 31, 2010 5:08 pm    Post subject: Reply with quote

spiralvoice wrote:
I just added some Makefile stuff there, please test.

I have tried both patches with v 3.0.5 (yours was https://savannah.nongnu.org/patch/download.php?file_id=21874, right?)

If I configure the sources with --disable-bittorrent
Code:

Configuring MLDonkey 3.0.5 completed.

Network modules:
 - eDonkey           enabled (eMule SUI enabled)
 - BitTorrent                disabled
 - FileTP (aka wget) enabled
 - Fasttrack                 disabled
 - Gnutella                  disabled - unmaintained
 - Gnutella2                 disabled - unmaintained
 - Direct Connect    enabled
 - Open Napster              disabled - currently not usable
 - Soulseek                  disabled - currently not usable
 - OpenFT                    disabled - currently not usable

Core features:
 - zlib (required)   enabled
 - threads           enabled
 - bzip2             enabled
 - iconv             enabled
 - libmagic          enabled
 - graphical stats   enabled
   - png support     enabled
   - jpg support     enabled

Compilers:
 - Ocaml version     3.10.2
 - x86_64-pc-linux-gnu-gcc version       4.4.4
 - x86_64-pc-linux-gnu-g++ version       4.4.4

then it doesn't compile:
Code:

ocamlopt.opt -inline 10    -I src/utils/cdk  -I src/utils/bitstring  -I src/utils/lib  -I src/utils/ocamlrss  -I src/utils/xml-light  -I src/utils/net  -I tools  -I src/daemon/common  -I src/daemon/driver  -I src/utils/mp3tagui  -I src/config/unix  -I src/networks/direct_connect  -I src/networks/fileTP  -I src/networks/donkey -I +camlp4 -c src/networks/bittorrent/bTTypes.ml
File "src/networks/bittorrent/bTTypes.ml", line 25, characters 0-11:
Unbound module BTRate


Otherwise, there is no problem I can report.

ygrek wrote:
Can you send me bittorrent.ini which causes problems?

Surely. Here it is: http://pastebin.com/mBhx4BQR
Please note this file was created by the client that had been started in the clean directory.
Back to top
View user's profile Send private message
spiralvoice
Sage


Joined: 06 Jan 2003
Posts: 3982
Location: Germany

PostPosted: Sun Oct 31, 2010 6:26 pm    Post subject: Reply with quote

rpns wrote:
If I configure the sources with --disable-bittorrent [...] then it doesn't compile

Wfm, which make target are you using? Please verify that all patches apply
cleanly, start in a clean dir with a fresh CVS checkout to be sure no leftovers
may cause problems.

EDIT: Please note that you can not (even with unpatched CVS) compile the
util make_torrent when using ./configure --disable-bittorrent.
_________________
Link overview and precompiled cores here: http://mldonkey.sourceforge.net/DownloadLinks
Back to top
View user's profile Send private message
rpns
neophyte


Joined: 26 Oct 2010
Posts: 7

PostPosted: Sun Oct 31, 2010 9:19 pm    Post subject: Reply with quote

spiralvoice wrote:
Please note that you can not (even with unpatched CVS) compile the
util make_torrent when using ./configure --disable-bittorrent.


Probably, that's the point.

The target failed to compile is "utils", while "all" compiles properly.
Back to top
View user's profile Send private message
spiralvoice
Sage


Joined: 06 Jan 2003
Posts: 3982
Location: Germany

PostPosted: Mon Nov 01, 2010 5:34 pm    Post subject: Reply with quote

spiralvoice wrote:
ygrek wrote:
Try this patch : http://repo.or.cz/w/mldonkey.git/patch/2b5c947

ygrek posted the patch on Savannah: https://savannah.nongnu.org/patch/?7364

I just added some Makefile stuff there, please test.

committed to CVS
_________________
Link overview and precompiled cores here: http://mldonkey.sourceforge.net/DownloadLinks
Back to top
View user's profile Send private message
rpns
neophyte


Joined: 26 Oct 2010
Posts: 7

PostPosted: Thu Nov 04, 2010 5:30 am    Post subject: Reply with quote

rpns wrote:
v.3.0.5 says on terminating
Code:
2010/10/29 03:29:19 [cCO] Options correctly saved
2010/10/29 03:29:19 [cCO] Sources correctly saved
2010/10/29 03:29:19 [cCO] Tar: skipping bittorrent.ini, error Gzip.Error("error during compression")
2010/10/29 03:29:19 [cCO] Exception Failure("Tar: skipped bittorrent.ini due to backup errors") while options backup
2010/10/29 03:29:19 [cCO] Options backup as .tar.gz correctly saved


rpns wrote:

ygrek wrote:
Can you send me bittorrent.ini which causes problems?

Surely. Here it is: http://pastebin.com/mBhx4BQR


Is there any progress with the issue? Can anybody reproduce it?
Back to top
View user's profile Send private message
ygrek
professional


Joined: 20 Mar 2010
Posts: 521

PostPosted: Thu Nov 04, 2010 1:20 pm    Post subject: Reply with quote

I'll look at it when time permits. If you want to be sure that it doesn't get lost - submit the link to this thread to bugtracker.
_________________
Download | Report bugs | git mirror
Back to top
View user's profile Send private message Visit poster's website
spiralvoice
Sage


Joined: 06 Jan 2003
Posts: 3982
Location: Germany

PostPosted: Sat Nov 13, 2010 5:32 pm    Post subject: Reply with quote

rpns wrote:
spiralvoice wrote:
Please note that you can not (even with unpatched CVS) compile the
util make_torrent when using ./configure --disable-bittorrent.

Probably, that's the point.
The target failed to compile is "utils", while "all" compiles properly.

fixed in CVS: http://article.gmane.org/gmane.network.mldonkey.cvs/3407
_________________
Link overview and precompiled cores here: http://mldonkey.sourceforge.net/DownloadLinks
Back to top
View user's profile Send private message
ygrek
professional


Joined: 20 Mar 2010
Posts: 521

PostPosted: Sat Nov 27, 2010 10:52 pm    Post subject: Reply with quote

Quote:
Is there any progress with the issue? Can anybody reproduce it?

Please try this patch (savannah seems down at the moment) :
Code:

diff --git src/utils/cdk/tar.mlcpp src/utils/cdk/tar.mlcpp
index d254afa..105429d 100644
--- src/utils/cdk/tar.mlcpp
+++ src/utils/cdk/tar.mlcpp
@@ -405,32 +405,33 @@ let output t head body =
     write_num8 buf 329 head.t_devmajor;
     write_num8 buf 337 head.t_devminor;
     write_str buf 345 155 head.t_prefix;
-    if head.t_format = OLDGNU_FORMAT then
-      write_oldgnu_header head buf;
-    let chksum = compute_chksum buf in
-      write_padded_num buf 148 chksum;
-      t.ochan#output buf 0 blocksize;
-      if head.t_format = GNU_FORMAT && isdigit buf.[156] then begin
-   let buf2 = String.copy empty_block in
-     write_gnu_header head buf2;
-     t.ochan#output buf2 0 blocksize
-      end;
-      if size > 0 then begin
-   let blocks = size / blocksize in
-     for n = 0 to blocks do
-       let pos = n * blocksize in
-       let len =
-         if size - pos >= blocksize then
-      blocksize
-         else
-      size - pos in
-         t.ochan#output body (n * 512) len;
-     done;   
-     let align = blocksize - (size mod blocksize) in
-       if align > 0 && align < blocksize then
-         t.ochan#output empty_block 0 align
-      end
-     
+  if head.t_format = OLDGNU_FORMAT then
+    write_oldgnu_header head buf;
+  let chksum = compute_chksum buf in
+  write_padded_num buf 148 chksum;
+  t.ochan#output buf 0 blocksize;
+  if head.t_format = GNU_FORMAT && isdigit buf.[156] then
+  begin
+    let buf2 = String.copy empty_block in
+    write_gnu_header head buf2;
+    t.ochan#output buf2 0 blocksize
+  end;
+  if size > 0 then
+  begin
+(*  ? why output by blocks ?
+    let blocks = size / blocksize in
+    for n = 0 to blocks do
+      let pos = n * blocksize in
+      let len = min (size - pos) blocksize in
+      t.ochan#output body pos len;
+    done;
+*)
+    t.ochan#output body 0 size;
+    let align = blocksize - (size mod blocksize) in
+    if align > 0 && align < blocksize then
+      t.ochan#output empty_block 0 align
+  end
+
 let flush t =
   t.ochan#output empty_block 0 blocksize;
   t.ochan#flush ()

_________________
Download | Report bugs | git mirror
Back to top
View user's profile Send private message Visit poster's website
rpns
neophyte


Joined: 26 Oct 2010
Posts: 7

PostPosted: Tue Nov 30, 2010 2:06 pm    Post subject: Reply with quote

Thank you for the patch.

There are some whitespace(?) issues during patching. Could you please upload the patch to the repository at repo.or.cz or some public file hosting so I can avoid copy/pasting?
Back to top
View user's profile Send private message
ygrek
professional


Joined: 20 Mar 2010
Posts: 521

PostPosted: Tue Nov 30, 2010 8:16 pm    Post subject: Reply with quote

http://repo.or.cz/w/mldonkey.git/patch/94d19804ec0c309b214113e2faf47518618d3fed
_________________
Download | Report bugs | git mirror
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    MLDonkey Forum Index -> Problems with MLDonkey Client (in general, and ed2k, kad, overnet) All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Sourceforge.net Logo