hoellen/dockerfiles

Nextcloud is not installed - only a limited number of commands are available

Closed this issue · 7 comments

Upon installing a new instance using DB_NAMEand DB_PASSWORD, these config options are not set correctly and firstrunwizard is not disabled. it also seems, that Nextcloud is not installed:

/ # occ
Nextcloud is not installed - only a limited number of commands are available
Nextcloud 13.0.7

Usage:
  command [options] [arguments]

Options:
  -h, --help            Display this help message
  -q, --quiet           Do not output any message
  -V, --version         Display this application version
      --ansi            Force ANSI output
      --no-ansi         Disable ANSI output
  -n, --no-interaction  Do not ask any interactive question
      --no-warnings     Skip global warnings, show command output only
  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Available commands:
  _completion           BASH completion hook.
  check                 check dependencies of the server environment
  help                  Displays help for a command
  list                  Lists commands
  status                show some status information
 app
  app:check-code        check code to be compliant
 integrity
  integrity:check-app   Check integrity of an app using a signature.
  integrity:check-core  Check integrity of core code using a signature.
  integrity:sign-app    Signs an app using a private key.
  integrity:sign-core   Sign core using a private key.
 l10n
  l10n:createjs         Create javascript translation files for a given app
 maintenance
  maintenance:install   install Nextcloud

the occ command here was executed on a freshly run container.

DB_NAMEand DB_PASSWORD, these config options are not set correctly

Are you sure? You can look into /config/config.php: Which values are set for the database? Have you set the right docker volumes? What is in the logs?
firstrunwizard is only disabled, if you set the ADMIN_USER variable. If you don't use the variable you have to create an admin account through the web interface.

Please excuse the missing details, I'll gladly provide additional info.
ENV:
ADMIN_USER is set:

Var value
ADMIN_PASSWORD  < redacted >
ADMIN_USER  admin
DB_HOST itigonextcloudpostgres
DB_NAME  itigo_nextcloud
DB_PASSWORD < redacted >
DB_TYPE pgsql
DB_USER < redacted >
DOMAIN  < redacted >
TZ  Europe/Zurich

Logs:

29.10.2018 19:33:18Updating permissions...
29.10.2018 19:33:18Updating permissions in /nextcloud...
29.10.2018 19:34:39Updating permissions in /data...
29.10.2018 19:34:39Updating permissions in /config...
29.10.2018 19:34:39Updating permissions in /apps2...
29.10.2018 19:34:39Updating permissions in /var/log...
29.10.2018 19:34:39Updating permissions in /php...
29.10.2018 19:34:39Updating permissions in /nginx...
29.10.2018 19:34:39Updating permissions in /tmp...
29.10.2018 19:34:39Updating permissions in /etc/s6.d...
29.10.2018 19:34:39Done updating permissions.
29.10.2018 19:34:39Starting automatic configuration...
29.10.2018 19:34:40Automatic configuration finished.
29.10.2018 19:34:40Nextcloud is not installed - only a limited number of commands are available
29.10.2018 19:34:40
29.10.2018 19:34:40
29.10.2018 19:34:40  [Symfony\Component\Console\Exception\CommandNotFoundException]
29.10.2018 19:34:40  Command "app:disable" is not defined.
29.10.2018 19:34:40  Did you mean this?
29.10.2018 19:34:40      app:check-code
29.10.2018 19:34:40
29.10.2018 19:34:40

Config:
The only lines in config.php that are set incorrectly are:

  'dbuser' => 'oc_admin7',
  'dbpassword' => 'imwam9rb28jma5rov97tyqrwd6sjrl',

All other entries seem to be correct. Manually correcting them does nothing, instead they are replaced again with oc_adminXX and a random dbpassword.

Volumes:
the following Volumes are mounted:

  • /nextcloud/themes
  • /config
  • /apps2
  • /data

If you correcting the entries in /config/config.php manually, the setup should not running again because the config file already exists.
Can you please look into the following file in the container: /nextcloud/config/autoconfig.php
Are the values set correctly there?
Do you maybe use NFS volumes for docker?

It is indeed using NFS Volumes. The values in /nextcloud/config/autoconfig.php are correct.

Then it seems you are affected by this bug: #3840

We see the same issue even if the config file location is local (not on NFS share). Interestingly the configuration file get's created correctly when setting up the a new nextcloud instance. The wrong entries in the config file only appear once the URL of the nextcloud instance has been loaded. It doesn't matter if the config is local or on NFS. The behavior is always the same. Therefor I don't think it's an NFS issue.

Is the issue still present? Auto-configuration is working for me with a fresh Nextcloud 15 installation and local volumes.