Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cockpit parameter services.cockpit.port is not honored anymore #371245

Open
elratt0r opened this issue Jan 5, 2025 · 0 comments
Open

Cockpit parameter services.cockpit.port is not honored anymore #371245

elratt0r opened this issue Jan 5, 2025 · 0 comments
Labels
0.kind: bug Something is broken

Comments

@elratt0r
Copy link

elratt0r commented Jan 5, 2025

Describe the bug

When setting a port with services.cockpit.port, the port stays on the default tcp/9090.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Enable cockpit package and set a different port
{ pkgs, ... }:
{
  environment.systemPackages = with pkgs; [
    cockpit
  ];
  services.cockpit = {
    enable = true;
    port = 80;
  };
}
  1. switch to config

  2. Observe "Listen" in systemd status

[root@nixos:~]# systemctl status cockpit.socket
● cockpit.socket - Cockpit Web Service Socket
     Loaded: loaded (/etc/systemd/system/cockpit.socket; enabled; preset: ignored)
    Drop-In: /nix/store/zagkwj3h5aa5795qi46xjx64bkmwgqd1-system-units/cockpit.socket.d
             └─overrides.conf
     Active: active (listening) since Sun 2025-01-05 21:03:14 CET; 26min ago
 Invocation: 55263513ec454452b811c5d9ace07735
   Triggers: ● cockpit.service
       Docs: man:cockpit-ws(8)
     Listen: [::]:9090 (Stream)
         IP: 0B in, 0B out
         IO: 0B read, 0B written
      Tasks: 0 (limit: 9425)
     Memory: 8K (peak: 1.8M)
        CPU: 33ms
     CGroup: /system.slice/cockpit.socket

Expected behavior

Cockpit socket should listen on the port assigned in the configuration.

Additional context

Changes in PR 369266 removed some generators, see also here in detail.

Workaround:

  systemd.sockets."cockpit" = {
    socketConfig = {
      ListenStream = 80;
    };
  };

Does not overwrite the listen on 9090 but at least adds another extra listening socket.

Metadata

 - system: `"x86_64-linux"`
 - host os: `Linux 6.12.8, NixOS, 24.11 (Vicuna), 24.11.712431.cbd8ec4de446`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.24.11`
 - channels(root): `"nixos-24.11"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Notify maintainers

@lucasew


Note for maintainers: Please tag this issue in your PR.


Add a 👍 reaction to issues you find important.

@elratt0r elratt0r added the 0.kind: bug Something is broken label Jan 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken
Projects
None yet
Development

No branches or pull requests

1 participant