Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.