Knime-Server (Tomcat) Logs

Hello

currently some Knime-Server-Logs are directed into /var/log/messages on the server.
These are messages like:
Apr 20 09:21:31 dcplnx99999999 sh[18844]: at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
Apr 20 09:21:31 dcplnx99999999 sh[18844]: at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382)
Apr 20 09:21:31 dcplnx99999999 sh[18844]: at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
Apr 20 09:21:31 dcplnx99999999 sh[18844]: at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
Apr 20 09:21:31 dcplnx99999999 sh[18844]: at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
Apr 20 09:21:31 dcplnx99999999 sh[18844]: at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
Exceptions resulting from Errors in Workflows.

These Messages from the knime-server (tomcat) and knime-executor should be written to separate files.
Since knime is installed on Red Hat 7.8. two .conf Files were written into the directory:

/etc/rsyslog.d

knime.conf_(existing configuration which writes into application.log , no problems with that________
if $msg contains ‘knime’ or $msg contains ‘KNIME’ or $msg contains ‘DevToolsActivePort’ or $msg contains ‘oracle.net.ns.NetException’ or $msg contains ‘java.sql.SQLException’ or $msg contains ‘java.sql.SQLRecoverableException’ then /var/log/application.log
& stop


I created:

knime-executor.conf______________________________________________
if $_SYSTEMD_UNIT contains ‘knime-executor’ then /var/log/knime-executor.log
& stop


knime-server.conf________________________________________________
if $_SYSTEMD_UNIT contains ‘knime-server’ then /var/log/knime-server.log
& stop


restartet rsyslog

The Logs in the directory
/var/log

knime-executor.log________________________________________________
Apr 21 12:45:46 dcplnx99999999 rootsh[07757]: root: 075: systemctl stop knime-executor
Apr 21 12:47:45 dcplnx99999999 rootsh[07757]: root: 082: systemctl status knime-executor
Apr 21 12:49:52 dcplnx99999999 rootsh[07757]: root: 086: journalctl -u knime-executor
Apr 21 12:50:27 dcplnx99999999 rootsh[07757]: root: 087: cat /var/log/knime-executor.log
Apr 21 16:18:17 dcplnx99999999 rootsh[04de4]: root: 048: nano knime-executor.conf
Apr 21 16:26:56 dcplnx99999999 rootsh[04de4]: root: 056: nano knime-executor.conf
Apr 21 16:31:12 dcplnx99999999 rootsh[04de4]: root: 061: journalctl -u knime-executor
Apr 21 16:33:49 dcplnx99999999 rootsh[04de4]: root: 063: journalctl -u knime-executor


knime-server.log__________________________________________________
Apr 21 12:48:16 dcplnx99999999 rootsh[07757]: root: 084: nano knime-server.conf
Apr 21 12:49:37 dcplnx99999999 rootsh[07757]: root: 085: najournalctl -u knime-server
Apr 21 14:33:25 dcplnx99999999 rootsh[04de4]: root: 000: nano /etc/rsyslog.d/knime-server.conf
Apr 21 16:30:44 dcplnx99999999 rootsh[04de4]: root: 060: journalctl -u knime-server
Apr 21 16:33:12 dcplnx99999999 rootsh[04de4]: root: 062: journalctl -u knime-server


This is a bit less, than I would expect;
with
journalctl -u knime-server
and
journalctl -u knime-executor
the log messages being still routed into /var/log/messages
I know this is more a Red Hat question, but maybe you have experienced this problem also
and have a solution.

About. the Fields , that rsyslog provides here some usefull hints.

Thanks in advance.

B.Kochs

I solved the problem with the following solution:

The configuration of the Services knime-server und knime-executor were customized:

/usr/local/lib/systemd/system/knime-executor.service______________________

User=knime-executor

StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=knime-executor-dienst


/usr/local/lib/systemd/system/knime-server.service________________________

User=knime-server

Group=knime
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=knime-server-dienst


In /etc/rsyslog.d the following conf Files were created:

knime-executor.conf_______________________________________________________
if $programname == ‘knime-executor-dienst’ then /var/log/knime-executor.log
& stop


knime-server.conf_________________________________________________________
if $programname == ‘knime-server-dienst’ then /var/log/knime-server.log
& stop


Restart the rsyslog Service: /etc/init.d/rsyslog restart

To reproduce where the Errormessage was written into, a Workflow which refers to a local file
was written and executed in the Webportal.
The errormessage appears now in the knime-executor.log:

cat knime-executor.log

Apr 23 17:16:00 dcplnx99999999 knime-executor-dienst: WARN #011 KNIME-Worker-1-ValSel_Component 0:12 Node#011 java.sql.SQLSyntaxErrorException: ORA-00903: invalid table name
Apr 23 17:17:15 dcplnx99999999 knime-executor-dienst: Enter a number and press enter:Enter a number and press enter:Enter a number and press enter:
Enter a number and press enter:WARN #011 pool-2-thread-17 Node#011 Input file ‘/C:\HTML\Person2.csv’ does not exist
Apr 23 17:17:15 dcplnx99999999 knime-executor-dienst: WARN #011 pool-2-thread-17 Node#011 Input file ‘/C:\HTML\Person2.csv’ does not exist
Apr 23 17:17:17 dcplnx99999999 knime-executor-dienst: WARN #011 pool-2-thread-19 Node#011 Input file ‘/C:\HTML\Person2.csv’ does not exist
Apr 26 08:27:16 dcplnx99999999 knime-executor-dienst: WARN #011 pool-2-thread-27 Node#011 Input file ‘/C:\HTML\Person2.csv’ does not exist
Apr 26 08:27:16 dcplnx99999999 knime-executor-dienst: WARN #011 pool-2-thread-27 Node#011 Input file ‘/C:\HTML\Person2.csv’ does not exist
Apr 26 08:27:18 dcplnx99999999 knime-executor-dienst: WARN #011 pool-2-thread-3 Node#011 Input file ‘/C:\HTML\Person2.csv’ does not exist

2 Likes