How can I find out why the Nextcloud console installation does not generate tables in ProstgreSQL?

0

I have been trying to install Nextcloud on my Alpine-Linux-based server using the occ maintenance:install --database "pgsql" --database-name "dbname" ... command, but I am only greeted with exceptions.

Initially, the complaint was

An unhandled exception has been thrown:
Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occured in driver: SQLSTATE[08006] [7] FATAL:  database "dbname" does not exist in /usr/share/webapps/nextcloud/lib/private/DB/Connection.php:61

in response to which I created the "dbname" database for my Nextcloud database explicitly and granted all rights to that psql user. However, while the occ procedure then seemed to be able to connect to the database, it followed up complaining about

An unhandled exception has been thrown:
PDOException: SQLSTATE[42P01]: Undefined table: 7 ERROR:  relation "oc_appconfig" does not exist
LINE 1: SELECT * FROM "oc_appconfig"
                      ^ in /usr/share/webapps/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:104

Well, duh. Isn't occ supposed to CREATE that table (as well as all the others needed) during the installation process?

I'm slowly running out of ideas what could cause this kind of behaviour and would appreciate any hints on how to find out what is going wrong...

Some related software versions, in case that's relevant:

  • OS: Alpine Linux 3.7
  • PostgreSQL 10.3
  • PHP 7.1.17
  • Nextcloud 12.0.6
  • Nginx 1.12.2

Sty

Posted 2018-05-12T19:08:44.760

Reputation: 101

I’m not sure if it’s relevant, but did you run occ command as the user nextcloud? – Jakub Jirutka – 2018-05-13T19:15:13.523

It is probably relevant, but yes, I did that (well, as the nginx user, as I have no separate nextcloud user set up on my system) – Sty – 2018-05-14T08:10:06.760

No answers