Skip to content

Freenet Fails with No Such File or Directory #339330

Description

@mkb2091

Describe the bug

Freenet installs successfully but fails to run for both the service and the package with

find: ‘/nix/store/4kz7pkzz1kgkx12jh3r8a8lgzi6lf2yq-freenet-01497/deps/’: No such file or directory
Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/jna/Platform
        at freenet.support.ProcessPriority.enterBackgroundMode(ProcessPriority.java:63)
        at freenet.node.NodeStarter.main(NodeStarter.java:264)
Caused by: java.lang.ClassNotFoundException: com.sun.jna.Platform
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
        at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
        ... 2 more

Steps To Reproduce

Steps to reproduce the behavior:

  1. nix-shell -p freenet
  2. freenet
  3. Failure with
find: ‘/nix/store/4kz7pkzz1kgkx12jh3r8a8lgzi6lf2yq-freenet-01497/deps/’: No such file or directory
Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/jna/Platform
        at freenet.support.ProcessPriority.enterBackgroundMode(ProcessPriority.java:63)
        at freenet.node.NodeStarter.main(NodeStarter.java:264)
Caused by: java.lang.ClassNotFoundException: com.sun.jna.Platform
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
        at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
        ... 2 more

Or alternatively with the service

  1. Add services.freenet.enable = true; to config
  2. nixos-rebuild switch
  3. systemctl status freenet
× freenet.service - Freenet daemon
     Loaded: loaded (/etc/systemd/system/freenet.service; enabled; preset: enabled)
     Active: failed (Result: exit-code) since Tue 2024-09-03 20:34:50 BST; 9min ago
   Duration: 89ms
 Invocation: 67b54c0227884349a9932cce8edc9cea
    Process: 415 ExecStart=/nix/store/4kz7pkzz1kgkx12jh3r8a8lgzi6lf2yq-freenet-01497/bin/freenet (code=exited, status=1/FAILURE)
   Main PID: 415 (code=exited, status=1/FAILURE)
   Mem peak: 20.4M
        CPU: 127ms

Sep 03 20:34:50 freenet freenet[415]: Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/jna/Platform
Sep 03 20:34:50 freenet freenet[415]:         at freenet.support.ProcessPriority.enterBackgroundMode(ProcessPriority.java:63)
Sep 03 20:34:50 freenet freenet[415]:         at freenet.node.NodeStarter.main(NodeStarter.java:264)
Sep 03 20:34:50 freenet freenet[415]: Caused by: java.lang.ClassNotFoundException: com.sun.jna.Platform
Sep 03 20:34:50 freenet freenet[415]:         at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
Sep 03 20:34:50 freenet freenet[415]:         at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
Sep 03 20:34:50 freenet freenet[415]:         at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
Sep 03 20:34:50 freenet freenet[415]:         ... 2 more
Sep 03 20:34:50 freenet systemd[1]: freenet.service: Main process exited, code=exited, status=1/FAILURE
Sep 03 20:34:50 freenet systemd[1]: freenet.service: Failed with result 'exit-code'.

Expected behavior

For Freenet to start and be able to access setup wizard on 127.0.0.1:8888

Additional context

Add any other context about the problem here.

Notify maintainers

@nagy

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
fetching path input 'path:/nix/store/bd4fmzws6n5542khxbifbkr6nrygi232-source'
 - system: `"x86_64-linux"`
 - host os: `Linux 6.6.32-hardened1, NixOS, 24.11 (Vicuna), 24.11.20240831.12228ff`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Lix, like Nix) 2.91.0
System type: x86_64-linux
Additional system types: i686-linux, x86_64-v1-linux, x86_64-v2-linux, x86_64-v3-linux
Features: gc, signed-caches
System configuration file: /etc/nix/nix.conf
User configuration files: /home/mkb/.config/nix/nix.conf:/nix/store/i76mf8pn2zvki5hafjbzjcv8xpm7gxrg-plasma-workspace-6.1.4/etc/xdg/nix/nix.conf:/nix/store/2icgk2nj170dnhf39497i4nsrvkq995z-kglobalacceld-6.1.4/etc/xdg/nix/nix.conf:/nix/store/wdq2jl163f61kp8xqxhhgn3l5i1924dv-baloo-6.5.0/etc/xdg/nix/nix.conf:/home/mkb/.config/kdedefaults/nix/nix.conf:/nix/store/i76mf8pn2zvki5hafjbzjcv8xpm7gxrg-plasma-workspace-6.1.4/etc/xdg/nix/nix.conf:/nix/store/2icgk2nj170dnhf39497i4nsrvkq995z-kglobalacceld-6.1.4/etc/xdg/nix/nix.conf:/nix/store/wdq2jl163f61kp8xqxhhgn3l5i1924dv-baloo-6.5.0/etc/xdg/nix/nix.conf:/nix/store/i76mf8pn2zvki5hafjbzjcv8xpm7gxrg-plasma-workspace-6.1.4/etc/xdg/nix/nix.conf:/nix/store/2icgk2nj170dnhf39497i4nsrvkq995z-kglobalacceld-6.1.4/etc/xdg/nix/nix.conf:/nix/store/wdq2jl163f61kp8xqxhhgn3l5i1924dv-baloo-6.5.0/etc/xdg/nix/nix.conf:/home/mkb/.config/kdedefaults/nix/nix.conf:/etc/xdg/nix/nix.conf:/home/mkb/.nix-profile/etc/xdg/nix/nix.conf:/nix/profile/etc/xdg/nix/nix.conf:/home/mkb/.local/state/nix/profile/etc/xdg/nix/nix.conf:/etc/profiles/per-user/mkb/etc/xdg/nix/nix.conf:/nix/var/nix/profiles/default/etc/xdg/nix/nix.conf:/run/current-system/sw/etc/xdg/nix/nix.conf
Store directory: /nix/store
State directory: /nix/var/nix
Data directory: /nix/store/priv3b9xa3mq2qs5qf4c48aw8b2fd9lf-lix-2.91.0/share`
 - channels(root): `"home-manager, nixos"`
 - nixpkgs: `/nix/store/bd4fmzws6n5542khxbifbkr6nrygi232-source`

Add a 👍 reaction to issues you find important.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions