Skip to content

Code Server Culling 502 Bad Gateway: Missing mod_unixd and DirectoryIndex #3091

@EdisonSu768

Description

@EdisonSu768

Description

Currently, when accessing /api/kernels/ on the code-server image to retrieve the last_activity for culling purposes, the NGINX proxy returns a 502 Bad Gateway and the backend Apache HTTPD CGI server fails to start.

This is caused by two missing dependencies/configurations in the httpd.conf:

  1. Missing mod_unixd: HTTPD fails to start with AH00136: Server MUST relinquish startup privileges before accepting connections.
  2. Missing mime.types: HTTPD fails with AH01597: could not open mime types config file because mod_mime is loaded but the container doesn't have the file.
  3. Missing DirectoryIndex: Even after starting HTTPD, accessing /api/kernels/ returns a 404 because Apache does not know to serve access.cgi by default for the directory.

Expected Behavior

The culler should be able to successfully retrieve the JSON payload containing the last_activity from the code-server.

Proposed Fix

In codeserver/ubi9-python-3.12/httpd/httpd.conf:

  • Add LoadModule unixd_module modules/mod_unixd.so
  • Remove LoadModule mime_module modules/mod_mime.so
  • Add DirectoryIndex access.cgi to the /opt/app-root Directory block.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    📋 Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions