Skip to content

Unsetting maintenance mode using occ doesn't work #3301

Closed

Description

@bertmelis

Steps to reproduce

  1. Set maintenance mode using occ to true --> maintenance mode is ON
  2. Unset maintenance mode using occ (set to false) --> maintenance mode is still ON
  3. Manually changing 'maintenance' => 'false' to 'maintenance' => false (removed the single quotes) --> maintenance mode is OFF

Server configuration

Operating system: Ubuntu 16.04
Web server: Nginx 1.11.9
Database: MariaDB 10.0.29
PHP version: 7.1
Nextcloud version: 11.01
**Updated from an older Nextcloud/ownCloud or fresh install:**fresh install

Activity

  1. changed the title [-]Usetting maintenance mode using occ doesn't work[/-] [+]Unsetting maintenance mode using occ doesn't work[/+] on Jan 27, 2017
  2. tflidd commented on Jan 29, 2017

    @tflidd
    Contributor

    I tried to reproduce it on Nextcloud 11.0.1 with php 5.6 and 7.0 (dot-deb packages) on debian 8 with apache.

    1. sudo -u www-data php occ maintenance:mode --on
      -> config/config.php, maintenance was set to true
    2. sudo -u www-data php occ maintenance:mode --off
      -> config/config.php, maintenance was set to false
    3. Could open the login page.

    Only used the occ-command to enable and disable the maintenance mode, the value was always set correctly (without quotes around true or false).

    Do you still have a different php version installed on your system as well? Perhaps it's a bug with php 7.1?

  3. nickvergessen commented on Jan 30, 2017

    @nickvergessen
    Member

    I think he used the occ config:system:set maintenance command, but in an incorrect way.
    The complete command for that is:
    occ config:system:set maintenance --value=false --type=bool

  4. bertmelis commented on Jan 31, 2017

    @bertmelis
    Author

    I agree on the incorrect way I was using the commands. It feels like a bug however that setting the mode without the type option works and unsetting without does not work.

  5. nickvergessen commented on Jan 31, 2017

    @nickvergessen
    Member

    Well "setting" only works, because php says that 'true' == true, but 'false' != false

  6. gabrielklein commented on Jan 27, 2019

    @gabrielklein

    The value in config.php was 'maintenance' => 'false',
    (I don't know why as I have not edited this file manually.)

    These commands didn't work
    sudo -u www-data php occ maintenance:mode --on
    sudo -u www-data php occ maintenance:mode --off

    This command fixed the problem (Thank you @nickvergessen for the help)
    occ config:system:set maintenance --value=false --type=bool

    Version: Nextcloud 15.0.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions