Answered question

NeoLoadCmd: how to use the specified free license?

Hi,

I'm trying to run the following command on a Jenkins job:


```
/opt/NeoLoad/NeoLoad7.9/bin/NeoLoadCmd -project /var/jenkins_home/workspace/PC_JPetStore_Buyer_simple/jpetstore.nlp -launch Buyer -noGUI -nlweb -nlwebAPIURL https://[url]:1081 -nlwebToken [token]
```

I have already specified a free license on this NL controler (in GUI mode) but I have this error on my logs:

```
19:24:17 Project jpetstore loaded
19:24:18 Found a valid NLWeb configuration : URL=[https://[url]:1081]
19:24:19 ERROR: Unable to automatically lease a server license
```

How can I force NLCmd to not try to automatically lease a server license?

Thanks.
Regard,

Antoine M.
Antoine M.

Antoine M.

Level
1
174 / 750
points
stéphane M.
stéphane M.

stéphane M.

Level
0
81 / 100
points

Thank you for the feed back.

I thought that activated license was locked with machine fingerprint.

It can done with docker volume, good to know.

Thank you,
Best regards,
Stéphane Martin.

Did you find this useful ?

No (0)

Yes (0)

0% of users found this answer useful

Other answers

stéphane M.
stéphane M.

stéphane M.

Level
0
81 / 100
points

Hi,

The license in NeoLoad is installed by user.

On the classic installation the jenkins server has own user.

Could you confirm that the username logged in jenkins is the same than the username which you have added the licence in GUI mode ?

You can use the commande whoami pour see that in a terminal.

Best regard,
Stephane Martin.

Antoine M.
Antoine M.

Antoine M.

Level
1
174 / 750
points

Stéphane,

The user logged on the terminal from where I launched NeoLoadGUI is "root".

I've added the shell command "whoami" on my Jenkins Job and it also returned "root".

Regards,
AM

stéphane M.
stéphane M.

stéphane M.

Level
0
81 / 100
points

ok, You aren't using docker or other virtualization ?

The command "echo $HOME" in jenkins and terminal are the same ?

You are working on master node ?

If you go in NeoLoadGui on licence panel click on "use a server", uncheck "Auto-lease", click on apply and reclick on use a license file and click on ok.

finaly could you retry your jenkins job ?

Antoine M.
Antoine M.

Antoine M.

Level
1
174 / 750
points

I'm using docker, yes.

The NL Controller is installed on the main computer and I've configured a volume on the Jenkins container in order to "pass" the NL controller to the container.

The $HOME is the same on each, but I don't think that's relevent.

I've tried to uncheck "Auto-lease" without success.

Also, I've restarted the Jenkins container: maybe the changes I made in the controller from the GUI wasn't updated to the files in the container...

stéphane M.
stéphane M.

stéphane M.

Level
0
81 / 100
points

Ok, We are on it.

Your home directory of jenkins is in container and you have added your license in host. Correct ?

If you copy past the ligne of jenkins in your GUI terminal all should be fine. (if your project is accessible from outside of jenkins)

I propose to transfert your free license and follow the procedure in jenkins container.
http://answers.neotys.com/questions/346036-can-activate-license-without-gui

You can do that with docker exec -it --user=root <jenkins_container_name> /bin/bash

Antoine M.
Antoine M.

Antoine M.

Level
1
174 / 750
points

Plus, I've tried to use "-nlweb" argument only, but the Jenkins job returns that it used saas server...

That's strange because I've added a valid NLweb config on the GUI.

It looks like the commands used in my Jenkins job don't know I've made changes on configs with the GUI...

Does it mean the problem is on the shared volume (containing the NL contrllore) between the main environment and the container?

Antoine M.
Antoine M.

Antoine M.

Level
1
174 / 750
points

"Your home directory of jenkins is in container and you have added your license in host. Correct ?" → Yeah, that's correct!

"If you copy past the ligne of jenkins in your GUI terminal all should be fine. " → Yes

I will try the procedure and I'll get back to you, thanks

Antoine M.
Antoine M.

Antoine M.

Level
1
174 / 750
points

OK, I've fixed my problem!

► The configuration files of the NeoLoad Controller (incuding license config) are stored in the the folder: "{$HOME}/.neotys/neoload"

So I've added this volume to the Jenkins Docker container. (view image below)

Now, the changes I make on the properties window of the GUI are also registered in the Jenkins container!

Thanks a lot!
Best regards,