Troubleshooting
Problem
When the HPC database report the column type is not match issue, how to fix them?
Cause
The below is some error log sample for this issue:
2018-01-12 00:00:15 CET xcatdb xcatadm ERROR: column "count" is of type integer but expression is of type character varying at character 136 2018-01-12 00:00:15 CET xcatdb xcatadm HINT: You will need to rewrite or cast the expression. 2018-01-12 00:00:15 CET xcatdb xcatadm STATEMENT: Insert into PCM_NODE_COUNTS (TIME_STAMP, TIME_STAMP_GMT, COUNT ) Values ($1, $2, $3)
2018-01-12 00:00:15 CET xcatdb xcatadm ERROR: column "job_type" is of type numeric but expression is of type character varying at character 602 2018-01-12 00:00:15 CET xcatdb xcatadm HINT: You will need to rewrite or cast the expression. 2018-01-12 00:00:15 CET xcatdb xcatadm STATEMENT: INSERT INTO LSF_BJOBS (TIME_STAMP_GMT, CLUSTER_NAME, JOB_ID, JOB_ARRAY_INDEX, TIME_STAMP, SUBMIT_TIME, START_TIME, JOB_TYPE, JOB_STATUS_STR, JOB_NAME, FROM_HOST, EXEC_HOSTS, JOB_GROUP, USER_NAME, USER_GROUP, QUEUE_NAME, PROJECT_NAME, SWAP_USAGE, MEM_USAGE, CPU_TIME, CPU_DELTA, CPU_UTIL, NUM_PROCESSORS, SLOT_FLAG, IS_REMOTE, JOB_DESCRIPTION, SAMPLING_INTERVAL) VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27)
2018-01-12 00:01:12 CET xcatdb xcatadm ERROR: column "master_changed" is of type boolean but expression is of type character varying at character 801 2018-01-12 00:01:12 CET xcatdb xcatadm HINT: You will need to rewrite or cast the expression. 2018-01-12 00:01:12 CET xcatdb xcatadm STATEMENT: INSERT INTO HPC_CLUSTER_METRICS (CLUSTER_NAME, TIME_STAMP, TIME_STAMP_GMT, LICENSE_EXPIRE_GMT, MASTER_CHANGED, MASTER_HOST, SHARED_DISK_FREE, SHARED_DISK_MAX, JOB_REPO_DISK_FREE1, JOB_REPO_DISK_MAX1, JOB_REPO_DIR_NAME1, JOB_REPO_DISK_FREE2, JOB_REPO_DISK_MAX2, JOB_REPO_DIR_NAME2, JOB_REPO_DISK_FREE3, JOB_REPO_DISK_MAX3, JOB_REPO_DIR_NAME3, JOB_REPO_DISK_FREE4, JOB_REPO_DISK_MAX4, JOB_REPO_DIR_NAME4, INTERVAL_PERIOD) VALUES($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21)
The root cause is that the column data type in perf loader configure xml file is not consistent with the database initialization design. For example,
column "count" issue is for the table of PCM_NODE_COUNTS, the loader configuration xml is hostconfigloader.xml;
column "job_type" issue is for the table of LSF_BJOBS, the loader xml configuration is bjobs.xml;
column "master_changed" issue is for the table of LSF_BJOBS, the loader xml configuration is hpcclustermetrics .xml
Diagnosing The Problem
The easiest fixing way is to modify data type in perf loader xml file to make it same with sql initialization.
Resolving The Problem
For the above issue, follow the below steps to fix them:
1. Change the below files
<1> In /opt/pcm/web-portal/perf/conf/dataloader/bjobs.xml
change the line <Field Name="JOB_TYPE" Column="JOB_TYPE"/> to
<Field Name="JOB_TYPE" Column="JOB_TYPE" Type="Numeric"/>
<2> In /opt/pcm/web-portal/perf/conf/dataloader/hpcclustermetrics.xml
change the line <Field Name="master_changed" Column="MASTER_CHANGED"/> to <Field Name="master_changed" Column="MASTER_CHANGED" Type="Boolean"/>
<3> In /opt/pcm/web-portal/perf/conf/dataloader/hostconfigloader.xml
change the line <Field Name="count" Column="COUNT" /> to
<Field Name="count" Column="COUNT" Type="integer" />
2. # pcmadmin service restart --service PLC
Was this topic helpful?
Document Information
More support for:
Platform HPC for System x
Software version:
4.2
Operating system(s):
Linux
Document number:
633875
Modified date:
17 June 2018
UID
isg3T1026830