Trying puma-dev service, it's not starting

I am trying to get puma-dev running and it comes with a nice systemctl service file to try. So I followed those instructions, and then tried to run my service, but it fails. There is nothing to really help in debugging why it fails though. Any hot tips on debugging services?

The service I placed in /lib/systemd/system as


ExecStart=/usr/local/bin/puma-dev -sysbind


The journalctl log shows this:

Jan 10 20:03:35 dave-macbookpro121 systemd[1]: Started puma-dev.service.
Jan 10 20:03:35 dave-macbookpro121 systemd[1]: puma-dev.service: Main process exited, code=exited, status=1/FAILURE
Jan 10 20:03:35 dave-macbookpro121 systemd[1]: puma-dev.service: Failed with result 'exit-code'.
Jan 10 20:03:35 dave-macbookpro121 systemd[1]: puma-dev.service: Scheduled restart job, restart counter is at 5.
Jan 10 20:03:35 dave-macbookpro121 systemd[1]: puma-dev.service: Start request repeated too quickly.
Jan 10 20:03:35 dave-macbookpro121 systemd[1]: puma-dev.service: Failed with result 'exit-code'.
Jan 10 20:03:35 dave-macbookpro121 systemd[1]: Failed to start puma-dev.service.


  Kernel: 6.6.10-zen1-1-zen arch: x86_64 bits: 64 compiler: gcc v: 13.2.1
    clocksource: tsc available: acpi_pm
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
    root=UUID=3ca8b255-f29c-4744-8324-8ca995444357 rw rootflags=subvol=@
    quiet resume=UUID=88aa211a-5bdb-49f3-a5f5-d8ac5cf926a3 loglevel=3
    mem_sleep_default=s2idle ibt=off
  Desktop: KDE Plasma v: 5.27.10 tk: Qt v: 5.15.12 wm: kwin_wayland vt: 1
    dm: SDDM Distro: Garuda Linux base: Arch Linux
  Type: Laptop System: Apple product: MacBookPro12,1 v: 1.0
    serial: <superuser required> Chassis: type: 9 v: Mac-E43C1C25D4880AD6
    serial: <superuser required>
  Mobo: Apple model: Mac-E43C1C25D4880AD6 v: MacBookPro12,1
    serial: <superuser required> UEFI: Apple v: 486. date: 08/03/2023
  ID-1: BAT0 charge: 49.0 Wh (80.6%) condition: 60.8/74.8 Wh (81.4%)
    volts: 11.9 min: 11.4 model: DP bq20z451 type: Li-ion serial: N/A
    status: discharging cycles: 210
  Info: model: Intel Core i5-5287U bits: 64 type: MT MCP arch: Broadwell
    gen: core 5 level: v3 note: check built: 2015-18 process: Intel 14nm
    family: 6 model-id: 0x3D (61) stepping: 4 microcode: 0x2F
  Topology: cpus: 1x cores: 2 tpc: 2 threads: 4 smt: enabled cache:
    L1: 128 KiB desc: d-2x32 KiB; i-2x32 KiB L2: 512 KiB desc: 2x256 KiB
    L3: 3 MiB desc: 1x3 MiB
  Speed (MHz): avg: 2400 high: 3300 min/max: 500/3300 scaling:
    driver: intel_cpufreq governor: schedutil cores: 1: 2901 2: 3300 3: 500
    4: 2900 bogomips: 23201
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities: <filter>
  Device-1: Intel Iris Graphics 6100 vendor: Apple driver: i915 v: kernel
    arch: Gen-8 process: Intel 14nm built: 2014-15 ports: active: eDP-1
    empty: DP-1, DP-2, HDMI-A-1, HDMI-A-2 bus-ID: 00:02.0 chip-ID: 8086:162b
    class-ID: 0300
  Display: wayland server: v: with: Xwayland v: 23.2.3
    compositor: kwin_wayland driver: X: loaded: modesetting
    alternate: fbdev,intel,vesa dri: iris gpu: i915 display-ID: 0
  Monitor-1: eDP-1 res: 1463x914 size: N/A modes: N/A
  API: EGL v: 1.5 hw: drv: intel iris platforms: device: 0 drv: iris
    device: 1 drv: swrast surfaceless: drv: iris wayland: drv: iris x11:
    drv: iris inactive: gbm
  API: OpenGL v: 4.6 compat-v: 4.5 vendor: intel mesa v: 23.3.2-arch1.2
    glx-v: 1.4 direct-render: yes renderer: Mesa Intel Iris Graphics 6100 (BDW
    GT3) device-ID: 8086:162b memory: 15.16 GiB unified: yes display-ID: :1.0
  API: Vulkan v: 1.3.274 layers: 9 device: 0 type: integrated-gpu name: Intel
    Iris Graphics 6100 (BDW GT3) driver: mesa intel v: 23.3.2-arch1.2
    device-ID: 8086:162b surfaces: xcb,xlib,wayland device: 1 type: cpu
    name: llvmpipe (LLVM 16.0.6 256 bits) driver: mesa llvmpipe
    v: 23.3.2-arch1.2 (LLVM 16.0.6) device-ID: 10005:0000
    surfaces: xcb,xlib,wayland
  Device-1: Intel Broadwell-U Audio vendor: Apple driver: snd_hda_intel
    v: kernel bus-ID: 00:03.0 chip-ID: 8086:160c class-ID: 0403
  Device-2: Intel Wildcat Point-LP High Definition Audio
    driver: snd_hda_intel v: kernel bus-ID: 00:1b.0 chip-ID: 8086:9ca0
    class-ID: 0403
  Device-3: Broadcom 720p FaceTime HD Camera driver: N/A pcie: gen: 2
    speed: 5 GT/s lanes: 1 bus-ID: 02:00.0 chip-ID: 14e4:1570 class-ID: 0480
  API: ALSA v: k6.6.10-zen1-1-zen status: kernel-api with: aoss
    type: oss-emulator tools: N/A
  Server-1: PipeWire v: 1.0.0 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
    4: pw-jack type: plugin tools: pactl,pw-cat,pw-cli,wpctl
  Device-1: Broadcom BCM43602 802.11ac Wireless LAN SoC vendor: Apple
    driver: brcmfmac v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1
    bus-ID: 03:00.0 chip-ID: 14e4:43ba class-ID: 0280
  IF: wlp3s0 state: up mac: <filter>
  Device-1: Apple Bluetooth Host Controller driver: btusb,hid-generic,usbhid
    type: USB rev: 2.0 speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 1-3:2
    chip-ID: 05ac:8290 class-ID: fe01
  Report: hciconfig ID: hci0 rfk-id: 0 state: up address: <filter> bt-v: 4.2
    lmp-v: 8 sub-v: 21a9 hci-v: 8 rev: 12d9 class-ID: 7c010c
  Info: acl-mtu: 1021:8 sco-mtu: 64:1 link-policy: rswitch sniff
    link-mode: peripheral accept service-classes: rendering, capturing, object
    transfer, audio, telephony
  Local Storage: total: 465.92 GiB used: 25.94 GiB (5.6%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/sda maj-min: 8:0 vendor: Apple model: SSD SM0512G
    size: 465.92 GiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s
    tech: SSD serial: <filter> fw-rev: JA0Q scheme: GPT
  ID-1: / raw-size: 448.54 GiB size: 448.54 GiB (100.00%)
    used: 25.94 GiB (5.8%) fs: btrfs dev: /dev/sda2 maj-min: 8:2
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
    used: 584 KiB (0.2%) fs: vfat dev: /dev/sda1 maj-min: 8:1
  ID-3: /home raw-size: 448.54 GiB size: 448.54 GiB (100.00%)
    used: 25.94 GiB (5.8%) fs: btrfs dev: /dev/sda2 maj-min: 8:2
  ID-4: /var/log raw-size: 448.54 GiB size: 448.54 GiB (100.00%)
    used: 25.94 GiB (5.8%) fs: btrfs dev: /dev/sda2 maj-min: 8:2
  ID-5: /var/tmp raw-size: 448.54 GiB size: 448.54 GiB (100.00%)
    used: 25.94 GiB (5.8%) fs: btrfs dev: /dev/sda2 maj-min: 8:2
  Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default) zswap: no
  ID-1: swap-1 type: zram size: 15.52 GiB used: 138 MiB (0.9%) priority: 100
    comp: zstd avail: lzo,lzo-rle,lz4,lz4hc,842 max-streams: 4 dev: /dev/zram0
  ID-2: swap-2 type: partition size: 17.08 GiB used: 0 KiB (0.0%)
    priority: -2 dev: /dev/sda3 maj-min: 8:3
  System Temperatures: cpu: 63.0 C pch: 62.0 C mobo: N/A
  Fan Speeds (rpm): N/A
  Processes: 246 Uptime: 2d 4h 5m wakeups: 10 Memory: total: 16 GiB
  available: 15.52 GiB used: 5.19 GiB (33.4%) Init: systemd v: 255
  default: graphical tool: systemctl Compilers: gcc: 13.2.1 clang: 16.0.6
  Packages: pm: pacman pkgs: 1967 libs: 565 tools: octopi,paru Shell: Zsh
  v: 5.9 running-in: alacritty inxi: 3.3.31
