aMule Forum

English => aMule Help => Topic started by: luquino on December 20, 2008, 07:55:06 PM

Title: Error Traversing Database
Post by: luquino on December 20, 2008, 07:55:06 PM
Quote
Error Traversing Database for ipnum = 1326418381 - Perhaps database is corrupt?
Error Traversing Database for ipnum = 1537591195 - Perhaps database is corrupt?

Amule SVN 9278, this two lines are repeating indefinitely in the terminal window from where I launched amule.

Somebody knows what do they mean?
Title: Re: Error Traversing Database
Post by: luquino on December 20, 2008, 08:34:19 PM
ok, I fixed the problem by reloading IPfilter.dat.
 After a while the message restarted like this
Quote
Error Traversing Database for ipnum = 1460004398 - Perhaps database is corrupt?
Error Traversing Database for ipnum = 3196626597 - Perhaps database is corrupt?
somebody has an idea?
Title: Re: Error Traversing Database
Post by: GonoszTopi on December 20, 2008, 09:58:54 PM
This message is generated by the GeoIP library. Try updating its database.
Title: Re: Error Traversing Database
Post by: luquino on December 22, 2008, 03:52:29 PM
This message is generated by the GeoIP library. Try updating its database.
Mhhhh... that's looks weird, until the previous version of svn I was using (9263) I had no problem with GeoIP, as soon I compiled 9278 I got this problem.
Anyway, I couldn't find how to update database, can you halp me?
Title: Re: Error Traversing Database
Post by: Stu Redman on December 22, 2008, 05:08:00 PM
Just delete GeoIP.dat from the config directory (.amule), and it will redownload it on restart.
Title: Re: Error Traversing Database
Post by: luquino on December 23, 2008, 12:09:41 AM
Ok problem fixed, but I had to download the file manually because the automatic download stopped after 64 KB and the DL window stay there without any progress.
Title: Re: Error Traversing Database
Post by: Stu Redman on December 23, 2008, 12:20:09 PM
Can you reproduce the problem?
Does aMule leave a broken GeoIP.dat or no file at all?
Title: Re: Error Traversing Database
Post by: luquino on December 23, 2008, 03:57:22 PM
well, on my computer I found two file GeoIP.dat: in /usr/share and in /home/my_user_name/.amule.
First I renamed the file in /usr/share, but the problem continued, so I removed the file in .amule and aMule started the download automatically, but it didn't finished.
When I saw the download window hanging I remembered that the same thing occurs a short time ago, probably when I migrate from svn 9263 to 9278, but until 9263 I had no problem at all. I can confirm this because obviously the country flags wasn't showed in 9278, but they was in 9263.
In .amule I found as well a GeoIP.dat.download, that is the part file created from the automatic download I suppose.

May be previously amule looked for the file in /usr/share?
Title: Re: Error Traversing Database
Post by: Stu Redman on December 24, 2008, 12:04:56 AM
aMule SVN looks in .amule since I added the auto-download of the database in September. Last change on the issue was the change of the download URL in 9196 (25.11.).
The database is downloded to .amule/GeoIP.dat.download and renamed on success to GeoIP.dat .

So - does the download break always or was that a one-time event ? It's working fine here.
Title: Re: Error Traversing Database
Post by: luquino on December 26, 2008, 04:44:37 PM
OK, I found the trick.
On my pc I share about 5.000 files, when aMule starts it spends 2 - 3 minutes scanning the directories to share, in the meanwhile it tries to download the GeoIP.dat (if needed) and it fails. If I share only a little amount of files (i.e. 200) the GeoIP.dat downloads correctly.
I don't know which is the relationship between the two events, but remember that I have only 1 Mb ADSL bandwidth.
Nor I know why aMule had to download the GeoIP.dat after upgrade from 9263 to 9278.
Attached you find what appears in the console when the download fails.
Title: Re: Error Traversing Database
Post by: Stu Redman on December 26, 2008, 08:23:36 PM
I'd rather need the content of your logfile to find out what's going on.
Title: Re: Error Traversing Database
Post by: luquino on December 26, 2008, 09:42:12 PM
Today I tried three times to rebuild the event.
I attach the file I received, all the times I found only this GeoIP.dat in ~/.amule, no files named .download, but I still receive the error message (traversing database....) and the country flags don't appears.
Note that I had to rename the file attached to GeoIP.dat.txt, otherwise the attachment is not allowed ;)
Title: Re: Error Traversing Database
Post by: Stu Redman on December 26, 2008, 10:09:08 PM
That's the beginning of the compressed archive. Strange.
Please delete it, restart aMule, and if it breaks again post your logfile.
Title: Re: Error Traversing Database
Post by: luquino on December 27, 2008, 01:16:21 AM
I tried again, but it failed.
Attached the logfile
Title: Re: Error Traversing Database
Post by: Stu Redman on December 27, 2008, 01:22:50 AM
Thanks! I'll see to at least improving the error handling.
Removed your logfile - nobody needs to know what you're sharing.  ;)

Code: [Select]
2008-12-26 19:13:03: HTTPDownload.cpp(326): Host: geolite.maxmind.com:80
 2008-12-26 19:13:03: HTTPDownload.cpp(327): URL: http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
 2008-12-26 19:13:03: HTTPDownload.cpp(328): Response: 200 (Error: 0)
 2008-12-26 19:13:03: HTTPDownload.cpp(199): Download size: 577935
 2008-12-26 19:13:03: HTTPDownload.cpp(246): HTTP download thread ended
 2008-12-26 19:13:03: amule.cpp(1887): Tu copia de aMule está actualizada.
 2008-12-26 19:13:12: Logger.cpp(342): Error: Can't read inflate stream: unexpected EOF in underlying stream.
 2008-12-26 19:13:12: IP2Country.cpp(128): Actualizacion GeoIP.dat satisfactoria
Duh, it's missing a check if the inflation was ok.
Title: Re: Error Traversing Database
Post by: Stu Redman on December 27, 2008, 07:12:11 PM
Error handling improved in 9297.
Title: Re: Error Traversing Database
Post by: luquino on December 27, 2008, 10:23:05 PM
ok I' ll test asap
Title: Re: Error Traversing Database
Post by: luquino on December 29, 2008, 03:03:23 AM
Hi Stu, I'm here.
I downloaded the svn 9306, I tried to start aMule without a GeoIP.dat file, but aMule crashed. The logs and bt are attached, as well you find attached what aMule could download.
Title: Re: Error Traversing Database
Post by: Stu Redman on December 29, 2008, 01:02:29 PM
Silly me.  :-[ (And silly not-autocasting throw/catch.)
Fixed in 9307. You can try it yourself (HTTPDownload.cpp line 230) with the wxString() around the throw argument:
Code: [Select]
if (current_read == 0) {
if (total_read != download_size) {
throw wxString(CFormat(_("Expected %d bytes, but downloaded %d bytes")) % download_size % total_read);
} else {
// Download was succesful.
m_result = 1;
}
}
Title: Re: Error Traversing Database
Post by: luquino on December 29, 2008, 05:00:47 PM
Ok, I applied the patch by hand.
Then I compiled and started amule. As usual it starts and after the initial checks starts to scan the shared directories and appears aMule window on the screen, at the same time the download window appears on the screen but until now both windows are blank and stay blank until the end of the scan.
As soon as the scan ends the two windows are filled, but the download window is just like the attached photo and stay there undefinitely.
I gave a Ctrl+C and attached I report all bt and logfile. I hope they are useful.
Title: Re: Error Traversing Database
Post by: Stu Redman on December 29, 2008, 11:11:06 PM
Until now, all changes were only meant to make the download fail-safer - not to prevent your actual problem.  ;)
I'm working on moving the update to a later stage, after the scan for shared files. But right now their site appears to have gone down, so I'm stopped until it goes up again...

Meanwhile I wonder what takes so long at your site to look up a bunch of shared files. What's the size of your known.met ?
Title: Re: Error Traversing Database
Post by: luquino on December 30, 2008, 03:17:04 AM
my known.met file is 7.6 MB

Title: Re: Error Traversing Database
Post by: Stu Redman on December 30, 2008, 01:32:09 PM
OK, SVN 9308 should load it for you. Download now starts only after scanning shared files.
Title: Re: Error Traversing Database
Post by: luquino on December 31, 2008, 06:12:11 PM
yeah, it works fine.
Happy new year    ;D