Control-M workload archiving using a PostgreSQL database stops collecting data and gets ERROR: character with byte sequence 0x81 in encoding "WIN1252" has no equivalent in encoding "UTF8" in the archive logs Full log messages are : 1208_23:59:57.497 [INFO] T@40-OneMinuteAnalyzerThread 4 items accepted. 0 items successfully processed and 0 items failed in the last minute. active collectors: 14 CollectionAnalyzer$1::OneMinuteAnalyzerThread 1208_23:59:57.669 [INFO] T@8007-NewItemThread no new jobs were found. NewItemManager$NewItemGetterTask::run 1208_23:59:59.546 [WARNING] T@9053-CollectLoader unexpected exception occurred loading into collection queue. will try again in a few seconds. error is PreparedStatementCallback; SQL [SELECT * FROM job_info_working_table WHERE ( ( ( failure_date is null ) AND ( LOWER(coalesce(job_state,'~')) =LOWER(?) )) OR ( ( failure_date<=?) AND ( LOWER(coalesce(job_state,'~')) =LOWER(?) ))) ORDER BY end_time ASC LIMIT 200 ]; ERROR: character with byte sequence 0x81 in encoding "WIN1252" has no equivalent in encoding "UTF8"; nested exception is org.postgresql.util.PSQLException: ERROR: character with byte sequence 0x81 in encoding "WIN1252" has no equivalent in encoding "UTF8" CollectionManager::run |
1. The following query can be used to check how client encoding is set, after login into database using "arc_sql" utility: SHOW client_encoding; 2. To see if non-English characters are being used for the description of a job or jobname, do the following: Login into the database using "arc_sql" utility, and run following queries : select * FROM job_info_working_table WHERE description like '%ü%'; select * FROM job_info_working_table WHERE job_name like '%ü%'; If one of the queries returns data, please run the following: set client_encoding=utf8; select description FROM job_info_working_table WHERE description like '%ü%'; select job_name FROM job_info_working_table WHERE job_name like '%ü%'; Setting client encoding to "utf8" resolved the problem. To change the client encoding permanently, update the environment variable PGCLIENTENCODING in Control-M Workload Archiving to UTF8: - UNIX/Linux: Edit $HOME/ctm_em/archive/.PGenv.sh and $HOME/ctm_em/archive/.PGenv.csh and update PGCLIENTENCODING variable to UTF8 - Windows: Open "Control Panel" -> "System and Security" -> "System" -> "Advanced System Settings" -> "Environment Variables" and update PGCLIENTENCODING system variable to UTF8 After the changes, restart Control-M Workload Archiving |