server icon indicating copy to clipboard operation
server copied to clipboard

[Bug]: OCC does not work when memcache configuration is invalid

Open danxuliu opened this issue 3 years ago • 0 comments

⚠️ This issue respects the following points: ⚠️

  • [X] This is a bug, not a question or a configuration/webserver/proxy issue.
  • [X] This issue is not already reported on Github (I've searched it).
  • [X] Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
  • [X] Nextcloud Server is running on 64bit capable CPU, PHP and OS.
  • [X] I agree to follow Nextcloud's Code of Conduct.

Bug description

This is a generalization of #30292

When the configured memcache is not available OCC can not be used, not even to delete the memcache configuration that is preventing OCC from bein used; config.php needs to be manually edited in that case.

Steps to reproduce

  • Make a typo when setting memcache.local with OCC:
php occ config:system:set memcache.local --value "ridiculousTypoToMakeTheIssueClear" --type string
  • Try to fix the typo (note that php --define apc.enable_cli=1 would have no effect, as APCu is not even used yet)
php occ config:system:set memcache.local --value "\OC\Memcache\APCu" --type string

The configuration value was not updated and OCC exited with:

An unhandled exception has been thrown:
OCP\HintException: [0]: Memcache ridiculousTypoToMakeTheIssueClear not available for local cache (Is the matching PHP module installed and enabled?)

Expected behavior

The configuration should be updated.

Installation method

No response

Operating system

No response

PHP engine version

No response

Web server

No response

Database engine version

No response

Is this bug present after an update or on a fresh install?

No response

Are you using the Nextcloud Server Encryption module?

No response

What user-backends are you using?

  • [ ] Default user-backend (database)
  • [ ] LDAP/ Active Directory
  • [ ] SSO - SAML
  • [ ] Other

Configuration report

No response

List of activated Apps

Not relevant.

Nextcloud Signing status

No response

Nextcloud Logs

No response

Additional info

No response

danxuliu avatar Aug 08 '22 16:08 danxuliu

Same problem here. More generally, I would find it really great if occ config:system:set could work in all cases where either the database or the cache would not be working/valid, eg. wrong configurations (as in op) or a crashed database.

Ezwen avatar Sep 01 '22 12:09 Ezwen