License manager - error addnig license
License manager - error addnig license
I try to add new license, but I get following error:
Opsi service error: [DataError] (1406, "Data too long for column 'licenseKey' at row 1")
License is 102 characters long.
I've checked definition of LICENSE_ON_CLIENT table:
+----------------------+---------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+----------------------+---------------+------+-----+---------+----------------+
| license_on_client_id | int(11) | NO | PRI | NULL | auto_increment |
| softwareLicenseId | varchar(100) | NO | MUL | NULL | |
| licensePoolId | varchar(100) | NO | | NULL | |
| clientId | varchar(255) | YES | MUL | NULL | |
| licenseKey | varchar(100) | YES | | NULL | |
| notes | varchar(1024) | YES | | NULL | |
+----------------------+---------------+------+-----+---------+----------------+
Is it possible to safely alter LICENSE_ON_CLIENT table and change "licenseKey" to e.g. "varchar(105)"?
Opsi service error: [DataError] (1406, "Data too long for column 'licenseKey' at row 1")
License is 102 characters long.
I've checked definition of LICENSE_ON_CLIENT table:
+----------------------+---------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+----------------------+---------------+------+-----+---------+----------------+
| license_on_client_id | int(11) | NO | PRI | NULL | auto_increment |
| softwareLicenseId | varchar(100) | NO | MUL | NULL | |
| licensePoolId | varchar(100) | NO | | NULL | |
| clientId | varchar(255) | YES | MUL | NULL | |
| licenseKey | varchar(100) | YES | | NULL | |
| notes | varchar(1024) | YES | | NULL | |
+----------------------+---------------+------+-----+---------+----------------+
Is it possible to safely alter LICENSE_ON_CLIENT table and change "licenseKey" to e.g. "varchar(105)"?
- n.wenselowski
- Ex-uib-Team
- Beiträge: 3194
- Registriert: 04 Apr 2013, 12:15
Re: License manager - error addnig license
Hi stept,
I found that a quite interesting error as the length for that column was changed to 1024 some years ago. Digging a little more I found that the update-routine for MySQL did create the table only with a length of 100. Is this an older server that got updated some time ago?
Anyway you should be safe to alter the length to 1024.
I created an internal ticket so that this gets fixed with a future release.
Thanks for reporting!
Kind regards
Niko
I found that a quite interesting error as the length for that column was changed to 1024 some years ago. Digging a little more I found that the update-routine for MySQL did create the table only with a length of 100. Is this an older server that got updated some time ago?
Anyway you should be safe to alter the length to 1024.
I created an internal ticket so that this gets fixed with a future release.
Thanks for reporting!

Kind regards
Niko
Code: Alles auswählen
import OPSI
Re: License manager - error addnig license
Hey,
would he not need to update the following tables as well?
SOFTWARE_LICENSE_TO_LICENSE_POOL
SOFTWARE_LICENSE
Each of them has column:
softwareLicenseId varchar(100)
I didn't check any other tables right now, just the most obvious ones
would he not need to update the following tables as well?
SOFTWARE_LICENSE_TO_LICENSE_POOL
SOFTWARE_LICENSE
Each of them has column:
softwareLicenseId varchar(100)
I didn't check any other tables right now, just the most obvious ones
Re: License manager - error addnig license
After alter LICENSE_ON_CLIENT and change 'licenseKey' to 'varchar(1024)' error presists. So maybe panisch is right and I need alter more tables with column 'licenseKey' (not 'softwareLicenseId')? Which are they?
And answering previous question. Server was clean installed to version 4.0.5, but database was migrated from the old one (mysqldump)
And answering previous question. Server was clean installed to version 4.0.5, but database was migrated from the old one (mysqldump)
- n.wenselowski
- Ex-uib-Team
- Beiträge: 3194
- Registriert: 04 Apr 2013, 12:15
Re: License manager - error addnig license
Hi,
with python-opsi 4.0.7.2 there should be a working fix.
This version is currently available in experimental - instructions how to get it.
Warning: please do not use this on your live system and do not forget to disable the repo after installation of the package to not get all packages from experimental!
After installing that version opsi-setup --update-mysql should be everything you need to get this working.
I'd like to hear if this fixes it for you!
Kind regards
Niko
with python-opsi 4.0.7.2 there should be a working fix.
This version is currently available in experimental - instructions how to get it.
Warning: please do not use this on your live system and do not forget to disable the repo after installation of the package to not get all packages from experimental!
After installing that version opsi-setup --update-mysql should be everything you need to get this working.
I'd like to hear if this fixes it for you!
Kind regards
Niko
Code: Alles auswählen
import OPSI
Re: License manager - error addnig license
Hello,
thank you for replay. What do you mean by "live system"? I would like to fix it on our production environment.
thank you for replay. What do you mean by "live system"? I would like to fix it on our production environment.
- n.wenselowski
- Ex-uib-Team
- Beiträge: 3194
- Registriert: 04 Apr 2013, 12:15
Re: License manager - error addnig license
Hi,

We do warn people not to do so they do not get stuck somewhere if things do not work as expected. But you are free to just ignore our warning and do it anyway. In either case I suggest creating a backup before changing the system
-Niko
I was referring to your production environment.stept_ hat geschrieben:Hello,
thank you for replay. What do you mean by "live system"? I would like to fix it on our production environment.

We do warn people not to do so they do not get stuck somewhere if things do not work as expected. But you are free to just ignore our warning and do it anyway. In either case I suggest creating a backup before changing the system

-Niko
Code: Alles auswählen
import OPSI
Re: License manager - error addnig license
Hi,
I've manually altered SOFTWARE_LICENSE_TO_LICENSE_POOL and SOFTWARE_CONFIG and it works. Problem solved.
I've manually altered SOFTWARE_LICENSE_TO_LICENSE_POOL and SOFTWARE_CONFIG and it works. Problem solved.