Pynab
|
Posts: 23
Threads: 1
Joined: Nov 2015
Reputation:
1
[Not Solved]
Nov 06, 2015, 03:38 AM
Absolutely! I will post my results as soon as I have them.
Posts: 23
Threads: 1
Joined: Nov 2015
Reputation:
1
[Not Solved]
Nov 07, 2015, 06:23 PM
(This post was last modified: Nov 07, 2015, 06:58 PM by xvpx.)
Ok,
So I spun up a Debian 7 VM, I made it all the way through with no issues to the "Starting the API" section again. As always, I can't start the API.
I run:
Code:
root@pynab-server:/opt/pynab# python3 pynab.py api
pynab:api: ERROR (abnormal termination)
Python version:
Python 3.2.3 (default, Feb 20 2013, 14:44:27)
/var/log/supervisor/supervisord.log:
Code:
2015-11-07 13:03:56,784 INFO daemonizing the supervisord process
2015-11-07 13:03:56,784 INFO supervisord started with pid 3310
2015-11-07 13:03:57,787 INFO spawned: 'stats' with pid 3311
2015-11-07 13:03:57,788 INFO spawned: 'scan' with pid 3312
2015-11-07 13:03:57,789 INFO spawned: 'postproc' with pid 3313
2015-11-07 13:03:57,790 INFO spawned: 'prebot' with pid 3314
2015-11-07 13:03:57,950 INFO exited: stats (exit status 1; not expected)
2015-11-07 13:03:58,433 INFO exited: postproc (exit status 1; not expected)
2015-11-07 13:03:58,459 INFO exited: scan (exit status 1; not expected)
2015-11-07 13:03:58,648 INFO exited: prebot (exit status 1; not expected)
2015-11-07 13:03:59,650 INFO spawned: 'stats' with pid 3315
2015-11-07 13:03:59,651 INFO spawned: 'scan' with pid 3316
2015-11-07 13:03:59,652 INFO spawned: 'postproc' with pid 3317
2015-11-07 13:03:59,653 INFO spawned: 'prebot' with pid 3318
2015-11-07 13:03:59,763 INFO exited: stats (exit status 1; not expected)
2015-11-07 13:03:59,808 INFO exited: postproc (exit status 1; not expected)
2015-11-07 13:03:59,845 INFO exited: scan (exit status 1; not expected)
2015-11-07 13:03:59,866 INFO exited: prebot (exit status 1; not expected)
2015-11-07 13:04:01,870 INFO spawned: 'stats' with pid 3319
2015-11-07 13:04:01,872 INFO spawned: 'scan' with pid 3320
2015-11-07 13:04:01,873 INFO spawned: 'postproc' with pid 3321
2015-11-07 13:04:01,874 INFO spawned: 'prebot' with pid 3322
2015-11-07 13:04:01,983 INFO exited: stats (exit status 1; not expected)
2015-11-07 13:04:02,028 INFO exited: postproc (exit status 1; not expected)
2015-11-07 13:04:02,058 INFO exited: scan (exit status 1; not expected)
2015-11-07 13:04:02,085 INFO exited: prebot (exit status 1; not expected)
2015-11-07 13:04:05,090 INFO spawned: 'stats' with pid 3323
2015-11-07 13:04:05,091 INFO spawned: 'scan' with pid 3324
2015-11-07 13:04:05,092 INFO spawned: 'postproc' with pid 3325
2015-11-07 13:04:05,093 INFO spawned: 'prebot' with pid 3326
2015-11-07 13:04:05,203 INFO exited: stats (exit status 1; not expected)
2015-11-07 13:04:05,243 INFO gave up: stats entered FATAL state, too many start retries too quickly
2015-11-07 13:04:05,248 INFO exited: postproc (exit status 1; not expected)
2015-11-07 13:04:05,275 INFO gave up: postproc entered FATAL state, too many start retries too quickly
2015-11-07 13:04:05,281 INFO exited: scan (exit status 1; not expected)
2015-11-07 13:04:05,298 INFO gave up: scan entered FATAL state, too many start retries too quickly
2015-11-07 13:04:05,305 INFO exited: prebot (exit status 1; not expected)
2015-11-07 13:04:06,306 INFO gave up: prebot entered FATAL state, too many start retries too quickly
2015-11-07 13:04:12,631 INFO spawned: 'api' with pid 3334
2015-11-07 13:04:12,806 INFO exited: api (exit status 1; not expected)
2015-11-07 13:04:13,808 INFO spawned: 'api' with pid 3335
2015-11-07 13:04:13,930 INFO exited: api (exit status 1; not expected)
2015-11-07 13:04:15,934 INFO spawned: 'api' with pid 3336
2015-11-07 13:04:16,054 INFO exited: api (exit status 1; not expected)
2015-11-07 13:04:19,059 INFO spawned: 'api' with pid 3337
2015-11-07 13:04:19,179 INFO exited: api (exit status 1; not expected)
2015-11-07 13:04:20,181 INFO gave up: api entered FATAL state, too many start retries too quickly
api-stderr---supervisor-XlLVFu.log:
Code:
Traceback (most recent call last):
File "/opt/pynab/api.py", line 8, in <module>
from pynab import log, log_init
File "/opt/pynab/pynab/__init__.py", line 80, in <module>
log_init(name)
File "/opt/pynab/pynab/__init__.py", line 51, in log_init
backupCount=5, encoding='utf-8')
File "/usr/lib/python3.2/logging/handlers.py", line 117, in __init__
BaseRotatingHandler.__init__(self, filename, mode, encoding, delay)
File "/usr/lib/python3.2/logging/handlers.py", line 64, in __init__
logging.FileHandler.__init__(self, filename, mode, encoding, delay)
File "/usr/lib/python3.2/logging/__init__.py", line 970, in __init__
StreamHandler.__init__(self, self._open())
File "/usr/lib/python3.2/logging/__init__.py", line 995, in _open
stream = codecs.open(self.baseFilename, self.mode, self.encoding)
File "/usr/lib/python3.2/codecs.py", line 884, in open
file = builtins.open(filename, mode, buffering)
IOError: [Errno 13] Permission denied: '/var/log/pynab/api.log'
/var/log/pynab/pynab.log:
Code:
2015-11-07 12:56:06 INFO log: started pynab logger
2015-11-07 12:56:19 INFO log: started pynab logger
2015-11-07 12:59:39 INFO log: started pynab logger
2015-11-07 13:02:33 INFO log: started pynab logger
2015-11-07 13:04:12 INFO log: started pynab logger
2015-11-07 13:10:33 INFO log: started pynab logger
2015-11-07 13:12:25 INFO log: started pynab logger
2015-11-07 13:16:18 INFO log: started pynab logger
ls -l /var/log/pynab:
Code:
-rwxr-xr-x 1 root root 255 Nov 7 12:31 install.log
-rwxr-xr-x 1 root root 459 Nov 7 13:20 pynab.log
Edit:
I added a test group:
Code:
root@pynab-server:/opt/pynab# python3 /opt/pynab/pynab.py group enable alt.binaries.teevee
group enabled.
And just for giggles tried to start pynab:
Code:
root@pynab-server:/opt/pynab# python3 pynab.py start
pynab:scan: ERROR (abnormal termination)
pynab:postproc: ERROR (abnormal termination)
pynab:prebot: ERROR (abnormal termination)
pynab:stats: ERROR (abnormal termination)
Posts: 1,646
Threads: 2
Joined: Aug 2015
Reputation:
42
[Not Solved]
Nov 07, 2015, 08:32 PM
Crap, and were you using the master branch or the development branch? I think it's time for a bug report on the pynab git, he's really helpful.
I will revisit pynab maybe sometime this week and see if I can help out, we will get this working.
Posts: 23
Threads: 1
Joined: Nov 2015
Reputation:
1
[Not Solved]
Nov 07, 2015, 11:41 PM
(Nov 07, 2015, 08:32 PM)Mike Wrote: Crap, and were you using the master branch or the development branch? I think it's time for a bug report on the pynab git, he's really helpful.
I will revisit pynab maybe sometime this week and see if I can help out, we will get this working.
Double CRAP! Let me use the right branch this time... Then I will reach out.
Posts: 23
Threads: 1
Joined: Nov 2015
Reputation:
1
[Not Solved]
Nov 08, 2015, 06:03 AM
(This post was last modified: Nov 08, 2015, 06:10 AM by xvpx.
Edit Reason: Update
)
(Nov 07, 2015, 11:41 PM)xvpx Wrote: (Nov 07, 2015, 08:32 PM)Mike Wrote: Crap, and were you using the master branch or the development branch? I think it's time for a bug report on the pynab git, he's really helpful.
I will revisit pynab maybe sometime this week and see if I can help out, we will get this working.
Double CRAP! Let me use the right branch this time... Then I will reach out.
You are going to love this!!!
I posted an issue and about 2 minutes before Murodese responded, I figured it out!
Code:
chown -R www-data:www-data /var/log/pynab
Murodese is going to add it to the read me.
Now, API is running:
Code:
root@pynab-server:/opt/pynab# supervisorctl
pynab:api RUNNING pid 4763, uptime 0:02:19
pynab:backfill STOPPED Not started
pynab:postproc RUNNING pid 4715, uptime 0:02:30
pynab:prebot RUNNING pid 4727, uptime 0:02:29
pynab:pubsub STOPPED Not started
pynab:scan FATAL Exited too quickly (process log may have details)
pynab:stats RUNNING pid 4738, uptime 0:02:27
how do I know if this is working now? --it isn't lol
Posts: 1,646
Threads: 2
Joined: Aug 2015
Reputation:
42
[Not Solved]
Nov 08, 2015, 03:21 PM
(This post was last modified: Nov 08, 2015, 07:52 PM by Mike.)
lol, wonder why I didn't see that issue before - I do now and changing the ownership worked so thanks for that
OK, so the pynab api is running, can you check with netstat -antp
You should see this somewhere
Code:
tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN 3749/python3
And if you go to http://192.168.60.135:8080/ you should see something about 404 file not found - but that is good because it means the socket is open and listening.
Let's make sure you can at least grab new headers and post process the using the supplied regex
Try going into /opt/pynab/config.py and change backfill_days to 10
Then do a scan, replace last paratemeter alt.binaries.teevee with an enabled group
Code:
python3 /opt/pynab/scan.py backfill alt.binaries.teevee
Check the backfill log
Code:
cat /var/log/pynab/backfill.log
Then force post processing
Code:
python3 /opt/pynab/postprocess.py
Now check the post process log to see if it found and made releases
Code:
cat /var/log/pynab/postprocess.log
Posts: 23
Threads: 1
Joined: Nov 2015
Reputation:
1
[Not Solved]
Nov 08, 2015, 07:26 PM
(This post was last modified: Nov 08, 2015, 08:39 PM by xvpx.)
HOT DAMN!!!!
Code:
2015-11-08 14:26:28 INFO group: alt.binaries.teevee: 182 iterations (3637095 messages) to go
2015-11-08 14:26:29 DEBUG server: alt.binaries.teevee: getting range 839119204-839139203
2015-11-08 14:26:31 INFO server: alt.binaries.teevee: retrieved 839119204 - 839139203 in 2.23s [20000 recv, 472 pts, 0 ign, 0 blk]
2015-11-08 14:26:31 DEBUG parts: mysql+pymysql insert: 0.02s
2015-11-08 14:26:31 DEBUG parts: mysql+pymysql insert: 0.19s
2015-11-08 14:26:31 DEBUG parts: saved 428 parts and 20000 segments in 0.54s
2015-11-08 14:26:31 INFO group: alt.binaries.teevee: 181 iterations (3617095 messages) to go
2015-11-08 14:26:31 INFO group: alt.binaries.teevee: scan limit reached, ending early (will continue later)
2015-11-08 14:26:31 INFO group: alt.binaries.teevee: scanning group
2015-11-08 14:26:32 DEBUG server: alt.binaries.teevee: getting range 839099204-839119203
2015-11-08 14:26:36 INFO server: alt.binaries.teevee: retrieved 839099204 - 839119203 in 4.17s [20000 recv, 660 pts, 0 ign, 0 blk]
2015-11-08 14:26:36 DEBUG parts: mysql+pymysql insert: 0.04s
2015-11-08 14:26:37 DEBUG parts: mysql+pymysql insert: 0.29s
2015-11-08 14:26:37 DEBUG parts: saved 653 parts and 19999 segments in 0.63s
2015-11-08 14:26:37 INFO group: alt.binaries.teevee: 180 iterations (3597095 messages) to go
2015-11-08 14:26:37 DEBUG server: alt.binaries.teevee: getting range 839079204-839099203
EDIT: backfill_days was already set to 10.
I will check the post processing in a bit.
Code:
Parts | Binaries | Releases | Other-Misc Releases
11448 . | 0 . | 0 . | 0 .
17025 +5577 | 0 . | 0 . | 0 .
29262 +12237 | 0 . | 0 . | 0 .
2015-11-08 14:46:28 INFO log: started pynab logger
log: started pynab logger
Parts | Binaries | Releases | Other-Misc Releases
13504 . | 0 . | 0 . | 0 .
12457 -1047 | 4 +4 | 328 +328 | 7 +7
I have some stuff after a post-process. Now, I sure did install the frigging stable branch again but I have access to the NN regexes so I think thats why it is working?
Code:
2015-11-08 15:37:24 DEBUG rar: processing Kitchen Impossible With Michel Roux Jr S01E01 HDTV x264 C4TV
2015-11-08 15:37:25 INFO rar: file info add [Kitchen Impossible With Michel Roux Jr S01E01 HDTV x264 C4TV]
2015-11-08 15:37:25 DEBUG rar: processing Kitchen Impossible With Michel Roux Jr S01E01 720p HDTV x264 C4TV
2015-11-08 15:37:25 INFO rar: file info add [Kitchen Impossible With Michel Roux Jr S01E01 720p HDTV x264 C4TV]
2015-11-08 15:37:25 DEBUG rar: processing Moonbeam City S01E06 HDTV x264 FLEET
2015-11-08 15:37:26 INFO rar: file info add [Moonbeam City S01E06 HDTV x264 FLEET]
2015-11-08 15:37:26 DEBUG rar: processing George Clarkes Amazing Spaces S05E07 HDTV x264 C4TV
2015-11-08 15:37:27 INFO rar: file info add [George Clarkes Amazing Spaces S05E07 HDTV x264 C4TV]
2015-11-08 15:37:27 DEBUG rar: processing George Clarkes Amazing Spaces S05E07 720p HDTV x264 C4TV
2015-11-08 15:37:28 INFO rar: file info add [George Clarkes Amazing Spaces S05E07 720p HDTV x264 C4TV]
Nothing shows up when I browse to localhost:8080, still the 404 Not Found, is this normal? EDIT: I suppose if I am not making a specific API call it is?
Posts: 1,646
Threads: 2
Joined: Aug 2015
Reputation:
42
[Not Solved]
Nov 08, 2015, 09:15 PM
(This post was last modified: Nov 08, 2015, 09:18 PM by Mike.)
OK, then everything is working and if you see that 404 not found it is because you need to make an appropriate API call - this is something I've never done manually but if you want to test here is the newznab API documentation.
If you want to do a test to see if the API is working I'd install SickRage or Sonarr ( my installer will make it easier to start up) and then add a show that you know pynab has found and do a manual search for an episode you know pynab found and see if the nzb is sent to NZBGet or Sanbnzbd.
I don't see an API key value in the pynab config so I would assume leave it blank.
Looking forward to the results.
Posts: 23
Threads: 1
Joined: Nov 2015
Reputation:
1
[Not Solved]
Nov 08, 2015, 10:02 PM
(This post was last modified: Nov 08, 2015, 10:09 PM by xvpx.)
(Nov 08, 2015, 09:15 PM)Mike Wrote: OK, then everything is working and if you see that 404 not found it is because you need to make an appropriate API call - this is something I've never done manually but if you want to test here is the newznab API documentation.
If you want to do a test to see if the API is working I'd install SickRage or Sonarr (my installer will make it easier to start up) and then add a show that you know pynab has found and do a manual search for an episode you know pynab found and see if the nzb is sent to NZBGet or Sanbnzbd.
I don't see an API key value in the pynab config so I would assume leave it blank.
Looking forward to the results.
I will add it to my sickbeard. Have you ever set up the web UI?
UPDATE:
I ran a search manually first and it works:
Code:
http://servername.com/api?t=search&apikey=xxxxx&q=a%20tv%20show
Code:
pynab
a pynab api
The Gadget Show S24E07 720p HDTV x264 C4TV
Sunday, November 8, 2015 2:46 PM
The Gadget Show S24E07 720p HDTV x264 C4TV
Media files
api (1.0 GB)
The Gadget Show S24E07 HDTV x264 C4TV
Sunday, November 8, 2015 2:46 PM
The Gadget Show S24E07 HDTV x264 C4TV
Media files
api (333 MB)
Antiques Roadshow UK S38E09 HDTV x264 C4TV
Sunday, November 8, 2015 2:46 PM
Antiques Roadshow UK S38E09 HDTV x264 C4TV
Posts: 1,646
Threads: 2
Joined: Aug 2015
Reputation:
42
[Not Solved]
Nov 08, 2015, 10:11 PM
I have tried setting up the web ui but got some errors related to the wasxgi thing used to serve the pages. I believe it was a problem with the nginx repository I used (it is a custom one) because the wasxgi page says nginx has native support for it.
I remember having an issue building the webgui stuff too since npm-legacy wasn't in the wheezy repo.
If you confirm the API is working then the next step will be to make sure new headers are received and processed, then the Web UI. We can do it.
|
|
|