miguelfreitas / twister-html

twister HTML + Javascript User Interface
MIT License
229 stars 138 forks source link

UI indicator for post delivery doesn't disappear #275

Open Erkan-Yilmaz opened 9 years ago

Erkan-Yilmaz commented 9 years ago

see pictures below

This is now happening for about 15h. (It should also be noted that I am an oldtime user, so I've already many buddies/connections.)

what have I done so far?

some background info: http://twistnik.com/@mfreitas/645 https://twistnik.com/@letstwist/555 https://twistnik.com/@letstwist/553

What can I do to help investigate this? (e.g. check for something specific in logs...) I put this in twister-html bugtracker in the hope it's "just" a GUI bug, otherwise moving to twister-core may be more appropriate

bildschirmfoto vom 2015-07-24 11 15 23

bildschirmfoto vom 2015-07-24 11 18 26

miguelfreitas commented 9 years ago

preliminary analysis...

./twisterd getlasthave <localusernamehere> '["erkan_yilmaz"]'
{
    "erkan_yilmaz" : 4669
}
./twisterd dhtget erkan_yilmaz status s
[
    {
        "p" : {
            "height" : 97039,
            "seq" : 4730,
...

so, indeed, at my end it looks like torrent has only updated to piece 4669 and dht has advanced to 4730 messages.

besides:

./twisterd torrentstatus erkan_yilmaz
{
    "state" : 3,
    "paused" : true,
    "auto_managed" : true,
    "num_peers" : 0,
    "list_peers" : 75,
    "connect_candidates" : 75,
    "num_connections" : 0,
    "num_complete" : -1,
    "num_pieces" : 4575,
    "bitfield" :  ...,
    "has_incoming" : false,
    "priority" : 0,
    "queue_position" : 1126,
    "peers" : [
    ]
}

i will follow you to see what happens. it should try to connect to one of those 75 "connect_candidates" to sync. lets see.

it will be interesting to compare the same command outputs on your side.

Erkan-Yilmaz commented 9 years ago

I see:

./twisterd getlasthave my_user_name '["erkan_yilmaz"]'

{ "erkan_yilmaz" : 4762 }

./twisterd dhtget erkan_yilmaz status s

[ { "p" : { "height" : 97053, "seq" : 4762, ... } ]

./twisterd torrentstatus erkan_yilmaz { "state" : 3, "paused" : false, "auto_managed" : false, "num_peers" : 0, "list_peers" : 143, "connect_candidates" : 143, "num_connections" : 0, "num_complete" : -1, "num_pieces" : 4668, "bitfield" : "has_incoming" : false, "priority" : 0, "queue_position" : 0, "peers" : [ ] }

miguelfreitas commented 9 years ago

seems to have sync'ed very fast after started following you (cool, twister works!):

./twisterd getlasthave mfreitas '["erkan_yilmaz"]'
{
    "erkan_yilmaz" : 4741
}

even freshier than dht now (4741 > 4730)

do you still have the sand clock thing? what getpiecemaxseen says?

./twisterd getpiecemaxseen erkan_yilmaz 4741
28

it seems at least 28 peers duplicated the post 4741 - you're a popular guy :-)

miguelfreitas commented 9 years ago

wow. so your own torrent is at 4762, while everybody's else copies seems to be stuck at 4741.

Erkan-Yilmaz commented 9 years ago

Thx for the quick reply :-)

Yes, the sand clock is still there :-(

./twisterd getpiecemaxseen erkan_yilmaz 4741 1

./twisterd getpiecemaxseen erkan_yilmaz 4669 2

./twisterd getpiecemaxseen erkan_yilmaz 3669 2

miguelfreitas commented 9 years ago

it is very strange that you have "num_connections" : 0 to your own torrent.

i have "num_connections" : 26 for ./twisterd torrentstatus erkan_yilmaz

so it looks like a connectivity issue... but since you've also tried tor, that can't be an isp block.

miguelfreitas commented 9 years ago

just a quick test: try connecting to a know host running twisterd (those two are members of your swarm)

telnet 201.4.20.147 29333
Trying 201.4.20.147...
Connected to 201.4.20.147.
Escape character is '^]'.
Connection closed by foreign host.
telnet 188.226.228.216 29333
Trying 188.226.228.216...
Connected to 188.226.228.216.
Escape character is '^]'.
^]
telnet> Connection closed.
Erkan-Yilmaz commented 9 years ago

29333 port doesn't work, but with 28333 I can log in to both of them as seen above in your post

miguelfreitas commented 9 years ago

29333 doesn't work for those hosts? so something is blocking this port at your side! they are definitely up and reachable.

miguelfreitas commented 9 years ago

another idea to try:

access using your browser the pages 201.4.20.147:29333 and 188.226.228.216:29333 (same as above)

chrome, for example, says "No data received" (ERR_EMPTY_RESPONSE) which is different than "This webpage is not available" (ERR_CONNECTION_REFUSED) if I try a random nonexistent port at the same host.

then repeat this test using your tor browser to make sure tor would fix this connectivity thing.

Erkan-Yilmaz commented 9 years ago

chromium is still loading for both ips (with also different ports)

but in tor browser I got fast a response (though scrambled like this, only showing begin:

http://201.4.20.147:29333/ ÏÛb§-ç

http://188.226.228.216:29333/ [‘HJ

)

Erkan-Yilmaz commented 9 years ago

I am running now twister over tor and will post the command outputs from above again

Erkan-Yilmaz commented 9 years ago

with tor I get "num_connections" : 2,

./twisterd torrentstatus erkan_yilmaz

{ "state" : 3, "paused" : false, "auto_managed" : false, "num_peers" : 1, "list_peers" : 122, "connect_candidates" : 120, "num_connections" : 2, "num_complete" : -1, "num_pieces" : 4675, "bitfield": "has_incoming" : false, "priority" : 0, "queue_position" : 121, "peers" : [ { "addr" : "201.4.20.147:29333", "flags" : "0x3a", "connection_type" : 0, "download_queue_length" : 0, "failcount" : 0, "bitfield" : }, { "addr" : "23.95.44.148:29333", "flags" : "0xaa", "connection_type" : 0, "download_queue_length" : 0, "failcount" : 0, "bitfield" : } ] }

miguelfreitas commented 9 years ago

I guess you've delivered your posts out by now:

./twisterd getlasthave mfreitas '["erkan_yilmaz"]' { "erkan_yilmaz" : 4780 } ./twisterd getpiecemaxseen erkan_yilmaz 4780 34

so tor fixed it.

you now should look for what is blocking your direct access. did we found the first case of an isp trying to block twister? ;-) unlikely.

Erkan-Yilmaz commented 9 years ago

yes, also the sandclock disappears after about 5 mins with tor

Erkan-Yilmaz commented 9 years ago

to Miguel and future similar-problem searchers: with tor it works, though I have a bandwidth waste via tor of 80% (1)

as a future improvement, instead of only the sandclock a msg/tooltip a la "Please check if all required ports 28333/29333 are open" would be nice

@miguelfreitas thx again for debugging this issue quickly with me

(1) http://skilledtests.com/wiki/Twister_and_Tor#wasting_traffic.3F