Garuda (2.6.22-1):
  System install date:     2023-12-24
  Last full system update: 2024-01-10 ↻
  Is partially upgraded:   No
  Relevant software:       snapper NetworkManager dracut
  Windows dual boot:       No/Undetected
  Failed units:            puma-dev.service

Make sure you have done the following before you post:

Issue still unresolved? Then:

  • ONE issue per topic.
  • Describe your issue in detail. The more we know, the better we can help
  • Show us the results of your searches, and what you’ve tried
  • After rebooting, post the FULL output of garuda-inxi in the body of the post (not linked externally, or collapsed with the “hide details” feature)
  • Format terminal output (including your garuda-inxi) as a code block by clicking the preformatted text button (</>) , or put three tildes (~) above and below the text

Without garuda-inxi this request will be moved to 412 Precondition Failed

So… is it solved or not?
Looks like it’s still failing to start, or is that just the error before fixing the user?

Failed units: puma-dev.service

And I guess you’re not installing by the (out-of-date) AUR package?
Not a problem, but I don’t think setting User=root in a system unit is necessary, that should be default.

it remains broken sadly… changing User to root ruined the service in that now it looks in directory /root/ for things, not my home directory.

So I do not know how to get the service to start properly. it just fails with no indication as to why.

What is the output when you run this command in the terminal?

1 Like

See the AUR package page, “Sources” section for example of the two (user and system) systemd units.
That package is sadly marked out-of-date since 2022 so I don’t know if it’s good to install that.
Then, see GitHub - puma/puma-dev: A tool to manage rack apps in development with puma

First, ensure that the puma gem is installed. It probably belongs in the Gemfile of the application(s) you’re trying to serve via puma-dev.


When puma-dev is installed as a user agent (the default mode), it will log output from itself and the apps to ~/Library/Logs/puma-dev.log. You can refer to there to find out if apps have started and look for errors.

note that the ~/Library path looks MacOS to me, perhaps the log file is elsewhere.

puma-dev.service: Main process exited, code=exited, status=1/FAILURE
puma-dev.service: Failed with result 'exit-code'.

/usr/bin/puma-dev apparently exits with error code.
Try running it from command line (either with sudo or without -sysbind).

I decided to move the executable to my home directory, and then added the service to my ~/.config/systemd/user/ directory. Not sure if that was smart, but it seemed like the right thing to do.

So I did a systemctl --user enable puma-dev followed by systemctl --user start puma-dev and the service said it started!

So that was nice. But I had to really hack the example back. I had to remove the User= entry, and the target, it said was not a thing, so I changed that to

All that hacking and while it runs, it does not work yet. I know that is no one’s fault but mine, but wow. This package on Linux is painful! I hope to one day be able to work in Linux with the tools I used on MacOS… but these small things really present huge hurdles!

1 Like

Yeah, I see on github that it requires some further steps to run on Linux, also searching “linux” in the issues perhaps there’s something useful (there are a few).

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.