Menu

Trac is down

2022-02-13
2022-02-13
  • Daniel Marjamäki

    I have upgraded the server and unfortunately there are issues with lighttpd. Therefore our trac is down right now. :-(

    here is error.log:

    2022-02-13 17:02:45: server.c.1513) server started (lighttpd/1.4.59)
    2022-02-13 17:02:45: mod_deflate.c.567) DEPRECATED: compress.filetype replaced with deflate.mimetypes
    2022-02-13 17:02:45: mod_deflate.c.580) DEPRECATED: compress.cache-dir replaced with deflate.cache-dir
    2022-02-13 17:02:45: gw_backend.c.475) unlink /var/run/tmp/trac.sock-0 after connect failed: Connection refused
    2022-02-13 17:02:45: gw_backend.c.325) child exited: 2 unix:/var/run/tmp/trac.sock-0
    2022-02-13 17:02:45: gw_backend.c.601) gw-backend failed to start: /var/www/trac.fcgi
    2022-02-13 17:02:45: gw_backend.c.603) If you're trying to run your app as a FastCGI backend, make sure you're using the FastCGI-enabled version.  If this is PHP on Gentoo, add 'fastcgi' to the USE flags.  If this is PHP, try removing the bytecode caches for now and try again.
    2022-02-13 17:02:45: gw_backend.c.1655) [ERROR]: spawning gw failed.
    2022-02-13 17:02:45: server.c.1517) Configuration of plugins failed. Going down.
    

    If anybody knows anything let me know.

    Do you know how I can fix those DEPRECATED messages? The config is:

    server.modules = (
            "mod_access",
            "mod_alias",
            "mod_auth",
            "mod_compress",
            "mod_fastcgi",
            "mod_openssl",
            "mod_redirect"
    )
    
    server.document-root        = "/var/www/html"
    server.upload-dirs          = ( "/var/cache/lighttpd/uploads" )
    accesslog.filename          = "/var/log/lighttpd/access.log"
    server.errorlog             = "/var/log/lighttpd/error.log"
    server.pid-file             = "/var/run/lighttpd.pid"
    server.username             = "www-data"
    server.groupname            = "www-data"
    server.port                 = 80
    
    # strict parsing and normalization of URL for consistency and security
    # https://redmine.lighttpd.net/projects/lighttpd/wiki/Server_http-parseoptsDetails
    # (might need to explicitly set "url-path-2f-decode" = "disable"
    #  if a specific application is encoding URLs inside url-path)
    server.http-parseopts = (
      "header-strict"           => "enable",# default
      "host-strict"             => "enable",# default
      "host-normalize"          => "enable",# default
      "url-normalize-unreserved"=> "enable",# recommended highly
      "url-normalize-required"  => "enable",# recommended
      "url-ctrls-reject"        => "enable",# recommended
      "url-path-2f-decode"      => "enable",# recommended highly (unless breaks app)
     #"url-path-2f-reject"      => "enable",
      "url-path-dotseg-remove"  => "enable",# recommended highly (unless breaks app)
     #"url-path-dotseg-reject"  => "enable",
     #"url-query-20-plus"       => "enable",# consistency in query string
    )
    
    index-file.names            = ( "index.php", "index.html" )
    url.access-deny             = ( "~", ".inc" )
    static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
    
    compress.cache-dir          = "/var/cache/lighttpd/compress/"
    compress.filetype           = ( "application/javascript", "text/css", "text/html", "text/plain" )
    
    # default listening port for IPv6 falls back to the IPv4 port
    include_shell "/usr/share/lighttpd/use-ipv6.pl " + server.port
    include_shell "/usr/share/lighttpd/create-mime.conf.pl"
    include "/etc/lighttpd/conf-enabled/*.conf"
    
    # Configure SSL
    $SERVER["socket"] == ":443" {
        ssl.engine                  = "enable" 
        ssl.pemfile                 = "/etc/letsencrypt/live/trac.cppcheck.net/ssl.pem" 
        ssl.ca-file                 =  "/etc/letsencrypt/live/trac.cppcheck.net/fullchain.pem"
        ssl.dh-file                 = "/etc/ssl/certs/dhparam.pem" 
        ssl.ec-curve                = "secp384r1"
        ssl.honor-cipher-order      = "enable"
        ssl.cipher-list             = "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH"
        ssl.use-compression         = "disable"
        setenv.add-response-header  = (
            "Strict-Transport-Security" => "max-age=63072000; includeSubdomains; preload",
            "X-Frame-Options" => "DENY",
            "X-Content-Type-Options" => "nosniff"
        )
        ssl.use-sslv2 = "disable"
        ssl.use-sslv3 = "enable"
    }
    
    # Redirect http connections to https
    $HTTP["scheme"] == "http" {
        # capture vhost name with regex conditiona -> %0 in redirect pattern
        # must be the most inner block to the redirect rule
        $HTTP["host"] =~ ".*" {
            url.redirect = (".*" => "https://%0$0")
        }
    }
    
    # Run /var/trac-cppcheck
    $HTTP["host"] == "trac.cppcheck.net" {
        server.document-root = "/var/trac-cppcheck"
        auth.backend.htpasswd.userfile = "/var/trac-cppcheck/.htpasswd"
    
        $HTTP["url"] =~ "^/" {
            fastcgi.server    = (
                "/" => (
                    (
                        # options needed to have lighty spawn trac
                        "bin-path"        => "/var/www/trac.fcgi",
                        "min-procs"       => 1,
                        "max-procs"       => 1,
                        "bin-environment" => (
                            "TRAC_ENV_PARENT_DIR" => "/var/trac-cppcheck/",
                        ),
    
                        # options needed in all cases
                        "socket"          => "/tmp/trac.sock",
                        "check-local"     => "disable",
    
                        # optional
                        "disable-time"    => 1,
    
                        # needed if trac_prefix is empty; and you need >= 1.4.23
                        "fix-root-scriptname" => "enable",
                    ),
                ),
            )
        } # end of $HTTP["url"] =~ "^/" 
    } # end of $HTTP["host"] == "trac.cppcheck.net" 
    
     
  • Daniel Marjamäki

    The Trac installation is not working well. Trac uses python 2.x and that was removed from debian. Well I could install python 2.x but I still get some problems..

    root@cppcheck1:~# lighttpd -D -f /etc/lighttpd/lighttpd.conf
    2022-02-13 19:06:38: configfile.c.461) Warning: "mod_compress" is DEPRECATED and has been replaced with "mod_deflate".  A future release of lighttpd 1.4.x will not contain mod_compress and lighttpd may fail to start up
    2022-02-13 19:06:38: mod_openssl.c.2475) SSL: ssl.use-sslv2 is deprecated and will soon be removed.  It is disabled by default.  Many modern TLS libraries no longer support SSLv2.
    2022-02-13 19:06:38: mod_openssl.c.2482) SSL: ssl.use-sslv3 is deprecated and will soon be removed.  It is disabled by default.  Many modern TLS libraries no longer support SSLv3.
    2022-02-13 19:06:38: mod_openssl.c.2487) SSL: If needed, use: ssl.openssl.ssl-conf-cmd = ("MinProtocol" => "SSLv3")
    Traceback (most recent call last):
      File "/var/www/trac.fcgi", line 5, in <module>
        from trac.web import fcgi_frontend
    ModuleNotFoundError: No module named 'trac'
    

    Somehow I need to ensure that trac is found .. do you have some clever ideas?
    As far as I see the trac files are saved in path /usr/local/lib/python2.7/dist-packages/trac/

     
    • Daniel Marjamäki

      hmm..

      root@cppcheck1:~# PYTHONPATH=/usr/local/lib/python2.7/dist-packages  lighttpd -D -f /etc/lighttpd/lighttpd.conf
      2022-02-13 19:12:46: configfile.c.461) Warning: "mod_compress" is DEPRECATED and has been replaced with "mod_deflate".  A future release of lighttpd 1.4.x will not contain mod_compress and lighttpd may fail to start up
      2022-02-13 19:12:46: mod_openssl.c.2475) SSL: ssl.use-sslv2 is deprecated and will soon be removed.  It is disabled by default.  Many modern TLS libraries no longer support SSLv2.
      2022-02-13 19:12:46: mod_openssl.c.2482) SSL: ssl.use-sslv3 is deprecated and will soon be removed.  It is disabled by default.  Many modern TLS libraries no longer support SSLv3.
      2022-02-13 19:12:46: mod_openssl.c.2487) SSL: If needed, use: ssl.openssl.ssl-conf-cmd = ("MinProtocol" => "SSLv3")
      Traceback (most recent call last):
        File "/var/www/trac.fcgi", line 5, in <module>
          from trac.web import fcgi_frontend
        File "/usr/local/lib/python2.7/dist-packages/trac/web/__init__.py", line 19, in <module>
          from trac.web.api import *
        File "/usr/local/lib/python2.7/dist-packages/trac/web/api.py", line 18, in <module>
          from BaseHTTPServer import BaseHTTPRequestHandler
      ModuleNotFoundError: No module named 'BaseHTTPServer'
      
       
  • Daniel Marjamäki

    Trac seems to be up now again.

    The error.log says:

    2022-02-13 19:25:05: mod_deflate.c.567) DEPRECATED: compress.filetype replaced with deflate.mimetypes
    2022-02-13 19:25:05: mod_deflate.c.580) DEPRECATED: compress.cache-dir replaced with deflate.cache-dir
    2022-02-13 19:25:05: configfile.c.1142) WARNING: unknown config-key: accesslog.filename (ignored)
    2022-02-13 19:25:05: configfile.c.1142) WARNING: unknown config-key: ssl.use-compression (ignored)
    2022-02-13 19:25:05: configfile.c.1142) WARNING: unknown config-key: setenv.add-response-header (ignored)
    2022-02-13 19:25:05: configfile.c.1142) WARNING: unknown config-key: auth.backend.htpasswd.userfile (ignored)
    

    Any help to resolve those would be appreciated!

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.