[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#73110: 29.4; emacs.service failed with result 'timeout'
From: |
Eli Zaretskii |
Subject: |
bug#73110: 29.4; emacs.service failed with result 'timeout' |
Date: |
Sat, 07 Sep 2024 20:45:23 +0300 |
> From: Patrick Nicodemus <gadget142@gmail.com>
> Date: Sat, 7 Sep 2024 13:22:30 -0400
>
> I want to run Emacs as a service and connect to it with a client. I
> followed the instructions here:
>
> https://www.gnu.org/software/emacs/manual/html_node/emacs/Emacs-Server.html
>
> and ran the command
> systemctl --user enable emacs
>
> This apparently creates a file at
> ~/.config/systemd/user/default.target.wants/emacs.service
>
> whose contents are:
>
> [Unit]
> Description=Emacs text editor
> Documentation=info:emacs man:emacs(1) https://gnu.org/software/emacs/
>
> [Service]
> Type=notify
> ExecStart=/usr/local/bin/emacs --fg-daemon
>
> # Emacs will exit with status 15 after having received SIGTERM, which
> # is the default "KillSignal" value systemd uses to stop services.
> SuccessExitStatus=15
>
> # The location of the SSH auth socket varies by distribution, and some
> # set it from PAM, so don't override by default.
> # Environment=SSH_AUTH_SOCK=%t/keyring/ssh
> Restart=on-failure
>
> [Install]
> WantedBy=default.target
>
> The directions also say:
> (If your Emacs was installed into a non-standard location, you may need
> to copy the emacs.service file to a standard directory such as
> ~/.config/systemd/user/.)
>
> I built this emacs distribution from source and installed it using "sudo
> make install"; the executable is at /usr/local/bin/emacs, so I don't
> think it is installed in a non-standard location, and so I did not
> follow these instructions.
>
> I modified the [Service] command above to include the -Q flag for the
> purposes of this bug report.
>
> After activating the service, restarting, etc., my journalctl output is
> as follows:
>
> Sep 07 12:52:45 patrick-ThinkPad-X1-Carbon-Gen-10 systemd[2704]:
> emacs.service: start operation timed out. Terminating.
> Sep 07 12:52:45 patrick-ThinkPad-X1-Carbon-Gen-10 systemd[2704]:
> emacs.service: Failed with result 'timeout'.
> Sep 07 12:52:45 patrick-ThinkPad-X1-Carbon-Gen-10 systemd[2704]:
> Failed to start emacs.service - Emacs text editor.
> Sep 07 12:52:46 patrick-ThinkPad-X1-Carbon-Gen-10 systemd[2704]:
> emacs.service: Scheduled restart job, restart counter is at 1.
> Sep 07 12:52:46 patrick-ThinkPad-X1-Carbon-Gen-10 systemd[2704]:
> Starting emacs.service - Emacs text editor...
> Sep 07 12:52:46 patrick-ThinkPad-X1-Carbon-Gen-10 emacs[183514]:
> Starting Emacs daemon.
> Sep 07 12:54:16 patrick-ThinkPad-X1-Carbon-Gen-10 systemd[2704]:
> emacs.service: start operation timed out. Terminating.
> Sep 07 12:54:16 patrick-ThinkPad-X1-Carbon-Gen-10 systemd[2704]:
> emacs.service: Failed with result 'timeout'.
> Sep 07 12:54:16 patrick-ThinkPad-X1-Carbon-Gen-10 systemd[2704]:
> Failed to start emacs.service - Emacs text editor.
> Sep 07 12:54:16 patrick-ThinkPad-X1-Carbon-Gen-10 systemd[2704]:
> emacs.service: Scheduled restart job, restart counter is at 2.
> Sep 07 12:54:16 patrick-ThinkPad-X1-Carbon-Gen-10 systemd[2704]:
> Starting emacs.service - Emacs text editor...
> Sep 07 12:54:16 patrick-ThinkPad-X1-Carbon-Gen-10 emacs[183623]:
> Starting Emacs daemon.
> Sep 07 12:55:46 patrick-ThinkPad-X1-Carbon-Gen-10 systemd[2704]:
> emacs.service: start operation timed out. Terminating.
> Sep 07 12:55:46 patrick-ThinkPad-X1-Carbon-Gen-10 systemd[2704]:
> emacs.service: Failed with result 'timeout'.
> Sep 07 12:55:46 patrick-ThinkPad-X1-Carbon-Gen-10 systemd[2704]:
> Failed to start emacs.service - Emacs text editor.
> Sep 07 12:55:47 patrick-ThinkPad-X1-Carbon-Gen-10 systemd[2704]:
> emacs.service: Scheduled restart job, restart counter is at 3.
> Sep 07 12:55:47 patrick-ThinkPad-X1-Carbon-Gen-10 systemd[2704]:
> Starting emacs.service - Emacs text editor...
> Sep 07 12:55:47 patrick-ThinkPad-X1-Carbon-Gen-10 emacs[183684]:
> Starting Emacs daemon.
>
> etc., etc., every ninety seconds.
>
> For some reason emacs is not successfully communicating to systemd that
> it has launched successfully, and so systemd terminates emacs.
According to this:
> Configured features:
> ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ
> IMAGEMAGICK JPEG JSON LCMS2 LIBSELINUX LIBXML2 MODULES NATIVE_COMP
> NOTIFY INOTIFY PDUMPER PGTK PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF
> TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XIM XWIDGETS GTK3 ZLIB
your Emacs is built without libsystemd support, which I think is
required for this to work? Or maybe I'm missing something.