[SCRIPT] sherpa.sh

This is the best place for community developers to publish their genius work. Your Apps enrich the QNAP Turbo NAS.
Post Reply
User avatar
OneCD
Ask me anything
Posts: 6995
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [SCRIPT] sherpa.sh

Post by OneCD » Fri Jan 31, 2020 11:22 am

potestus wrote:
Fri Jan 31, 2020 8:25 am
Post processing seems not to be updating I edited eol to add 100 but it seems it's not auto updating?
Can you please SSH in again as 'admin' and run a manual git pull?

Code: Select all

cd /share/HDA_DATA/Qdownload/nzbToMedia && git pull

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage

User avatar
OneCD
Ask me anything
Posts: 6995
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [SCRIPT] sherpa.sh

Post by OneCD » Fri Jan 31, 2020 11:28 am

jkcchan wrote:
Fri Jan 31, 2020 9:43 am
Ran it, no output. Even checked with netstat -tuln | grep 5070 and nothing :(
What is your serverhost listening address?

Code: Select all

grep serverhost /share/CACHEDEV1_DATA/.qpkg/OWatcher3/config/config.ini
It should be 0.0.0.0

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage

potestus
Starting out
Posts: 37
Joined: Tue May 10, 2011 7:30 pm

Re: [SCRIPT] sherpa.sh

Post by potestus » Fri Jan 31, 2020 7:20 pm

OneCD wrote:
Fri Jan 31, 2020 11:22 am
potestus wrote:
Fri Jan 31, 2020 8:25 am
Post processing seems not to be updating I edited eol to add 100 but it seems it's not auto updating?
started
Can you please SSH in again as 'admin' and run a manual git pull?

Code: Select all

cd /share/HDA_DATA/Qdownload/nzbToMedia && git pull
The job ran ok lots of modules listed including eol.py. Ended with a message comit before you abort?
Needless to say it hasn't updated I restarted sab. Should I do anything else..? Having said that. it's working differently and failed processing is working.
Screenshot_20200131-112648_Chrome.jpg
Output from user script "nzbToMedia.py" (Exit code = 1):
[13:36:32] [INFO]::MAIN: Loading config from [/share/HDA_DATA/Qdownload/nzbToMedia/autoProcessMedia.cfg]
/share/HDA_DATA/Qdownload/nzbToMedia/eol.py:139: LifetimeWarning: Python 2.7 is no longer supported.
warnings.warn(msg, LifetimeWarning)
[13:36:33] [INFO]::MAIN: Python v2.7 will reach end of life in -30 days.
[13:36:33] [WARNING]::MAIN: Please upgrade to a more recent Python version.
[13:36:33] [INFO]::MAIN: Checking database structure...
[13:36:36] [INFO]::MAIN: Checking if git needs an update
[13:37:40] [INFO]::MAIN: There is a newer version available (you're 139 commits behind)
[13:37:40] [INFO]::MAIN: Auto-Updating nzbToMedia, Please wait ...
[13:38:13] [ERROR]::MAIN: Update failed, not restarting. Check your log for more information.
[13:38:14] [INFO]::MAIN: nzbToMedia Version:95e4c70d9a85b4f1737bd5b272756d7efce2df64 Branch:master (Linux 3.4.6)
[13:38:24] [INFO]::MAIN: #########################################################
[13:38:24] [INFO]::MAIN: ## ..::[nzbToMedia.py]::.. ##
[13:38:24] [INFO]::MAIN: #########################################################
[13:38:24] [INFO]::MAIN: Script triggered from SABnzbd 0.7.17+
Changing to directory: /share/HDA_DATA/Qdownload/nzbToMedia

-- Cleaning bytecode --

No bytecode to clean

-- Cleaning folders: ['libs', 'core'] --
No folders to clean

Returning to directory: /share/HDA_DATA/.qpkg/SABnzbdplus/SABnzbdplus

-- Cleanup finished --

Changing to directory: /share/HDA_DATA/Qdownload/nzbToMedia

-- Cleaning bytecode --

No bytecode to clean

-- Cleaning folders: ['libs', 'core'] --
No folders to clean

Returning to directory: /share/HDA_DATA/.qpkg/SABnzbdplus/SABnzbdplus

-- Cleanup finished --

Traceback (most recent call last):
File "/share/HDA_DATA/Qdownload/nzbToMedia/nzbToMedia.py", line 964, in <module>
exit(main(sys.argv))
File "/share/HDA_DATA/Qdownload/nzbToMedia/nzbToMedia.py", line 894, in main
download_id='', failure_link=''.join(args[8:]))
File "/share/HDA_DATA/Qdownload/nzbToMedia/nzbToMedia.py", line 667, in process
download_id = get_nzoid(input_name)
File "/share/HDA_DATA/Qdownload/nzbToMedia/core/plugins/downloaders/nzb/utils.py", line 36, in get_nzoid
r = requests.get(url, params=params, verify=False, timeout=(30, 120))
File "/share/HDA_DATA/Qdownload/nzbToMedia/libs/common/requests/api.py", line 75, in get
return request('get', url, params=params, **kwargs)
File "/share/HDA_DATA/Qdownload/nzbToMedia/libs/common/requests/api.py", line 60, in request
return session.request(method=method, url=url, **kwargs)
File "/share/HDA_DATA/Qdownload/nzbToMedia/libs/common/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/share/HDA_DATA/Qdownload/nzbToMedia/libs/common/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/share/HDA_DATA/Qdownload/nzbToMedia/libs/common/requests/adapters.py", line 529, in send
raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPConnectionPool(host='localhost', port=8800): Read timed out. (read timeout=120)
Exception AttributeError: "'NoneType' object has no attribute 'path'" in <bound method PosixProcess.__del__ of <core.utils.processes.PosixProcess object at 0x1a8c350>> ignored


Enjoy!
You do not have the required permissions to view the files attached to this post.

User avatar
OneCD
Ask me anything
Posts: 6995
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [SCRIPT] sherpa.sh

Post by OneCD » Sat Feb 01, 2020 3:29 am

potestus wrote:
Fri Jan 31, 2020 7:20 pm
The job ran ok lots of modules listed including eol.py. Ended with a message comit before you abort?
OK, that output is what I need to see. ;)
potestus wrote:
Fri Jan 31, 2020 7:20 pm
Needless to say it hasn't updated I restarted sab. Should I do anything else..? Having said that. it's working differently and failed processing is working.
Let's get nzbToMedia up-to-date before using it for post-processing.

