[RESOLU] Echec php occ upgrade

Bonjour,

La mise Ă  jour de mon environnement nextcloud Ă©choue, je n’arrive pas Ă  comprendre pourquoi

Ci-dessous le retour de la commande :
www-data@bb9a52ecc6a8:~/html$ php occ upgrade
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
Setting log level to debug
Updating database schema
Updated database
An unhandled exception has been thrown:
TypeError: fwrite(): Argument #1 ($stream) must be of type resource, bool given in /var/www/html/lib/private/Security/CertificateManager.php:161
Stack trace:
#0 /var/www/html/lib/private/Security/CertificateManager.php(161): fwrite(false, ‘##\n## Bundle of
’)
#1 /var/www/html/lib/private/Security/CertificateManager.php(247): OC\Security\CertificateManager->createCertificateBundle()
#2 /var/www/html/lib/private/Http/Client/Client.php(127): OC\Security\CertificateManager->getAbsoluteBundlePath()
#3 /var/www/html/lib/private/Http/Client/Client.php(74): OC\Http\Client\Client->getCertBundle()
#4 /var/www/html/lib/private/Http/Client/Client.php(218): OC\Http\Client\Client->buildRequestOptions(Array)
#5 /var/www/html/lib/private/App/AppStore/Fetcher/Fetcher.php(120): OC\Http\Client\Client->get(‘https://apps.ne
’, Array)
#6 /var/www/html/lib/private/App/AppStore/Fetcher/AppFetcher.php(87): OC\App\AppStore\Fetcher\Fetcher->fetch(’’, ‘’)
#7 /var/www/html/lib/private/App/AppStore/Fetcher/Fetcher.php(192): OC\App\AppStore\Fetcher\AppFetcher->fetch(’’, ‘’, false)
#8 /var/www/html/lib/private/App/AppStore/Fetcher/AppFetcher.php(188): OC\App\AppStore\Fetcher\Fetcher->get(false)
#9 /var/www/html/lib/private/Installer.php(422): OC\App\AppStore\Fetcher\AppFetcher->get(false)
#10 /var/www/html/lib/private/Updater.php(413): OC\Installer->isUpdateAvailable(‘accessibility’)
#11 /var/www/html/lib/private/Updater.php(274): OC\Updater->upgradeAppStoreApps(Array)
#12 /var/www/html/lib/private/Updater.php(133): OC\Updater->doUpgrade(‘24.0.0.12’, ‘23.0.4.1’)
#13 /var/www/html/core/Command/Upgrade.php(235): OC\Updater->upgrade()
#14 /var/www/html/3rdparty/symfony/console/Command/Command.php(255): OC\Core\Command\Upgrade->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#15 /var/www/html/3rdparty/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#16 /var/www/html/3rdparty/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand(Object(OC\Core\Command\Upgrade), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#17 /var/www/html/3rdparty/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#18 /var/www/html/lib/private/Console/Application.php(211): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#19 /var/www/html/console.php(99): OC\Console\Application->run()
#20 /var/www/html/occ(11): require_once(’/var/www/html/c
’)
#21 {main}www-data@bb9a52ecc6a8

Salut,

Je n’ai pas la mĂȘme erreur mais lorsque je fais une MAJ avec php 8.0 j’ai toujours une erreur qui m’empĂȘche de terminer la MAJ. En repassant Ă  php 7.4, je n’ai aucune erreur.

En espĂ©rant que ça puisse t’aider.

Bonne journée !

Bonjour Thom1,

Merci pour cette piste, cependant dans mon cas je ne peux changer facilement la version de php j’utilise le conteneur nextcloud officiel. La version de php intĂ©grĂ© est la 8.0.18.

Bonne journée,

Bonsoir,

J’ai beau creuser je ne trouve pas une solution à mon problùme, si vous avez des pistes ? :slight_smile:

@Dionysoos avez vous essayé de fairephp occ maintenance:repair ?

Bonjour,

