- Revenera Community
- :
- FlexNet Embedded
- :
- FlexNet Embedded Forum
- :
- Uploading model definition for FNE Local License server is giving 406 error: HttpMediaTypeNotAccepta...
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Uploading model definition for FNE Local License server is giving 406 error: HttpMediaTypeNotAcceptableException
I am getting below 406 error while uploading a simple model definition to the FNE Local License Server using the command-line flexnetlsadmin tool:
Server responded with a 406 and an error message of:
key='org.springframework.web.HttpMediaTypeNotAcceptableException'
message='org.springframework.web.HttpMediaTypeNotAcceptableException'
arguments=[Could not find acceptable representation]
model "exampleModel" {
on hostid("ABC") {
use "default"
accept}
on any() {
deny
}
}
I am running this command:
flexnetlsadmin -server licenseServer_baseURL -model -load definition.model
Note: I have not setup any security password for the server
Note: Uploading the same model using REST API (/rules) is working fine. But the command line tool is giving HttpMediaTypeNotAcceptableException error.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hi @kruthim ,
I'm wondering if perhaps you have some extra characters in your model definition file. I repeated your test and did not have any issues:
Display current (default) model:
.\flexnetlsadmin.bat -model
model "default" {
on any() {
use "default"
accept}}
Display contents of new model definition file:
more .\newmodel.txt
model "exampleModel" {
on hostid("ABC") {
use "default"
accept }
on any() {
deny
}
}
Load new model definition on server:
.\flexnetlsadmin.bat -model -load .\newmodel.txt
Display current (updated) model:
.\flexnetlsadmin.bat -model
model "exampleModel" {
on hostid("ABC") {
use "default"
accept }
on any() {
deny
}
}
I have attached the new model file to this post.
Thanks,
Jim
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hi @kruthim ,
As it turns out this was an issue that has been resolved in the latest server release, 2023.03. I was testing using this version so I was not able to reproduce the error.
Best regards,
Jim
![](/skins/images/8C9D13A71C7F7695F3262372C0172D68/responsive_peak/images/icon_anonymous_message.png)