| Solution | The following steps describe how to identify an issue with 'pthe h_incident_story table' and fix the errors. - Check into AppSvr Server logs using the below command:
tail -f /opt/glassfish/domains/domain1/logs/server.log [2024-07-16T10:55:26.137+0200] [glassfish 5.1] [WARNING] [] [javax.enterprise.ejb.container] [tid: _ThreadID=23887 _ThreadName=p: thread-pool-1; w: 17] [timeMillis: 1721120126137] [levelValue: 900] [[
javax.ejb.EJBException: Transaction aborted Caused by: javax.transaction.RollbackException: Transaction marked for rollback. Caused by: javax.persistence.PersistenceException: org.hibernate.exception.DataException: could not execute batch Caused by: java.sql.BatchUpdateException: Batch entry 0 insert into ph_incident_story (collector_id, creation_time, cust_org_id, last_modified_time, owner_id, attributes, first_seen_time, incident_id, label, neighbors, story_id, id) values (NULL, 0, 2013, 0, NULL, '[]', 1721120055000, 20665, 'FortiGate config object 445 was changed with value uuid[ecac9ace-4350-51ef-cd02-b7ef1265fc91]name[temp_qa-app01_to_dev_lb]srcintf[ivl_mgmt_qa00]dstintf[ivl_mgmt_dev00]action[accept]srcaddr[qa-app01.kaktus.local]dstaddr[dev-lb]srcaddr6[]dstaddr6[]src-vendor-mac[]schedule[always]service[tcp-2529 tcp-2542 tcp-42410 tcp-6086]logtraffic[all]groups[]users[]fsso-groups[]comments[temp tofo 2024-07-16]custom-log-fields[] by user t1maka', '[]', 318241062, 346806523) was aborted: ERROR: value too long for type character varying(255) Call getNextException to see other errors in the batch. at org.postgresql.jdbc.BatchResultHandler.handleError(BatchResultHandler.java:165)
Caused by: org.postgresql.util.PSQLException: ERROR: value too long for type character varying(255) - Check from database logs:
tail -f /cmdb/data/pg_log/postgresql.log < 2024-07-16 08:00:02.344 GMT >STATEMENT: insert into ph_incident_story (collector_id, creation_time, cust_org_id, last_modified_time, owner_id, attributes, first_seen_time, incident_id, label, neighbors, story_id, id) values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12) < 2024-07-16 08:00:02.344 GMT >ERROR: value too long for type character varying(255) - Enter the below commands from Supervisor CLI:
psql -U phoenix phoenixdb
alter table ph_incident_story alter column label type text;
\q - Check again from AppSvr and database logs if the errors no longer persist.
|