Can you please run another manual git pull on nzbToMedia and post the output? I need to see why it suggested a "commit before abort". It sounds like one or more of the base files have been manually changed.

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage

jkcchan
Starting out
Posts: 11
Joined: Mon Dec 30, 2019 5:44 am

Re: [SCRIPT] sherpa.sh

Post by jkcchan » Sat Feb 01, 2020 8:35 am

OneCD wrote:
Fri Jan 31, 2020 11:28 am
jkcchan wrote:
Fri Jan 31, 2020 9:43 am
Ran it, no output. Even checked with netstat -tuln | grep 5070 and nothing :(
What is your serverhost listening address?

Code: Select all

grep serverhost /share/CACHEDEV1_DATA/.qpkg/OWatcher3/config/config.ini
It should be 0.0.0.0
my serverhost is pointing to 192.168.0.12

User avatar
OneCD
Ask me anything
Posts: 6995
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [SCRIPT] sherpa.sh

Post by OneCD » Sat Feb 01, 2020 8:41 am

jkcchan wrote:
Sat Feb 01, 2020 8:35 am
my serverhost is pointing to 192.168.0.12
Can you edit that file so it's 0.0.0.0?

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage

Rodneysb
New here
Posts: 2
Joined: Sat Jan 18, 2020 10:45 am

Re: [SCRIPT] sherpa.sh

Post by Rodneysb » Sat Feb 01, 2020 8:48 am

Had to run in Debug mode as when it fails to find that folder no log was created.

[/share/Public] # ./sherpa.sh SABnzbd --debug
[ fail ] A required NAS system share is missing [/share/Download]. Please re-create it via the QTS Control Panel -> Privilege Settings -> Shared Folders.
[ dbug ] (vv) $debug [true]
[ dbug ] (>>) <EnvironCheck>
[ dbug ] (II) ========================================================================
[ dbug ] (**) SCRIPT: started: Fri Jan 31 19:26:29 EST 2020
[ dbug ] (**) SCRIPT: version: 200108
[ dbug ] (II) ------------------------------------------------------------------------
[ dbug ] (II) Markers: (**) detected, (II) information, (WW) warning, (LL) log file,
[ dbug ] (II) (EE) error, (==) processing, (--) done, (>>) f entry, (<<) f exit,
[ dbug ] (II) (vv) variable name & value, ($1) positional argument value.
[ dbug ] (II) ------------------------------------------------------------------------
[ dbug ] (**) NAS : model: TVS-672XT
[ dbug ] (**) NAS : firmware version
[ dbug ] (**) NAS : firmware build: 20191206
[ dbug ] (**) NAS : kernel: 4.14.24-qnap x86_64
[ dbug ] (**) NAS : OS uptime: 13 days
[ dbug ] (**) NAS : system load: 1 min=2.62, 5 min=2.57, 15 min=2.75
[ dbug ] (**) NAS : USER: admin
[ dbug ] (**) NAS : EUID: 0
[ dbug ] (**) NAS : default volume: /share/CACHEDEV1_DATA
[ dbug ] (**) NAS : $PATH: /bin:/sbin:/usr/bin:/usr/sbin:/usr/bin/X11:
[ dbug ] (**) NAS : /opt: not present
[ dbug ] (**) NAS : /share/Download: not present!
[ dbug ] (**) SCRIPT: user arguments: SABnzbd --debug
[ dbug ] (**) SCRIPT: target app(s)
[ dbug ] (**) SCRIPT: working path
[ dbug ] (**) QPKG : download path
[ dbug ] (**) IPKG : download path
[ dbug ] (**) QPKG : arch: none
[ dbug ] (>>) <DisplayHelp>
* A BASH script to install various Usenet apps into a QNAP NAS.

- Each application shown below can be installed (or reinstalled) by running:

- Ensure all sherpa application dependencies are installed:
./sherpa.sh --check

- Don't check free-space on target filesystem when installing Entware packages:
./sherpa.sh --ignore-space

- Update all sherpa installed applications:
./sherpa.sh --update
[ dbug ] (<<) <DisplayHelp> [43]
[ dbug ] (II) ------------------------------------------------------------------------
[ dbug ] (<<) <EnvironCheck> [43]
[ dbug ] (>>) <Cleanup>
[ dbug ] (<<) <Cleanup> [43]
[ dbug ] (>>) <DisplayResult>
[ dbug ] (II) ------------------------------------------------------------------------
[ dbug ] (**) SCRIPT: finished: Fri Jan 31 19:26:29 EST 2020
[ dbug ] (**) SCRIPT: elapsed time: 439032h:26m:28s
[ dbug ] (II) ========================================================================
[ dbug ] (<<) <DisplayResult> [43]
[/share/Public] #
[/share/Public] #


The directory is created can toss up a screen of it if you like.

User avatar
OneCD
Ask me anything
Posts: 6995
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [SCRIPT] sherpa.sh

Post by OneCD » Sat Feb 01, 2020 12:01 pm

Rodneysb wrote:
Sat Feb 01, 2020 8:48 am
[ fail ] A required NAS system share is missing [/share/Download]. Please re-create it via the QTS Control Panel -> Privilege Settings -> Shared Folders.
...
[ dbug ] (**) NAS : default volume: /share/CACHEDEV1_DATA
...
[ dbug ] (**) NAS : /opt: not present
[ dbug ] (**) NAS : /share/Download: not present!
Can you please SSH in again as the 'admin' user, run the following commands and paste the result back here?

Code: Select all

ll /; echo; ll /share/

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage

potestus
Starting out
Posts: 37
Joined: Tue May 10, 2011 7:30 pm

Re: [SCRIPT] sherpa.sh

Post by potestus » Sat Feb 01, 2020 6:12 pm

Screenshot_20200201-153259_Termius.jpg
OneCD wrote:
Sat Feb 01, 2020 3:29 am
potestus wrote:
Fri Jan 31, 2020 7:20 pm
The job ran ok lots of modules listed including eol.py. Ended with a message comit before you abort?
OK, that output is what I need to see. ;)
potestus wrote:
Fri Jan 31, 2020 7:20 pm
Needless to say it hasn't updated I restarted sab. Should I do anything else..? Having said that. it's working differently and failed processing is working.
Let's get nzbToMedia up-to-date before using it for post-processing.

Can you please run another manual git pull on nzbToMedia and post the output? I need to see why it suggested a "commit before abort". It sounds like one or more of the base files have been manually changed.
I modified the nzbtomedia.py and autoprocess.cfg to add parameters for sickchill tight from the start..
Is that the problem? I'll have a go later at the git pull
You do not have the required permissions to view the files attached to this post.

User avatar
OneCD
Ask me anything
Posts: 6995
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [SCRIPT] sherpa.sh

Post by OneCD » Sun Feb 02, 2020 4:15 am

potestus wrote:
Sat Feb 01, 2020 6:12 pm
I modified the nzbtomedia.py and autoprocess.cfg to add parameters for sickchill tight from the start..
Is that the problem? I'll have a go later at the git pull
Modifying any of the cloned files will result in an error when pulling via git. It's OK to edit [autoProcessMedia.cfg] as that file isn't part of the remote repo (it begins life as a copy of [autoProcessMedia.cfg.spec]), but any other mods will cause problems.

Please run this to reset your local copy of nzbToMedia, then pull again from the remote repo:

Code: Select all

cd /share/HDA_DATA/Qdownload/nzbToMedia && git reset --hard && git pull

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage

potestus
Starting out
Posts: 37
Joined: Tue May 10, 2011 7:30 pm

Re: [SCRIPT] sherpa.sh

Post by potestus » Sun Feb 02, 2020 8:45 pm

Screenshot_20200201-153259_Termius.jpg
OneCD wrote:
Sat Feb 01, 2020 3:29 am
potestus wrote:
Fri Jan 31, 2020 7:20 pm
The job ran ok lots of modules listed including eol.py. Ended with a message comit before you abort?
OK, that output is what I need to see. ;)
potestus wrote:
Fri Jan 31, 2020 7:20 pm
Needless to say it hasn't updated I restarted sab. Should I do anything else..? Having said that. it's working differently and failed processing is working.
Let's get nzbToMedia up-to-date before using it for post-processing.

Can you please run another manual git pull on nzbToMedia and post the output? I need to see why it suggested a "commit before abort". It sounds like one or more of the base files have been manually changed.
You do not have the required permissions to view the files attached to this post.

User avatar
OneCD
Ask me anything
Posts: 6995
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [SCRIPT] sherpa.sh

Post by OneCD » Mon Feb 03, 2020 3:23 am

potestus wrote:
Sun Feb 02, 2020 8:45 pm
You've run the same commands as last time. :'

Please check my previous post for the correct commands.

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage

jkcchan
Starting out
Posts: 11
Joined: Mon Dec 30, 2019 5:44 am

Re: [SCRIPT] sherpa.sh

Post by jkcchan » Tue Feb 04, 2020 1:46 am

jkcchan wrote:
Sat Feb 01, 2020 8:35 am
OneCD wrote:
Fri Jan 31, 2020 11:28 am
jkcchan wrote:
Fri Jan 31, 2020 9:43 am
Ran it, no output. Even checked with netstat -tuln | grep 5070 and nothing :(
What is your serverhost listening address?

Code: Select all

grep serverhost /share/CACHEDEV1_DATA/.qpkg/OWatcher3/config/config.ini
It should be 0.0.0.0
my serverhost is pointing to 192.168.0.12
omg it works!! Thanks so much! I remember changing that setting. 0.0.0.0 sets it to whatever IP it's using?

Is the config file for LazyLibrarian similar? Might be the same issue, let me check that out.

User avatar
OneCD
Ask me anything
Posts: 6995
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [SCRIPT] sherpa.sh

Post by OneCD » Tue Feb 04, 2020 11:53 am

jkcchan wrote:
Tue Feb 04, 2020 1:46 am
I remember changing that setting. 0.0.0.0 sets it to whatever IP it's using?
0.0.0.0 tells the app to listen to (and respond to) any-and-all network interfaces on the host machine that have been assigned IPv4 addresses, no matter what each one actually is. https://en.wikipedia.org/wiki/0.0.0.0
jkcchan wrote:
Tue Feb 04, 2020 1:46 am
Is the config file for LazyLibrarian similar? Might be the same issue, let me check that out.
LazyLibrarian doesn't ship with a config file - it's auto-generated on first-run. Yes, it's possible you specified a different IP listening address other than 0.0.0.0 ;)

Let us know how you go. :geek:

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage

jkcchan
Starting out
Posts: 11
Joined: Mon Dec 30, 2019 5:44 am

Re: [SCRIPT] sherpa.sh

Post by jkcchan » Tue Feb 04, 2020 2:14 pm

Thanks for that link! Pretty cool, my fault for toying with those settings in the first place! :ashamed:

I found the config file for LazyLibrarian! It was in [/share/CACHEDEV1_DATA/.qpkg/LazyLibrarian/config].

Thanks so much @OneCD :DD you're the best.

Post Reply

Return to “Community Apps”