bensheldon/good_job · error · GoodJob::SdNotify::NotifyError

#{e.class}: #{e.message}

Error message

#{e.class}: #{e.message}

What it means

Error "#{e.class}: #{e.message}" thrown in bensheldon/good_job.

Source

Thrown at lib/good_job/sd_notify.rb:151

  #
  # @raise [NotifyError] if there was an error communicating with the systemd
  #   socket
  #
  # @see https://www.freedesktop.org/software/systemd/man/sd_notify.html
  def self.notify(state, unset_env=false)
    sock = ENV["NOTIFY_SOCKET"]

    return nil if !sock

    ENV.delete("NOTIFY_SOCKET") if unset_env

    begin
      Addrinfo.unix(sock, :DGRAM).connect do |s|
        s.close_on_exec = true
        s.write(state)
      end
    rescue StandardError => e
      raise NotifyError, "#{e.class}: #{e.message}", e.backtrace
    end
  end
end

# FORK: Finish nesting inside GoodJob.
end

View on GitHub (pinned to 5fcde48f87)

Solutions

  1. This wraps an underlying sd_notify error; read the embedded exception class and message for the cause.
  2. Ensure NOTIFY_SOCKET is set and reachable, or do not call SdNotify outside of systemd.

Example fix

# Run under systemd with NotifyAccess configured, or skip sd_notify outside systemd

When it happens

Trigger: Thrown at lib/good_job/sd_notify.rb:151 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of bensheldon/good_job@5fcde48f87 (2026-08-23). Data as JSON: /api/errors/c463349f9e46b6c5. Report an issue: GitHub.