aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Pages: [1] 2 3 4

Author Topic: amuled: Kad disconnects regularly, "connect kad" doesn't help  (Read 26174 times)

danilapus

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 6

(Note: The problem has been previously discussed here: http://forum.amule.org/index.php?topic=8361. However, there was neither conclusion nor suggestions.)

I am running amuled and amuleweb on debian. I didn't compile amule from source, I've just installed the corresponding .deb packages.

The problem: after some time (sometimes hours, sometimes days) Kad network gets disconnected:

Code: [Select]
> Kad: Not running
The command connect kad in amulecmd doesn't make Kad connect again. Kad's status just changes to Not connected and stays like that. The only way to get Kad working again is to restart the daemon. Any clues?
« Last Edit: May 08, 2007, 09:49:46 PM by danilapus »
Logged

skolnick

  • Global Moderator
  • Hero Member
  • *****
  • Karma: 24
  • Offline Offline
  • Posts: 1188
  • CentOS 6 User
Re: amuled: Kad disconnects regularly, "connect kad" doesn't help
« Reply #1 on: May 09, 2007, 06:22:11 AM »

The status of this is (AFAIR) that Kry could not reproduce this issue, therefore he is unable to solve this inconvenience. If you find an exact way to produce the error, post it here, so he can study it more carefully and get a solution.

Regards.
Logged

danilapus

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 6
Re: amuled: Kad disconnects regularly, "connect kad" doesn't help
« Reply #2 on: May 09, 2007, 09:32:20 AM »

Well, I don't have another linux machine to try and reproduce it in the perfect sense of the word, but it "reproduces" itself here and with an enviable permanency.  ;)

Recipe

distro: Debian etch [Linux 2.4.27-3-586tsc #1 Tue Dec 5 22:06:26 UTC 2006 i586 GNU/Linux]
amule: aMuled 2.1.3 using wxGTK2 v2.6.3 (Unicoded)
connection: router client with fixed IP

Code: [Select]
$ amuled &
$ amuleweb -P<password> -q &

-> Kad disconnects within 24 hours.

Question: If I try to compile amule from source, may it help to resolve the problem? Or you never know before you actually try?
Logged

Radek

  • Full Member
  • ***
  • Karma: 5
  • Offline Offline
  • Posts: 149
Re: amuled: Kad disconnects regularly, "connect kad" doesn't help
« Reply #3 on: May 09, 2007, 10:00:35 AM »

Hi!

I don't think it would help, as that's exactly what I am doing for quite a while - with the same results even for the latest daily snapshots!

On my linux box in question is still Debain Sarge at large :) and I don't have a gui there, so only amuled, amuleweb, and amulecmd. And I, too, have a fixed IP on my router with port forwarding and NAT (Bintec X1200II, for the experts, so not the usual NAT, but a port restricted one).

I only gave up reporting this error, for the same reason that <skolnick> mentioned. As long, as there is no amule(d) with some special event logging to help trap this bug, I don't see any solution.

Cheers...
Logged
There are 10 kinds of people - those who are able to understand binary numbers and those who aren't...

danilapus

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 6
Re: amuled: Kad disconnects regularly, "connect kad" doesn't help
« Reply #4 on: May 09, 2007, 10:22:07 AM »

@Radek
Thanks for saving my time.
P.S. Same here: debian witout GUI, only amuled.
Logged

skolnick

  • Global Moderator
  • Hero Member
  • *****
  • Karma: 24
  • Offline Offline
  • Posts: 1188
  • CentOS 6 User
Re: amuled: Kad disconnects regularly, "connect kad" doesn't help
« Reply #5 on: May 10, 2007, 04:06:35 AM »

Maybe the problem is some debian library, since I use aMule on Fedora Core 6, and on Solaris 10 and kad happily runs for up to three or four days with no disconnection. Sometimes it says firewalled, but after a couple minutes it changes to OK again.

Regards.
Logged

Radek

  • Full Member
  • ***
  • Karma: 5
  • Offline Offline
  • Posts: 149
Re: amuled: Kad disconnects regularly, "connect kad" doesn't help
« Reply #6 on: May 10, 2007, 09:59:59 AM »

@skolnick

That would be of course possible, but unlikely, as we already are talking about different versions of Debian (Etch and Sarge).

I tended to believe, that there is some issue with NAT or (specialty of DSL in Germany), the daily disconnection/reconnection with different IP of DSL.
But: I myself have a fixed IP, as well as <danilapus>! I do experience short disconnects at night, though. My ISP states, that that should not happen, but it happens anyway. It's mostly only for a few seconds, but could cause some disconnections, of course.

The problem seems to lie in the fact that Kad is unable to reconnect! Even if there is no such thing as automatic reconnect after loss of connection, it should work manually!

And it should be possible to find out, why "connect kad" in amulecmd does not work anymore after said loss of connection. From user point of view there is no difference to giving same command after (re)starting amuled. This initial "connect kad" works without any problems on my machine and almost always gives "ok" after a few seconds. The same command after disconnection has no effect apart from the state of Kad changing from "not running" to "running" (or similar, don't recall the exact text atm). No "connected" even after waiting for some hours.
Logged
There are 10 kinds of people - those who are able to understand binary numbers and those who aren't...

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: amuled: Kad disconnects regularly, "connect kad" doesn't help
« Reply #7 on: May 10, 2007, 02:11:38 PM »

It's probably that the UDP socket is closed at some point. or broken. or something.
Logged

danilapus

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 6
Re: amuled: Kad disconnects regularly, "connect kad" doesn't help
« Reply #8 on: May 10, 2007, 03:56:34 PM »

@Radek: What's your ISP? (if not a secret)
The nightly disconnections happen here as well. I am hanging on Hansanet.
Logged

Radek

  • Full Member
  • ***
  • Karma: 5
  • Offline Offline
  • Posts: 149
Re: amuled: Kad disconnects regularly, "connect kad" doesn't help
« Reply #9 on: May 10, 2007, 04:49:02 PM »

@danilapus

No secret: it's "ish" (for non-germans: that's a cable tv provider. I get my internet by tv cable). And it normally has no nightly disconnect but is a fixed connection. There must be sth wrong with either my cable modem or the counterpart at ish's. Worst case has been almost 40 hours without connection. The service personnel couldn't find any problems :(

@Kry

Quite possible. What about the following?
The so called NAT function of my router is somewhat pedantic and remembers (and checks) pairs of IP addresses and ports. Most NAT implementations only remember the port, Example:

MyComp with internal IP address of 192.168.1.1 and external IP address of 4.3.2.1 opens a UDP connection to 1.2.3.4:1111 which makes a "Hole" in Firewall/NAT, let's say 192.168.1.1:2222 --> 4.3.2.1:33333 --> 1.2.3.4:1111, where the port 33333 is automatically assigned by the router

With "normal" NAT anyone could reply or send sth to UDP port 33333 at my external IP and the data would be forwarded to myComp at 192.168.1.1:2222. Sth like 9.8.7.6:4444 --> 4.3.2.1:33333 --> 192.168.1.1:2222

With my "port restricted" version only the original IP address 1.2.3.4 with the original port (at least I believe so with the port) could reply to myComp: 1.2.3.4:1111 --> 4.3.2.1:33333 --> 192.168.1.1:2222
All others would be blocked. For the "official" ports I configured static forwardings, of course.

Also, this automatic port forwardings to my internal IP will be deleted when there was no traffic for some time. I think it's about 120 seconds (configurable).

Sth like that could be an explanation for the disconnects. I'll activate my router's debug log to see if there are some denies logged. But I don't think this could explain the failure of a new manual "connect kad", where everything should start afresh?!

What about some debug output during/after the command "connect kad" until the connection is established? Are there any "heart beats" transmitted or sth of the kind to keep the connection alive?
I admit, I never looked into protocol specifications for Kad and don't have the time atm. But I'd love to help catch that bug/strange behaviour.
Logged
There are 10 kinds of people - those who are able to understand binary numbers and those who aren't...

skolnick

  • Global Moderator
  • Hero Member
  • *****
  • Karma: 24
  • Offline Offline
  • Posts: 1188
  • CentOS 6 User
Re: amuled: Kad disconnects regularly, "connect kad" doesn't help
« Reply #10 on: May 10, 2007, 05:02:37 PM »


Quote
With "normal" NAT anyone could reply or send sth to UDP port 33333 at my external IP and the data would be forwarded to myComp at 192.168.1.1:2222. Sth like 9.8.7.6:4444 --> 4.3.2.1:33333 --> 192.168.1.1:2222
If that happens, then your router/firewall is not stateful, which is rare even in small modern routers (I use an old Netgear, and it's stateful). I think this is not default behavior. It would be a huge security threat to use such a router, since it would allow easy spoofing.

Regards.
Logged

vdb

  • Full Member
  • ***
  • Karma: 1
  • Offline Offline
  • Posts: 215
Re: amuled: Kad disconnects regularly, "connect kad" doesn't help
« Reply #11 on: May 11, 2007, 05:31:58 PM »

Just my 2 cents here: I used to (!!) experience Kad disconnects every so many hours, ranging from 4 to 36 hours of uptime. This is on a headless Mandriva 2006 distribution, using obviously amuled only.

However, since a couple of months now this fenomenon has magically disappeared. Now I only restart the amuled when the amuleGUI won't connect to it from my Windows machine, which usually happens after about 7 to 10 days of uptime. I have not installed any new applications, nor recompiled amule, nor updated my Linux distribution.

Concluding: Something outside my realm of influence has changed.
Concluding2: The Kad disconnect probably has nothing to do with your local installation but instead is somehow triggered by ISP events. Perhaps they do some soft of traffic inspection, or they shut down UDP threads every now and then. Who knows?
Logged
A waste is a terrible thing to mind.

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: amuled: Kad disconnects regularly, "connect kad" doesn't help
« Reply #12 on: May 11, 2007, 05:53:46 PM »

The fact it never happens to me speaks for your idea. I know there is a kad bug waiting to be fixed, but I don't think it's related to the disconnects. We'll see after I have time to fix it....
Logged

danilapus

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 6
Re: amuled: Kad disconnects regularly, "connect kad" doesn't help
« Reply #13 on: May 11, 2007, 09:55:16 PM »

And still, you have to agree, that it doesn't explain why Kad cannot be reconnected manually, without restarting daemon...
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: amuled: Kad disconnects regularly, "connect kad" doesn't help
« Reply #14 on: May 11, 2007, 10:29:18 PM »

Yes it does.
Logged
Pages: [1] 2 3 4