markop159 / KODI-Popcorn-Time

With KODI Popcorn Time you can search for movies that you can see immediately in KODI.
142 stars 32 forks source link

ERROR - Can't start torrent2http on RPI3 + KODI 18.3 #108

Open lpt2007 opened 4 years ago

lpt2007 commented 4 years ago

Hi,

I get this error when I try to start movie on raspberry pi 2 + kodi 18.3 (xbian):

NOTICE: [plugin.video.kodipopcorntime] (Thread-1) (Torrent) error: [Errno 111] Connection refused
NOTICE: Previous line repeats 142 times.
FATAL: [plugin.video.kodipopcorntime] Traceback (most recent call last):
                                              File "/home/xbian/.kodi/addons/plugin.video.kodipopcorntime/addon.py", line 40, in <module>
                                                getattr(gui, params.pop('endpoint', 'index'))(params.pop('mediaType', '')).show(**params)
                                              File "/home/xbian/.kodi/addons/plugin.video.kodipopcorntime/resources/lib/kodipopcorntime/gui/player.py", line 106, in show
                                                TorrentPlayer().playTorrentFile(self.mediaSettings, build_magnetFromMeta(params[quality], "quality %s" %quality), item, subtitle)
                                              File "/home/xbian/.kodi/addons/plugin.video.kodipopcorntime/resources/lib/kodipopcorntime/torrent.py", line 432, in playTorrentFile
                                                raise Abort()
                                              File "/home/xbian/.kodi/addons/plugin.video.kodipopcorntime/resources/lib/kodipopcorntime/threads.py", line 42, in __exit__
                                                self.close()
                                              File "/home/xbian/.kodi/addons/plugin.video.kodipopcorntime/resources/lib/kodipopcorntime/torrent.py", line 379, in close
                                                super(Loader, self).close()
                                              File "/home/xbian/.kodi/addons/plugin.video.kodipopcorntime/resources/lib/kodipopcorntime/threads.py", line 51, in close
                                                self.raiseAnyError()
                                              File "/home/xbian/.kodi/addons/plugin.video.kodipopcorntime/resources/lib/kodipopcorntime/threads.py", line 22, in ___run
                                                self._target()
                                              File "/home/xbian/.kodi/addons/plugin.video.kodipopcorntime/resources/lib/kodipopcorntime/torrent.py", line 257, in _run
                                                if self._TEngine.start() and self._getPlayFile() and self._checkData() and self._preloading(self._item.get('stream_info', {}).get('video', {}).get('duration', 0)):
                                              File "/home/xbian/.kodi/addons/plugin.video.kodipopcorntime/resources/lib/kodipopcorntime/torrent.py", line 122, in start
                                                raise TorrentError("Can't start torren
markop159 commented 4 years ago

I cannot test this, so I will try to help you with some known problems that could occur on some systems, so you can check on yours.

if this is all ok, there could be some changes in Kodi 18.3 that could be blocking torrent to run.

lpt2007 commented 4 years ago

Probably there some changes in kodi 18.3. I try on KODI 17.6 and plugin is working.

How to modify plugin to work with kodi 18?

How I can test torrent2http if working correctly?

thx in advance for help

markop159 commented 4 years ago

I am using plugin with kodi 18.3 on windows and on RPI2 with OSMC installed. I do not think that there is a problem with kodi 18. I still think that there is some change in OS (enabled firewall).

dkavraal commented 4 years ago
Rasp 3B+
# uname -a
Linux osmc 4.14.78-4-osmc #1 SMP PREEMPT Wed Dec 12 17:58:11 UTC 2018 armv7l GNU/Linux
# cat /etc/os-release
PRETTY_NAME="Open Source Media Center"
NAME="OSMC"
VERSION="July 2019"
VERSION_ID="2019.07-1"
ID=osmc
ID_LIKE=debian

It keeps trying:

...
DEBUG: [plugin.video.kodipopcorntime] (Thread-1) (URL) Trying to obtaining data from http://127.0.0.1:5001/ls
DEBUG: [plugin.video.kodipopcorntime] (Thread-1) (URL) Reading response
DEBUG: [plugin.video.kodipopcorntime] (Thread-1) (Json) Reading JSON data
DEBUG: [plugin.video.kodipopcorntime] (Thread-1) (Json) Successful receive data from http://127.0.0.1:5001/ls
DEBUG: [plugin.video.kodipopcorntime] (Thread-1) (URL) Headers: {'Accept-Encoding': 'gzip', 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.66 Safari/537.36'}
...

Meanwhile I tried and got:

# curl http://127.0.0.1:5001/ls
{"files":null}
markop159 commented 4 years ago

Fixed this issue in latest release 1.7.3, the problem was with new version of Linux which does not allow to connect via localhost IP address if you do not bind the listening port to IP: 127.0.0.

If you have installed it via my repository it should start updateing shortly, if it does not start just check for new addon updates in Kodi.

MantasR commented 4 years ago

I get the same error ([Errno 111] Connection refused) on 1.7.3

I am running https://libreelec.tv/ on a laptop. Also tried to set execution permissions on torrent2http.

MantasR commented 4 years ago

Figured this out :D

Apperantly my ISP was blocking server. So changing DSP settings to google solved it.

In case anyone else has same problem on LibreElec: In my case I have eddited /etc/resolv.conf and set first 2 nameservers to 8.8.8.8 and 8.8.4.4 The third one was set to localhost, so I left it as is.

wake0up0ne0 commented 4 years ago

Had same issue on win 10 x64. After installation the was no folder for x64 created, it only had x86 so it kept saying it cant find torrent2http. I have manually copied windows_x86 folder and renamed that copy to windows_x64 It did the trick and now it works. Full path is: C:\Users\%USERNAME%\AppData\Roaming\Kodi\addons\plugin.video.kodipopcorntime\resources\bin\windows_x64

I cannot test this, so I will try to help you with some known problems that could occur on some systems, so you can check on yours.

* check if firewall is enabled on your system (on linux this is usually iptables) I would check this first because of this error: `[Errno 111] Connection refused`

* check if torrent2http binary have execution right (binnary is stored on your system here: `/home/xbian/.kodi/addons/plugin.video.kodipopcorntime/resources/bin/`)

if this is all ok, there could be some changes in Kodi 18.3 that could be blocking torrent to run.