Delphix Products

Expand all | Collapse all

what is sessiontimeout?

  • 1.  what is sessiontimeout?

    Posted 05-26-2015 03:26:00 PM
    Hi all,

    I'm wondering what is the sessiontimeout parameter under the user profile.
    I set this parameter to 10minutes. But I still don't loose the connection with the admin gui either with the CLI interface.

    Thank you.
    Gianpiero


  • 2.  RE: what is sessiontimeout?

    Posted 05-27-2015 08:29:00 AM
    It specifies the time between client requests before the Delphix Engine will invalidate the session. When the GUI or CLI are active, requests are made frequently enough that, under normal network conditions, the session does not expire.


  • 3.  RE: what is sessiontimeout?

    Posted 05-27-2015 11:27:00 AM
    Thank you. Is it necessary to restart the engine after the change? I'm wondering this because after my collegue changed the parameter value, the timeout seems not change.

    Best Regards.
    Gianpiero


  • 4.  RE: what is sessiontimeout?

    Posted 05-27-2015 03:43:00 PM
    It is not necessary to restart the engine, but the new value will only affect new sessions. You may have to log out and log in again to see it in action.

    What do you mean by "the timeouts seems not change". Are you reading the value from the CLI?


  • 5.  RE: what is sessiontimeout?

    Posted 05-28-2015 09:09:00 AM
    Hello,

    I have some questions for you guys, about session timeout and CLI.

    What happens if I launch a DB_SYNC (that takes some hours) from CLI?
    Will I lose the connection due session timeout?
    What happens to my DB_SYNC job?
    Will it continue regularly even after session timeout?
    What can I do to keep my CLI session alive during job execution?

    I want to be able to check the job exit code...

    Thanks.
    Giorgio




  • 6.  RE: what is sessiontimeout?

    Posted 05-28-2015 10:22:00 AM
    Unless there are connectivity issues, CLI session will remain active indefinitely (the session timeout will terminate inactive sessions, but CLI sessions are active since they monitor the state of jobs and updates in the system).

    Once a job has been launched, it will continue regardless of the state of the client session that initiated it. Feel free to exit from the CLI after having dispatched the job. 

    However, if you log in to the CLI again, you won't receive inline notifications for the job progress. You will have to explicit check the status of the job. This can be done in the CLI:

    job list
    will list the most recent jobs and their status (jobState attribute). You can then 'select' a specific job to get more details.

    Example:

    delphix_engine> /job list pageSize=3 display=name,jobState,title
    NAME     JOBSTATE   TITLE  JOB-139  COMPLETED  Enable dataset "Paxos-1".  JOB-138  COMPLETED  Enable dataset "Paxos-2".  JOB-137  COMPLETED  Enable dataset "Paxos-3".
    delphix_engine job> select JOB-139
    delphix_engine job 'JOB-139'> get
        type: Job
        name: (unset)
        actionType: SOURCE_ENABLE
        cancelable: true
        emailAddresses: (unset)
        events: [ ... ]
        jobState: COMPLETED
        parentAction: ACTION-196
        parentActionState: COMPLETED
        percentComplete: 100%
        reference: JOB-139
        startTime: 2015-05-28T09:36:46.232Z
        suspendable: false
        target: B5NJ/Paxos-wi-B5NJ-1432801458454
        targetName: Paxos-wi-B5NJ-1432801458454
        targetObjectType: MSSqlVirtualSource
        title: Enable dataset "Paxos-1".
        updateTime: 2015-05-28T09:38:42.596Z
    Alternatively, the information is available while the job is executing and after completion in the admin GUI (see https://docs.delphix.com/display/DOCS42/Viewing+Action+Status)


  • 7.  RE: what is sessiontimeout?

    Posted 05-28-2015 10:27:00 AM
    Giorgio,

    The CLI doesn't return an exit code the way a shell does, but when your DB_SYNC job is spawned, the CLI will give you the job ID, which you can use later to check the job status:

    LandsharkEngine job 'JOB-25'> /job  LandsharkEngine job> select JOB-25  LandsharkEngine job 'JOB-25'> get jobState      COMPLETED  LandsharkEngine job 'JOB-25'>
    The job runs independent of the CLI session that spawned it, so if that CLI session exits, the job will still continue.

    Cheers,

    Michael


  • 8.  RE: what is sessiontimeout?

    Posted 05-28-2015 02:00:00 PM
    Thankyou guys for your rich explaination.

    Launching a ssh connection from PuTTY to the CLI, I get session timeout after 30 minutes even if I set the sessionTimeout parameter to a different value.

    So, it seems that sessionTimeout parameter does not affect SSH connections to the CLI.

    Ex.



    But I receive timeout for inactivity only after 30 min.!




    NB: Even I set sessionTimeout parameter to a value greater than 30 min, I still get timeout after 30 min!!

    So, what I miss?

    Thanks.

    Giorgio



  • 9.  RE: what is sessiontimeout?

    Posted 05-28-2015 02:26:00 PM
    Giorgio,

    The disconnect you received was due to the SSH session timing out, not the CLI session. SSH has its own session timeout. This should not happen while a job is running, because the spinner will keep the session alive as it is constantly updated, but if you aren't running a job in foreground, and don't interact with the CLI for 30 minutes, SSH will disconnect you. 

    Michael 


  • 10.  RE: what is sessiontimeout?

    Posted 05-29-2015 07:12:00 AM
    Michael,

    thanks for highlighting the difference between SSH session and CLI session.

    Unfortunately I experimented something different from what you said: during a job execution that lasted more than 2 hours I got SSH session timeout after 30 min.

    I'd like to wait for job end without getting session timeout.
    I'd like to act on DE parameters and not on clients for getting that.

    Do you think that enabling SO_KEEPALIVE option in the Putty connection is the only way (on windows machines)?

    Thanks.
    Giorgio



  • 11.  RE: what is sessiontimeout?
    Best Answer

    Posted 05-29-2015 11:06:00 AM
    Giorgio,

    As Michael stated, SSH timeout has nothing to do with the sessionTimeout attribute for a Delphix connection.

    Rather, the parameters "clientAliveInterval" and "clientAliveCountMax" are set within the "sshd_config" file on a UNIX/Linux server or host, generally located within the "/etc/ssh" directory and in the "C:\Program Files\OpenSSH\etc\ folder" on Windows.

    Documentation about these parameters excerpted from the UNIX/Linux "man" page documentation on "sshd_config"...

         ClientAliveCountMax        Sets the number of client alive messages (see below) which may be        sent without sshd receiving any messages back from the client.        If this threshold is reached while client alive messages are        being sent, sshd will disconnect the client, terminating the ses-        sion.  It is important to note that the use of client alive mes-        sages is very different from TCPKeepAlive (below).  The client        alive messages are sent through the encrypted channel and there-        fore will not be spoofable.  The TCP keepalive option enabled by        TCPKeepAlive is spoofable.  The client alive mechanism is valu-        able when the client or server depend on knowing when a connec-        tion has become inactive.          The default value is 3.  If ClientAliveInterval (see below) is        set to 15, and ClientAliveCountMax is left at the default, unre-        sponsive ssh clients will be disconnected after approximately 45        seconds.         ClientAliveInterval        Sets a timeout interval in seconds after which if no data has        been received from the client, sshd will send a message through        the encrypted channel to request a response from the client.  The        default is 0, indicating that these messages will not be sent to        the client.  This option applies to protocol version 2 only.

    Putty's SO_KEEPALIVE setting might be worth trying, but I'm not certain that it overrides the settings inherited from the server.  The Putty documentation describes how to set SO_KEEPALIVE for a new session, an existing session, and for all future sessions.

    The Delphix "hostchecker" for UNIX/Linux platforms will warn about "clientAliveInterval" and "clientAliveCountMax" settings, as documented online here (see option "-7"), and Delphix Engine 4.2 and above will also automatically create warning faults if settings are detected.

    Hope this helps!