Error in setup of ovirt-engine Development Environment

Hello, I am trying to setup ovirt-engine using this link http://www.ovirt.org/develop/developer-guide/engine/engine-development-envir... . Now when I am trying these commands I am getting following error $ postgres -c "psql -d template1 -c \"create user engine password 'engine';\"" FATAL: -c psql -d template1 -c "create user engine password 'engine';" requires a value and $postgres -c "psql -d template1 -c "create database engine \ owner engine template template0 encoding 'UTF8' lc_collate \ 'en_US.UTF-8' lc_ctype 'en_US.UTF-8';\"" FATAL: -c psql -d template1 -c "create database engine owner engine template template0 encoding 'UTF8' lc_collate 'en_US.UTF-8' lc_ctype 'en_US.UTF-8';" requires a value So I think the syntax given there is not right,So can anyone tell me the correct syntax.Or maybe I am doing something wrong. Thanks, Shubham

Under which user are you running this command ? In the guide, it is specified to run it as root. On Wed, Mar 15, 2017 at 6:30 PM, shubham dubey <sdubey504@gmail.com> wrote:
Hello, I am trying to setup ovirt-engine using this link http://www.ovirt.org/develop/developer-guide/engine/engine- development-environment/. Now when I am trying these commands I am getting following error $postgres -c "psql -d template1 -c \"create user engine password 'engine';\"" FATAL: -c psql -d template1 -c "create user engine password 'engine';" requires a value
and $postgres -c "psql -d template1 -c "create database engine \ owner engine template template0 encoding 'UTF8' lc_collate \ 'en_US.UTF-8' lc_ctype 'en_US.UTF-8';\"" FATAL: -c psql -d template1 -c "create database engine owner engine template template0 encoding 'UTF8' lc_collate 'en_US.UTF-8' lc_ctype 'en_US.UTF-8';" requires a value
So I think the syntax given there is not right,So can anyone tell me the correct syntax.Or maybe I am doing something wrong.
Thanks, Shubham
_______________________________________________ Devel mailing list Devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/devel

I am running it as normal user because when I am running it as root user it is giving me following error "root" execution of the PostgreSQL server is not permitted. The server must be started under an unprivileged user ID to prevent possible system security compromise. See the documentation for more information on how to properly start the server. On Wed, Mar 15, 2017 at 10:14 PM, Fred Rolland <frolland@redhat.com> wrote:
Under which user are you running this command ? In the guide, it is specified to run it as root.
On Wed, Mar 15, 2017 at 6:30 PM, shubham dubey <sdubey504@gmail.com> wrote:
Hello, I am trying to setup ovirt-engine using this link http://www.ovirt.org/develop/developer-guide/engine/engine-d evelopment-environment/. Now when I am trying these commands I am getting following error $postgres -c "psql -d template1 -c \"create user engine password 'engine';\"" FATAL: -c psql -d template1 -c "create user engine password 'engine';" requires a value
and $postgres -c "psql -d template1 -c "create database engine \ owner engine template template0 encoding 'UTF8' lc_collate \ 'en_US.UTF-8' lc_ctype 'en_US.UTF-8';\"" FATAL: -c psql -d template1 -c "create database engine owner engine template template0 encoding 'UTF8' lc_collate 'en_US.UTF-8' lc_ctype 'en_US.UTF-8';" requires a value
So I think the syntax given there is not right,So can anyone tell me the correct syntax.Or maybe I am doing something wrong.
Thanks, Shubham
_______________________________________________ Devel mailing list Devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/devel

On Wednesday, March 15, 2017 1:56:27 PM EDT shubham dubey wrote:
I am running it as normal user because when I am running it as root user it is giving me following error
"root" execution of the PostgreSQL server is not permitted. The server must be started under an unprivileged user ID to prevent possible system security compromise. See the documentation for more information on how to properly start the server.
Yes don't run that part as root. What I usually do after installing the packages and configuring the database is sudo to postgres and run psql engine. Then paste the part between the double quotes in. I always manage to screw up the quotes otherwise.
On Wed, Mar 15, 2017 at 10:14 PM, Fred Rolland <frolland@redhat.com> wrote:
Under which user are you running this command ? In the guide, it is specified to run it as root.
On Wed, Mar 15, 2017 at 6:30 PM, shubham dubey <sdubey504@gmail.com>
wrote:
Hello, I am trying to setup ovirt-engine using this link http://www.ovirt.org/develop/developer-guide/engine/engine-d evelopment-environment/. Now when I am trying these commands I am getting following error $postgres -c "psql -d template1 -c \"create user engine password 'engine';\"" FATAL: -c psql -d template1 -c "create user engine password 'engine';" requires a value
and $postgres -c "psql -d template1 -c "create database engine \ owner engine template template0 encoding 'UTF8' lc_collate \ 'en_US.UTF-8' lc_ctype 'en_US.UTF-8';\"" FATAL: -c psql -d template1 -c "create database engine owner engine template template0 encoding 'UTF8' lc_collate 'en_US.UTF-8' lc_ctype 'en_US.UTF-8';" requires a value
So I think the syntax given there is not right,So can anyone tell me the correct syntax.Or maybe I am doing something wrong.
Thanks, Shubham
_______________________________________________ Devel mailing list Devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/devel

