[QPKG] sherpa: a mini-package-manager (CLI) beta

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
Guru
Posts: 12163
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [SCRIPT] sherpa.sh

Post by OneCD »

bjtukker wrote: Fri Apr 12, 2019 4:46 pm I have upgraded the machine to 3GB years ago, so it has 'plenty' of RAM :-)
Agree. There should be no problems with 3GB.

Can you please 'start' SABnzbd via the QPKG icon, then check the SABnzbd logs? You'll need to give SAB a few minutes to start (it's a bit slow on these old Atom CPUs.) The default location is [/share/Download/sabnzbd/logs].

Anything indicating a problem in the logs? Any mention of a shutdown?

To check if SAB is actually running, try grepping your Python instances:

Code: Select all

ps ax | grep python | grep -v grep

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
bjtukker
Starting out
Posts: 17
Joined: Wed Oct 22, 2008 7:37 pm

Re: [SCRIPT] sherpa.sh

Post by bjtukker »

Sab doesn't run after, with the command only Medusa is shown.

Indeed seems like a SSL issue:

Code: Select all

2019-04-12 11:17:28,867::INFO::[_cplogging:219] [12/Apr/2019:11:17:28] ENGINE Bus STARTING
2019-04-12 11:17:29,173::INFO::[_cplogging:219] [12/Apr/2019:11:17:29] ENGINE Serving on http://0.0.0.0:8800
2019-04-12 11:17:29,185::ERROR::[_cplogging:219] [12/Apr/2019:11:17:29] ENGINE Error in 'start' listener <bound method Server.start of <cherrypy._cpserver.Server object at 0x26a38e0>>
Traceback (most recent call last):
  File "/share/MD0_DATA/.qpkg/SABnzbdplus/SABnzbdplus/cherrypy/process/wspbus.py", line 207, in publish
    output.append(listener(*args, **kwargs))
  File "/share/MD0_DATA/.qpkg/SABnzbdplus/SABnzbdplus/cherrypy/_cpserver.py", line 167, in start
    self.httpserver, self.bind_addr = self.httpserver_from_self()
  File "/share/MD0_DATA/.qpkg/SABnzbdplus/SABnzbdplus/cherrypy/_cpserver.py", line 158, in httpserver_from_self
    httpserver = _cpwsgi_server.CPWSGIServer(self)
  File "/share/MD0_DATA/.qpkg/SABnzbdplus/SABnzbdplus/cherrypy/_cpwsgi_server.py", line 64, in __init__
    self.server_adapter.ssl_certificate_chain)
  File "/share/MD0_DATA/.qpkg/SABnzbdplus/SABnzbdplus/cherrypy/wsgiserver/ssl_builtin.py", line 56, in __init__
    self.context.load_cert_chain(certificate, private_key)
SSLError: [SSL: CA_MD_TOO_WEAK] ca md too weak (_ssl.c:2783)

2019-04-12 11:17:29,186::ERROR::[_cplogging:219] [12/Apr/2019:11:17:29] ENGINE Shutting down due to error in start listener:
Traceback (most recent call last):
  File "/share/MD0_DATA/.qpkg/SABnzbdplus/SABnzbdplus/cherrypy/process/wspbus.py", line 245, in start
    self.publish('start')
  File "/share/MD0_DATA/.qpkg/SABnzbdplus/SABnzbdplus/cherrypy/process/wspbus.py", line 225, in publish
    raise exc
ChannelFailures: SSLError(336245134, u'[SSL: CA_MD_TOO_WEAK] ca md too weak (_ssl.c:2783)')

2019-04-12 11:17:29,187::INFO::[_cplogging:219] [12/Apr/2019:11:17:29] ENGINE Bus STOPPING
2019-04-12 11:17:29,188::INFO::[_cplogging:219] [12/Apr/2019:11:17:29] ENGINE HTTP Server None already shut down
2019-04-12 11:17:29,194::INFO::[_cplogging:219] [12/Apr/2019:11:17:29] ENGINE HTTP Server cherrypy._cpwsgi_server.CPWSGIServer(('0.0.0.0', 8800)) shut down
2019-04-12 11:17:29,195::INFO::[_cplogging:219] [12/Apr/2019:11:17:29] ENGINE Bus STOPPED
2019-04-12 11:17:29,196::INFO::[_cplogging:219] [12/Apr/2019:11:17:29] ENGINE Bus EXITING
2019-04-12 11:17:29,196::INFO::[_cplogging:219] [12/Apr/2019:11:17:29] ENGINE Bus EXITED
User avatar
OneCD
Guru
Posts: 12163
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [SCRIPT] sherpa.sh

Post by OneCD »

bjtukker wrote: Fri Apr 12, 2019 5:22 pm Indeed seems like a SSL issue:

Code: Select all

SSLError: [SSL: CA_MD_TOO_WEAK] ca md too weak (_ssl.c:2783)
Also agree. :(

I'll have to hand you over to the guys on the SABnzbd forum as they are much more capable with SSL than I. Hopefully, they can advise further. @sander has a good track-record fixing SSL problems in the past. ;)

I'll keep an eye-out there and assist where I can.

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
bjtukker
Starting out
Posts: 17
Joined: Wed Oct 22, 2008 7:37 pm

Re: [SCRIPT] sherpa.sh

Post by bjtukker »

OK, thanks for now. I'll try another track as well: Qnap support since I'm having similar issues with Tomcat.
bjtukker
Starting out
Posts: 17
Joined: Wed Oct 22, 2008 7:37 pm

Re: [SCRIPT] sherpa.sh

Post by bjtukker »

Well, that was quick :-) I was able to resolve the issue with this post: https://forums.sabnzbd.org/viewtopic.ph ... ps#p118387

1. I disabled https (in the config.ini file with vi : set enable_https = 0
2. Restart SABnzb
3. Connect to the HTTP port (for me 8800)
4. Regenerate the keys (restart for both keys)
5. Enable https in the config file (set to 1)
6. Restart SABnzb

et voila: working again and with SSL!
bjtukker
Starting out
Posts: 17
Joined: Wed Oct 22, 2008 7:37 pm

Re: [SCRIPT] sherpa.sh

Post by bjtukker »

Now only need to repair the par2-program; it's missing...
bjtukker
Starting out
Posts: 17
Joined: Wed Oct 22, 2008 7:37 pm

Re: [SCRIPT] sherpa.sh

Post by bjtukker »

And fixed that, too, with

Code: Select all

opkg install par2cmdline
User avatar
OneCD
Guru
Posts: 12163
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [SCRIPT] sherpa.sh

Post by OneCD »

Good work. :geek:

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
User avatar
Xmantium
Been there, done that
Posts: 579
Joined: Fri Sep 03, 2010 3:55 am
Location: Manchester, England

Re: [SCRIPT] sherpa.sh

Post by Xmantium »

Hi OneCD, im glad this project is still going strong!

For some reason my sabnzbd stopped working, cant think of reason why... cant find where the logs folder is

The only thing ive done recently is remove Entware-ng and Installed latest Entware qpkg from qnapclub
Ive used SortQPKG, Sonaar and Radaar is working fine
User avatar
OneCD
Guru
Posts: 12163
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [SCRIPT] sherpa.sh

Post by OneCD »

Xmantium wrote: Sun Apr 14, 2019 6:38 pm The only thing ive done recently is remove Entware-ng and Installed latest Entware qpkg from qnapclub
Ah, then you might be missing the IPKGs required to make the sherpa apps work. ;)

Please download the latest [sherpa.sh] and run this:

Code: Select all

./sherpa.sh --check

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
User avatar
Xmantium
Been there, done that
Posts: 579
Joined: Fri Sep 03, 2010 3:55 am
Location: Manchester, England

Re: [SCRIPT] sherpa.sh

Post by Xmantium »

Ran the script, its not worked

Cant even Stop the program to restart it again
Where is the log file for sab? and how do i make a back of Sab settings just incase i need to start over
User avatar
OneCD
Guru
Posts: 12163
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [SCRIPT] sherpa.sh

Post by OneCD »

Can you please reinstall SAB via sherpa and post the debug log? This would help me a lot.

SAB logs are in [/share/Download/sabnzbd/logs/]

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
User avatar
Xmantium
Been there, done that
Posts: 579
Joined: Fri Sep 03, 2010 3:55 am
Location: Manchester, England

Re: [SCRIPT] sherpa.sh

Post by Xmantium »

OneCD wrote: Mon Apr 15, 2019 4:08 am Can you please reinstall SAB via sherpa and post the debug log? This would help me a lot.

SAB logs are in [/share/Download/sabnzbd/logs/]
Last logs say:

Code: Select all

2019-04-13 03:04:54,637::INFO::[__init__:1071] Restarting because of crashed assembler
2019-04-13 03:04:54,638::INFO::[__init__:772] [N/A] Performing SABnzbd shutdown
2019-04-13 03:04:54,638::INFO::[__init__:385] SABnzbd shutting down...
2019-04-13 03:04:54,639::INFO::[directunpacker:476] Aborting all DirectUnpackers
2019-04-13 03:04:54,639::INFO::[urlgrabber:77] URLGrabber shutting down
2019-04-13 03:04:55,435::INFO::[dirscanner:321] Dirscanner shutting down
2019-04-13 03:04:56,978::INFO::[downloader:513] Shutting down
2019-04-13 03:04:57,287::INFO::[nzbqueue:260] Saving queue
2019-04-13 03:04:57,332::INFO::[postproc:94] Saving postproc queue
2019-04-13 03:04:57,333::INFO::[__init__:449] All processes stopped
2019-04-13 03:04:57,333::INFO::[_cplogging:219] [13/Apr/2019:03:04:57] ENGINE Bus STOPPING
2019-04-13 03:04:57,351::INFO::[_cplogging:219] [13/Apr/2019:03:04:57] ENGINE HTTP Server cherrypy._cpwsgi_server.CPWSGIServer(('0.0.0.0', 8800)) shut down
2019-04-13 03:04:57,351::INFO::[_cplogging:219] [13/Apr/2019:03:04:57] ENGINE Bus STOPPED
2019-04-13 03:04:57,352::INFO::[_cplogging:219] [13/Apr/2019:03:04:57] ENGINE Bus EXITING
2019-04-13 03:04:57,352::INFO::[_cplogging:219] [13/Apr/2019:03:04:57] ENGINE Bus EXITED
2019-04-13 03:04:57,353::INFO::[_cplogging:219] [13/Apr/2019:03:04:57] ENGINE Re-spawning /opt/bin/python2.7 SABnzbd.py --daemon --config-file /share/CACHEDEV1_DATA/.qpkg/SABnzbdplus/config/config.ini --browser 0 --pidfile /tmp/SABnzbdplus.pid
whats the script to re-install Sab? will i loose my existing settings?
User avatar
OneCD
Guru
Posts: 12163
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [SCRIPT] sherpa.sh

Post by OneCD »

Xmantium wrote: Mon Apr 15, 2019 4:16 am whats the script to re-install Sab?

Code: Select all

./sherpa.sh sab
Xmantium wrote: Mon Apr 15, 2019 4:16 am will i loose my existing settings?
No.

Please post your sherpa debug log afterward.

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
User avatar
Xmantium
Been there, done that
Posts: 579
Joined: Fri Sep 03, 2010 3:55 am
Location: Manchester, England

Re: [SCRIPT] sherpa.sh

Post by Xmantium »

OneCD wrote: Mon Apr 15, 2019 4:28 am Please post your sherpa debug log afterward.
Did get a few warnings

Code: Select all

[ dbug ] (vv) $STEPHANE_QPKG_ARCH [x64]
[ dbug ] (vv) $PREF_ENTWARE [Entware]
[ dbug ] (**) QPKG  : Entware installer: std
[ proc ] downloading sherpa package list ...
[ done ] downloaded sherpa package list
[ dbug ] (<<) <Init> [0]
[ dbug ] (>>) <PauseDownloaders>
[ dbug ] (--) paused existing SABnzbd queue
[ dbug ] (<<) <PauseDownloaders> [0]
[ dbug ] (>>) <RemoveOther>
[ dbug ] (**) QPKG  :         'Optware': not installed [250]
[ dbug ] (<<) <RemoveOther> [0]
[ dbug ] (>>) <DownloadQPKGs>
[ dbug ] (>>) <DownloadQPKG>
[ proc ] downloading QPKG (SABnzbdplus_190205.qpkg) ...
[ done ] downloaded QPKG (SABnzbdplus_190205.qpkg)
[ dbug ] (<<) <DownloadQPKG> [0]
[ dbug ] (<<) <DownloadQPKGs> [0]
[ dbug ] (>>) <InstallEntware>
[ dbug ] (--) adjusted $PATH
[ dbug ] (vv) $PATH [/opt/bin:/opt/sbin:/opt/bin:/opt/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/bin/X11:/usr/local/sbin:/usr/local/bin:/Apps/bin:/Apps/sbin]
[ dbug ] (>>) <PatchEntwareInit>
[ dbug ] (II) patch: do the "opt shuffle" - already done
[ dbug ] (<<) <PatchEntwareInit> [0]
[ dbug ] (<<) <InstallEntware> [0]
[ dbug ] (>>) <InstallExtras>
[ dbug ] (II) QPKG 'Par2' is already installed
[ dbug ] (II) QPKG 'Par2' is already enabled
[ dbug ] (>>) <InstallIPKGs>
[ dbug ] (>>) <UpdateEntware>
[ proc ] updating Entware package list ...
[ done ] updated Entware package list
[ dbug ] (<<) <UpdateEntware> [0]
[ dbug ] (>>) <InstallIPKGBatch>
[ proc ] calculating number and size of IPKGs required ...
[ dbug ] (II) requested IPKGs: git git-http nano less ca-certificates python python-pip python-pyopenssl python-dev gcc unrar p7zip coreutils-nice ionice ffprobe
[ dbug ] (==) finding all IPKG dependencies ...
[ dbug ] (--) complete
[ dbug ] (II) found all IPKG dependencies in 11 iterations
[ dbug ] (==) excluding packages already installed ...
[ dbug ] (--) complete
[ dbug ] (II) IPKGs to download: 
[ dbug ] (vv) $IPKG_download_size [0]
[ done ] no IPKGs are required
[ dbug ] (<<) <InstallIPKGBatch> [0]
[ dbug ] (<<) <InstallIPKGs> [0]
[ dbug ] (>>) <InstallPIPs>
[ proc ] downloading & installing (PIP modules) ...
[ done ] downloaded & installed (PIP modules)
[ dbug ] (<<) <InstallPIPs> [0]
[ dbug ] (<<) <InstallExtras> [0]
[ dbug ] (>>) <BackupAndRemoveOldApp>
[ dbug ] (>>) <BackupConfig>
[ proc ] stopping daemon (sabnzbd.sh) ...
[ warn ] could not stop daemon (sabnzbd.sh) [1]

result=[1]
[ dbug ] (vv) $package_config_path [/share/CACHEDEV1_DATA/.qpkg/SABnzbdplus/config]
[ dbug ] (vv) $QPKG_BACKUP_PATH [/share/Public/sherpa.tmp/backup]
[ dbug ] (II) moved old config to backup location
[ done ] created 'SABnzbdplus' settings backup
[ dbug ] (>>) <ConvertSettings>
[ dbug ] (<<) <ConvertSettings> [0]
[ dbug ] (<<) <BackupConfig> [0]
[ proc ] uninstalling QPKG 'SABnzbdplus' ...
[ done ] uninstalled QPKG 'SABnzbdplus'
[ dbug ] (<<) <BackupAndRemoveOldApp> [0]
[ dbug ] (>>) <InstallTargetApp>
[ proc ] installing QPKG (SABnzbdplus_190205.qpkg) - this can take a while ...
[ done ] installed QPKG (SABnzbdplus_190205.qpkg)
[ proc ] waiting for 10 seconds ...
[ done ] wait complete
[ dbug ] (>>) <RestoreConfig>
[ proc ] stopping daemon (sabnzbd.sh) ...
[ done ] daemon stopped (sabnzbd.sh)
[ done ] restored 'SABnzbdplus' settings backup
[ dbug ] (<<) <RestoreConfig> [0]
[ proc ] starting daemon (sabnzbd.sh) - this can take a while ...
[ done ] daemon started (sabnzbd.sh)
[ dbug ] (<<) <InstallTargetApp> [0]
[ dbug ] (>>) <Cleanup>
[ dbug ] (--) resumed existing SABnzbd queue
[ dbug ] (<<) <Cleanup> [0]
[ dbug ] (>>) <DisplayResult>
[ done ] 'SABnzbdplus' has been successfully reinstalled! 
[ dbug ] (**) SCRIPT:          finished: Sun Apr 14 21:42:01 BST 2019
[ dbug ] (**) SCRIPT:      elapsed time: 00h:10m:55s
[ dbug ] (II) ======================================================================
[ dbug ] (<<) <DisplayResult> [0]
Unsure if its similar to this post: viewtopic.php?f=133&t=143605 but its working now :)
Last edited by Xmantium on Thu Apr 18, 2019 6:46 am, edited 3 times in total.
Post Reply

Return to “Community Apps”