1. Erik Svensson
  2. transmissionrpc
  3. Issues
Issue #27 resolved

Request failed when using with flexget

Anonymous created an issue

Hello, I'm opening a ticket here because my problem seems to be a transmission rpc error. I'm actually using transmission rpc with flexget. The problem is that when flexget is running, it adds successfully a few torrent to transmission, and then I get the error "Request failed". I copy my flexget log :

2011-01-05 12:01 ERROR feed XXX Failed XXXXXXX (None)

2011-01-05 12:01 ERROR transmission XXX Request failed.

I was looking for some log of the transmission daemon, but i didn't find it.

Comments (9)

  1. Anonymous

    Looks like this is to do with a basic auth failure connecting to the transmission daemon. Which is curious, as it works fine with the same client object for several adds before having this problem. We have updated the associated flexget ticket with some more info. http://flexget.com/ticket/1315

  2. gazpachoking
    • changed status to new

    Can you take another look at this? I'm sorta stumped why basic auth would start failing after several successful requests to the daemon with same Client object. I stripped out the bulk of the torrent data to shorten log.

    2011-12-14 23:30 INFO     download      Feedname            Downloading: The Something Show1
        2011-12-14 23:30 INFO     download      Feedname            Downloading: The Something Show2
        2011-12-14 23:30 INFO     download      Feedname            Downloading: AShow Show3
        2011-12-14 23:30 VERBOSE  details       Feedname            Summary - Accepted: 3 (Rejected: 5 Undecided: 22 Failed: 0)
        2011-12-14 23:30 DEBUG    transmissionrpc Feedname            {
          "url": "http://myservername:9091/transmission/rpc",
          "headers": {
            "x-transmission-session-id": "No0k27owaDoxMZlujOuTRonxJN1MgtjJgpwFVzmBs6jSUCke"
          },
          "timeout": 30,
          "query": "{\"tag\": 2, \"method\": \"torrent-add\", \"arguments\": {\"download-dir\": \"/mnt/media/Video/TV/Comedy/The Something Show1/Season 2011\", \"metainfo\": \"ZDg6YW5ub3VuY2UzMDpodHRwOi8vdHJhY2tlci5jY2MuZGUvYW5ub3VuY2UxMzphbm5vdW5jZS1s...\\nDAIQ92ZnydPMMHj9/qlXZWU=\\n\"}}"
        }
        2011-12-14 23:30 INFO     transmissionrpc Feedname            http request took 0.030 s
        2011-12-14 23:30 DEBUG    transmissionrpc Feedname            {
          "tag": 2,
          "arguments": {
            "torrent-added": {
              "hashString": "5a0ee444c1c457d3c4ebfb3c3435d38b2b1bb3bb",
              "id": 9,
              "name": "The.Something.Show1.avi"
            }
          },
          "result": "success"
        }
        2011-12-14 23:30 INFO     transmission  Feedname            "The Something Show1" torrent added to transmission
        2011-12-14 23:30 DEBUG    transmissionrpc Feedname            {
          "url": "http://myservername:9091/transmission/rpc",
          "headers": {
            "x-transmission-session-id": "No0k27owaDoxMZlujOuTRonxJN1MgtjJgpwFVzmBs6jSUCke"
          },
          "timeout": 30,
          "query": "{\"tag\": 3, \"method\": \"torrent-add\", \"arguments\": {\"download-dir\": \"/mnt/media/Video/TV/Comedy/The Something Show1/Season 2011\", \"metainfo\": \"ZDg6YW5ub3VuY2UzMDpodHRwOi8vdHJhY2tlci5jY2MuZGUvYW5ub3VuY2UxMzphbm5vdW5jZS1s...\\nsJUXcwX1RLHXQ42GdAjaimkujoaUUYYIDMscZsavVuWk8rjf+3xlZQ==\\n\"}}"
        }
        2011-12-14 23:30 INFO     transmissionrpc Feedname            http request took 0.005 s
        2011-12-14 23:30 DEBUG    transmissionrpc Feedname            {
          "tag": 3,
          "arguments": {
            "torrent-added": {
              "hashString": "a0b7fc1f21285c5ed9af6680c812eedd89855529",
              "id": 10,
              "name": "The.Something.Show2.avi"
            }
          },
          "result": "success"
        }
        2011-12-14 23:30 INFO     transmission  Feedname            "The Something Show2" torrent added to transmission
        2011-12-14 23:30 DEBUG    transmissionrpc Feedname            {
          "url": "http://myservername:9091/transmission/rpc",
          "headers": {
            "x-transmission-session-id": "No0k27owaDoxMZlujOuTRonxJN1MgtjJgpwFVzmBs6jSUCke"
          },
          "timeout": 30,
          "query": "{\"tag\": 4, \"method\": \"torrent-add\", \"arguments\": {\"download-dir\": \"/mnt/media/Video/TV/Science/AShow Show2/Season 9\", \"metainfo\": \"ZDg6YW5ub3VuY2U0MjpodHRwOi8vdHJhY2tlci5vcGVuYml0dG9ycmVudC5jb20vYW5ub3VuY2Ux...\\n1YQSnfUlUUvKi50T/x+p0yr1yjTmuhyjI50fMiVWYRuF1A3FpGq1f6WbparxXlMR7kIqANkXK0Kp\\nt6jkQWVl\\n\"}}"
        }
        2011-12-14 23:30 INFO     transmissionrpc Feedname            http request took 0.010 s
        2011-12-14 23:30 DEBUG    transmissionrpc Feedname            {
          "tag": 4,
          "arguments": {
            "torrent-added": {
              "hashString": "78dca575db846ba1fc30a9f2f2e38cea1a61c381",
              "id": 11,
              "name": "AShow.Show3.avi"
            }
          },
          "result": "success"
        }
        2011-12-14 23:30 INFO     transmission  Feedname            "AShow Show3" torrent added to transmission
        2011-12-14 23:30 DEBUG    transmissionrpc Feedname            {
          "url": "http://myservername:9091/transmission/rpc",
          "headers": {
            "x-transmission-session-id": "No0k27owaDoxMZlujOuTRonxJN1MgtjJgpwFVzmBs6jSUCke"
          },
          "timeout": 30.0,
          "query": "{\"tag\": 5, \"method\": \"torrent-get\", \"arguments\": {\"fields\": [\"id\", \"hashString\", \"name\", \"status\", \"uploadRatio\", \"seedRatioLimit\"]}}"
        }
        2011-12-14 23:30 DEBUG    transmissionrpc Feedname            {
          "response": {
            "url": "http://myservername:9091/transmission/rpc",
            "msg": "",
            "code": 401,
            "data": "",
            "headers": {
              "content-length": "43",
              "server": "Transmission",
              "connection": "close",
              "date": "Thu, 15 Dec 2011 07:30:28 GMT",
              "content-type": "text/html; charset=ISO-8859-1",
              "www-authenticate": "Basic realm=\"Transmission\""
            }
          }
        }
        2011-12-14 23:30 ERROR    feed          Feedname            BUG: Unhandled error in plugin transmission:  Original exception: HTTPHandlerError, "HTTPHandlerError 401: basic auth failed"
        Traceback (most recent call last):
          File "/usr/local/lib/python2.6/dist-packages/FlexGet-1.0r2530-py2.6.egg/flexget/feed.py", line 290, in __run_plugin
            return method(*args, **kwargs)
          File "/usr/local/lib/python2.6/dist-packages/FlexGet-1.0r2530-py2.6.egg/flexget/event.py", line 18, in __call__
            return self.func(*args, **kwargs)
          File "/usr/local/lib/python2.6/dist-packages/FlexGet-1.0r2530-py2.6.egg/flexget/plugins/plugin_transmission.py", line 24, in new_f
            f(self, *args, **kwargs)
          File "/usr/local/lib/python2.6/dist-packages/FlexGet-1.0r2530-py2.6.egg/flexget/plugins/plugin_transmission.py", line 252, in on_feed_output
            self.remove_finished(self.client)
          File "/usr/local/lib/python2.6/dist-packages/FlexGet-1.0r2530-py2.6.egg/flexget/plugins/plugin_transmission.py", line 349, in remove_finished
            transfers = cli.info(arguments=['id', 'hashString', 'name', 'status', 'uploadRatio', 'seedRatioLimit'])
          File "/usr/local/lib/python2.6/dist-packages/transmissionrpc-0.8-py2.6.egg/transmissionrpc/client.py", line 411, in info
            return self._request('torrent-get', {'fields': arguments}, ids, timeout=timeout)
          File "/usr/local/lib/python2.6/dist-packages/transmissionrpc-0.8-py2.6.egg/transmissionrpc/client.py", line 173, in _request
            http_data = self._http_query(query, timeout)
          File "/usr/local/lib/python2.6/dist-packages/transmissionrpc-0.8-py2.6.egg/transmissionrpc/client.py", line 149, in _http_query
            raise TransmissionError('Request failed.', error)
        TransmissionError:  Original exception: HTTPHandlerError, "HTTPHandlerError 401: basic auth failed"
        2011-12-14 23:30 INFO     feed          Feedname            Aborting feed (plugin: transmission)
    
  3. Anonymous

    The issue might be related to the fact that Transmission uses Blocking disk Functions.. so when allocating disk or moving a completed torrent ALL of transmission including the RPC stops responding, and on slow systems this can be a long time.

    Accounting for a long retry interval up to 1 min might work around the issue if this is the root cause.

  4. Kiar Holland

    I had a similar issue and have spent lots of time, only to find a workaround. Mine would accept only 4 torrents from flexget at a time, and reject the others. My solution was to lower the retry time and raise the number of maximum retries in flexget, then raise the number of retires to something it would never reach. I think had my scheduler run flexget more often. The result is having 4 downloads get added to transmission more frequently until the list is complete

    I am running: Synology DS412+ DSM 4.2-3211 Transmission 2.82-6 for Cedarview transmissionrpc 0.11 flesget 1.2.134

    In my config.yml file, I simply added this to the end.

        retry_failed:
          retry_time: 1 minutes
          retry_time_multiplier: 1
          max_retries: 139
    

    Again, NOT a fix, but a work around that works.

  5. Log in to comment