Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Postgre] Error while trying to create admin user #29342

Closed
RobinFrcd opened this issue Oct 24, 2017 · 16 comments
Closed

[Postgre] Error while trying to create admin user #29342

RobinFrcd opened this issue Oct 24, 2017 · 16 comments

Comments

@RobinFrcd
Copy link

Steps to reproduce

  1. Docker-compose on debian (jessie)
version: '2'
services:
  owncloud:
      image: owncloud
      ports:
          - 8080:80
      volumes_from:
         - owncloud-data
      links:
         - db:owncloud-db

  db:
      image: postgres
      environment:
          - POSTGRES_PASSWORD=mysecretpassword
      volumes_from:
          - postgres-data

  postgres-data:
      image: postgres
      command: /bin/true
      volumes:
          - /etc/postgresql
          - /var/lib/postgresql

  owncloud-data:
      image: owncloud
      command: /bin/bash -c "/bin/chown -R 33 /var/www/html/data && /bin/chown -R 33 /var/www/html/config"
      volumes:
          - /srv/owncloud/data
          - /srv/owncloud/config

  1. docker-compose -f docker-compose.yml up
  2. Try to initialize owncloud

Expected behaviour

It should create an admin account and initialize owncloud.

Actual behaviour

I get this error:

Error while trying to create admin user: An exception occurred while executing 'SELECT min_value, increment_by FROM "oc_storages_numeric_id_seq"':

SQLSTATE[42703]: Undefined column: 7 ERROR:  column "min_value" does not exist
LINE 1: SELECT min_value, increment_by FROM "oc_storages_numeric_id_...
               ^				

I'm using the latest images available on docker.

If I do a \t, I get that, but there is no oc_storages_numeric_id_seq here ...

                    List of relations
 Schema |            Name             | Type  |  Owner
--------+-----------------------------+-------+----------
 public | oc_appconfig                | table | oc_robin
 public | oc_authtoken                | table | oc_robin
 public | oc_comments                 | table | oc_robin
 public | oc_comments_read_markers    | table | oc_robin
 public | oc_credentials              | table | oc_robin
 public | oc_file_locks               | table | oc_robin
 public | oc_filecache                | table | oc_robin
 public | oc_group_admin              | table | oc_robin
 public | oc_group_user               | table | oc_robin
 public | oc_groups                   | table | oc_robin
 public | oc_jobs                     | table | oc_robin
 public | oc_migrations               | table | oc_robin
 public | oc_mimetypes                | table | oc_robin
 public | oc_mounts                   | table | oc_robin
 public | oc_preferences              | table | oc_robin
 public | oc_privatedata              | table | oc_robin
 public | oc_storages                 | table | oc_robin
 public | oc_systemtag                | table | oc_robin
 public | oc_systemtag_group          | table | oc_robin
 public | oc_systemtag_object_mapping | table | oc_robin
 public | oc_users                    | table | oc_robin
 public | oc_vcategory                | table | oc_robin
 public | oc_vcategory_to_object      | table | oc_robin

Any idea ?

Thanks!

@artyom-poptsov
Copy link

Hello RobinFrcd,

I faced with the same problem today and it seems that I found a solution: you should use PostgreSQL 9.6 or older version, because with PostgreSQL 10 (the latest version of the official PostgreSQL Docker image) ownCloud fails to run with the aforementioned error.

So you should change in your composer file

image: postgres

to

image: postgres:9.6

Hope it helps,

Artyom

@DeepDiver1975
Copy link
Member

@SergioBertolinSG can you please add postgres 10 to the drone matrix?

As a quickfix we might want to add a version check to not allow install against postgres 10 - I assume the real fix requires doctrine dbal changes ......

@felixboehm @PVince81 please find someone with postgres knowhow

@SergioBertolinSG
Copy link
Contributor

@SergioBertolinSG can you please add postgres 10 to the drone matrix?

Sure.

@PVince81 PVince81 modified the milestones: development, planned Nov 8, 2017
@PVince81 PVince81 modified the milestones: planned, development Nov 22, 2017
@ghost ghost mentioned this issue Dec 7, 2017
@ghost
Copy link

ghost commented Dec 7, 2017

Seems this is now even popping up on an update from 10.0.3 to 10.0.4: #29787

@fabricecolas
Copy link

Solved here: doctrine/dbal#2868

@PVince81 PVince81 modified the milestones: development, planned Jan 12, 2018
@ownclouders
Copy link
Contributor

Hey, this issue has been closed because the label status/STALE is set and there were no updates for 7 days. Feel free to reopen this issue if you deem it appropriate.

(This is an automated comment from GitMate.io.)

@PVince81
Copy link
Contributor

@DeepDiver1975 @VicDeo did we upgrade dbal on master ?

@VicDeo
Copy link
Member

VicDeo commented Mar 6, 2018

@PVince81 nope #29891 (comment)

@PVince81 PVince81 modified the milestones: development, triage Apr 25, 2018
@PVince81
Copy link
Contributor

moving to "triage"

@VicDeo
Copy link
Member

VicDeo commented May 8, 2018

dbal was bumped to 2.7.1 on master with #31059

@DeepDiver1975
Copy link
Member

duplicate #31320

@DeepDiver1975
Copy link
Member

and fixed for owncloud 11

@msplival
Copy link

msplival commented Dec 5, 2018

Hi, This is still not working for owncloud10, which is the only version installable from apt repositories:

root@bio-owncloud-test:/etc/apache2/sites-enabled# apt-cache policy owncloud-files
owncloud-files:
  Installed: 10.0.10-1+1.1
  Candidate: 10.0.10-1+1.1
  Version table:
 *** 10.0.10-1+1.1 500
        500 http://download.owncloud.org/download/repositories/production/Ubuntu_18.04  Packages
        100 /var/lib/dpkg/status

@VicDeo
Copy link
Member

VicDeo commented Dec 5, 2018

The fix for doctrine/dbal is released with v2.7.0 that requires PHP 7.1+
Unfortunately we need keep ownCloud 10.0.x PHP 5.6 compatible
Thus we can't update doctrine/dbal library to support Postgres 10 for ownCloud 10.0.x.

@msplival
Copy link

msplival commented Dec 6, 2018

Ah, I see. The Installation doc only mentions that php-7.2 is strongly recommended, not actually needed.
I went with Ubuntu 18.04 because it has php-7.2. Ok, will revert to xenial for the time being.
Thank you for the info.

@affectit
Copy link

same problem for PostgreSQL 11 with OwnCloud 10.0.10
(falling back to version PostgreSQL 9.6 works fine)

@lock lock bot locked as resolved and limited conversation to collaborators Jan 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

10 participants