Closed fpfeng closed 7 years ago
transmission-rss fetches a session id before every request to add a torrent. This seemed to have worked according to the pasted log. However, the actual request to add the torrent timed out. Do you have an explanation for that?
Transmission responds the session id missmatch error to the retried torrent add request, because the session id is no longer valid. Did the Transmission daemon restart?
This seems not to be an issue with transmission-rss, primarily. However, the error handling could be improved, so that it survives a daemon restart.
The transmission daemon is non-stop running for days, I guess timeout caused by hard workload. Thank you very much for your explanation.
aggregate https://xxx/torrentrss.php? 1503150700(debug) on_new_item event https://xxx/download.php? 1503150700(debug) request :19091 1503150704(debug) got session id xx 1503150704(debug) request :19091 1503150709(debug) connection timeout 1503150709(debug) request :19091 /usr/local/bundle/gems/json-2.1.0/lib/json/common.rb:156:in'
parse': 765: unexpected token at '<h1>409: Conflict</h1><p>Your request had an invalid session-id header.</p><p>To fix this, follow these steps:<ol><li> When reading a response, get its X-Transmission-Session-Id header and remember it<li> Add the updated header to your outgoing requests<li> When you get this 409 error message, resend your request with the updated header</ol></p><p>This requirement has been added to help prevent <a href="http://en.wikipedia.org/wiki/Cross-site_request_forgery">CSRF</a> attacks.</p><p><code>X-Transmission-Session-Id: xxx</code></p>' (JSON::ParserError) from /usr/local/bundle/gems/json-2.1.0/lib/json/common.rb:156:in
parse' from /home/ruby/transmission-rss/lib/transmission-rss/client.rb:37:inrpc' from /home/ruby/transmission-rss/lib/transmission-rss/client.rb:56:in
add_torrent' from ./bin/transmission-rss:150:inblock in <main>' from /home/ruby/transmission-rss/lib/transmission-rss/callback.rb:12:in
block (3 levels) in callback' from /home/ruby/transmission-rss/lib/transmission-rss/aggregator.rb:103:inprocess_link' from /home/ruby/transmission-rss/lib/transmission-rss/aggregator.rb:64:in
block (3 levels) in run' from /home/ruby/transmission-rss/lib/transmission-rss/aggregator.rb:63:ineach' from /home/ruby/transmission-rss/lib/transmission-rss/aggregator.rb:63:in
block (2 levels) in run' from /home/ruby/transmission-rss/lib/transmission-rss/aggregator.rb:43:ineach' from /home/ruby/transmission-rss/lib/transmission-rss/aggregator.rb:43:in
block in run' from /home/ruby/transmission-rss/lib/transmission-rss/aggregator.rb:42:inloop' from /home/ruby/transmission-rss/lib/transmission-rss/aggregator.rb:42:in
run' from ./bin/transmission-rss:181:in `