Merci pour votre message, j’avais dĂ©jĂ  exĂ©cutĂ© cette commande, je n’ai pas trouvĂ© d’erreur dans cette derniĂšre :
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade

  • Repair MySQL collation
    • All tables already have the correct collation → nothing to do
  • Repair mime types
  • Clean tags and favorites
    • 0 tags of deleted users have been removed.
    • 0 tags for delete files have been removed.
    • 0 tag entries for deleted tags have been removed.
    • 0 tags with no entries have been removed.
  • Repair invalid shares
  • Move .step file of updater to backup location
  • Add move avatar background job
    • Repair step already executed
  • Add preview cleanup background jobs
  • Migrate oauth2_clients table to nextcloud schema
    • Update the oauth2_access_tokens table schema.
    • Update the oauth2_clients table schema.
  • Fix potential broken mount points
    • No mounts updated
  • Repair language codes
  • Install new core bundle components
  • Add log rotate job
  • Clear frontend caches
    • Image cache cleared
    • SCSS cache cleared
    • JS cache cleared
  • Clear every generated avatar on major updates
  • Add preview background cleanup job
  • Queue a one-time job to cleanup old backups of the updater
  • Cleanup invalid photocache files for carddav
  • Add background job to cleanup login flow v2 tokens
  • Remove potentially over exposing share links
    • No need to remove link shares.
  • Clear access cache of projects
  • Reset generated avatar flag
  • Keep legacy encryption enabled
  • Check encryption key format
  • Remove old dashboard app config data
  • Add job to cleanup the bruteforce entries
  • Queue a one-time job to check for user uploaded certificates
  • Repair DAV shares
  • Add background job to set the lookup server share state for users
  • Upgrading Circles App
  • Fix component of birthday calendars
    • 4 birthday calendars updated.
  • Regenerating birthday calendars to use new icons and fix old birthday events without year
    • Repair step already executed
  • Fix broken values of calendar objects
    0 [->--------------------------]
  • Registering building of calendar search index as background job
    • Repair step already executed
  • Register building of social profile search index as background job
  • Registering background jobs to update cache for webcal calendars
    • Added 0 background jobs to update webcal calendars
  • Registering building of calendar reminder index as background job
    • Repair step already executed
  • Clean up orphan event and contact data
    • 0 events without a calendar have been cleaned up
    • 0 properties without an events have been cleaned up
    • 0 changes without a calendar have been cleaned up
    • 0 cached events without a calendar subscription have been cleaned up
    • 0 changes without a calendar subscription have been cleaned up
    • 0 contacts without an addressbook have been cleaned up
    • 0 properties without a contact have been cleaned up
    • 0 changes without an addressbook have been cleaned up
  • Remove activity entries of private events
    • Removed 0 activity entries
  • Clean up old calendar subscriptions from deleted users that were not cleaned-up
    0 [----->----------------------]
    • 0 calendar subscriptions without an user have been cleaned up
  • Fix the share type of guest shares when migrating from ownCloud
  • Copy the share password into the dedicated column
  • Set existing shares as accepted
  • Update OAuth token expiration times
  • Switches from default updater server to the customer one if a valid subscription is available
    • Repair step already executed
  • Send an admin notification if monthly report is disabled
  • Add background job to check for backup codes
  • Populating added database structures for workflows

J’ai Ă©galement essayĂ© de dĂ©sactiver le maximum d’app
Enabled:

  • cloud_federation_api: 1.7.0
  • dav: 1.22.0
  • federatedfilesharing: 1.14.0
  • files: 1.19.0
  • lookup_server_connector: 1.12.0
  • oauth2: 1.12.0
  • provisioning_api: 1.14.0
  • settings: 1.6.0
  • twofactor_backupcodes: 1.13.0
  • viewer: 1.8.0
  • workflowengine: 2.6.0
    Puis de lance php occ upgrade, toujours la mĂȘme erreur.

@Dionysoos c’est Ă©trange, je n’ai pas le temps de me renseignĂ© d’avantage sur votre problĂšme et actuellement je ne peux pas vous aider d’avantage. J’espĂšre qu’une solution sera trouvĂ©.
Je vous conseil de regarder si une erreur similaire est dĂ©jĂ  traitĂ© sur le forum anglophone ou d’ouvrir un topic sur ce dernier et de fermer celui-ci.

Bonsoir,

Mes recherches sont infructueuses, j’ai toujours le problĂšme. J’était en train de tenter de recrĂ©er un nouvel environnement en parallĂšle pour migrer vers ce dernier. Mais je ne pense pas que ça soit la solution, car je n’arrive mĂȘme pas Ă  faire une sauvegarde de Nextcloud password :
php occ passwords:backup:create
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade

There are no commands defined in the “passwords:backup” namespace.

Mon plan B tombe à l’eau :confused:

Je viens d’avancer un peu.
J’ai modifiĂ© le fichier config.php pour remplacer la valeur du paramĂštre :
‘version’ => ‘23.0.4.1’ par ‘version’ => ‘24.0.0.12’
Puis désactivé le mode maintenance.
Suite Ă  ça j’ai rĂ©ussis Ă  me reconnecter sur Nextcloud, mais je n’arrive plus Ă  accĂ©der au menu applications : j’ai la fenĂȘtre d’erreur :
Le serveur est incapable d’exĂ©cuter votre requĂȘte.

Si cela se reproduit, veuillez envoyer les dĂ©tails techniques ci-dessous Ă  l’administrateur du serveur.

Le fichier journal du serveur peut fournir plus de renseignements.
Renseignements techniques

Adresse distante : IP
ID de la demande : UID

La suite au prochaine Ă©pisode.

@Dionysoos avez vous toujours accĂšs Ă  l’application password via le web ? (et bien sur pensez a rĂ©activer cette derniĂšre )

essayer cette commande pour voir si un certificat est importé ? php occ security:certificates

Bonjour,

Cette commande ne remonte rien :
www-data@0bd82effec6f:~/html$ php occ security:certificates
±----------±------------±-------------±------------±----------+
| File Name | Common Name | Organization | Valid Until | Issued By |
±----------±------------±-------------±------------±----------+

Bonjour,

Enfin une solution Ă  mon problĂšme, fixer les droits sur le dossier files_external sous data :
chown -R www-data:www-data files_external

Merci pour l’aide que vous m’avez apportĂ©.

Bonne journée.

1 Like