!NhAsaYbbgmzHtXTPQJ:funklause.de

Nix NodeJS

209 Members
61 Servers

Load older messages


SenderMessageTime
12 Nov 2023
@lily:lily.flowersLily Foster(apologies if that sounded accusative. i only got up a bit ago and i guess am typing a bit short this morning)13:21:55
@peter-lustig:matrix.orgpeter-lustigok the systemd service still fails13:22:12
@peter-lustig:matrix.orgpeter-lustigso seems like that was not the issue13:22:16
@lily:lily.flowersLily Fosterit was 100% still an issue13:22:28
@lily:lily.flowersLily Fostereven if there are other ones13:22:33
@c0ba1t:matrix.orgCobaltIt may be helpful if you share the logs13:22:35
@c0ba1t:matrix.orgCobaltOr some kind of MRE13:23:16
@peter-lustig:matrix.orgpeter-lustig
The unit myapp.service has entered the 'failed' state with result 'exit-code'.
Nov 12 14:21:52 server systemd[1]: Failed to start My application
░░ Subject: A start job for unit myapp.service has failed
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ A start job for unit myapp.service has finished with a failure.
░░ 
░░ The job identifier is 1062533 and the job result is failed.
13:23:47
@peter-lustig:matrix.orgpeter-lustigdoes not help much13:23:50
@peter-lustig:matrix.orgpeter-lustigit is not specific13:23:55
@lily:lily.flowersLily Foster
In reply to @peter-lustig:matrix.org

Here is my current systemd service:

systemd.services.myservice = {
    wantedBy = ["multi-user.target"];
    after = ["network-online.target"];
    serviceConfig = {
      Type = "simple";
      ExecStart = "PORT=5173 ${pkgs.nodejs_20}/bin/node .";
      WorkingDirectory = inputs.myservice.packages.${pkgs.system}.default;
      Restart = "always";
    };
  };
