Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR 503 #680

Closed
sandwitcherz opened this issue Dec 20, 2024 · 11 comments
Closed

ERROR 503 #680

sandwitcherz opened this issue Dec 20, 2024 · 11 comments

Comments

@sandwitcherz
Copy link

sandwitcherz commented Dec 20, 2024

Hi.

Thanks for this project :)

I have an error when i whant to upload a .torrent, i don't know why :

Index - Console
2024-12-20T15:47:06.035102Z ERROR request{method=POST uri=/v1/torrent/upload version=HTTP/1.1}: tower_http::trace::on_failure: response failed classification=Status code: 503 Service Unavailable latency=65 ms
Capture d’écran 2024-12-20 165229

Capture d’écran 2024-12-20 165641

No more logs ..

started index-gui : screen npm run dev -- --host
started index : TORRUST_INDEX_API_CORS_PERMISSIVE=true cargo run
started tracker : TORRUST_TRACKER_CONFIG_TOML=$(cat "./storage/tracker/etc/tracker.toml") TORRUST_TRACKER_CONFIG_OVERRIDE_HTTP_API__ACCESS_TOKENS__ADMIN=$(cat "./storage/tracker/lib/tracker_api_admin_token.secret") cargo run

Everything is updated, up and accessible.

Thanks

@sandwitcherz
Copy link
Author

sandwitcherz commented Dec 20, 2024

I have modified torrust-index index.development.sqlite3.toml to add some [tracker] infos, it works.

Now, i made a torrent, get .torrent, put in torrust, download new .torrent, but torrent won't download..

@josecelano
Copy link
Member

Hi @sandwitcherz, can you comment on why the upload did not work initially? That could help other people in the future.

Regarding your new problem, I suppose your BitTorrent client can't connect to the tracker. You can use the tracker client to verify you can announce.

If it has that feature, you can also read the client response logs or error messages.

The problem could be:

  • The client can't connect to the tracker. Are you running all services locally?
  • If you use a private tracker, there could be a problem with the user's key.
  • There are no seeders.
  • Ports closed.
  • Etc.

Maybe I can help more if you copy/paste the Index and tracker logs here while running the client. I would like to know if the tracker receives the client's request.

@sandwitcherz
Copy link
Author

ow, thank you, i will try and comment here.

best regards.

@sandwitcherz
Copy link
Author

sandwitcherz commented Dec 22, 2024

Every tests with tracker-client works, on my global ip, & local.

┌──(root㉿db)-[~/torrust/torrust-tracker/console/tracker-client] └─# TORRUST_CHECKER_CONFIG='{ "udp_trackers": ["127.0.0.1:6969"], "http_trackers": ["http://127.0.0.1:7070"], "health_checks": ["http://127.0.0.1:1212/api/health_check"] }' cargo run --bin tracker_checker Finished devprofile [optimized + debuginfo] target(s) in 0.26s Running/root/torrust/torrust-tracker/target/debug/tracker_checker 2024-12-22T08:31:58.889409Z INFO torrust_tracker_client::console::clients::checker::service: Running checks for trackers ... [ { "Udp": { "Ok": { "remote_addr": "127.0.0.1:6969", "results": [ [ "Setup", { "Ok": null } ], [ "Connect", { "Ok": null } ], [ "Announce", { "Ok": null } ], [ "Scrape", { "Ok": null } ] ] } } }, { "Health": { "Ok": { "url": "http://127.0.0.1:1212/api/health_check", "result": { "Ok": "200 OK" } } } }, { "Http": { "Ok": { "url": "http://127.0.0.1:7070/", "results": [ [ "Announce", { "Ok": null } ], [ "Scrape", { "Ok": null } ] ] } } } ]

    The client can't connect to the tracker. Are you running all services locally? 
> no, services run on global dedicated IP, in a CT ubuntu
    If you use a private tracker, there could be a problem with the user's key. 
> public or private, same
    There are no seeders. 
> hm, maybe i made a mistake when i seed?
    Ports closed. 
> ports open, dedicated, no firewall

Is is ok?
1 - create torrent for example on rutorrent whith udp/http trackers, so clic ok, and file sharing.
2 - download .torrent from rutorrent new sharing file
3 - upload rutorrent .torrent in torrust
4 - download .torrent from torrust and going download it in bittorent

I continue tests, thank you for all :)

I can see, from my pc, seed = 1, but when i download from rutorrent, it says 0 of 0 connected ( peers )
Capture d’écran 2024-12-22 091553

edit : in rutorrent :
Tracker: [Couldn't connect to server]
Tracker: [unable to connect to UDP tracker]

All 6969,7070,1212,1313,3000,3001 ports are accessible via web browser..

@josecelano
Copy link
Member

josecelano commented Dec 22, 2024

Hi @sandwitcherz, this is very interesting. You can connect to the tracker with the tracker-client but not with RTorrent. It would be invaluable to know the reason. Is it possible to enable some debug mode in rutorrent to find the reason why it's unable to connect? If ports are open, the reason could be:

  • The client has a timeout and does not wait enough for the response. It could be related to this.
  • The client is not sending a valid connection ID. It could be related to this. If this is the case, we can open an issue on the rtorrent repo.

The process you are doing looks fine. Make sure the torrent infohash is the same after downloading it from the Torrsut Index. The Torrsut Index might change the infohash if the torrent contains non standards fields in the info dictionary.

If you can share the torrent I can try with the exact configuration. Same torrent and using the rutorrent client.

@sandwitcherz
Copy link
Author

sandwitcherz commented Dec 22, 2024

Thank you @josecelano :)

i have modified

[core.announce_policy]
interval = 300
interval_min = 300

Now i have ERROR process_request:handle_packet torrust_tracker::servers::udp::connection_cookie: error=cookie value is expired: -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007082885960258536, expected > 1734879844.5927248

I am lost ^^

@josecelano
Copy link
Member

Hi @sandwitcherz,

Thank you @josecelano :)

i have modified

[core.announce_policy]
interval = 300
interval_min = 300

Why?. It's okay, but I don't see who that is related to the other "unable to connect" issue.

This is the torrent : https://drop.koikia.eu/JQ0KvugZ

The torrent does not have any non-standard field.

Now i have ERROR process_request:handle_packet torrust_tracker::servers::udp::connection_cookie: error=cookie value is expired: -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007082885960258536, expected > 1734879844.5927248

I am lost ^^

Do you always get the same error? Or sometimes an "unable to connect" and others the "cookie value is expired"?

It seems the client is not sending the right connection ID. That could be because:

  1. It does not even connect and sends a random connection ID.
  2. It connects but reuses the connection if for too long. The Torrust Tracker follows strictly the specification for UDO trackers in the default configuration, meaning the connection ID is only valid for two minutes.

image

Clients should not use the same connection ID for more than 1 minute.

If the client is reusing the connection ID for too long, try to increase the connection ID lifetime.

I'm doing that in the live demo tracker here because I'm investigating why we have a lot of errors with the connection. I think some clients ignore or reuse the connection ID for too long. That can be the case for your client.

Could you try to use another client?

If I can confirm that rutorrent is ignoring or reusing for too long the connection ID I will open an issue. Maybe the torrent has a configuration option to set the interval to reconnect.

cc @da2ce7

@josecelano
Copy link
Member

Hi, @sandwitcherz, did it work by increasing the cookie lifetime? Can you share how you fixed it.

@sandwitcherz
Copy link
Author

Hi @josecelano :) Nope, The torrent never connect to the tracker ether UDP or HTTP.

So, i decided to try to reproduce error whith a simple App like OpenTracker, and same! I have to work on a different IP, so i have closed this trhead to not disturb you, and reopen when i try ^^

@josecelano
Copy link
Member

Hi @josecelano :) Nope, The torrent never connect to the tracker ether UDP or HTTP.

So, i decided to try to reproduce error whith a simple App like OpenTracker, and same! I have to work on a different IP, so i have closed this trhead to not disturb you, and reopen when i try ^^

Thank you, @sandwitcherz, for replaying. I've created the issue to check it when I finish my current task.

@josecelano
Copy link
Member

Hi @sandwitcherz I've tried it locally, and it works:

torrust/torrust-tracker#1160

It's working at least the first time it makes the announce request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants