cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
422
Views
2
Helpful
5
Replies
raffovicisco01
Beginner

Run another instance of NCS

Hi,

I see from the documentation that creating different run-time directory I can run different instance of NCS.

Which parameter should I configure to avoid the 2 different instance to be in conflict.

Regards

Raffo

1 ACCEPTED SOLUTION

Accepted Solutions
shooky@nil.si
Beginner

When you use "ncs --stop" for example, ncs will look for the NCS_IPC_PORT environment variable to determine which port to use for IPC. If it is not there, it will default to 4569. If you set the variable to be 5570, that it will talk to the right NCS instance.

Additionally, you should add another environment variable when starting a second instance in order to have the other Java VM. talk to the right NCS instance. For example: NCS_JAVA_VM_OPTIONS=-Dport=5570 -Xmx1024M

View solution in original post

5 REPLIES 5
richsun
Cisco Employee

Raffo, usually there is no need to run multiple instances of NCS on one machine at the same time. You run one instance of NCS from one test directory: when done, stop the NCS instance, then go to another directory to run NCS for another test. If you really want to run multiple instances of NCS on one machine at the same time, search <port> in ncs.conf to make sure they are different from each instance.

Hi

actually for my experience it is not enough to change the port.

I modified the file ncs.conf on my ncs-run-02 directory, and I added these lines:

...

     <ncs-ipc-address>

        <ip>127.0.0.1</ip>

        <port>5570</port>

     </ncs-ipc-address>

</ncs-config>

Then I used this command:

ncs -c ./ncs.conf

In this way we had 2 ncs instances running, but we were not able to stop them separately.

Start with "ncs --foreground --stop-on-eof", then use CTRL-d to stop specific instance. "ncs --help" has more details.

If you could provide more details on why 2 instances need to run at the same time on same machine, it may be helpful for better answers.

shooky@nil.si
Beginner

When you use "ncs --stop" for example, ncs will look for the NCS_IPC_PORT environment variable to determine which port to use for IPC. If it is not there, it will default to 4569. If you set the variable to be 5570, that it will talk to the right NCS instance.

Additionally, you should add another environment variable when starting a second instance in order to have the other Java VM. talk to the right NCS instance. For example: NCS_JAVA_VM_OPTIONS=-Dport=5570 -Xmx1024M

View solution in original post

Hello,

 

I have been using the solution of adding the following lines in ncs.conf:

  <ncs-ipc-address>
   <ip>127.0.0.1</ip>
   <port>5555</port>
  </ncs-ipc-address>

But after an upgrade to nso 5.3, this does not seem to work any longer:

 

Bad configuration: /home/fjorge/ncs-run/ncs.conf:372: Unexpected content: '
   '

What is the supported way to have more than one instance of NSO running simultaneously?

 

We need that feature because there are more than one people developing on the same machine, each one with its own instance of NSO running.

 

Exporting the environment variable NCS_IPC_PORT only seems to affect when NSO is already running, for example in order to issue an ncs --stop. But it does not control the port NSO starts listening to.

 

Regards.

Content for Community-Ad

This widget could not be displayed.