(also you probably want that to be wants = [ "network-online.target"] instead of after, since the former sets up an explicitly dependency but after only does ordering. it works for now, but we're going to be making multi-user.target no longer depend on network-online.target at some point)
13:24:21
@szucsitg:matrix.orgszucsitg
In reply to @lily:lily.flowers
can you ping me in like 5 hours? i'm running an event at the moment, but can help later
Maybe now?
13:25:35
@lily:lily.flowersLily Foster
In reply to @szucsitg:matrix.org
Maybe now?
yeah sure! apologies for forgetting yesterday (was a busy day)
13:25:52
@peter-lustig:matrix.orgpeter-lustig
In reply to @peter-lustig:matrix.org
The unit myapp.service has entered the 'failed' state with result 'exit-code'.
Nov 12 14:21:52 server systemd[1]: Failed to start My application
░░ Subject: A start job for unit myapp.service has failed
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ A start job for unit myapp.service has finished with a failure.
░░ 
░░ The job identifier is 1062533 and the job result is failed.
as you can see it does not give me any info Cobalt
13:25:57
@lily:lily.flowersLily Fostercan you share your updated service definition?13:26:46
@lily:lily.flowersLily Fosterthat usually means systemd couldn't exec the command at all13:27:04
@peter-lustig:matrix.orgpeter-lustig
systemd.services.myapp = {
    description = "My application";
    wantedBy = ["multi-user.target"];
    wants = ["network-online.target"];
    serviceConfig = {
      Type = "simple";
      Environment = "PORT=5173";
      ExecStart = "${pkgs.nodejs_20}/bin/node .";
      WorkingDirectory = inputs.myapp.packages.${pkgs.system}.default;
      Restart = "always";
    };
  };
13:27:43
@lily:lily.flowersLily Foster
In reply to @szucsitg:matrix.org
Maybe now?
So I was meaning the actual like workspaces field in package.json
13:28:51
@lily:lily.flowersLily Fosterif you're not using it, then they are entirely separate packages13:28:57
@lily:lily.flowersLily Foster
In reply to @peter-lustig:matrix.org
systemd.services.myapp = {
    description = "My application";
    wantedBy = ["multi-user.target"];
    wants = ["network-online.target"];
    serviceConfig = {
      Type = "simple";
      Environment = "PORT=5173";
      ExecStart = "${pkgs.nodejs_20}/bin/node .";
      WorkingDirectory = inputs.myapp.packages.${pkgs.system}.default;
      Restart = "always";
    };
  };
Could you share /etc/systemd/system/services/myapp.service from the system too, so we can see what like the workingdirectory and stuff expanded to?
13:29:28
@peter-lustig:matrix.orgpeter-lustig
In reply to @lily:lily.flowers
Could you share /etc/systemd/system/services/myapp.service from the system too, so we can see what like the workingdirectory and stuff expanded to?
yes
13:31:32
@peter-lustig:matrix.orgpeter-lustig
[Unit]
Description=My application
Wants=network-online.target

[Service]
Environment="LOCALE_ARCHIVE=/nix/store/zi9m92xiz904cc6d9w41mb6c95q7yahn-glibc-locales-2.38-23/lib/locale/locale-archive"
Environment="PATH=/nix/store/vwkvhj69z4qqgmpa2lwm97kabf12p26r-coreutils-9.3/bin:/nix/store/qyzfglbrqb5ck0dgljplin2bvc4995w7-findutils-4.9.0/bin:/nix/store/p2r51wfg9m3ga7pp7avslpfhfa7w5y83-gnugrep-3.11/bin:/nix/store/g5p3ky90xa05ggg5szyb0pbbl2vp7n03-gnused-4.9/bin:/nix/store/vapnrxrw3b21c7ji61bmnbzl2cj1vl96-systemd-254.3/bin:/nix/store/vwkvhj69z4qqgmpa2lwm97kabf12p26r-coreutils-9.3/sbin:/nix/store/qyzfglbrqb5ck0dgljplin2bvc4995w7-findutils-4.9.0/sbin:/nix/store/p2r51wfg9m3ga7pp7avslpfhfa7w5y83-gnugrep-3.11/sbin:/nix/store/g5p3ky90xa05ggg5szyb0pbbl2vp7n03-gnused-4.9/sbin:/nix/store/vapnrxrw3b21c7ji61bmnbzl2cj1vl96-systemd-254.3/sbin"
Environment="TZDIR=/nix/store/cf0gxd6nyr6shkkn0ca82bap1x8r0f9x-tzdata-2023c/share/zoneinfo"



Environment=PORT=5173
ExecStart=/nix/store/17g2kfxglsl3rncfasqrxqs2g3bjin3k-nodejs-20.9.0/bin/node .
Restart=always
Type=simple
WorkingDirectory=/nix/store/xixmhd827wd95j6748xv3zyn5cf3kb9x-build-my-application

Lily Foster

13:32:45
@lily:lily.flowersLily Foster What's in /nix/store/xixmhd827wd95j6748xv3zyn5cf3kb9x-build-my-application? should just be the build dir with index.js, right? 13:33:21
@lily:lily.flowersLily Fosterbecause yeah, no that looks like it should work now13:33:29
@peter-lustig:matrix.orgpeter-lustig
In reply to @lily:lily.flowers
What's in /nix/store/xixmhd827wd95j6748xv3zyn5cf3kb9x-build-my-application? should just be the build dir with index.js, right?
yep there is everything in there that is also there if I test it locally and run node .
13:33:51
@peter-lustig:matrix.orgpeter-lustigso idk why it is not working13:33:54
@peter-lustig:matrix.orgpeter-lustig ok Lily Foster so i think i found the culprit 13:34:33
@peter-lustig:matrix.orgpeter-lustig when I do cd that path and then node . 13:34:39
@peter-lustig:matrix.orgpeter-lustigthis comes13:34:42
@peter-lustig:matrix.orgpeter-lustigimage.png
Download image.png
13:35:12

Show newer messages


Back to Room ListRoom Version: 6