nextcloud / recognize

👁 👂 Smart media tagging for Nextcloud: recognizes faces, objects, landscapes, music genres
https://apps.nextcloud.com/apps/recognize
GNU Affero General Public License v3.0
539 stars 45 forks source link

"An error occurred during face recognition" and no active "node" process in system #717

Closed shperrung closed 1 year ago

shperrung commented 1 year ago

Which version of recognize are you using?

3.6.1 (previous version has the same behavior)

Enabled Modes

Object recognition, Face recognition

TensorFlow mode

Normal mode

Which Nextcloud version do you have installed?

25.0.3

Which Operating system do you have installed?

Debian 11 (Openmediavault 6.x.x)

Which Docker container are you using to run Nextcloud? (if applicable)

nextcloud:25.0.3-apache (docker image with added ffmpeg supporting nvidia/cuda)

How much RAM does your server have?

64 Gb

What processor Architecture does your CPU have?

x86_64

Describe the Bug

The first my experience in use of "nextcloud/recognize" was successful. All worked fine but I got a bug and I needed to rollback to old backup of nextcloud (there was already installed "nextcloud/recognize"). My photos all are kept in external storages. Part of them are mounted "read only". Rollback of nectcloud I did without uninstall of "nextcloud/recognize" and I did not reset tags. After re-mounting external storages with photos all old tags are lost and I tried to restart new recognition but got that message: "An error occurred during face recognition, please check the Nextcloud logs." Meanwhile "Object recognition is working". I did remove-legacy-tags, reset-face-clusters, reset faces, cleanup-tags, reset-tags. Then I:

Expected Behavior

Re-installed nextcloud/recognize has to either clean remaining old "faces" and "tags" or catch them up and reconcile tags with paths to images.

To Reproduce

Debug log

I found just this in the nextcloud logs:

FatalrecognizeErrorClass "voku\helper\Bootup" not found
  1. /var/www/html/custom_apps/recognize/vendor/composer/autoload_real.php - line 55:

    require()

  2. /var/www/html/custom_apps/recognize/vendor/composer/autoload_real.php - line 38:

    composerRequireed7f0a1d9dc886564ddbe2945c018806("b46ad4fe52f ... 0", "/var/www/ht ... p")

  3. /var/www/html/custom_apps/recognize/vendor/autoload.php - line 25:

    ComposerAutoloaderInited7f0a1d9dc886564ddbe2945c018806::getLoader()

  4. /var/www/html/custom_apps/recognize/lib/AppInfo/Application.php - line 34:

    include_once("/var/www/ht ... p")

  5. /var/www/html/lib/private/AppFramework/Bootstrap/Coordinator.php - line 136:

    OCA\Recognize\AppInfo\Application->register(

    shperrung commented 1 year ago

    изображение

    gmeks commented 1 year ago

    Just a guess, but if you scroll more down in the setting page, it shows Node status

    shperrung commented 1 year ago

    @gmeks there ok with node.js изображение

    marcelklehr commented 1 year ago

    Error: Class "voku\helper\Bootup" not found

    Most likely this is an instance of the following issue, which is new since v3.6.x https://github.com/nextcloud/recognize/issues/719

    marcelklehr commented 1 year ago

    Error: Class "voku\helper\Bootup" not found

    If this is the error that's causing the face recognition to fail, then object recognition shouldn't work either. I recommend searching the nextcloud log again for a newer error

    marcelklehr commented 1 year ago

    After re-mounting external storages with photos all old tags are lost

    This is inevitable, I think.

    Disconnect external storage with recognized images and connect them back

    This is likely irrelevant.

    shperrung commented 1 year ago

    If this is the error that's causing the face recognition to fail, then object recognition shouldn't work either. I recommend searching the nextcloud log again for a newer error

    Object recognition also doesn't work since there is no active "node" process. When I ran nextloud/recognize in first time it burned my CPU (AMD Ryzen 7 2700 up to 80 degrees but now it ~50C)

    I turned on 'debug' => true, in config php and run docker exec -it -u www-data nextcloud-app-1 ./occ recognize:recrawl That appeared in log

    Error PHP Error: get_browser(): browscap ini directive not set at /var/www/html/apps/support/lib/Sections/ServerSection.php#350<>OC\Log\ErrorHandler::onAll(2, "get_browser ... t", "/var/www/ht ... p", 350)/var/www/html/apps/support/lib/Sections/ServerSection.php - line 350: get_browser(null, true)/var/www/html/apps/support/lib/Sections/ServerSection.php - line 101: OCA\Support\Sections\ServerSection->getBrowser()<>OCA\Support\Sections\ServerSection->__construct(OC\AllConfig {}, OC\IntegrityCheck\Checker {}, OC\App\AppManager {}, OC\DB\ConnectionAdapter {}, OC\Http\Client\ClientService {}, OC\User\Manager {}, OC\AppFramew ... {})/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php - line 108: ReflectionClass->newInstanceArgs([ OC\AllConf ... "])/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php - line 116: OC\AppFramework\Utility\SimpleContainer->buildClass(ReflectionCl ... "})/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php - line 133: OC\AppFramework\Utility\SimpleContainer->resolve("OCA\Suppor ... n")/var/www/html/lib/private/AppFramework/DependencyInjection/DIContainer.php - line 465: OC\AppFramework\Utility\SimpleContainer->query("OCA\Suppor ... n")/var/www/html/lib/private/AppFramework/DependencyInjection/DIContainer.php - line 437: OC\AppFramework\DependencyInjection\DIContainer->queryNoFallback("OCA\Suppor ... n")/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php - line 89: OC\AppFramework\DependencyInjection\DIContainer->query("OCA\Suppor ... n", true)<>OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility{closure}(" sensiti ... ")/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php - line 108: array_map(Closure {}, [ "** sensi ... "])/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php - line 116: OC\AppFramework\Utility\SimpleContainer->buildClass(ReflectionCl ... "})/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php - line 133: OC\AppFramework\Utility\SimpleContainer->resolve("OCA\Support\DetailManager")/var/www/html/lib/private/AppFramework/DependencyInjection/DIContainer.php - line 465: OC\AppFramework\Utility\SimpleContainer->query("OCA\Support\DetailManager")/var/www/html/lib/private/AppFramework/DependencyInjection/DIContainer.php - line 437: OC\AppFramework\DependencyInjection\DIContainer->queryNoFallback("OCA\Support\DetailManager")/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php - line 89: OC\AppFramework\DependencyInjection\DIContainer->query("OCA\Support\DetailManager", true)<>OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility{closure}(" sensiti ... *")/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php - line 108: array_map(Closure {}, [ "*** sensi ... "])/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php - line 116: OC\AppFramework\Utility\SimpleContainer->buildClass(ReflectionCl ... "})/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php - line 133: OC\AppFramework\Utility\SimpleContainer->resolve("OCA\Suppor ... t")/var/www/html/lib/private/AppFramework/DependencyInjection/DIContainer.php - line 465: OC\AppFramework\Utility\SimpleContainer->query("OCA\Suppor ... t")/var/www/html/lib/private/ServerContainer.php - line 145: OC\AppFramework\DependencyInjection\DIContainer->queryNoFallback("OCA\Suppor ... t")/var/www/html/lib/private/Console/Application.php - line 219: OC\ServerContainer->query("OCA\Suppor ... t")/var/www/html/lib/private/Console/Application.php - line 130: OC\Console\Application->loadCommandsFromInfoXml([ "OCA\Supp ... "])/var/www/html/console.php - line 99: OC\Console\Application->loadCommands(Symfony\Comp ... {}, Symfony\Comp ... {})/var/www/html/occ - line 11: require_once("/var/www/html/console.php")

    marcelklehr commented 1 year ago

    get_browser(): browscap ini directive not set

    That's not related to this app I'm afraid.

    There are clues that suggest you are running on outdated code for some reason.

    Could you please try removing recognize again and installing it again as follows:

    1. php occ app:remove recognize
    2. php occ app:enable recognize
    3. php occ app:list // if you can post the output of this command, that would be helpful :)
    shperrung commented 1 year ago

    3. post the output of this command

    Done. Face recognition doesn't work as before. `shperrung@omv6:~ docker exec --user www-data nextcloud-app-1 php occ app:remove recognize recognize disabled recognize 3.6.1 removed shperrung@omv6:~ docker exec --user www-data nextcloud-app-1 php occ app:enable recognize recognize 3.6.1 enabled shperrung@omv6:~ docker exec --user www-data nextcloud-app-1 php occ app:list Enabled:

    • activity: 2.17.0 - bruteforcesettings: 2.5.0
    • circles: 25.0.0
    • cloud_federation_api: 1.8.0
    • comments: 1.15.0
    • contacts: 5.1.0
    • contactsinteraction: 1.6.0 - dashboard: 7.5.0
    • dav: 1.24.0
    • federatedfilesharing: 1.15.0
    • federation: 1.15.0 - files: 1.20.1
    • files_external: 1.17.0
    • files_pdfviewer: 2.6.0 - files_rightclick: 1.4.0
    • files_sharing: 1.17.0
    • files_trashbin: 1.15.0
    • files_versions: 1.18.0
    • firstrunwizard: 2.14.0
    • logreader: 2.10.0
    • lookup_server_connector: 1.13.0
    • memories: 4.11.2
    • nextcloud_announcements: 1.14.0
    • notifications: 2.13.1
    • oauth2: 1.13.0
    • password_policy: 1.15.0
    • photos: 2.0.1
    • previewgenerator: 5.2.1
    • privacy: 1.9.0
    • provisioning_api: 1.15.0
    • recognize: 3.6.1
    • recommendations: 1.4.0
    • related_resources: 1.0.3
    • serverinfo: 1.15.0
    • settings: 1.7.0
    • sharebymail: 1.15.0
    • support: 1.8.0
    • survey_client: 1.13.0
    • systemtags: 1.15.0
    • text: 3.6.0
    • theming: 2.0.1
    • twofactor_backupcodes: 1.14.0
    • twofactor_email: 2.7.2
    • updatenotification: 1.15.0
    • user_status: 1.5.0
    • viewer: 1.9.0
    • weather_status: 1.5.0
    • workflowengine: 2.7.0 Disabled:
    • admin_audit
    • encryption
    • suspicious_login
    • twofactor_totp
    • user_ldap shperrung@omv6:~$`
    shperrung commented 1 year ago

    May be some broken folders/files remains after recognize app uninstall? I can manually check it. I can also check or clean data base (mariadb) if it is relevant.

    shperrung commented 1 year ago

    Update: all night something stressed my HDDs. When I checked recognize/nextcloud status, I found that it works! "node" process is active and loads CPU up to 70-80%. I did nothing with settings of recognize or nextcloud. All fixed by themselves.

    Looks like my situation was not an issue but just silent background work of recognize/nextcloud. Thank you for avesome product!

    I see many similar records in log. Possibly these are leftovers of old tags in database:

    Error PHP Error: unlink(/tmp/oc_tmp_GywBH4-.jpg): No such file or directory at /var/www/html/custom_apps/recognize/lib/Classifiers/Classifier.php#296<>OC\Log\ErrorHandler::onAll(2, "unlink(/tmp ... y", "/var/www/ht ... p", 296)/var/www/html/custom_apps/recognize/lib/Classifiers/Classifier.php - line 296: unlink("/tmp/oc_tmp_GywBH4-.jpg")/var/www/html/custom_apps/recognize/lib/Classifiers/Classifier.php - line 208: OCA\Recognize\Classifiers\Classifier->cleanUpTmpFiles()/var/www/html/custom_apps/recognize/lib/Classifiers/Images/ClusteringFaceClassifier.php - line 83: OCA\Recognize\Classifiers\Classifier->classifyFiles("faces", [ OCA\Recogn ... "], 120)/var/www/html/custom_apps/recognize/lib/BackgroundJobs/ClassifyFacesJob.php - line 41: OCA\Recognize\Classifiers\Images\ClusteringFaceClassifier->classify([ OCA\Recogn ... "])/var/www/html/custom_apps/recognize/lib/BackgroundJobs/ClassifierJob.php - line 70: OCA\Recognize\BackgroundJobs\ClassifyFacesJob->classify([ OCA\Recogn ... "])/var/www/html/custom_apps/recognize/lib/BackgroundJobs/ClassifyFacesJob.php - line 33: OCA\Recognize\BackgroundJobs\ClassifierJob->runClassifier("faces", [ 48,10922745])/var/www/html/lib/public/BackgroundJob/Job.php - line 78: OCA\Recognize\BackgroundJobs\ClassifyFacesJob->run([ 48,10922745])/var/www/html/lib/public/BackgroundJob/TimedJob.php - line 103: OCP\BackgroundJob\Job->start(OC\BackgroundJob\JobList {})/var/www/html/lib/public/BackgroundJob/TimedJob.php - line 93: OCP\BackgroundJob\TimedJob->start(OC\BackgroundJob\JobList {})/var/www/html/cron.php - line 152: OCP\BackgroundJob\TimedJob->execute(OC\BackgroundJob\JobList {}, OC\Log {})

    изображение