Thanks,It just work. One more thing which I added to make it work is that after login with postgres user,if I was running psql then getting this error. $psql -d template1 -c "create user engine password 'engine';" psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"? So,I just give 777 permission to /var/lib/pgsql/data/pg_hba.conf and restart postgresql server.Then it work fine(I know it is not the best solution:) ). On Thu, Mar 16, 2017 at 12:09 AM, Alexander Wels <awels@redhat.com> wrote:
On Wednesday, March 15, 2017 1:56:27 PM EDT shubham dubey wrote:
I am running it as normal user because when I am running it as root user it is giving me following error
"root" execution of the PostgreSQL server is not permitted. The server must be started under an unprivileged user ID to prevent possible system security compromise. See the documentation for more information on how to properly start the server.
Yes don't run that part as root. What I usually do after installing the packages and configuring the database is sudo to postgres and run psql engine. Then paste the part between the double quotes in. I always manage to screw up the quotes otherwise.
Under which user are you running this command ? In the guide, it is specified to run it as root.
On Wed, Mar 15, 2017 at 6:30 PM, shubham dubey <sdubey504@gmail.com>
wrote:
Hello, I am trying to setup ovirt-engine using this link http://www.ovirt.org/develop/developer-guide/engine/engine-d evelopment-environment/. Now when I am trying these commands I am getting following error $postgres -c "psql -d template1 -c \"create user engine password 'engine';\"" FATAL: -c psql -d template1 -c "create user engine password 'engine';" requires a value
and $postgres -c "psql -d template1 -c "create database engine \ owner engine template template0 encoding 'UTF8' lc_collate \ 'en_US.UTF-8' lc_ctype 'en_US.UTF-8';\"" FATAL: -c psql -d template1 -c "create database engine owner engine template template0 encoding 'UTF8' lc_collate 'en_US.UTF-8' lc_ctype 'en_US.UTF-8';" requires a value
So I think the syntax given there is not right,So can anyone tell me
On Wed, Mar 15, 2017 at 10:14 PM, Fred Rolland <frolland@redhat.com> wrote: the
correct syntax.Or maybe I am doing something wrong.
Thanks, Shubham
_______________________________________________ Devel mailing list Devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/devel

Hi, I think you have forgotten 'su' command at beginning, correct commands are: su - postgres -c "psql -d template1 -c \"create user engine password 'engine';\"" su - postgres -c "psql -d template1 -c \"create database engine owner engine template template0 encoding 'UTF8' lc_collate 'en_US.UTF-8' lc_ctype 'en_US.UTF-8';\"" Martin On Wed, Mar 15, 2017 at 5:30 PM, shubham dubey <sdubey504@gmail.com> wrote:
Hello, I am trying to setup ovirt-engine using this link http://www.ovirt.org/develop/developer-guide/engine/engine- development-environment/. Now when I am trying these commands I am getting following error $postgres -c "psql -d template1 -c \"create user engine password 'engine';\"" FATAL: -c psql -d template1 -c "create user engine password 'engine';" requires a value
and $postgres -c "psql -d template1 -c "create database engine \ owner engine template template0 encoding 'UTF8' lc_collate \ 'en_US.UTF-8' lc_ctype 'en_US.UTF-8';\"" FATAL: -c psql -d template1 -c "create database engine owner engine template template0 encoding 'UTF8' lc_collate 'en_US.UTF-8' lc_ctype 'en_US.UTF-8';" requires a value
So I think the syntax given there is not right,So can anyone tell me the correct syntax.Or maybe I am doing something wrong.
Thanks, Shubham
_______________________________________________ Devel mailing list Devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/devel

On Wed, Mar 15, 2017 at 10:42 PM, Martin Perina <mperina@redhat.com> wrote:
Hi,
I think you have forgotten 'su' command at beginning, correct commands are:
su - postgres -c "psql -d template1 -c \"create user engine password 'engine';\"" su - postgres -c "psql -d template1 -c \"create database engine owner engine template template0 encoding 'UTF8' lc_collate 'en_US.UTF-8' lc_ctype 'en_US.UTF-8';\""
You can also use this: /usr/share/ovirt-engine/setup/bin/ovirt-engine-provisiondb --otopi-environment="OVESETUP_PROVISION_DB/database=str:engine OVESETUP_PROVISION_DB/user=str:engine OVESETUP_PROVISION_DB/password=str:mypassword" It should do "everything" - initdb, create user and db, configure pg, etc. If you messed up your pg setup and want to start from scratch (which you at least partially did, if you have bad permissions on pg_hba.conf), you can do this: 1. Disconnect everything that's connected to pg, if any 2. systemctl stop postgresql 3. rm -rf /var/lib/pgsql/data Then try again (following the web page or using above command). Best,
Martin
On Wed, Mar 15, 2017 at 5:30 PM, shubham dubey <sdubey504@gmail.com> wrote:
Hello, I am trying to setup ovirt-engine using this link http://www.ovirt.org/develop/developer-guide/engine/engine-development-envir.... Now when I am trying these commands I am getting following error $postgres -c "psql -d template1 -c \"create user engine password 'engine';\"" FATAL: -c psql -d template1 -c "create user engine password 'engine';" requires a value
and $postgres -c "psql -d template1 -c "create database engine \ owner engine template template0 encoding 'UTF8' lc_collate \ 'en_US.UTF-8' lc_ctype 'en_US.UTF-8';\"" FATAL: -c psql -d template1 -c "create database engine owner engine template template0 encoding 'UTF8' lc_collate 'en_US.UTF-8' lc_ctype 'en_US.UTF-8';" requires a value
So I think the syntax given there is not right,So can anyone tell me the correct syntax.Or maybe I am doing something wrong.
Thanks, Shubham
_______________________________________________ Devel mailing list Devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/devel
_______________________________________________ Devel mailing list Devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/devel
-- Didi

thanks,It looks really a great solution.I will try that. On Thu, Mar 16, 2017 at 12:27 PM, Yedidyah Bar David <didi@redhat.com> wrote:
On Wed, Mar 15, 2017 at 10:42 PM, Martin Perina <mperina@redhat.com> wrote:
Hi,
I think you have forgotten 'su' command at beginning, correct commands are:
su - postgres -c "psql -d template1 -c \"create user engine password 'engine';\"" su - postgres -c "psql -d template1 -c \"create database engine owner engine template template0 encoding 'UTF8' lc_collate 'en_US.UTF-8' lc_ctype 'en_US.UTF-8';\""
You can also use this:
/usr/share/ovirt-engine/setup/bin/ovirt-engine-provisiondb --otopi-environment="OVESETUP_PROVISION_DB/database=str:engine OVESETUP_PROVISION_DB/user=str:engine OVESETUP_PROVISION_DB/password=str:mypassword"
It should do "everything" - initdb, create user and db, configure pg, etc.
If you messed up your pg setup and want to start from scratch (which you at least partially did, if you have bad permissions on pg_hba.conf), you can do this:
1. Disconnect everything that's connected to pg, if any 2. systemctl stop postgresql 3. rm -rf /var/lib/pgsql/data
Then try again (following the web page or using above command).
Best,
Martin
On Wed, Mar 15, 2017 at 5:30 PM, shubham dubey <sdubey504@gmail.com>
wrote:
Hello, I am trying to setup ovirt-engine using this link http://www.ovirt.org/develop/developer-guide/engine/engine-
development-environment/.
Now when I am trying these commands I am getting following error $postgres -c "psql -d template1 -c \"create user engine password 'engine';\"" FATAL: -c psql -d template1 -c "create user engine password 'engine';" requires a value
and $postgres -c "psql -d template1 -c "create database engine \ owner engine template template0 encoding 'UTF8' lc_collate \ 'en_US.UTF-8' lc_ctype 'en_US.UTF-8';\"" FATAL: -c psql -d template1 -c "create database engine owner engine template template0 encoding 'UTF8' lc_collate 'en_US.UTF-8' lc_ctype 'en_US.UTF-8';" requires a value
So I think the syntax given there is not right,So can anyone tell me the correct syntax.Or maybe I am doing something wrong.
Thanks, Shubham
_______________________________________________ Devel mailing list Devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/devel
_______________________________________________ Devel mailing list Devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/devel
-- Didi

Hi! On Wed, Mar 15, 2017 at 6:30 PM, shubham dubey <sdubey504@gmail.com> wrote:
Now when I am trying these commands I am getting following error $postgres -c "psql -d template1 -c \"create user engine password 'engine';\"" FATAL: -c psql -d template1 -c "create user engine password 'engine';" requires a value
You lost "su" here: su postgres -c "psql -d template1 -c \"create user engine password 'engine';\"" Shmuel
participants (6)
-
Alexander Wels
-
Fred Rolland
-
Martin Perina
-
Shmuel Melamud
-
shubham dubey
-
Yedidyah Bar David