I can connect to the db with the 'engine' user.
Initially 'engine' wasn't a member of any roles, I added it to
'postgres'.
engine=> \du
List of roles
Role name | Attributes | Member of
-----------+-------------+------------
engine | | {postgres}
postgres | Superuser | {}
: Create role
: Create DB
If you meant file permissions they are:
# ll
total 24
-rw-------. 1 ovirt ovirt 380 Jan 29 18:35 10-setup-database.conf
-rw-------. 1 ovirt ovirt 378 Jan 15 15:58
10-setup-database.conf.20140129183539
-rw-r--r--. 1 root root 33 Jan 15 15:58 10-setup-jboss.conf
-rw-------. 1 ovirt ovirt 384 Jan 15 15:59 10-setup-pki.conf
-rw-r--r--. 1 root root 259 Jan 15 15:58 10-setup-protocols.conf
-rw-r--r--. 1 root root 204 Dec 13 03:22 README
On ovirt-engine restart (engine.log):
i
2014-01-30 10:24:18,988 INFO [org.ovirt.engine.core.utils.LocalConfig]
(MSC service thread 1-23) Loaded file
"/usr/share/ovirt-engine/services/ovirt-engine/ovirt-engine.conf".
2014-01-30 10:24:18,990 WARN [org.ovirt.engine.core.utils.LocalConfig]
(MSC service thread 1-23) The file "/etc/ovirt-engine/engine.conf" doesn't
exist or isn't readable. Will return an empty set of properties.
2014-01-30 10:24:18,991 INFO [org.ovirt.engine.core.utils.LocalConfig]
(MSC service thread 1-23) Loaded file
"/etc/ovirt-engine/engine.conf.d/10-setup-database.conf".
2014-01-30 10:24:18,992 INFO [org.ovirt.engine.core.utils.LocalConfig]
(MSC service thread 1-23) Loaded file
"/etc/ovirt-engine/engine.conf.d/10-setup-jboss.conf".
2014-01-30 10:24:18,994 INFO [org.ovirt.engine.core.utils.LocalConfig]
(MSC service thread 1-23) Loaded file
"/etc/ovirt-engine/engine.conf.d/10-setup-pki.conf".
2014-01-30 10:24:18,994 INFO [org.ovirt.engine.core.utils.LocalConfig]
(MSC service thread 1-23) Loaded file
"/etc/ovirt-engine/engine.conf.d/10-setup-protocols.conf".
2014-01-30 10:24:18,995 INFO [org.ovirt.engine.core.utils.LocalConfig]
(MSC service thread 1-23) Value of property "ENGINE_AJP_ENABLED" is
"true".
2014-01-30 10:24:18,996 INFO [org.ovirt.engine.core.utils.LocalConfig]
(MSC service thread 1-23) Value of property "ENGINE_AJP_PORT" is
"8702".
2014-01-30 10:24:18,997 INFO [org.ovirt.engine.core.utils.LocalConfig]
(MSC service thread 1-23) Value of property "ENGINE_APPS" is
"engine.ear".
2014-01-30 10:24:18,997 INFO [org.ovirt.engine.core.utils.LocalConfig]
(MSC service thread 1-23) Value of property "ENGINE_CACHE" is
"/var/cache/ovirt-engine".
2014-01-30 10:24:18,998 INFO [org.ovirt.engine.core.utils.LocalConfig]
(MSC service thread 1-23) Value of property "ENGINE_DB_CHECK_INTERVAL" is
"1000".
2014-01-30 10:24:18,998 INFO [org.ovirt.engine.core.utils.LocalConfig]
(MSC service thread 1-23) Value of property "ENGINE_DB_CONNECTION_TIMEOUT"
is "300000".
2014-01-30 10:24:18,999 INFO [org.ovirt.engine.core.utils.LocalConfig]
(MSC service thread 1-23) Value of property "ENGINE_DB_DATABASE" is
"engine".
2014-01-30 10:24:19,000 INFO [org.ovirt.engine.core.utils.LocalConfig]
(MSC service thread 1-23) Value of property "ENGINE_DB_DRIVER" is
"org.postgresql.Driver".
2014-01-30 10:24:19,000 INFO [org.ovirt.engine.core.utils.LocalConfig]
(MSC service thread 1-23) Value of property "ENGINE_DB_HOST" is
"localhost".
2014-01-30 10:24:19,001 INFO [org.ovirt.engine.core.utils.LocalConfig]
(MSC service thread 1-23) Value of property "ENGINE_DB_MAX_CONNECTIONS" is
"100".
2014-01-30 10:24:19,001 INFO [org.ovirt.engine.core.utils.LocalConfig]
(MSC service thread 1-23) Value of property "ENGINE_DB_MIN_CONNECTIONS" is
"1".
2014-01-30 10:24:19,002 INFO [org.ovirt.engine.core.utils.LocalConfig]
(MSC service thread 1-23) Value of property "ENGINE_DB_PASSWORD" is
"***".
2014-01-30 10:24:19,002 INFO [org.ovirt.engine.core.utils.LocalConfig]
(MSC service thread 1-23) Value of property "ENGINE_DB_PORT" is
"5432".
2014-01-30 10:24:19,003 INFO [org.ovirt.engine.core.utils.LocalConfig]
(MSC service thread 1-23) Value of property "ENGINE_DB_SECURED" is
"False".
2014-01-30 10:24:19,004 INFO [org.ovirt.engine.core.utils.LocalConfig]
(MSC service thread 1-23) Value of property "ENGINE_DB_SECURED_VALIDATION"
is "False".
2014-01-30 10:24:19,004 INFO [org.ovirt.engine.core.utils.LocalConfig]
(MSC service thread 1-23) Value of property "ENGINE_DB_SSL" is
"false".
2014-01-30 10:24:19,005 INFO [org.ovirt.engine.core.utils.LocalConfig]
(MSC service thread 1-23) Value of property "ENGINE_DB_URL" is
"jdbc:postgresql://localhost:5432/engine?sslfactory=org.postgresql.ssl.NonValidatingFactory".
2014-01-30 10:24:19,006 INFO [org.ovirt.engine.core.utils.LocalConfig]
(MSC service thread 1-23) Value of property "ENGINE_DB_USER" is
"engine".
2014-01-30 10:24:19,006 INFO [org.ovirt.engine.core.utils.LocalConfig]
(MSC service thread 1-23) Value of property "ENGINE_DEBUG_ADDRESS" is
"".
2014-01-30 10:24:19,007 INFO [org.ovirt.engine.core.utils.LocalConfig]
(MSC service thread 1-23) Value of property "ENGINE_DOC" is
"/usr/share/doc/ovirt-engine".
2014-01-30 10:24:19,008 INFO [org.ovirt.engine.core.utils.LocalConfig]
(MSC service thread 1-23) Value of property "ENGINE_ETC" is
"/etc/ovirt-engine".
2014-01-30 10:24:19,008 INFO [org.ovirt.engine.core.utils.LocalConfig]
(MSC service thread 1-23) Value of property "ENGINE_FQDN" is
"ovirt001.miovision.corp".
2014-01-30 10:24:19,009 INFO [org.ovirt.engine.core.utils.LocalConfig]
(MSC service thread 1-23) Value of property "ENGINE_GROUP" is
"ovirt".
2014-01-30 10:24:19,009 INFO [org.ovirt.engine.core.utils.LocalConfig]
(MSC service thread 1-23) Value of property "ENGINE_HEAP_MAX" is
"1g".
2014-01-30 10:24:19,010 INFO [org.ovirt.engine.core.utils.LocalConfig]
(MSC service thread 1-23) Value of property "ENGINE_HEAP_MIN" is
"1g".
2014-01-30 10:24:19,010 INFO [org.ovirt.engine.core.utils.LocalConfig]
(MSC service thread 1-23) Value of property "ENGINE_HTTPS_ENABLED" is
"false".
2014-01-30 10:24:19,011 INFO [org.ovirt.engine.core.utils.LocalConfig]
(MSC service thread 1-23) Value of property "ENGINE_HTTPS_PORT" is
"None".
2014-01-30 10:24:19,011 INFO [org.ovirt.engine.core.utils.LocalConfig]
(MSC service thread 1-23) Value of property "ENGINE_HTTPS_PROTOCOLS" is
"SSLv3,TLSv1,TLSv1.1,TLSv1.2".
2014-01-30 10:24:19,012 INFO [org.ovirt.engine.core.utils.LocalConfig]
(MSC service thread 1-23) Value of property "ENGINE_HTTP_ENABLED" is
"false".
2014-01-30 10:24:19,013 INFO [org.ovirt.engine.core.utils.LocalConfig]
(MSC service thread 1-23) Value of property "ENGINE_HTTP_PORT" is
"None".
2014-01-30 10:24:19,013 INFO [org.ovirt.engine.core.utils.LocalConfig]
(MSC service thread 1-23) Value of property "ENGINE_JVM_ARGS" is "
-XX:+HeapDumpOnOutOfMemoryError
-XX:HeapDumpPath="/var/log/ovirt-engine/dump"".
2014-01-30 10:24:19,014 INFO [org.ovirt.engine.core.utils.LocalConfig]
(MSC service thread 1-23) Value of property "ENGINE_LOG" is
"/var/log/ovirt-engine".
2014-01-30 10:24:19,014 INFO [org.ovirt.engine.core.utils.LocalConfig]
(MSC service thread 1-23) Value of property "ENGINE_LOG_TO_CONSOLE" is
"false".
2014-01-30 10:24:19,015 INFO [org.ovirt.engine.core.utils.LocalConfig]
(MSC service thread 1-23) Value of property "ENGINE_MANUAL" is
"/usr/share/ovirt-engine/manual".
2014-01-30 10:24:19,016 INFO [org.ovirt.engine.core.utils.LocalConfig]
(MSC service thread 1-23) Value of property "ENGINE_PERM_MAX" is
"256m".
2014-01-30 10:24:19,016 INFO [org.ovirt.engine.core.utils.LocalConfig]
(MSC service thread 1-23) Value of property "ENGINE_PERM_MIN" is
"256m".
2014-01-30 10:24:19,017 INFO [org.ovirt.engine.core.utils.LocalConfig]
(MSC service thread 1-23) Value of property "ENGINE_PKI" is
"/etc/pki/ovirt-engine".
2014-01-30 10:24:19,017 INFO [org.ovirt.engine.core.utils.LocalConfig]
(MSC service thread 1-23) Value of property "ENGINE_PKI_CA" is
"/etc/pki/ovirt-engine/ca.pem".
2014-01-30 10:24:19,018 INFO [org.ovirt.engine.core.utils.LocalConfig]
(MSC service thread 1-23) Value of property "ENGINE_PKI_ENGINE_CERT" is
"/etc/pki/ovirt-engine/certs/engine.cer".
2014-01-30 10:24:19,018 INFO [org.ovirt.engine.core.utils.LocalConfig]
(MSC service thread 1-23) Value of property "ENGINE_PKI_ENGINE_STORE" is
"/etc/pki/ovirt-engine/keys/engine.p12".
2014-01-30 10:24:19,019 INFO [org.ovirt.engine.core.utils.LocalConfig]
(MSC service thread 1-23) Value of property "ENGINE_PKI_ENGINE_STORE_ALIAS"
is "1".
2014-01-30 10:24:19,019 INFO [org.ovirt.engine.core.utils.LocalConfig]
(MSC service thread 1-23) Value of property
"ENGINE_PKI_ENGINE_STORE_PASSWORD" is "***".
2014-01-30 10:24:19,020 INFO [org.ovirt.engine.core.utils.LocalConfig]
(MSC service thread 1-23) Value of property "ENGINE_PKI_TRUST_STORE" is
"/etc/pki/ovirt-engine/.truststore".
2014-01-30 10:24:19,021 INFO [org.ovirt.engine.core.utils.LocalConfig]
(MSC service thread 1-23) Value of property
"ENGINE_PKI_TRUST_STORE_PASSWORD" is "***".
2014-01-30 10:24:19,021 INFO [org.ovirt.engine.core.utils.LocalConfig]
(MSC service thread 1-23) Value of property "ENGINE_PROPERTIES" is "
jsse.enableSNIExtension=false".
2014-01-30 10:24:19,022 INFO [org.ovirt.engine.core.utils.LocalConfig]
(MSC service thread 1-23) Value of property "ENGINE_PROXY_ENABLED" is
"true".
2014-01-30 10:24:19,022 INFO [org.ovirt.engine.core.utils.LocalConfig]
(MSC service thread 1-23) Value of property "ENGINE_PROXY_HTTPS_PORT" is
"443".
2014-01-30 10:24:19,023 INFO [org.ovirt.engine.core.utils.LocalConfig]
(MSC service thread 1-23) Value of property "ENGINE_PROXY_HTTP_PORT" is
"80".
2014-01-30 10:24:19,023 INFO [org.ovirt.engine.core.utils.LocalConfig]
(MSC service thread 1-23) Value of property "ENGINE_STOP_INTERVAL" is
"1".
2014-01-30 10:24:19,024 INFO [org.ovirt.engine.core.utils.LocalConfig]
(MSC service thread 1-23) Value of property "ENGINE_STOP_TIME" is
"10".
2014-01-30 10:24:19,024 INFO [org.ovirt.engine.core.utils.LocalConfig]
(MSC service thread 1-23) Value of property "ENGINE_TMP" is
"/var/tmp/ovirt-engine".
2014-01-30 10:24:19,024 INFO [org.ovirt.engine.core.utils.LocalConfig]
(MSC service thread 1-23) Value of property "ENGINE_UP_MARK" is
"/var/lib/ovirt-engine/engine.up".
2014-01-30 10:24:19,025 INFO [org.ovirt.engine.core.utils.LocalConfig]
(MSC service thread 1-23) Value of property "ENGINE_USER" is "ovirt".
2014-01-30 10:24:19,025 INFO [org.ovirt.engine.core.utils.LocalConfig]
(MSC service thread 1-23) Value of property "ENGINE_USR" is
"/usr/share/ovirt-engine".
2014-01-30 10:24:19,026 INFO [org.ovirt.engine.core.utils.LocalConfig]
(MSC service thread 1-23) Value of property "ENGINE_VAR" is
"/var/lib/ovirt-engine".
2014-01-30 10:24:19,026 INFO [org.ovirt.engine.core.utils.LocalConfig]
(MSC service thread 1-23) Value of property "ENGINE_VERBOSE_GC" is
"false".
2014-01-30 10:24:19,027 INFO [org.ovirt.engine.core.utils.LocalConfig]
(MSC service thread 1-23) Value of property "JBOSS_HOME" is
"/usr/share/jboss-as".
2014-01-30 10:24:19,027 INFO [org.ovirt.engine.core.utils.LocalConfig]
(MSC service thread 1-23) Value of property "SENSITIVE_KEYS" is
",ENGINE_DB_PASSWORD,ENGINE_PKI_TRUST_STORE_PASSWORD,ENGINE_PKI_ENGINE_STORE_PASSWORD".
2014-01-30 10:24:19,391 ERROR [org.ovirt.engine.core.bll.Backend] (MSC
service thread 1-2) Error in getting DB connection. The database is
inaccessible. Original exception is: BadSqlGrammarException:
CallableStatementCallback; bad SQL grammar [{call checkdbconnection()}];
nested exception is org.postgresql.util.PSQLException: ERROR: function
checkdbconnection() does not exist
Hint: No function matches the given name and argument types. You might
need to add explicit type casts.
Position: 15
2014-01-30 10:24:20,398 ERROR [org.ovirt.engine.core.bll.Backend] (MSC
service thread 1-2) Error in getting DB connection. The database is
inaccessible. Original exception is: UncategorizedSQLException:
CallableStatementCallback; uncategorized SQLException for SQL [{call
checkdbconnection()}]; SQL state [25P02]; error code [0]; ERROR: current
transaction is aborted, commands ignored until end of transaction block;
nested exception is org.postgresql.util.PSQLException: ERROR: current
transaction is aborted, commands ignored until end of transaction block
[last error repeats]
Thanks,
*Steve Dainard *
IT Infrastructure Manager
Miovision <
http://miovision.com/> | *Rethink Traffic*
519-513-2407 ex.250
877-646-8476 (toll-free)
*Blog <
http://miovision.com/blog> | **LinkedIn
<
https://www.linkedin.com/company/miovision-technologies> | Twitter
<
https://twitter.com/miovision> | Facebook
<
https://www.facebook.com/miovision>*
------------------------------
Miovision Technologies Inc. | 148 Manitou Drive, Suite 101, Kitchener, ON,
Canada | N2C 1L3
This e-mail may contain information that is privileged or confidential. If
you are not the intended recipient, please delete the e-mail and any
attachments and notify us immediately.
On Thu, Jan 30, 2014 at 2:18 AM, Yedidyah Bar David <didi(a)redhat.com> wrote:
*From: *"Steve Dainard" <sdainard(a)miovision.com>
*To: *"Alon Bar-Lev" <alonbl(a)redhat.com>
*Cc: *"users" <users(a)ovirt.org>, "Yedidyah Bar David"
<didi(a)redhat.com>,
"Eli Mesika" <emesika(a)redhat.com>
*Sent: *Thursday, January 30, 2014 7:44:01 AM
*Subject: *Re: [Users] engine-backup restore how to
I also see this error in engine.log which repeats every second if I am
trying to access the web ui.
2014-01-29 18:59:47,531 ERROR [org.ovirt.engine.core.bll.Backend]
(ajp--127.0.0.1-8702-4) Error in getting DB connection. The database is
inaccessible. Original exception is: UncategorizedSQLException:
CallableStatementCallback; uncategorized SQLException for SQL [{call
checkdbconnection()}]; SQL state [25P02]; error code [0]; ERROR: current
transaction is aborted, commands ignored until end of transaction block;
nested exception is org.postgresql.util.PSQLException: ERROR: current
transaction is aborted, commands ignored until end of transaction block
It looks like the db inserted correctly, I took a quick look through some
tables and can see the valid admin user, and snapshots. But I can't say for
certain.
The IP address of the new server does not match the IP of the old (backup
file) server, would this have any impact? I would think not as its a local
db.
When I changed the password for the psql engine user, is there any config
file this is referenced in that may not have been updated?
In principle, the only needed file is
/etc/ovirt-engine/engine.conf.d/10-setup-database.conf
which was updated by restore. Can you please verify that you can connect
to the database
using the credentials in this file? What are its permissions/owner?
Thanks,
--
Didi