cancel
Showing results for 
Search instead for 
Did you mean: 
avdhesh
Flexera beginner

Re: Getting Error during running "Capability Request.java" Example.

Hi,

Currently ,we using "FlexNet Publisher 2018 R4(11.16.2)Development Environment Guide" for run the server and "FlexNet Embedded Client 2019 R1 Java XT SDK User Guide "  for java Development.

  
My order number is " SSF-0000557257 (PO# FNL Evaluation)"  and Account ID "MOA-000608327".
i just want to implement and integrate floating license server with our  tool.

please let me know if you required another information.

0 Kudos
Highlighted
Moderator jberthold Moderator
Moderator

Re: Getting Error during running "Capability Request.java" Example.

Thanks @avdhesh ,

I believe I now see the issue.  With a FlexNet Embedded Licensing only evaluation  (without the FlexNet Operations back office) you have 3 ways to obtain a license on a client device:

1) Manually generate a license (capability response) using the capresponseutil utility and then load this response on the client device.

2) Install a FlexNet Embedded local license server, load a floating license on the local license server generated with capresponseutil, then point your license requests (capability requests) from your client devices to the local license server.  If the license server is running on your local system then license requests should be directed to http://localhost:7070/fne/bin/capability   (7070 is default local license server port)

3) Use the test back office utility, capserverutil to respond to license requests from the client device.  If you are running the capserverutil on your localhost the license requests from clients should be directed to http://localhost:8080/request (8080 is default port for capserverutil)

If your goal is to quickly test the process of getting a license back from a server to your client device then option 3 is the easiest.  

Run the following from the tools directory:

.\capserverutil.bat -id .\IdentityBackOffice.bin -template .\templates\ -v

*********************************************************
This utility is for testing purposes only.
It is not intended for production environments.
*********************************************************

Info : [11:01:43] Processing template files in .\templates\:
Info : [11:01:43] 1234567890.lic
Info : [11:01:43] survey:1.0:1
Info : [11:01:43] highres:1.0:1
Info : [11:01:43] li1.lic
Info : [11:01:43] f1:1.0:5
Info : [11:01:43] f2:1.0:10
Info : [11:01:43] Listening on port 8080
Info : [11:01:43] capserverutil started. Press ENTER to exit.

If you then run the CapabilityRequest.java example from the SDK out of the box (no modifications) with the options:

-server -server http://localhost:8080/request  

You should see the following output:

Number of features loaded from trusted storage: 0
Successfully processed response.
Response data
Vendor dictionary:
none
Response status:
none
Machine Type:
PHYSICAL
Confirmation request needed: no
Number of features loaded from capability response: 2
Successfully acquired "survey", version 1.0, 1 count.

In the capserverutil window you will see the following:

Info : [11:03:01] Received capability request from localhost
Info : [11:03:02] Client: 1234567890/STRING
Info : [11:03:02] Found matching device template for 1234567890
Info : [11:03:02] that includes features:
Info : [11:03:02] survey:1.0:1
Info : [11:03:02] highres:1.0:1
Info : [11:07:12] Received capability request from localhost
Info : [11:07:12] Client: 1234567890/STRING
Info : [11:07:12] Found matching device template for 1234567890
Info : [11:07:12] that includes features:
Info : [11:07:12] survey:1.0:1
Info : [11:07:12] highres:1.0:1

If your goal is to test out the local license server functionality as well then you will need to download the FlexNet Embedded license server from the Flexera Product and License Center and follow the process outlined in step 2 above.

Best regards,

 

avdhesh
Flexera beginner

Re: Getting Error during running "Capability Request.java" Example.

Thank you so much for your Reply.


Please tell me how i install a FlexNet Embedded local license server on windows  as mention in point 2.

0 Kudos
Moderator jberthold Moderator
Moderator

Re: Getting Error during running "Capability Request.java" Example.

Hi @avdhesh ,

You will need to download the FNE Server from FlexNet Embedded Licenses & Tools in the Flexera Product & License Center.   The FNE Documentation section also has a License Server Producer Guide and Administration Guide.  

A reference video is available here:  

Installation, Configuration and Activation of a FlexNet Embedded License Server:  https://youtu.be/iwkf3uqkNkQ

Since you are not evaluating the FlexNet Operations Back Office system you will need to manually generate a license (capability response) using the capresponseutil utility which you can load onto your server once it is up and running.  Refer to your SDK User Guide for details on how to use capresponseutil.

Best regards,

0 Kudos
avdhesh
Flexera beginner

Re: Getting Error during running "Capability Request.java" Example.

Thank you for your reply.

We have successfully started the server and install  and also run the service but we got a problem with activating the server. here are the steps i followed after starting the service:

1:   capresponseutil.bat -id IdentityBackOffice.bin -host A44CC838C333/Ethernet demo.lic demo.bin 

2:copy demo.bin to ./enterprise

3: activating server using "flexnetlsadmin -activate -load demo.bin" command then we  got an Error:

ERROR: { "key" : "Capability response host ID does not match. Expected A44CC838C333/Ethernet, got STRING:A44CC838C333/Ethernet", "message" : "Capability response host ID does not match. Expected A44CC838C333/Ethernet, got STRING:A44CC838C333/Ethernet"}

 

please suggest if we are going wrong.

Thanks.

0 Kudos
Moderator jberthold Moderator
Moderator

Re: Getting Error during running "Capability Request.java" Example.

Hi @avdhesh ,

Great, looks like you are very close.  First please make sure your demo.lic license is specified correctly for a served license.  There are many options depending on the type of license you want to generate however here's an example of a license with a permanent and expiring feature:

SERVER this_host A44CC838C333
INCREMENT f1 demo 1.0 permanent 5 START=11-oct-2019
INCREMENT f2 demo 1.0 10-oct-2020 10 START=11-oct-2019

Next generate the capability response for the served license using the following options:

capresponseutil.bat -id IdentityBackOffice.bin -host A44CC838C333 -idtype ethernet -lifetime 0 demo.lic demo.bin

Copy demo.bin to the /enterprise directory and activate the server with flexnetlsadmin -activate -load demo.bin

Thanks,

0 Kudos
avdhesh
Flexera beginner

Re: Getting Error during running "Capability Request.java" Example.

Thank you so much for helping me out.
We successfully activate the server but when i run the 'CapabilityRequest.java' using 'args = new String[]{"-server", "http://localhost:7070/fne/bin/capability"};' argument then i got this Error:

Number of features loaded from trusted storage: 0
request url : http://localhost:7070/fne/bin/capability
Licensing exception: Request has invalid content.
Server report: {
Capability requests are only expected from clients, not servers (type=public, code=BAD_REQUEST(51))
}
Error report=[1,7E3,4,0[7000001C,7100002F,250137]]

0 Kudos
Moderator jberthold Moderator
Moderator

Re: Getting Error during running "Capability Request.java" Example.

Hi @avdhesh,

Are you sure you are using the IdentityClient.java?  A couple things to try:

1)  Run the CapabilityRequest example with the options -generate caprequest.bin to generate a capability request file.   Copy to the Java SDK /tools folder and then run printbin on the caprequest.bin file to see the contents and then post here.

2) Eliminate the java application and try to send a capability request directly to your server using  the caprequestutil utility in the /tools folder.  Use the following syntax, substituting "F1" with a feature that exists on your server:

  ./caprequestutil.bat -id .\IdentityClient.bin -host TESTCLIENT http://localhost:7070/request -feature F1 1.0 1

Thanks,

0 Kudos
avdhesh
Flexera beginner

Re: Getting Error during running "Capability Request.java" Example.

Thank you so much for helping me .
0 Kudos
Moderator jberthold Moderator
Moderator

Re: Getting Error during running "Capability Request.java" Example.

So do you now have the CapabilityRequest.java sample working?

0 Kudos