Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have installed Django on Ubuntu 12.04 behind NGINX with uWSGI. I use Postgresql as the main database for the application however I need to retrieve some data from an Oracle database.

I have successfully installed Instant Client and cx_Oracle and I can connect and query the Oracle database successfully from command line scripts and also from ./manage.py shell. However when I run the application via uwsgi I receive the following error:

InterfaceError: Unable to acquire Oracle environment handle

I am puzzled because when I check ORACLE_HOME and LD_LIBRARY_PATH they are correct and available to the environment at that point.

Also I am using instantclient version 11.2.0.3.0 while I am querying an Oracle 10g database.

I have checked a lot of proposed solutions online but nothing seems to work in my case. Anybody has any pointers on what I can try next?

Thanks a lot.

share|improve this question
    
Would you share the part of your init script that sets those two environment variables? I've had that problem a million times and it has always been a matter of getting the environment configured early enough. I'm hoping to see something in the setup that would help. –  khoxsey Aug 21 '12 at 18:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.