Ad Widget

Collapse

Problems with Autossh

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Niels
    Senior Member
    • May 2007
    • 239

    #1

    Problems with Autossh

    Hi,

    I'm using Autossh on a remote machine ($REMOTE) to connect to my main server ($MASTER). My call looks (something) like this:

    Code:
    autossh -M 0 \
            $MASTER_NAME \
            -L $REMOTE_PORT_FWD_TO_MASTER:localhost:$MASTER_PORT \
            -R $MASTER_PORT_FWD_TO_REMOTE:localhost:$REMOTE_PORT \
            -N \
            -o ServerAliveInterval=15 \
            -o ServerAliveCountMax=3

    That is: I open two tunnels. The first survives network failures and master server outtakes, whereas the second doesn't. Sooner or later, it closes. For Zabbix, this means that the remote node will keep sending data, whereas the master node will lose its connection to the node eventually.

    Is this right? Should Autossh keep both tunnels running? Did I use it incorrectly?
  • Niels
    Senior Member
    • May 2007
    • 239

    #2
    Bumping my own message.

    Comment

    • Alexei
      Founder, CEO
      Zabbix Certified Trainer
      Zabbix Certified SpecialistZabbix Certified Professional
      • Sep 2004
      • 5654

      #3
      I guess this should be asked somewhere else
      Alexei Vladishev
      Creator of Zabbix, Product manager
      New York | Tokyo | Riga
      My Twitter

      Comment

      • Niels
        Senior Member
        • May 2007
        • 239

        #4
        Certainly. I first mailed the developer, but never got an answer.

        The more general question is: How do you keep tunnels alive?

        How does Zabbix server/agent handle restarting a tunnel every 15 minutes?

        Comment

        • MiZde
          Junior Member
          • May 2013
          • 3

          #5
          Did you tried cron job?

          Comment

          Working...