Deluge не скачивает файлы, выдает ошибку указанную в заголовке.
Причина в бане клиента на трекере. Для исправления, необходимо выдать Deluge за другой клиент.
$ sudo vi /usr/share/pyshared/deluge/core/core.py
upd. в ubuntu 14.04 и deluge 1.3.6 файл core.py находится по пути /usr/lib/python2.7/dist-packages/deluge/core/core.py, также вы можете его найти с помощью команды sudo find /usr/ -iname core.py | grep deluge
найти строку
self.settings.user_agent = "Deluge %s" % deluge.common.get_version()
исправить на
self.settings.user_agent = "uTorrent/3300(29625)"
перезапустить deluge
recently I wrote some app, that create many threads and connect to different servers as client, I used sockets for it, then I realized I can do it with boost library, so I rewrote app to boost part of connections work good and part give this error:
Host not found (authoritative)
I don’t know why it happens, when I used getaddrbyhost it works perfectly but boost resolver give this error…
what can be wrong, every address is domain.
Here is part of code:
class client
{
public:
client(boost::asio::io_service& io_service,
const char* server, const char* port, const int i)
: resolver_(io_service),
socket_(io_service),
i_(i)
{
tcp::resolver::query query(tcp::v4(), boost::lexical_cast< std::string >( server ), boost::lexical_cast< std::string >( port ), boost::asio::ip::resolver_query_base::numeric_service);
resolver_.async_resolve(query,
boost::bind(&client::handle_resolve, this,
boost::asio::placeholders::error,
boost::asio::placeholders::iterator));
}
private:
void handle_resolve(const boost::system::error_code& err,
tcp::resolver::iterator endpoint_iterator)
{
if (!err)
{
boost::asio::async_connect(socket_, endpoint_iterator,
boost::bind(&client::handle_connect, this,
boost::asio::placeholders::error));
}
else
{
//here outputs error
std::cout << __FUNCTION__ << " Error: " << err.message() << "n";
}
}
edit
totally weird yesterday I got problems with it and today it works… hmm maybe dhcp was busy or something
Не так давно клиент Deluge был забанен на торрент rutracker.org. Ошибка: Host not found (authoritative) —> Forbidden.
Клиент на трекере забанен до официально подтвержденного исправления факта утечки пасскеев. http://rutracker.org/forum/viewtopic.php?p=60749574#60749574
Решение не совсем правильное, но работает. Нужно заменить параметр юзер-агента, чтобы трекер видел его как uTorrent. Править нужно файл core.py.
sudo pluma /usr/lib/python2.7/dist-packages/deluge/core/core.py
Это на Mint 17, если у вас другой дистр, то возможно он находится в другом месте, для этого ищем командой:
find /usr/ -iname core.py | grep deluge
ищем в файле core.py параметр:
self.settings.user_agent = «Deluge %s» % deluge.common.get_version()
и заменяем на:
self.settings.user_agent = «uTorrent/3300(29625)»
Перезапускаем Deluge.
https://code44free.wordpress.com/tag/deluge/
I’m learning to use the boost beast library. I already wrote the server. It works perfectly.I also have a client sending POST requests. I’m starting the server.However, I can’t send him a request to the URL http://localhost:8080, but in response, the console outputs: Error: resolve: Host not found (authoritative) The code is written based on: https://github.com/boostorg/beast/blob/develop/example/http/client/sync/http_client_sync.cpp
#include <boost/asio/connect.hpp>
#include <boost/asio/ip/tcp.hpp>
#include <boost/beast/core.hpp>
#include <boost/beast/http.hpp>
#include <boost/beast/version.hpp>
#include <cstdlib>
#include <iostream>
#include <string>
namespace beast = boost::beast; // from <boost/beast.hpp>
namespace http = beast::http; // from <boost/beast/http.hpp>
namespace net = boost::asio; // from <boost/asio.hpp>
using tcp = net::ip::tcp; // from <boost/asio/ip/tcp.hpp>
int Client(int argc, char* argv[]) {
if (argc != 5 && argc != 6) {
std::cerr << "Usage: http-client-sync <host> <port> <target> "
"<request>[<HTTP version: 1.0 or 1.1(default)>]n"
<< "Example:n"
<< " http-client-sync www.example.com 80 /v1/api/suggest {"input": "<user_input>"}n"
<< " http-client-sync www.example.com 80 / 1.0n";
return EXIT_FAILURE;
}
try {
auto const host = argv[1];
auto const port = argv[2];
auto const target = argv[3];
auto const request_body = argv[4];
int version = argc == 5 && !std::strcmp("1.0", argv[5]) ? 10 : 11;
std::cout <<host << std::endl;
net::io_context ioc;
tcp::resolver resolver{ioc};
beast::tcp_stream stream(ioc);
auto const results = resolver.resolve(host, port);
stream.connect(results);
http::string_body::value_type body = request_body;
http::request<http::string_body> req{http::verb::post, target, version};
req.set(http::field::host, host);
req.set(http::field::body, body);
req.set(http::field::user_agent, BOOST_BEAST_VERSION_STRING);
req.set(http::field::content_type, "application/json");
http::write(stream, req);
boost::beast::flat_buffer buffer;
http::response<http::string_body> res;
http::read(stream, buffer, res);
std::cout << res << std::endl;
beast::error_code ec;
stream.socket().shutdown(tcp::socket::shutdown_both, ec);
if(ec && ec != beast::errc::not_connected)
throw beast::system_error{ec};
} catch (std::exception const& e) {
std::cerr << "Error: " << e.what() << std::endl;
return EXIT_FAILURE;
}
return EXIT_SUCCESS;
}
int main(int argc, char* argv[]){
Client(argc,argv);
return 0;
}
-
cokelid
- New User
- Posts: 6
- Joined: Sat Nov 03, 2012 11:32 am
Error: Host not found (authoritative)
Deluge was working fine on Ubuntu, and then I started getting the following for all my torrents:
Tracker Status: ubuntu.com: Error: Host not found (authoritative)
I can nslookup and ping ubuntu.com on the machine so the DNS is working. (Obviously the «ubuntu.com» bit varies according to the tracker of the torrent.)
I’ve upgraded Ubuntu, but still the same issue. As I said, everything was working fine. I can only assume some package got upgraded?
Am running Ubuntu 12.04 (Precise Pangolin) and Deluge 1.3.5.
Googling suggests it could be a libtorrent error message, but I can’t find out any more information or help.
Any ideas on how I could debug this? I’ve turned on logging, but I don’t get any useful info in the log files…
Thanks!
Justin
-
cokelid
- New User
- Posts: 6
- Joined: Sat Nov 03, 2012 11:32 am
Re: Error: Host not found (authoritative)
Post
by cokelid » Sun Nov 04, 2012 2:40 pm
Thanks for the reply Cas.
Indeed, the underlying host tracker is actually torrent.ubuntu.com, but I can resolve that (and ping it) from the command-line. The deluge error just mentions ubuntu.com (and similar for other torrents).
I appreciate that the error is probably generated by a (third-party) library used by Deluge, but hopefully it’s still appropriate to discuss the problem here?
-
Cas
- Top Bloke
- Posts: 3683
- Joined: Mon Dec 07, 2009 6:04 am
- Location: Scotland
Re: Error: Host not found (authoritative)
Post
by Cas » Sun Nov 04, 2012 5:17 pm
I don’t know for sure but it’s possible the error message may have stripped the ‘torrent.’ part off.
Have you checked your /etc/resolv.conf and /etc/hosts files?
It is fine discussing it here and if you find the solution it will help other users.
-
cokelid
- New User
- Posts: 6
- Joined: Sat Nov 03, 2012 11:32 am
Re: Error: Host not found (authoritative)
Post
by cokelid » Mon Nov 05, 2012 1:07 pm
Thanks again for the reply Cas.
So yes, I checked the resolv.conf (before I upgraded Ubuntu) and it pointed to my router as expected. After I upgraded to Ubuntu 12.04 resolv.conf points to localhost since 12.04 uses dnsmasq for DNS. Since the error occurred before dnsmasq was installed, it seems unlikely that’s the culprit.
The /etc/hosts files looks fine too, just 2 entries: my localhost and my server (plus it now has some standard IPv6 entries).
I’ve looked at my libtorrent libraries (after reading this) but they look fine (i.e. no duplicates)?
Hmmm.
-
cokelid
- New User
- Posts: 6
- Joined: Sat Nov 03, 2012 11:32 am
Re: Error: Host not found (authoritative)
Post
by cokelid » Thu Nov 08, 2012 8:43 am
Right — so I removed (purged) all the deluge packages, and any packages with «libtorrent» in the name. Then rebooted and then reinstalled deluge. Still the same problem.
Any more debugging ideas?
-
Cas
- Top Bloke
- Posts: 3683
- Joined: Mon Dec 07, 2009 6:04 am
- Location: Scotland
Re: Error: Host not found (authoritative)
Post
by Cas » Thu Nov 08, 2012 1:44 pm
As I said it is not a Deluge or libtorrent issue so no that would not help. Have you asked on AskUbuntu or the Ubuntu forums/IRC?
-
cokelid
- New User
- Posts: 6
- Joined: Sat Nov 03, 2012 11:32 am
Re: Error: Host not found (authoritative)
Post
by cokelid » Sat Nov 10, 2012 9:58 am
You’re right Cas, it doesn’t seem to be due to libtorrent since everything works fine with qbittorrent and rtorrent (which use libtorrent-rasterbar6 and libtorrent14 respectively).
Do you know what library is involved with the DNS lookup? If I can narrow it down to a particular library I can certainly jump on AskUbuntu or another forum, or do some testing myself.
I suppose it must be some library used by Deluge that isn’t used by either of these two?
Thanks!
Justin
-
Cas
- Top Bloke
- Posts: 3683
- Joined: Mon Dec 07, 2009 6:04 am
- Location: Scotland
Re: Error: Host not found (authoritative)
Post
by Cas » Sat Nov 10, 2012 2:26 pm
rtorrent is a completely different libtorrent but it is interesting that qbittorrent works ok. Could you be more precise about the libtorrent version used by qbittorrent as the only difference between qbittorent and Deluge is that we use the libtorrent python bindings but that should not affect how libtorrent communicates with trackers.
-
cokelid
- New User
- Posts: 6
- Joined: Sat Nov 03, 2012 11:32 am
Re: Error: Host not found (authoritative)
Post
by cokelid » Sat Nov 10, 2012 10:35 pm
Thanks once again Cas,
The installed versions I have are:
qbittorrent: 2.9.7-1
libtorrent-rasterbar6: 0.15.10-1
For deluged I’m using v 1.3.5 with
python-libtorrent: 0.15.10
libtorrent-rasterbar6: 0.15.10-1
If it’s of interest:
libboost: 1.46.1