[SOLVED] DataError value too long for type character varying

Share your tips or issues concerning the WAPT Console or WAPT Agent here
Forum Rules
Community Forum Rules
* English support on www.reddit.com/r/wapt
* French community support is available on this forum
* Please prefix the topic title with [RESOLVED] if it is resolved.
* Please do not edit a topic that is tagged [RESOLVED]. Open a new topic referencing the old one.
* Specify the installed WAPT version, full version, and build number (2.2.1.11957 / 2.2.2.12337 / etc.) as well as the Enterprise/Discovery edition.
* Versions 1.8.2 and earlier are no longer supported. The only questions accepted regarding version 1.8.2 are related to upgrading to a supported version (2.1, 2.2, etc.).
* Specify the server OS (Linux/Windows) and version (Debian Buster/Bullseye - CentOS 7 - Windows Server 2012/2016/2019).
* Specify the OS of the administration/package creation machine and the machine with the problematic agent, if applicable (Windows 7/10/11/Debian 11/etc.).
* Avoid asking multiple questions when opening a topic, otherwise it may be ignored. If there are multiple topics, open separate topics, preferably one after the other and not all at the same time (i.e., do not spam the forum).
* Include code snippets, screenshots, and other images directly in the post. Links to Pastebin, Bitly, and other third-party sites will be systematically removed.
* As with any community forum, support is provided voluntarily by members. If you require commercial support, you can contact Tranquil IT's sales department at 02.40.97.57.55
Locked
yann83
Messages: 40
Registration: Apr 22, 2021 - 07:54

May 3, 2024 - 2:07 PM

Good morning

On some workstations I have an empty audit value, and no general information other than the last connection and the UUID.

What could this data error correspond to?
DataError('value too long for type character varying(255)\n')
I have the following log:

Code: Select all

2024-05-03 13:53:41,227 [wapttasks WaptTaskManager 2568] INFO Reloading waptcore configuration for Wapt instance thread 2568
2024-05-03 13:53:41,258 [wapttasks WaptTaskManager 2568] INFO Core Wapt config file has changed, reloaded. Reloading waptservice config too
2024-05-03 13:53:41,267 [wapttasks WaptTaskManager 2568] INFO Host capabilities have changed since last update 49ddc57ee5f64e34074542c361ba45e5f11e0fb9681795b24472f098707d7b17 -> 36e5d9a22f5b9ccc60af94bc50acbd7e0c32c02cf473717a72e67a0f7e737d8a, forcing update
2024-05-03 13:53:41,268 [wapttasks WaptTaskManager 2568] INFO Service config have changed 1be8e68afd9a14accfea6124f19f30e64f55c0d1bc025658b4eb979ec106c66d -> 593f766fdeeb222cc03684e1642d997484682382553045b5a593c253a1383691, forcing update
2024-05-03 13:54:03,799 [wapttasks WaptTaskManager 2568] INFO Add task Mise à jour de la liste des paquets disponibles to queue
2024-05-03 13:54:03,804 [wapttasks WaptTaskManager 2568] INFO Running task Mise à jour de la liste des paquets disponibles created by SCHEDULER
Get packages index from [<WaptRepo https://depot.serveur/wapt verify_cert=False client_cert_path=C:\Program Files (x86)\wapt\private\73dffc33-3f7d-3996-362c-d8496f1b75dd.crt>, <WaptHostRepo https://wapt.serveur/wapt-host for host_id 73dffc33-3f7d-3996-362c-d8496f1b75dd >]
2024-05-03 13:54:07,068 [wapttasks WaptTaskManager 2568] CRITICAL Unable to update server status: Error on server:
DataError('value too long for type character varying(255)\n')
User avatar
dcardon
WAPT Expert
Messages: 1929
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

May 3, 2024 - 3:25 PM

Hello Yann83,

WAPT version, server OS, client OS, etc. (see forum rules).

We would need the log with the error message from the server side; that should provide more information.

Regards,

Denis
Denis Cardon - Tranquil IT
Share your experiences on WAPT! Send us your blog and article URLs in the "Your Opinion of the forum, and we'll feature them on the WAPT
yann83
Messages: 40
Registration: Apr 22, 2021 - 07:54

May 3, 2024 - 3:54 PM

Good morning,

This is a WAPT Enterprise 2.5.4 server, version 15342
On a CentOS 7 server with Windows 10 22H2 clients

server side in waptserver.log

Code: Select all

May  3 14:45:45 serveurdepot waptserver[642178]: 2024-05-03 14:45:45,476 [waptdb         ] CRITICAL Error updating data for 3891240b-2331-e6e7-26a3-14d0e6df1bac : DataError: value too long for type character varying(255)
May  3 14:45:45 serveurdepot waptserver[642178]: 2024-05-03 14:45:45,476 [waptserver     ] CRITICAL update_host failed DataError('value too long for type character varying(255)\n')
May  3 14:45:57 serveurdepot waptserver[642178]: 2024-05-03 14:45:57,557 [waptdb         ] CRITICAL Error updating data for 3891240b-2331-e6e7-26a3-14d0e6df1bac : DataError: value too long for type character varying(255)
May  3 14:45:57 serveurdepot waptserver[642178]: 2024-05-03 14:45:57,558 [waptserver     ] CRITICAL update_host failed DataError('value too long for type character varying(255)\n')
May  3 14:57:23 serveurdepot waptserver[642178]: 2024-05-03 14:57:23,960 [waptserver     ] CRITICAL add_host failed EWaptAuthenticationFailure('register_host : Mismatch hostname and subject_alt_names poste050.cnamts.local / poste002.cnamts.local')
May  3 15:03:28 serveurdepot waptserver[642178]: 2024-05-03 15:03:28,128 [waptdb         ] CRITICAL Error updating data for 00222798-6bec-ec11-8145-c83632083293 : DataError: value too long for type character varying(255)
May  3 15:03:28 serveurdepot waptserver[642178]: 2024-05-03 15:03:28,129 [waptserver     ] CRITICAL update_host failed DataError('value too long for type character varying(255)\n')
May  3 15:14:55 serveurdepot waptserver[642178]: 2024-05-03 15:14:55,715 [waptserver     ] CRITICAL add_host failed EWaptAuthenticationFailure('register_host : Mismatch hostname and subject_alt_names poste050.cnamts.local / poste002.cnamts.local')
May  3 15:15:16 serveurdepot waptserver[642178]: 2024-05-03 15:15:16,714 [waptserver     ] CRITICAL add_host failed EWaptAuthenticationFailure('register_host : Mismatch hostname and subject_alt_names poste050.cnamts.local / poste002.cnamts.local')
May  3 15:15:36 serveurdepot waptserver[642178]: 2024-05-03 15:15:36,254 [waptserver     ] CRITICAL add_host failed EWaptAuthenticationFailure('register_host : Mismatch hostname and subject_alt_names poste050.cnamts.local / poste002.cnamts.local')
May  3 15:22:15 serveurdepot waptserver[642178]: 2024-05-03 15:22:15,752 [waptdb         ] CRITICAL Error updating data for 84a194d1-2a5a-a949-86ff-8a12fb03ebf1 : DataError: value too long for type character varying(255)
May  3 15:22:15 serveurdepot waptserver[642178]: 2024-05-03 15:22:15,752 [waptserver     ] CRITICAL update_host failed DataError('value too long for type character varying(255)\n')
May  3 15:22:49 serveurdepot waptserver[642178]: 2024-05-03 15:22:49,364 [waptdb         ] CRITICAL Error updating data for 73dffc33-3f7d-3996-362c-d8496f1b75dd : DataError: value too long for type character varying(255)
May  3 15:22:49 serveurdepot waptserver[642178]: 2024-05-03 15:22:49,365 [waptserver     ] CRITICAL update_host failed DataError('value too long for type character varying(255)\n')
May  3 15:26:48 serveurdepot waptserver[642178]: 2024-05-03 15:26:48,775 [waptdb         ] CRITICAL Error updating data for 56763959-4245-df15-b88a-a4fe135c7f3f : DataError: value too long for type character varying(255)
May  3 15:26:48 serveurdepot waptserver[642178]: 2024-05-03 15:26:48,776 [waptserver     ] CRITICAL update_host failed DataError('value too long for type character varying(255)\n')
May  3 15:28:03 serveurdepot waptserver[642178]: 2024-05-03 15:28:03,818 [waptdb         ] CRITICAL Error updating data for 809f2da3-9ced-ec11-8145-c83632086382 : DataError: value too long for type character varying(255)
May  3 15:28:03 serveurdepot waptserver[642178]: 2024-05-03 15:28:03,819 [waptserver     ] CRITICAL update_host failed DataError('value too long for type character varying(255)\n')
May  3 15:32:49 serveurdepot waptserver[642178]: 2024-05-03 15:32:49,144 [waptdb         ] CRITICAL Error updating data for 00e63846-aaed-ec11-8145-c83632086443 : DataError: value too long for type character varying(255)
May  3 15:32:49 serveurdepot waptserver[642178]: 2024-05-03 15:32:49,145 [waptserver     ] CRITICAL update_host failed DataError('value too long for type character varying(255)\n')
May  3 15:35:48 serveurdepot waptserver[642178]: 2024-05-03 15:35:48,793 [waptdb         ] CRITICAL Error updating data for 3891240b-2331-e6e7-26a3-14d0e6df1bac : DataError: value too long for type character varying(255)
May  3 15:35:48 serveurdepot waptserver[642178]: 2024-05-03 15:35:48,794 [waptserver     ] CRITICAL update_host failed DataError('value too long for type character varying(255)\n')
yann83
Messages: 40
Registration: Apr 22, 2021 - 07:54

May 7, 2024 - 2:39 PM

I uninstalled/reinstalled the agent without success

Code: Select all

07 14:35:11,564 [wapttasks MainThread 11728] INFO Service Configuration: {'config_filename': 'C:\\Program Files (x86)\\wapt\\wapt-get.ini', 'waptservice_user': None, 'waptservice_password': None, 'MAX_HISTORY': 30, 'waptservice_port': 8088, 'dbpath': 'C:\\Program Files (x86)\\wapt\\db\\waptdb.sqlite', 'loglevel': 'warning', 'log_directory': 'C:\\Program Files (x86)\\wapt\\log', 'waptserver': <WaptServer https://serveur.wapt verify_cert=C:\Program Files (x86)\wapt\ssl\server\serveur.wapt.crt client_cert_path=None>, 'hiberboot_enabled': False, 'max_gpo_script_wait': 180, 'pre_shutdown_timeout': 180, 'log_to_windows_events': False, 'allow_user_service_restart': False, 'signature_clockskew': 21600, 'notify_user': False, 'waptservice_admin_filter': False, 'enable_remote_repo': False, 'local_repo_path': 'C:\\Program Files (x86)\\wapt\\repository', 'local_repo_sync_task_period': '2h', 'local_repo_time_for_sync_start': None, 'local_repo_time_for_sync_end': None, 'local_repo_limit_bandwidth': None, 'wol_port': '7,9', 'wol_relay': False, 'service_auth_type': 'system', 'verify_cert_ldap': False, 'waptservice_poll_timeout': 10, 'waptupdate_task_period': '120m', 'download_after_update_with_waptupdate_task_period': True, 'forced_installs_task_period': '2m', 'reconfig_on_network_change': False, 'websockets_verify_cert': 'C:\\Program Files (x86)\\wapt\\ssl\\server\\serveur.wapt.crt', 'update_server_status_on_connect': False, 'loglevel_waptcore': None, 'loglevel_waptservice': None, 'loglevel_waptws': None, 'loglevel_waptdb': None, 'loglevel_websocket': None, 'loglevel_waitress': None, 'loglevel_wapttasks': None}
2024-05-07 14:35:11,564 [wapttasks MainThread 11728] INFO Starting task queue
2024-05-07 14:35:11,564 [wapttasks WaptTaskManager 12976] INFO Wapt tasks management initialized with C:\Program Files (x86)\wapt\wapt-get.ini configuration
2024-05-07 14:35:11,565 [wapttasks MainThread 11728] INFO Tasks queue running
2024-05-07 14:35:11,567 [wapttasks MainThread 11728] INFO Starting waitress waptservice on port 8088
2024-05-07 14:35:11,575 [wapttasks SocketIOClient 16820] INFO Starting socketio on "https://serveur.wapt:443" Thread id 16820
2024-05-07 14:35:11,576 [wapttasks SocketIOClient 16820] INFO Socketio connection params have changed. Socketio needs reconnect
2024-05-07 14:35:11,577 [wapttasks SocketIOClient 16820] INFO Creating socketio client: https://serveur.wapt:443 client auth cert: ('C:\\Program Files (x86)\\wapt\\private\\00222798-6bec-ec11-8145-c83632083293.crt', 'C:\\Program Files (x86)\\wapt\\private\\00222798-6bec-ec11-8145-c83632083293.pem') proxies: None verify_cert: C:\Program Files (x86)\wapt\ssl\server\serveur.wapt.crt
2024-05-07 14:35:11,577 [wapttasks SocketIOClient 16820] INFO Connecting Socketio to https://serveur.wapt:443
2024-05-07 14:35:11,584 [wapttasks WaptTaskManager 12976] INFO Core Configuration: {'wapt_base_dir': 'C:\\Program Files (x86)\\wapt', 'waptserver': <WaptServer https://serveur.wapt verify_cert=C:\Program Files (x86)\wapt\ssl\server\serveur.wapt.crt client_cert_path=C:\Program Files (x86)\wapt\private\00222798-6bec-ec11-8145-c83632083293.crt>, 'config_filename': 'C:\\Program Files (x86)\\wapt\\wapt-get.ini', 'proxies': {'http': '', 'https': ''}, 'repositories': [<WaptRepo https://serveur.wapt/wapt verify_cert=C:\Program Files (x86)\wapt\ssl\server\serveur.wapt.crt client_cert_path=C:\Program Files (x86)\wapt\private\00222798-6bec-ec11-8145-c83632083293.crt>, <WaptHostRepo https://serveur.wapt/wapt-host for host_id 00222798-6bec-ec11-8145-c83632083293 >], 'personal_certificate_path': '', 'public_certs_dir': 'C:\\Program Files (x86)\\wapt\\ssl', 'package_cache_dir': 'C:\\Program Files (x86)\\wapt\\cache', 'dbpath': 'C:\\Program Files (x86)\\wapt\\db\\waptdb.sqlite', 'use_http_proxy_for_repo': False, 'use_http_proxy_for_server': False, 'limit_bandwidth': None, 'locales': ['fr'], 'custom_tags': [], 'packages_whitelist': None, 'packages_blacklist': None, 'maturities': ['PROD'], 'host_uuid': '00222798-6bec-ec11-8145-c84632783293', 'use_fqdn_as_uuid': False, 'use_hostpackages': True, 'use_ad_groups': False, 'use_repo_rules': False, 'host_profiles': [], 'host_organizational_unit_dn': 'OU=Magasin,OU=Gestion des Achats et du Patrimoine,OU=Departement des Ressouces Budgetaires et Logistiques,OU=Direction Ressources Humaines Logistique et Patrimoine,OU=Direction Generale,OU=Postes,OU=notreOU,OU=nom,DC=nom,DC=fr', 'host_ad_site': None, 'waptaudit_task_period': '2h', 'hiberboot_enabled': 0, 'max_gpo_script_wait': 180.0, 'pre_shutdown_timeout': 180.0, 'uninstallkey_timeout': 120, 'check_certificates_validity': True, 'token_lifetime': 86400, 'trust_all_certs_in_pems': False, 'include_dmi_inventory': False, 'include_wmi_inventory': False, 'wapt_temp_dir': None}
2024-05-07 14:35:11,590 [wapttasks WaptTaskManager 12976] INFO Wapt tasks queue started
2024-05-07 14:35:11,608 [wapttasks SocketIOClient 16820] INFO WS read loop for 120s
2024-05-07 14:35:21,877 [wapttasks WaptTaskManager 12976] INFO Add task Mise � jour de la liste des paquets disponibles to queue
2024-05-07 14:35:21,881 [wapttasks WaptTaskManager 12976] INFO Running task Mise � jour de la liste des paquets disponibles created by SCHEDULER
t packages index from [<WaptRepo https://serveur.wapt/wapt verify_cert=C:\Program Files (x86)\wapt\ssl\server\serveur.wapt.crt client_cert_path=C:\Program Files (x86)\wapt\private\00222798-6bec-ec11-8145-c83632083293.crt>, <WaptHostRepo https://serveur.wapt/wapt-host for host_id 00222798-6bec-ec11-8145-c83632083293 >]
2024-05-07 14:35:25,300 [wapttasks WaptTaskManager 12976] CRITICAL Unable to update server status: Error on server:
DataError('value too long for type character varying(255)\n')
yann83
Messages: 40
Registration: Apr 22, 2021 - 07:54

May 13, 2024 - 07:18

Hello

, I don't know what value exceeds 255 characters, but I think it's very likely the one in the registry where the computer's location is recorded in Active Directory.
Indeed, in Active Directory, the distinguishedName is 276 characters long.

What do you think? If so, how can I work around this?
User avatar
htouvet
WAPT Expert
Messages: 436
Registration: March 16, 2015 - 10:48
Contact :

May 29, 2024 - 10:44

Good morning,
Yes, that's very likely.
We will increase the size of the computer_ad_ou column in the hosts table in the next version. (2048 seems reasonable?)

You can do it yourself by connecting to your Wapt server and running the command:

Code: Select all

sudo -u wapt psql -c "alter table hosts alter column computer_ad_ou type varchar(2048);"
Tranquil IT
User avatar
dcardon
WAPT Expert
Messages: 1929
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

June 3, 2024 - 09:48

Hello,
this has been fixed internally and should be available for the next WAPT release. I'm marking this topic as resolved.
Regards,
Denis
Denis Cardon - Tranquil IT
Share your experiences on WAPT! Send us your blog and article URLs in the "Your Opinion of the forum, and we'll feature them on the WAPT
Locked