owncloud-2012.4-43.1, postgresql 8.4: 2 errors while creating database
we have an existing postgresql server, and created a new user with new db for owncloud. Upon creation of owncloud, we entered the user/pwd/db/host, but it wouldn't work, because owncloud needs access to the "postgres" db, in order to execute this statement:
REVOKE ALL PRIVILEGES ON DATABASE "owncloud_test" FROM PUBLIC
Could you please make this statement optional, i.e. if it doesn't work, don't mind. We've setup the db with access rights it needs.
2nd problem after creating tables: idle in transaction:LOG: statement: CREATE TABLE "oc_queuedtasks" ("id" SERIAL PRIMARY KEY, "app" VARCHAR(255) DEFAULT ' ' NOT NULL, "klass" VARCHAR(255) DEFAULT ' ' NOT NULL, "method" VARCHAR(255) DEFAULT ' ' NOT NULL, "parameters" VARCHAR(255) DEFAULT ' ' NOT NULL) idle in transaction:LOG: statement: CREATE TABLE "oc_users" ("uid" VARCHAR(64) DEFAULT ' ' NOT NULL, "password" VARCHAR(255) DEFAULT ' ' NOT NULL) idle in transaction:LOG: statement: ALTER TABLE "oc_users" ADD CONSTRAINT "users_pKey" PRIMARY KEY ("uid") EXECUTE:ERROR: null value in column "configvalue" violates not-null constraint EXECUTE:STATEMENT: EXECUTE mdb2_statement_pgsql_26676e83d0600a46c22454f1728cacce804409698c ('admin_migrate', 'types', NULL) EXECUTE:ERROR: null value in column "configvalue" violates not-null constraint EXECUTE:STATEMENT: EXECUTE mdb2_statement_pgsql_508ad691db5eba8d2f18a82e307ed27036df9859d9 ('files_imageviewer', 'types', NULL) EXECUTE:ERROR: null value in column "configvalue" violates not-null constraint EXECUTE:STATEMENT: EXECUTE mdb2_statement_pgsql_68ebfa8643125809d5dadfd48f10f3cf90db42fe2e ('files_texteditor', 'types', NULL) EXECUTE:ERROR: null value in column "configvalue" violates not-null constraint EXECUTE:STATEMENT: EXECUTE mdb2_statement_pgsql_8429ca484731264a54c8a67f1dec153cb5b63f78df ('user_migrate', 'types', NULL)
@eMerzh can you please have a look? THX a lot
The Installer of 4.5.3 always says "PostgreSQL username and/or password not valid". Is this due to this issue?
@telepath most likely unrelated - in 4.5 database names can only contain 0-9a-zA-Z$_ we will change this again as this is too rigid - hope this helps
Please see my PR #697
Thanks for the report, the PR is now merged :)
thanks @DeepDiver1975 ;)
owncloud-2012.4.5.5-enterprise.tar.bz2 still has this problem. From which version is this fixed?
Postgres says: Jan 7 09:16:39 db14 postgres[11855]: [10-1] DB=postgres U=testuser H=2001:our:ipv6:addr 50ea8467.2e4f authentication:FATAL: no pg_hba.conf entry for host "2001:our:ipv6:addr", user "testuser", database "postgres", SSL off
And error on WWW: PostgreSQL username and/or password not valid You need to enter either an existing account or the administrator.
@zmi1 it's not fixed yet.
@zmi1 your problem is another thing... it's that there is no pg_hba.conf entry for host "2001:our:ipv6:addr", user "testuser", database "postgres"...
you can either specify this in the pg_hba or give to oc an existing DB (that may give you problems too ... the fix is waiting review here #867
@eMerzh Yes I know, but that's no bug, it's a feature: We are an ISP, so we implement solutions for many customers. And I can't give rights for "testuser" to "postgres", no chance for that. No package should ever need to have this, see Typo3, Joomla, Wordpress etc., none of them need "postgres" access.
Your process should be changed: you can try to set the rights, but if there's no right to "postgres", just ignore it, you can warn the user if you like - but don't stop here. We've already setup "testuser" to have full rights on the "owncloud" database, that must be enough.
It was you who wrote Pull Request #697, I thought that this would be the solution already. So it seems there should be another fix.
@zmi1 if you have the ability test the current stable branch (or the next released version) then could you add your feedback to #675 ? thanks
I just tried to install 4.5.6 on FreeBSD 9.1/Postgresql 9.0.12 and got the following errors in /var/log/messages after initial setup on a database that is also handling MediaWiki, so it is pre-existing, which seems to be the problem case. I tried a few random things like setting pg_hba to "trust" and restarting postgresql, but to no avail. I'm happy to test any patch (non-production config).
Feb 21 20:24:49 boxen postgres[25360]: [2-1] ERROR: null value in column "configvalue" violates not-null constraint
Feb 21 20:24:49 boxen postgres[25360]: [2-2] STATEMENT: EXECUTE mdb2_statement_pgsql_300ed37956fb15e38fa5025721c475ce2ba54cc2d1 ('media', 'types', NULL)
Feb 21 20:24:49 boxen postgres[25360]: [3-1] ERROR: null value in column "configvalue" violates not-null constraint
Feb 21 20:24:49 boxen postgres[25360]: [3-2] STATEMENT: EXECUTE mdb2_statement_pgsql_370044314f155169757e69890d5be3d6f5359db93f ('files_imageviewer', 'types', NULL)
Feb 21 20:24:50 boxen postgres[25360]: [4-1] ERROR: null value in column "configvalue" violates not-null constraint
Feb 21 20:24:50 boxen postgres[25360]: [4-2] STATEMENT: EXECUTE mdb2_statement_pgsql_48dca1f469419aa6a4f7e1d70f6d06c69af0a8581b ('contacts', 'types', NULL)
Feb 21 20:24:50 boxen postgres[25360]: [5-1] ERROR: null value in column "configvalue" violates not-null constraint
Feb 21 20:24:50 boxen postgres[25360]: [5-2] STATEMENT: EXECUTE mdb2_statement_pgsql_555b259d39c92b1493e180fdd58ddffbe7eb905f81 ('user_migrate', 'types', NULL)
Feb 21 20:24:50 boxen postgres[25360]: [6-1] ERROR: null value in column "configvalue" violates not-null constraint
Feb 21 20:24:50 boxen postgres[25360]: [6-2] STATEMENT: EXECUTE mdb2_statement_pgsql_85fedcc37df28bf2cca01b3f881048ead49f74ce1f ('files_odfviewer', 'types', NULL)
Feb 21 20:24:50 boxen postgres[25360]: [7-1] ERROR: null value in column "configvalue" violates not-null constraint
Feb 21 20:24:50 boxen postgres[25360]: [7-2] STATEMENT: EXECUTE mdb2_statement_pgsql_93a7b243dc096eaee0c3569e74278a522eb87301eb ('files_texteditor', 'types', NULL)
Feb 21 20:24:50 boxen postgres[25360]: [8-1] ERROR: null value in column "configvalue" violates not-null constraint
Feb 21 20:24:50 boxen postgres[25360]: [8-2] STATEMENT: EXECUTE mdb2_statement_pgsql_102a15fb102823eb4a33e4dc71e4c6d8127e139d50 ('gallery', 'types', NULL)
Feb 21 20:24:50 boxen postgres[25360]: [9-1] ERROR: null value in column "configvalue" violates not-null constraint Feb 21 20:24:50 boxen postgres[25360]: [9-2] STATEMENT: EXECUTE mdb2_statement_pgsql_124ccd57636a8417088ee2a75e6b8fe78219a74f60 ('admin_migrate', 'types', NULL) Feb 21 20:24:50 boxen postgres[25360]: [10-1] ERROR: null value in column "configvalue" violates not-null constraint Feb 21 20:24:50 boxen postgres[25360]: [10-2] STATEMENT: EXECUTE mdb2_statement_pgsql_14062218ffdb9b7e6b8458d3e7432067c65ff01589 ('calendar', 'types', NULL) Feb 21 20:24:50 boxen postgres[25360]: [11-1] ERROR: null value in column "configvalue" violates not-null constraint Feb 21 20:24:50 boxen postgres[25360]: [11-2] STATEMENT: EXECUTE mdb2_statement_pgsql_149a8088b291e5c8c6cd612b7e3955b68734c6bd0a ('files_pdfviewer', 'types', NULL)
tested 4.5.7, same problem...
eMerzh, anything I can do to test?
Hi gessel, do you have access to pg logs or smth (to verify oc try to put null on the value column)? I've tested on my pg 8.4 and i'm unable to reproduce this... the "fun" fact is that it seems to be located on appconfig .... could you also five me a ( from a psql console)
\d oc_appconfig;
normally the setAppTypes function only put '' (no null) so i don't see how this could happened....
postgres=# \d oc_appconfig; Did not find any relation named "oc_appconfig".
Would you like me to set logging to all and send you a log dump from an initial install? Might be a lot of stuff, but could be helpful.
-------- Original Message -------- Subject: Re: [core] owncloud-2012.4-43.1, postgresql 8.4: 2 errors while creating database (#560) From: eMerzh [email protected] To: owncloud/core [email protected] Date: Sun Feb 24 2013 16:20:38 GMT+0300 (Arabic Standard Time)
Hi gessel, do you have access to pg logs or smth (to verify oc try to put null on the value column)? I've tested on my pg 8.4 and i'm unable to reproduce this... the "fun" fact is that it seems to be located on appconfig .... could you also five me a ( from a psql console)
|\d oc_appconfig;|
normally the setAppTypes function only put '' (no null) so i don't see how this could happened....
— Reply to this email directly or view it on GitHub https://github.com/owncloud/core/issues/560#issuecomment-14008248.
oups ok, look at appconfig (w-o the oc_ prefix) (could you also verify that there are some other rows in that table? )
Thanks for your help
using phpPgAdmin, to export the oc_appconfig table to "show" I see:
-- PostgreSQL database dump
SET statement_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = off; SET check_function_bodies = false; SET client_min_messages = warning; SET escape_string_warning = off;
SET search_path = public, pg_catalog;
SET default_tablespace = '';
SET default_with_oids = false;
-- Name: oc_appconfig; Type: TABLE; Schema: public; Owner: owncdbusr;
Tablespace:
CREATE TABLE oc_appconfig ( appid character varying(32) DEFAULT ' '::character varying NOT NULL, configkey character varying(64) DEFAULT ' '::character varying NOT NULL, configvalue text NOT NULL );
ALTER TABLE public.oc_appconfig OWNER TO owncdbusr;
-- Data for Name: oc_appconfig; Type: TABLE DATA; Schema: public; Owner:
owncdbusr
COPY oc_appconfig (appid, configkey, configvalue) FROM stdin; core installedat 1361580483.3492 core lastupdatedat 1361580483.3539 core remote_core.css /core/minimizer.php core remote_core.js /core/minimizer.php media installed_version 0.4.3 core remote_ampache media/remote.php media enabled yes files_imageviewer installed_version 1.0 files_imageviewer enabled yes contacts installed_version 0.2.4 core remote_contacts contacts/appinfo/remote.php core remote_carddav contacts/appinfo/remote.php contacts enabled yes user_migrate installed_version 0.1 user_migrate enabled yes files_sharing installed_version 0.3.3 core public_files files_sharing/public.php core public_webdav files_sharing/public.php files_sharing types filesystem files_sharing enabled yes files_versions installed_version 1.0.2 files_versions types filesystem files_versions enabled yes files_odfviewer installed_version 0.1 files_odfviewer enabled yes files_texteditor installed_version 0.3 files_texteditor enabled yes gallery installed_version 0.5.1 core public_gallery gallery/sharing.php gallery enabled yes files installed_version 1.1.6 core remote_files files/appinfo/remote.php core remote_webdav files/appinfo/remote.php core remote_filesync files/appinfo/filesync.php files types filesystem files enabled yes admin_migrate installed_version 0.1 admin_migrate enabled yes calendar installed_version 0.6.1 core remote_calendar calendar/appinfo/remote.php core remote_caldav calendar/appinfo/remote.php core public_calendar calendar/share.php core public_caldav calendar/share.php calendar enabled yes files_pdfviewer installed_version 0.1 files_pdfviewer enabled yes core backgroundjobs_task OC_Cache_FileGlobal-gc core global_cache_gc_lastrun 1361580491 core backgroundjobs_step queued_tasks .
-- Name: appconfig_appid_key_index; Type: INDEX; Schema: public; Owner:
owncdbusr; Tablespace:
CREATE INDEX appconfig_appid_key_index ON oc_appconfig USING btree (appid, configkey);
-- PostgreSQL database dump complete
Running the command:
postgres=# \d appconfig; Did not find any relation named "appconfig".
To create the db and postgres user prior to initial start (if I didn't, it complains that there is no such user, which seems to be a hint to pre-create the user) I used the following commands:
CREATE USER owncdbusr WITH ENCRYPTED PASSWORD 'password'; CREATE DATABASE owncdb WITH OWNER owncdbusr ENCODING 'UTF8'; GRANT ALL PRIVILEGES ON DATABASE owncdb TO owncdbusr;
I may have done something problematic there, though it seems pretty straight-forward.
-------- Original Message -------- Subject: Re: [core] owncloud-2012.4-43.1, postgresql 8.4: 2 errors while creating database (#560) From: eMerzh [email protected] To: owncloud/core [email protected] Date: Sun Feb 24 2013 23:57:14 GMT+0300 (Arabic Standard Time)
oups ok, look at appconfig (w-o the oc_ prefix) (could you also verify that there are some other rows in that table? )
Thanks for your help
— Reply to this email directly or view it on GitHub https://github.com/owncloud/core/issues/560#issuecomment-14015819.
I’m closing this bug because it has been inactive for a few months. This probably means it’s not reproducible or it has been fixed in a newer version.
Please reopen if the error still persists with ownCloud 5.0.9 (the latest stable version) and then please use the issue template. You an also contribute directly by providing a patch – see the developer manual. :)
Thank you!