Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

mod_fcgi errors with apache

16 views
Skip to first unread message

Gordon McKinnon

unread,
Dec 6, 2024, 5:02:38 PM12/6/24
to Trac Users
Hello,

I'm upgrading from RedHat 6 to Redhat 9 and migrating a trac instance from 1.0 to 1.6.  The trac instance runs in tracd, though it throws errors for some items like login, but I can't get past 500 errors in apache.  

The error I'm getting is:

import pkg_resources: /projects/project_deploy/cgi-bin/trac.fcgi
Traceback (most recent call last):: /projects/project_deploy/cgi-bin/trac.fcgi
File "/projects/project_deploy/cgi-bin/trac.fcgi", line 37, in <module>: /projects/project_deploy/cgi-bin/trac.fcgi
main(): /projects/project_deploy/cgi-bin/trac.fcgi
File "/projects/project_deploy/cgi-bin/trac.fcgi", line 34, in main: /projects/project_deploy/cgi-bin/trac.fcgi
     fcgi_frontend.run(): /projects/project_deploy/cgi-bin/trac.fcgi
  File "/home/user/.local/lib/python3.9/site-packages/trac/web/fcgi_frontend.py", line 54, in run: /projects/project_deploy/cgi-bin/trac.fcgi
     WSGIServer(dispatch_request, **params).run(): /projects/project_deploy/cgi-bin/trac.fcgi
File "/home/user/.local/lib/python3.9/site-packages/trac/web/_fcgi.py", line 1074, in run: /projects/project_deploy/cgi-bin/trac.fcgi
[pid 945737:tid 945824] [client 142.124.235.13:55226]     clientSock, addr = sock.accept(): /projects/project_deploy/cgi-bin/trac.fcgi
[pid 945737:tid 945824] [client 142.124.235.13:55226]   File "/usr/lib64/python3.9/socket.py", line 293, in accept: /projects/project_deploy/cgi-bin/trac.fcgi
[pid 945737:tid 945824] [client 142.124.235.13:55226]     fd, addr = self._accept(): /projects/project_deploy/cgi-bin/trac.fcgi
[pid 945737:tid 945824] [client 142.124.235.13:55226] OSError: [Errno 22] Invalid argument: /projects/project_deploy/cgi-bin/trac.fcgi
End of script output before headers: trac.fcgi

Alias /trac/chrome/common /projects/project_deploy/htdocs/common
Alias /trac/chrome/site /projects/project_deploy/htdocs/site

DefaultInitEnv TRAC_ENV /projects/project_deploy
<Directory "/projects/project_deploy/htdocs">
  Options Indexes FollowSymLinks
  AllowOverride None
  Require all granted
</Directory>
<Location "/trac/chrome/common">
  SetHandler None
</Location>
ScriptAlias /project /projects/project_deploy/cgi-bin/trac.fcgi
<Directory /project>
  Options Indexes FollowSymLinks
  Require all granted
</Directory>

I'm using the alternative in the fcgi script, 
os.environ['TRAC_ENV'] = '/projects/project_deploy'


I tried using my upgraded trac directory, and also tried doing a deploy and configuring that.  Selinux is running but I don't see any recent errors.  I'm running redhat 9.4, apache 2.4.57, trac 1.6, and Python 3.9.18.

Does anyone have advice?  I upgraded my apache configuration from 2.2 to 2.4 so I may have missed something obvious.  Static pages and subversion work now, though.

Thank you,

Gordon

Gordon McKinnon

unread,
Dec 9, 2024, 12:18:38 PM12/9/24
to Trac Users
I added ExecCGI and it's now throwing other errors (upgrade your schema, Forbidden).  So I missed an obvious apache config.  

Gordon McKinnon

unread,
Dec 9, 2024, 1:42:06 PM12/9/24
to Trac Users
And now it is working properly.  Nothing related to trac, I just missed some apache 2.4 config changes.
Reply all
Reply to author
Forward
0 new messages