After some time, the nso cli will exit. Could we control the during time of entering timeout ?
*** IDLE TIMEOUT ***
My application background is :
Run NSO in docker with startNCS.sh
docker run -it -p 8080:8080 icon/nso:v3.0 /bin/bash /nso/startNCS.sh
root@e1c49ef602a0:/nso# cat startNCS.sh
cd /nso/NSO && ncs
cd /nso/NSO && ncs_cli -u admin –C
But when nso cli timeout, this docker will crash? How can I return /nso/NSO directory , when nso cli timeout ? Or can change the cli timeout time ?
Then do a search for “timeout”. Here is what I found:
/ncs-config/cli/idle-timeout (xs:duration) [PT30M]
Maximum idle time before terminating a CLI session. Default is PT30M, ie 30 minutes.
Would this help?
You can also set the idle timeout in the cli for each session, ie
set idle-timeout 0
Others have answered regarding increasing the idle timeout for the ncs cli.
But the problem here is that you cannot start your docker container with the ncs_cli command. Docker monitors the command you started a container with, and once that command exits, the container is also stopped. So in your case, once the ncs_cli times out, the container is stopped.
You will have to use a command that doesn't timeout or stop executing until you want the container to be running. In my experiments, I have used a command like 'tail -f /var/log/ncs' for starting the container. And then when you want a cli session in that container, you can use docker exec to execute ncs_cli on the container.
You can also of course set the idle timeout to 0, so that the cli never times out.
Or maybe even start ncs with --foreground? This way you ensure that docker container will down only when NCS itself goes down, not some other application like ncs_cli or tail
On 2016-10-03 10:09, Denys Knertser (dknertse) wrote:
> Or maybe even start ncs with --foreground? This way you ensure that
> docker container will down only when NCS itself goes down, not some
> other application like ncs_cli or tail