ERROR procedure 'parse_csv' statement execution has been aborted
Hello, I just setup the NXLog to work with Graylog to process CSV file (converted from some java.utils.logging logs (WebSphere and FileNet). It's a lab environment (docker) to test and evaluate the tools.
The solution is woking ok so far but while I am feeding the csv file I am getting errors for some of the lines.
I started the nxlog container by mapping a volume for the csv (input) file like: logs_filenet.csv:/var/log/filenet/logs.csv. I am echoing lines ou cating files and directing it's output to logs_filenet.csv file on the docker host.
Below is my nxlog.conf:
===================================================================================================
## This is a sample configuration file. See the nxlog reference manual about the
## configuration options. It should be installed locally under
## /usr/share/doc/nxlog-ce/ and is also available online at
## http://nxlog.org/docs
########################################
# Global directives #
########################################
User nxlog
Group nxlog
LogFile /var/log/nxlog/nxlog.log
LogLevel INFO
########################################
# Modules #
########################################
<Extension gelf>
Module xm_gelf
</Extension>
<Extension csv>
Module xm_csv
Fields $fn_source, $fn_event_date, $fn_event_time, $fn_thread, $fn_sub, $fn_error_code, $fn_event_type, $fn_full_message
Delimiter ;
</Extension>
<Input file>
Module im_file
File "/var/log/filenet/logs.csv"
<Exec>
csv->parse_csv();
</Exec>
</Input>
<Output tcp>
Module om_tcp
Host 172.17.0.4
Port 12201
OutputType GELF_TCP
</Output>
########################################
# Routes #
########################################
<Route csv_to_gelf>
Path file => tcp
</Route>
===================================================================================================
And this is the errors I am getting from the nxlog.log:
===================================================================================================
2021-07-22 00:15:36 WARNING already running as gid 998
2021-07-22 00:15:36 WARNING already running as uid 999
2021-07-22 00:55:08 ERROR procedure 'parse_csv' failed at line 32, character 25 in /etc/nxlog.conf. statement execution has been aborted;Invalid CSV input: 'fcm:server;2021-07-19;21:00:42;752A06AC;ENG;FNRCE0043E;ERROR;"2021-07-19 21:00:42 752A06AC ENG FNRCE0043E - ERROR method name: checkNameCollision principal name: XXXXXXX Global Transaction: true User Transaction: false Exception Info: A uniqueness requirement has been violated. The value for property FolderName of class someClass is nfcm:server;2021-07-19;21:00:42;752A06AC;ENG;FNRCE0043E;ERROR;"2021-07-19 21:00:42 752A06AC ENG FNRCE0043E - ERROR method name: checkNameCollision principal name: XXXXXXX Global Transaction: true User Transaction: false Exception Info: A uniqueness requirement has been violated. The value for property FolderName of class someClass is not unique."'
2021-07-22 02:22:05 ERROR procedure 'parse_csv' failed at line 32, character 25 in /etc/nxlog.conf. statement execution has been aborted;Invalid CSV input: 'fcm:server;2021-07-20;09:08:27;EC70023B;ENG;FNRCR0080E;ERROR;"2021-07-20 09:08:27 EC70023B ENG FNRCR0080E - ERROR method name: getFolderIdNoError principal name: XXXXXXX Global Transaction: false User Transaction: false Exception Info: The path "Não informado" does not start with the required forward or reverse slash."'
2021-07-22 02:22:05 ERROR procedure 'parse_csv' failed at line 32, character 25 in /etc/nxlog.conf. statement execution has been aborted;Invalid CSV input: 'fcm:server;2021-07-20;09:08:44;6F09F23D;ENG;FNRCR0080E;ERROR;"2021-07-20 09:08:44 6F09F23D ENG FNRCR0080E - ERROR method name: getFolderIdNoError principal name: XXXXXXX Global Transaction: false User Transaction: false Exception Info: The path "Não informado" does not start with the required forward or reverse slash."'
2021-07-22 02:24:05 ERROR procedure 'parse_csv' failed at line 32, character 25 in /etc/nxlog.conf. statement execution has been aborted;Invalid CSV input: 'fcm:server;2021-07-20;09:19:14;44DA04B6;ENG;FNRCR0080E;ERROR;"2021-07-20 09:19:14 44DA04B6 ENG FNRCR0080E - ERROR method name: getFolderIdNoError principal name: XXXXXXX Global Transaction: false User Transaction: false Exception Info: The path "Não informado" does not start with the required forward or reverse slash."'
2021-07-22 02:24:05 ERROR procedure 'parse_csv' failed at line 32, character 25 in /etc/nxlog.conf. statement execution has been aborted;Invalid CSV input: 'fcm:server;2021-07-20;09:26:38;C38C4FD0;ENG;FNRCR0080E;ERROR;"2021-07-20 09:26:38 C38C4FD0 ENG FNRCR0080E - ERROR method name: getFolderIdNoError principal name: XXXXXXX Global Transaction: false User Transaction: false Exception Info: The path "Não informado" does not start with the required forward or reverse slash."'
2021-07-22 02:30:05 ERROR procedure 'parse_csv' failed at line 32, character 25 in /etc/nxlog.conf. statement execution has been aborted;Invalid CSV input: 'fcm:server;2021-07-20;10:20:29;6447AF17;ENG;FNRCR0080E;ERROR;"2021-07-20 10:20:29 6447AF17 ENG FNRCR0080E - ERROR method name: getFolderIdNoError principal name: XXXXXXX Global Transaction: false User Transaction: false Exception Info: The path "Não informado" does not start with the required forward or reverse slash."'
2021-07-22 02:34:05 ERROR procedure 'parse_csv' failed at line 32, character 25 in /etc/nxlog.conf. statement execution has been aborted;Invalid CSV input: 'fcm:server;2021-07-20;10:54:12;62F887F6;ENG;FNRCE0066E;ERROR;"2021-07-20 10:54:12 62F887F6 ENG FNRCE0066E - ERROR method name: executeSearch principal name: I362279 Global Transaction: false User Transaction: false Exception Info: An unexpected exception occurred. Message was: For input string: "35997028887""'
2021-07-22 02:34:05 ERROR procedure 'parse_csv' failed at line 32, character 25 in /etc/nxlog.conf. statement execution has been aborted;Invalid CSV input: 'fcm:server;2021-07-20;10:55:08;D36E314A;ENG;FNRCR0080E;ERROR;"2021-07-20 10:55:08 D36E314A ENG FNRCR0080E - ERROR method name: getFolderIdNoError principal name: XXXXXXX Global Transaction: false User Transaction: false Exception Info: The path "Não informado" does not start with the required forward or reverse slash."'
2021-07-22 02:48:05 ERROR procedure 'parse_csv' failed at line 32, character 25 in /etc/nxlog.conf. statement execution has been aborted;Invalid CSV input: 'fcm:server;2021-06-02;23:40:45;CMR1.ICM35BF;PESecondary2;PESecondary2;Error;"2021-06-02 23:40:45 CMR1.ICM35BF PESecondary2 DB=SOME_DB Reg#1 [Error] FNRPE2131090436E CMQueueInfo:getServerConfigEntries caught unexpected exception when get farm config; Exception: Assertion failed in file "DbTransaction.java", method "PushTransaction", line 245. "'
2021-07-22 02:48:05 ERROR procedure 'parse_csv' failed at line 32, character 25 in /etc/nxlog.conf. statement execution has been aborted;Invalid CSV input: 'fcm:server;2021-07-02;20:25:43;EventExp25B5;PESecondary2;PESecondary2;Error;"2021-07-02 20:25:43 EventExp25B5 PESecondary2 [Error] Exception while attempting to begin processing a store CADB.; Exception: com.filenet.api.exception.EngineRuntimeException: FNRCE0066E: E_UNEXPECTED_EXCEPTION: An unexpected exception occurred. Message was: A communication failure occurred while attempting to obtain an initial context with the provider URL: "corbaloc:rir:/NameServiceServerRoot". Make sure that any bootstrap address information in the URL is correct and that the target name server is running. A bootstrap address with no port specification defaults to port 2809. Possible causes other than an incorrect bootstrap address or unavailable name server include the network environment and workstation network configuration. errorStack={ "'
2021-07-22 02:54:06 ERROR procedure 'parse_csv' failed at line 32, character 25 in /etc/nxlog.conf. statement execution has been aborted;Invalid CSV input: 'fcm:server;2021-07-20;09:17:20;AC4CFEFB;ENG;FNRCR0080E;ERROR;"2021-07-20 09:17:20 AC4CFEFB ENG FNRCR0080E - ERROR method name: getFolderIdNoError principal name: XXXXXXX Global Transaction: false User Transaction: false Exception Info: The path "Não informado" does not start with the required forward or reverse slash."'
===================================================================================================
I am achieving success on most of the lines on the csv but I am wondering what are the errors above. Any clue on what is the problem or how to troubleshoot it ?
Andre
It says that the problem is Invalid CSV input:
If you look at the data in the log you can see that the last message field contains double quotes in the middle of the string and looks like the csv parser cannot deal with this.