[erlang-questions] systemd and attach

Ferenc Holzhauser ferenc.holzhauser@REDACTED
Wed Dec 27 11:05:38 CET 2017


I think I've seen this issue with attach when the TERM environment wasn't
set for some reason.
Perhaps you could try to add the environment to the [Service] and see
whether it helps.
...
Environment=TERM=xterm
...

On 27 December 2017 at 10:49, Roger Lipscombe <roger@REDACTED>
wrote:

> 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
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20171227/83957b16/attachment.htm>


More information about the erlang-questions mailing list