cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
52
Views
2
Helpful
6
Replies
Cisco Employee

About nso in nso cli timeout

 

Hi,

 

After some time, the nso cli will exit. Could we control the during time of entering timeout ?

 

admin@ncs#

 

*** IDLE TIMEOUT ***

 

---------

 

Regards,

 

Hao Fan   

 

Everyone's tags (4)
6 REPLIES 6
Highlighted
Cisco Employee

Re: About nso in nso cli timeout

 

Hi,

 

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

 

#!/bin/bash

 

. /nso/4.1.1/ncsrc

 

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 ?

 

---------

 

Regards,

 

Hao Fan   

 

Highlighted
Cisco Employee

Re: About nso in nso cli timeout

 

Hi Hao,

 

 

Try:

 

man ncs.conf

 

 

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?

 

 

Thanks,

  Bilal.

 

Highlighted
Cisco Employee

Re: About nso in nso cli timeout

 

You can also set the idle timeout in the cli for each session, ie

 

 

set idle-timeout 0

 

Or

 

idle-timeout 0

 

 

For infinity.

-Johan

 

Highlighted
Cisco Employee

Re: About nso in nso cli timeout

 

Hi Hao,

 

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.

 

 

Thanks,

 

Ram

 

Highlighted
Cisco Employee

Re: About nso in nso cli timeout

 

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

 

 

/ Denys

 

Highlighted
Cisco Employee

Re: About nso in nso cli timeout

 

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

 

 

+1

 

 

--Per

 

Content for Community-Ad
FusionCharts will render here
This widget could not be displayed.