nixos-unstable log file unwriteable

Open
#3 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
nginx

Research direction

Inspect nginx-binary-cache-proxy.nix around line 57 and compare the configured log path with the read-only /nix/store path shown in the failure. Reproduce the nginx service start and trace the related NixOS or nixpkgs change. Done means nginx starts successfully and its access log uses a writable location.

Written by the indexing model from the issue text.

Description

    Jun 15 01:25:52 dell-nixos systemd[1]: Starting Nginx Web Server...
    -- Subject: Unit nginx.service has begun start-up
    -- Defined-By: systemd
    -- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
    --
    -- Unit nginx.service has begun starting up.
    Jun 15 01:25:52 dell-nixos nginx-pre-start[19878]: nginx: [warn] could not build optimal types_hash, you should increase either types_hash_max_size: 1024 or types_hash_bucket_size: 64; ignoring types_hash_bucket_size
    Jun 15 01:25:52 dell-nixos nginx-pre-start[19878]: nginx: the configuration file /nix/store/6flkwwcrd2smyxq9s88jncjqsik55z76-nginx.conf syntax is ok
    Jun 15 01:25:52 dell-nixos nginx-pre-start[19878]: nginx: [emerg] open() "/nix/store/sg297sr4iji76br0511z17k4x35mpcbl-nginx-1.18.0/logs/access.log" failed (2: No such file or directory)
    Jun 15 01:25:52 dell-nixos nginx-pre-start[19878]: nginx: configuration file /nix/store/6flkwwcrd2smyxq9s88jncjqsik55z76-nginx.conf test failed
    Jun 15 01:25:52 dell-nixos systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE
    Jun 15 01:25:52 dell-nixos systemd[1]: nginx.service: Failed with result 'exit-code'.
    Jun 15 01:25:52 dell-nixos systemd[1]: Failed to start Nginx Web Server.
    -- Subject: Unit nginx.service has failed
    -- Defined-By: systemd
    -- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
    --
    -- Unit nginx.service has failed.
    --
    -- The result is RESULT.

https://github.com/nh2/nix-binary-cache-proxy/blob/b144bad7e95fc78ab50b2230df4920938899dab0/nginx-binary-cache-proxy.nix#L57
it used to write to /var/spool/nginx/logs/access.log
but now tries to write to the read only store. /nix/store/sg297sr4iji76br0511z17k4x35mpcbl-nginx-1.18.0/logs/access.log

seems likely to be related to this https://github.com/NixOS/nixpkgs/pull/85862#issuecomment-619948672

Dominant language
Nix
Stars
58
Forks
4
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from nh2/nix-binary-cache-proxy

All issues in nh2/nix-binary-cache-proxy

Similar issues

More DevOps issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.