How to fix a Trac installation that starts to give errors related to PYTHON_EGG_CACHE?

We used Trac to track tasks / defects, and everything went well, but this morning it started serving 500 errors. Looking at the Apache error_log, I get a stack trace that ends:

PythonHandler trac.web.modpython_frontend:
  ExtractionError: Can't extract file (s) to egg cache

The following error occurred while trying to extract file (s) to the Python egg
cache:

  [Errno 13] Permission denied: '/.python-eggs'

The Python egg cache directory is currently set to:

  /.python-eggs

Perhaps your account does not have write access to this directory? You can
change the cache directory by setting the PYTHON_EGG_CACHE environment
variable to point to an accessible directory

Therefore, I explicitly set PYTHON_EGG_CACHE to / srv / trac / plugin -cache. I restarted Apache. However, I get the same error (she still says that "the egg cache directory is set to: \ n \ n / .python_eggs.")

How do I proceed? The easiest thing to do to reinstall Trac? If I go along this route, what steps do I need to take in order not to lose the existing data?

+1
source share
5 answers

This should be fixed in 0.11 in accordance with their bug tracking system .

If this is not the case, you should try passing the var environment to apache, since executing SetEnv in the configuration file does not work. Adding something like

export PYTHON_EGG_CACHE=/tmp/python_eggs

to the script you use to start apache should work.

+5

Trac 10.4 0.11 . - , - Python Apache?

, , SetEnv PYTHON_EGG_CACHE /.python-eggs /.python-eggs 777 . , .

. agnul, Trac.

+1

PYTHON_EGG_CACHE, - apache envvars, httpd.conf(SetEnv PythonOption), . python , - . , ...

+1

. , chown'ed apache (apache centos 4.3). , . , rw , , , apache. ps aux | grep httpd , , . , -a ls, "" .

0

, PythonOption , SetEnv. .

0

Source: https://habr.com/ru/post/1699199/


All Articles