Visitar URL original
stdinserver is not restarted after timeout? · Issue #77 · zrepl/zrepl · GitHub
Skip to content

stdinserver is not restarted after timeout? #77

Closed

Description

@shivno

hi,
first, thanks for zrepl, it is awesome.

i have this problem:
did my setup after the tutorial, tested manual ssh from backup-srv if stdinserver is responding, closed the ssh session with ctrl+c.
afterwards zrepl on app-srv shows this:
SSHCON_PROXY_ERROR2018/06/19 11:17:46 error: dial unix /var/run/zrepl/stdinserver/isenu-backup1: connect: no such file or directory
and i think it never recovers. maybe the stdinserver could be supervised? maybe i did something wrong.

thanks!

Activity

  1. problame commented on Jun 19, 2018

    @problame
    Member

    maybe the stdinserver could be supervised?
    zrepl stdinserver CLIENT_IDENTITY is merely a stub process that is necessary to establish the connection from the client to the zrepl daemon.
    stdinserver connects to a unix socket created by zrepl daemon in /var/run/zrepl/stdinserver/CLIENT_IDENTITY, forwards the connection from the client, and then waits until it is signaled by the client to exit.
    As such, it doesn't need supervision.

    However, zrepl daemon must be running on both sides.

    zrepl daemon does not create the /var/run/zrepl/stdinserver directory.
    On FreeBSD, this should be handled by the /usr/local/etc/rc.d/zrepl, see https://svnweb.freebsd.org/ports/head/sysutils/zrepl/files/zrepl.in?view=markup#l57

    Are you running the daemon with the rc script or manually from the command line?
    If so, maybe try running it from rc script once so the install commands get run and create the runtime dirs.

  2. shivno commented on Jun 19, 2018

    @shivno
    Author

    on freebsd, 0.3 with the rc script, right, runs on both sides. everything works ok, can you reproduce this?

    • set up ssh on app-srv with command=
    • run daemon on app-srv
    • socket is there
    • connect with ssh manually from backup-srv, stdinserver is there, close ssh with ctrl+c
    • socket is gone
  3. problame commented on Jun 19, 2018

    @problame
    Member

    Uh, so if I understand you correctly, it works if you don't do the ssh test-connect?

  4. shivno commented on Jun 19, 2018

    @shivno
    Author

    right, i guess go closes the socket if it is being exited uncleanly or so. probably is reproducible locally somehow by starting zrepl stdinserver backupservername, then just kill the shell or similar.

  5. problame commented on Jun 19, 2018

    @problame
    Member
  6. shivno commented on Jun 19, 2018

    @shivno
    Author

    right, it logs that. but the socket should stay alive imho, otherwise no further backups can be transferred. i dont know go so i dont know what is wrong.

  7. added this to the 0.0.4 milestone on Jun 19, 2018
  8. problame commented on Jun 19, 2018

    @problame
    Member

    Right, so I guess we're lucky that if users follow the tutorial 1:1, they won't run into this (because the zrepl daemon is not yet running on the other side)

    Will find a fix for 0.0.4. Thanks for reporting, patches are always welcome ;)

  9. shivno commented on Jul 4, 2018

    @shivno
    Author

    this is actually a severe issue, i just discovered that backups werent transferred for 2 days because of this issue (no logcheck yet on that server). so an addition to the docs exclaimer would be good imho with reference to this ticket or something. otherwise it works great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions