[erlang-questions] systemd and attach

Roger Lipscombe roger@REDACTED
Wed Dec 27 10:49:55 CET 2017


Not a direct answer to your question, but we generally use "bin/test
foreground" to run the service (i.e. non-forking) and then use
"bin/test remote_console", rather than "attach".

On 24 December 2017 at 15:20, Sid Muller <sid5@REDACTED> wrote:
> Hi there-
>
> I am trying to get a rebar style application to work with systemd as a service and it's mostly working. The application comes up just as if I typed in "bin/test start" but when I type "bin/test attach" then the shell just hangs in this state:
> ===================================================
> root@REDACTED:/test# bin/test attach
> Attaching to /tmp/erl_pipes/test/erlang.pipe.1 (^D to exit)
>
> ^L
> ===================================================
>
> But when I run "systemctl stop test.service" and then "bin/test start" the "bin/test attach" works fine. I have not been able to get attach to work with systemd no matter what I try. My systemd script is:
>
> --------------------------------------------------
> [Unit]
> Description=test
> Requires=network-online.target remote-fs-pre.target
> Before=remote-fs-pre.target
> After=network.target network-online.target
> Conflicts=shutdown.target reboot.target
> Before=shutdown.target reboot.target
>
> [Service]
> Type=forking
> WorkingDirectory=/test
> ExecStart=/test/bin/test start
> ExecStop=/test/bin/test stop
> SuccessExitStatus=0 1
>
>
> [Install]
> WantedBy=multi-user.target
> ---------------------------------------------------
>
> Does anyone have any suggestions? I am stumped.
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions



More information about the erlang-questions mailing list