OneCDOnly / sherpa

A mini-package-manager for QNAP NAS
GNU General Public License v3.0
114 stars 13 forks source link

Installed packages not opening #290

Closed baecke closed 7 months ago

baecke commented 7 months ago

Hi,

I upgraded my packages and all op a sudden Medusa and SABnzbd are no longer starting.

They are missing a QPKG service function 'derp' if I look at the logs :

printf '\033[1;31m%s\033[0m: %s\n' 'derp' "QPKG service function library not found, can't continue."

Already tried to reinstall the packages. Result is the same.

using :

 _

_| |_ _ / | ' \ / \ '| ' \ / ` | A mini-package-manager for QNAP® NAS __ \ | | | _/ | | |) | (| | Copyright (C) 2017-2024 OneCD |/| ||__|| | ./ \,| v240317-stable ||

Any idea how to make this work?

jun6lee commented 7 months ago

asking to this, not sure if it's the same:


[/etc/init.d] # ./sabnzbd.sh --restart
 source: sabnzbd.sh, action: restart, datetime: Sun Mar 17 23:14:30 IST 2024
package: 240316, service: 240316, library: 240307
daemon: inactive
auto-update: true
file '/opt/bin/git': exists
update 'SABnzbd' from remote repository: OK
active git branch: 'master'
exclude problem PyPI modules from 'requirements.txt': OK
install PyPI modules from 'requirements.txt': OK
file '/share/CACHEDEV1_DATA/.qpkg/SABnzbd/venv/bin/python3': exists
load ports from configuration file: OK
start daemon: failed
 source: sabnzbd.sh, action: restart, datetime: Sun Mar 17 23:14:37 IST 2024, result: failed, elapsed time: 7,036ms

... if I try starting it manually

OneCDOnly commented 7 months ago

Hi @baecke and thanks for reporting this problem. 👍🏽

I upgraded my packages and all op a sudden Medusa and SABnzbd are no longer starting.

They are missing a QPKG service function 'derp' if I look at the logs :

printf '\033[1;31m%s\033[0m: %s\n' 'derp' "QPKG service function library not found, can't continue."

Let's see if the service library file exists.

Can you please run the following command to generate a list of the files in your SABnzbd installation directory:

ll $(getcfg SABnzbd Install_Path -f /etc/config/qpkg.conf)

... and post the result back here?

OneCDOnly commented 7 months ago

Hi @jun6lee, I'm not sure if it's the same problem either, let's find-out. 🤓

Can you please run the restart in debug mode?

/etc/init.d/sabnzbd.sh restart debug
baecke commented 7 months ago

getcfg SABnzbd Install_Path -f /etc/config/qpkg.conf

[/] # ll $(getcfg SABnzbd Install_Path -f /etc/config/qpkg.conf)
total 136K
drwxr-xr-x  6 admin administrators 4.0K 2024-03-17 19:04 ./
drwxrwxrwx 28 admin administrators 4.0K 2024-03-17 19:04 ../
drwxr-xr-x  2 admin administrators 4.0K 2024-03-17 19:04 config/
-rw-------  1 admin administrators   93 2020-08-04 03:25 .directory
-rw-r--r--  1 admin administrators  35K 2024-01-12 23:53 LICENSE
-rw-r--r--  1 admin administrators  178 2024-03-17 19:04 .list
drwxr-xr-x  2 admin administrators 4.0K 2024-03-17 19:04 pip-cache/
-rw-r--r--  1 admin administrators 2.3K 2023-02-24 20:03 .qpkg_icon.gif
-rw-r--r--  1 admin administrators 2.3K 2023-02-24 20:03 .qpkg_icon_gray.gif
drwxr-xr-x 19 admin administrators 4.0K 2024-03-17 19:04 repo-cache/
-rwxr-xr-x  1 admin administrators 2.6K 2024-03-16 08:12 sabnzbd.sh*
-rw-r--r--  1 admin administrators  51K 2024-03-06 23:44 service.lib
-rwxr-xr-x  1 admin administrators 1.1K 2024-03-17 19:04 .uninstall.sh*
drwxr-xr-x  2 admin administrators 4.0K 2024-03-17 19:04 venv/
OneCDOnly commented 7 months ago

@baecke, looks-good, I can see the service function library file there service.lib. 👍🏽

Can you please try starting SABnzbd in debug mode?

/etc/init.d/sabnzbd.sh start debug

... then please post back what you see.

baecke commented 7 months ago

@baecke, looks-good, I can see the service function library file there service.lib. 👍🏽

Can you please try starting SABnzbd in debug mode?

/etc/init.d/sabnzbd.sh start debug

... then please post back what you see.

[/] # /etc/init.d/sabnzbd.sh start debug source: sabnzbd.sh, action: start, datetime: Sun Mar 17 22:45:38 CET 2024 package: 240316, service: 240316, library: 240307 daemon: inactive auto-update: true file '/opt/bin/git': exists update 'SABnzbd' from remote repository: exec: 'cd /tmp;/opt/bin/git -C /share/CACHEDEV1_DATA/.qpkg/SABnzbd/repo-cache clean -f; /opt/bin/git -C /share/CACHEDEV1_DATA/.qpkg/SABnzbd/repo-cache reset --hard origin/master; /opt/bin/git -C /share/CACHEDEV1_DATA/.qpkg/SABnzbd/repo-cache pull' HEAD is now at e7e06de Update text files for 4.2.3 Already up to date. exec: completed OK OK active git branch: 'master' create new virtual Python environment: exec: 'export PIP_CACHE_DIR=/share/CACHEDEV1_DATA/.qpkg/SABnzbd/pip-cache VIRTUALENV_OVERRIDE_APP_DATA=/share/CACHEDEV1_DATA/.qpkg/SABnzbd/pip-cache;/opt/bin/python3 -m virtualenv /share/CACHEDEV1_DATA/.qpkg/SABnzbd/venv --system-site-packages' /opt/bin/python3: No module named virtualenv exec: completed, but with errors failed unable to install addons: 'virtual environment does not exist' source: sabnzbd.sh, action: start, datetime: Sun Mar 17 22:45:39 CET 2024, result: failed, elapsed time: 1,166ms

OneCDOnly commented 7 months ago

@baecke, please run a check operation through sherpa:

sherpa check

When this has finished, please clean your SABnzbd QPKG installation (your settings will be retained):

/etc/init.d/sabnzbd.sh clean

... then start it again:

/etc/init.d/sabnzbd.sh start debug
baecke commented 7 months ago

This seemed to have solved the problem!

Thanks :) And I learned some things along the way

OneCDOnly commented 7 months ago

@baecke, that's great, good work!

Hopefully these manual actions will be needed less-and-less as development proceeds. 🤓

jun6lee commented 7 months ago

my end it was:

Missing module: sabctools.sabctools
You can read more at: https://sabnzbd.org/wiki/installation/install-off-modules
If you still experience problems, remove all .pyc files in this folder and subfolders
exec: completed, but with errors
failed

sherpa check encountered:

• These actions failed (and why):
      install 1 auxiliary IPK module in 5 seconds (255)
      reactivate SABnzbd in 14 seconds (For more information: /etc/init.d/sabnzbd.sh log)
OneCDOnly commented 7 months ago

@jun6lee can you please now run a clean on SABnzbd:

/etc/init.d/sabnzbd.sh clean

... then restart it?

/etc/init.d/sabnzbd.sh restart debug
jun6lee commented 7 months ago

that sorted it for me.. thanks @OneCDOnly

OneCDOnly commented 7 months ago

Looks like we are good here, so I'll close this issue. If the error reappears, please reopen this issue.

Cheers!

richie80 commented 7 months ago

exec: completed OK OK file '/share/CACHEDEV1_DATA/.qpkg/SABnzbd/venv/bin/python3': exists load ports from configuration file: OK start daemon: exec: '/share/CACHEDEV1_DATA/.qpkg/SABnzbd/venv/bin/python3 /share/CACHEDEV1_DATA/.qpkg/SABnzbd/repo-cache/SABnzbd.py --daemon --browser 0 --config-file /share/CACHEDEV1_DATA/.qpkg/SABnzbd/config/config.ini --pidfile /var/run/SABnzbd.pid' Not all required Python modules are available, please check requirements.txt Missing module: sabctools.sabctools You can read more at: https://sabnzbd.org/wiki/installation/install-off-modules If you still experience problems, remove all .pyc files in this folder and subfolders exec: completed, but with errors failed source: sabnzbd.sh, action: restart, datetime: Wed Mar 20 21:36:44 CET 2024, result: failed, elapsed time: 0h:00m:19s

This is what I still encounter after these steps: /etc/init.d/sabnzbd.sh clean

/etc/init.d/sabnzbd.sh restart debug

richie80 commented 7 months ago

Did reinstall for entware, sabnbzd Sherpa check /etc/init.d/sabnzbd.sh clean /etc/init.d/sabnzbd.sh restart debug

Everything works again