python - PassEnv variable OPENSHIFT_POSTGRESQL_DB_HOST was undefined at Openshift -


for python 3.3 cartridge , postgresql 9.2 on openshift.

when ssh openshift app can see content of openshift_postgresql_db_host:

echo $openshift_postgresql_db_port 5432 

however wsgi script env vars not passed - see part python.log:

[fri jan 15 16:27:33 2016] [notice] sighup received.  attempting restart [fri jan 15 16:27:33 2016] [warn] passenv variable openshift_cron_dir undefined [fri jan 15 16:27:33 2016] [warn] passenv variable openshift_postgresql_db_password undefined [fri jan 15 16:27:33 2016] [warn] passenv variable openshift_postgresql_db_socket undefined [fri jan 15 16:27:33 2016] [warn] passenv variable openshift_postgresql_db_host undefined [fri jan 15 16:27:33 2016] [warn] passenv variable pguser undefined [fri jan 15 16:27:33 2016] [warn] passenv variable openshift_postgresql_ident undefined [fri jan 15 16:27:33 2016] [warn] passenv variable pgdatabase undefined [fri jan 15 16:27:33 2016] [warn] passenv variable openshift_postgresql_db_pid undefined [fri jan 15 16:27:33 2016] [warn] passenv variable openshift_postgresql_db_username undefined [fri jan 15 16:27:33 2016] [warn] passenv variable openshift_postgresql_dir undefined [fri jan 15 16:27:33 2016] [warn] passenv variable openshift_postgresql_ld_library_path_element undefined [fri jan 15 16:27:33 2016] [warn] passenv variable openshift_postgresql_path_element undefined [fri jan 15 16:27:33 2016] [warn] passenv variable pghost undefined [fri jan 15 16:27:33 2016] [warn] passenv variable openshift_postgresql_db_url undefined [fri jan 15 16:27:33 2016] [warn] passenv variable openshift_cron_ident undefined [fri jan 15 16:27:33 2016] [warn] passenv variable openshift_postgresql_version undefined [fri jan 15 16:27:33 2016] [warn] passenv variable pgdata undefined [fri jan 15 16:27:33 2016] [warn] passenv variable openshift_postgresql_db_port undefined [fri jan 15 16:27:33 2016] [warn] passenv variable openshift_postgresql_db_log_dir undefined [fri jan 15 16:27:33 2016] [notice] digest: generating secret digest authentication ... [fri jan 15 16:27:33 2016] [notice] digest: done [fri jan 15 16:27:33 2016] [notice] apache/2.2.15 (unix) mod_wsgi/3.4 python/3.3.2 configured -- resuming normal operations 

the restart of app in application console did not help. neither restart of python cartridge.

please advice how propagate env vars wsgi script.

try stopping & starting (not restarting) python application if added postgresql after application created. since it's running inside of apache wsgi application may take stop/start see env variables correctly.


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -