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

SSH substituter with nologin as shell should not result in serialized integer error #37287

Closed
msteen opened this issue Mar 18, 2018 · 12 comments · Fixed by NixOS/nix#5290
Closed
Assignees

Comments

@msteen
Copy link
Contributor

msteen commented Mar 18, 2018

Issue description

When the user of the SSH connection used by the SSH substituter does not have a shell configured it defaults to nologin, which causes the following error:

error: serialised integer 7161674624452356180 is too large for type 'j'

Which actually is the decimal representation of the first few letters of the following error reported by nologin (thanks @cleverca22 for figuring that out).

This account is currently not available.

Since with the release of Nix 2.0 it has become easy to setup a SSH substituter, so I expect that more people might run into this problem. I know of at least another that reported it on the IRC.

Instead of the serialized integer error it should just have reported the actual error, or at least it should have given a more specific error about the response being bogus.

Steps to reproduce

Forget to set users.users.<name>.shell for the user of the SSH substituter connection.

Technical details

  • system: "x86_64-linux"
  • host os: Linux 4.4.116, NixOS, 17.09.git.4daffb9 (Hummingbird)
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.0 (from nixos-unstable around 5 Mar)
  • channels(root): ""
  • channels(matthijs): ""
  • nixpkgs: /wheel/fork/nixpkgs (nixos-17.09 around 22 Feb)
@MMesch
Copy link
Contributor

MMesch commented Sep 4, 2018

I added some debug echo messages to my profile scripts and I got this error as well (with a different number). To fix it, I had to remove any output from the profiles ...

@tmplt
Copy link
Member

tmplt commented Oct 27, 2019

Just stumbled into this too. I figured

user.users.builder = {
  isNormalUser = false;
  openssh.authorizedKeys.keys = [ builderSshKey ];
};

should be enough on the server part, but alas.

@stale
Copy link

stale bot commented Jun 1, 2020

Thank you for your contributions.
This has been automatically marked as stale because it has had no activity for 180 days.
If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.
Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the
    related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse. 3. Ask on the #nixos channel on
    irc.freenode.net.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 1, 2020
@ajs124
Copy link
Member

ajs124 commented Jun 1, 2020

I'm >90% sure this issue is still valid.

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 1, 2020
@tartavull
Copy link

It is.

1 similar comment
@Michcioperz
Copy link

It is.

@stale
Copy link

stale bot commented Jun 28, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 28, 2021
@ajs124
Copy link
Member

ajs124 commented Jun 29, 2021

Probably still

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 29, 2021
@edolstra edolstra self-assigned this Sep 23, 2021
edolstra added a commit to edolstra/nix that referenced this issue Sep 23, 2021
…is "nologin"

Instead of

  error: serialised integer 7161674624452356180 is too large for type 'j'

we now get

  error: 'nix-store --serve' protocol mismatch from 'sshtest@localhost', got 'This account is currently not available.'

Fixes NixOS/nixpkgs#37287.
@edolstra
Copy link
Member

Made NixOS/nix#5290 to show a better error message. But I feel that nologin should print its message to stderr instead of stdout...

@zoechi
Copy link

zoechi commented Dec 11, 2023

I just run into this error running nixos-rebuild --target-host --flake .#my-host ...

@madorian
Copy link

madorian commented Feb 1, 2024

BASHY $ NIX_SSHOPTS="-o RequestTTY=force" nixos-rebuild switch --flake .#pi --target-host b0ef@10.0.0.68 --use-remote-sudo
warning: Git tree '/home/b0ef/repoman/2024-01-31.raspberrypi-nixos-example' is dirty
building the system configuration...
warning: Git tree '/home/b0ef/repoman/2024-01-31.raspberrypi-nixos-example' is dirty
(b0ef@10.0.0.68) Password:
copying 75 paths...
copying path '/nix/store/293hh61g82rgh4kvbv6x11bqqyaw55z5-binutils-2.40-lib' to 'ssh://b0ef@10.0.0.68'...
copying path '/nix/store/4ii7naj8bpfgc1y2lb79n822rpq9k6mb-firmware' to 'ssh://b0ef@10.0.0.68'...
copying path '/nix/store/5q208sbq6yydhmw8c0d7vm4kbsz0qf1k-graphite2-1.3.14' to 'ssh://b0ef@10.0.0.68'...
copying path '/nix/store/5c1lcvrw9f80wasrhsy7gvkrc6sr3d0j-local-cmds' to 'ssh://b0ef@10.0.0.68'...
copying path '/nix/store/559m992nchr7fl3i2zl67x55f71i55d6-gpm-unstable-2020-06-17' to 'ssh://b0ef@10.0.0.68'...
copying path '/nix/store/7xryf3yccz1i8yilw0cqicps2bxg4qcs-jansson-2.14' to 'ssh://b0ef@10.0.0.68'...
copying path '/nix/store/4ibrwiykc3jj2hgybnzaj3wpj067xxdm-libXi-1.8.1' to 'ssh://b0ef@10.0.0.68'...
copying path '/nix/store/5aa75npm01xjz7q9f14fndlwjmfy0hdc-ncompress-5.0' to 'ssh://b0ef@10.0.0.68'...
copying path '/nix/store/8d108bf94fj6b8j5v7hmly85pg7sj06x-duf-0.8.1' to 'ssh://b0ef@10.0.0.68'...
copying path '/nix/store/6cp9jdrnp0wsm2lxwxvy2lhmz1q9fvlz-libXfixes-6.0.1' to 'ssh://b0ef@10.0.0.68'...
copying path '/nix/store/9f39063n8x7qh97zcnn4206x1b623li6-fribidi-1.0.13' to 'ssh://b0ef@10.0.0.68'...
copying path '/nix/store/5vv4bsbcj4kdkvm9vsd8zx9jr6b0zsf6-libdatrie-2019-12-20-lib' to 'ssh://b0ef@10.0.0.68'...
copying path '/nix/store/686qkd0gmdnyl135m5xqsnh3848l3iin-giflib-5.2.1' to 'ssh://b0ef@10.0.0.68'...
copying path '/nix/store/clrj3m1kaackha4vnd28qb422xhmhp32-unit-systemd-makefs-.service' to 'ssh://b0ef@10.0.0.68'...
copying path '/nix/store/dlj8hm1vvpwimfaj1kj4kyqy4q77a4m1-gmp-6.3.0' to 'ssh://b0ef@10.0.0.68'...
copying path '/nix/store/fhkj0ywv8yp85b0qn685mm92wzlfrsrm-etc-sysctl.d-60-nixos.conf' to 'ssh://b0ef@10.0.0.68'...
copying path '/nix/store/fnqh1d823qg717xgxgnjni446pphq8iy-unit-systemd-fsck-.service' to 'ssh://b0ef@10.0.0.68'...
copying path '/nix/store/jrlbs24v34hprn9vpdkj4gnw085abdgm-libjpeg-turbo-2.1.5.1' to 'ssh://b0ef@10.0.0.68'...
copying path '/nix/store/cdq6hvignl3ran4dcb23b6afd86y8mx7-pcre-8.45' to 'ssh://b0ef@10.0.0.68'...
copying path '/nix/store/k5wz1hziijwg8rlyr766i3r8j8mp752b-isl-0.20' to 'ssh://b0ef@10.0.0.68'...
copying path '/nix/store/mgqkdf660x631bbidbqsyzl0c4bfynn3-m17n-db-1.8.5' to 'ssh://b0ef@10.0.0.68'...
copying path '/nix/store/fyfb9maxywiayqj64sxl348wr28f664x-libXrender-0.9.11' to 'ssh://b0ef@10.0.0.68'...
copying path '/nix/store/kcb03rg3mgcyvqdkhw0s6q30sbkyy8ap-linux-6.6.6-modules-shrunk' to 'ssh://b0ef@10.0.0.68'...
~& escape not available to multiplexed sessions
copying path '/nix/store/ilslhysr9dpqgjwd31iynmgs68x86xci-libxcb-1.16-dev' to 'ssh://b0ef@10.0.0.68'...
error (ignored): error: interrupted by the user
copying path '/nix/store/n76g3qn71c569h9l47mqm083lcmf2xsl-binutils-2.40' to 'ssh://b0ef@10.0.0.68'...
copying path '/nix/store/k7379ivzxg4m94vg43cj1yvzk2mjvcbj-expand-response-params' to 'ssh://b0ef@10.0.0.68'...
error (ignored): error: interrupted by the user
copying path '/nix/store/p9yqa7sh093rndj4yq7ch0c557ad1ha5-etc-fstab' to 'ssh://b0ef@10.0.0.68'...
copying path '/nix/store/nz212fm1gxpchr6spx73h2wap8casqhz-libXpm-3.5.17' to 'ssh://b0ef@10.0.0.68'...
error: serialised integer 7577342048918991461 is too large for type 'j'

@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/how-can-i-nixos-rebuild-on-the-pi-without-getting-the-error-serialized-integer-is-too-large-for-type/39108/2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants