[Users] Unable to get managed connection for java:/ENGINEDataSource

Juan Hernandez jhernand at redhat.com
Fri Mar 8 08:05:26 UTC 2013


On 03/08/2013 12:59 AM, snmishra at linux.vnet.ibm.com wrote:
>
> Quoting Juan Hernandez <jhernand at redhat.com>:
>
>> On 03/05/2013 05:24 PM, Dennis Böck wrote:
>>> Dear oVirt-Users,
>>>
>>> since I had a typo in my engine-setup I did a engine-cleanup, a
>>> reboot and started again.
>>> Unfortunately now the engine doesn't come up any more. Obviously
>>> there are problems accessing the database:
>>>
>>> 2013-03-05 17:13:08,078 ERROR [org.ovirt.engine.core.bll.Backend]
>>> (MSC service thread 1-32) Error in getting DB connection. The
>>> database is inaccessible. Original exception is:
>>> DataAccessResourceFailureException: Error retreiving database
>>> metadata; nested exception is
>>> org.springframework.jdbc.support.MetaDataAccessException: Could not
>>> get Connection for extracting meta data; nested exception is
>>> org.springframework.jdbc.CannotGetJdbcConnectionException: Could
>>> not get JDBC Connection; nested exception is java.sql.SQLException:
>>> javax.resource.ResourceException: IJ000453: Unable to get managed
>>> connection for java:/ENGINEDataSource
>>>
>>> I already tried:
>>> yum erase ovirt-engine
>>> yum earse postresql-server
>>> and installed it again, but it didn't help.
>>>
>>> Does anyone have an idea?
>>>
>>> Best regards and thanks in advance
>>> Dennis
>>
>> In the /etc/sysconfig/ovirt-engine file you should have the details
>> of the connection to the database, in particular you should have
>> something like this:
>>
>>    ENGINE_DB_URL=jdbc:postgresql://localhost:5432/engine
>>
>> Are you using "localhost" as in this example? If that is the case
>> then check that the database is listening in right address and port:
>>
>>    # netstat --listen --tcp --numeric --program | grep postgres
>>    tcp        0      0 127.0.0.1:5432          0.0.0.0:* LISTEN
>> 10424/postgres
>>
>> Then also check that connection to the database is working:
>>
>>    psql --host localhost --port 5432 --user engine --password engine
>>    Password for user engine:
>>    psql (9.2.3)
>>    Type "help" for help.
>>
>>    engine=>
>>
>> You may also run a simple query to check that the tables are there:
>>
>>    engine=> select count(*) from vdc_options;
>>     count
>>    -------
>>       346
>>    (1 row)
>>
>> Hopefully, if there is an error, the output of these commands will
>> give you a hint.
>
> I am running into this issue today. Running "select count(*) from
> vdc_options;" gives me permission denied. But when I run the same
> command with postgres (psql --host localhost --port 5432 --user
> postgres --password engine) it works fine.
>

I don't really know what is the root cause of this issue, but it looks 
like the database is now owned by "postgres" instead of "engine". If you 
don't mind dropping the database and installing again then you can do this:

# psql -U postgres
postgres# drop database engine;
postgres# drop role engine;

Then run engine-setup again.

-- 
Dirección Comercial: C/Jose Bardasano Baos, 9, Edif. Gorbea 3, planta 
3ºD, 28016 Madrid, Spain
Inscrita en el Reg. Mercantil de Madrid – C.I.F. B82657941 - Red Hat S.L.



More information about the Users mailing list