Relay troubleshooting tips (v1.4.0)
These tips are based on version 1.4.0 of the Devo Relay.
The Devo In-house Relay software is based on a Syslog engine called Scoja written in Java. Also, there are some processes written in Python that perform other tasks.
Recommendation
This software is prepared to be installed in any Linux system, but Devo recommends using Ubuntu.
Once running, the Scoja process listens for TCP/UDP connections on ports and, depending on the port, it modifies the Syslog events and forwards them to the Devo central collector. The main role of the relay is to tag events based on a defined rule, then forward the tagged events to Devo.Â
The relay comes with a few ports that are preconfigured with rules for managing specific types of events. For example, port 13000 is preconfigured to forward the events received directly to Devo without any other processing. This port should be used for events that are properly tagged in the data source. You can also create custom rules to tag and/or filter the events sent to the associated port on the relay. Each rule is stored in one of these two folders:
/opt/logtrust/scoja-server/conf/rules/ → Rules managed from the Devo web application.
/opt/logtrust/scoja-server/conf/unrules/ → Rules not managed from the Devo web application. These rules are directly managed from the relay machine itself.
About the relay logs files
First, a word about the logs generated by the Devo Relay that can be used to investigate and identify problems with the relay.
The main logs files are:
/var/log/scoja.log → Main activity log of the Scoja engine. For example, if there is an error starting the process, it will be logged in this file.
/var/log/lt-relay.log → Contains events related to rules and changes to the relay configuration.
In addition, daily log files are generated and stored in:
/var/logt/local/<year>/<month>/<day>/<relayName>/syslog/scoja/
main.log → main process log file
source.log → logs related to the sources configured
thread.log → threads opened for each source
stats.log → statistics about received and sent events
target.log  → logs related to the sending process
These five daily logs are compressed at night by a cron task.
Troubleshooting checklist
- 1 Make sure only one Scoja process (Java) is runningÂ
- 2 Check the scoja.log file for errors
- 3 Confirm that the default ports are listening
- 4 Ensure that the client certificate is installed
- 5 Ensure that the relay configuration is updating correctly
- 6 Send test events to confirm relay is receiving and forwarding correctly
- 7 Check the relay's internet proxy configuration
- 8 Some common problems and solutions
Make sure only one Scoja process (Java) is runningÂ
# ps auxwww|grep java|grep scoja|grep -v grep
root 4695 0.5 25.7 2674484 259408 ? Sl 14:23 0:39 java -classpath /opt/logtrust/scoja-server/lib/scoja-server-1.4.0.jar:/opt/logtrust/scoja-server/lib/scoja-client-1.4.0.jar:/opt/logtrust/scoja-server/lib/scoja-beep-1.4.0.jar:/opt/logtrust/scoja-server/lib/scoja-rpc-1.4.0.jar:/opt/logtrust/scoja-server/lib/scoja-compression-1.4.0.jar:/opt/logtrust/scoja-server/lib/scoja-rpc-xc-1.4.0.jar:/opt/logtrust/scoja-server/lib/scoja-cc-1.4.0.jar:/opt/logtrust/scoja-server/lib/jython-standalone-2.7.2b3.jar:/opt/logtrust/scoja-server/lib/log4j-1.2.17.jar org.scoja.server.Scoja -r 5s -G /opt/logtrust/scoja-server/conf/all-me.conf -j /opt/logtrust/scoja-server/conf/all-var.conf
If there is more than one process running, you should kill all of them using the command kill -9 <PID>, then start the relay again:
sudo /etc/init.d/devo-relay start
If the Java process is still not appearing after restarting the relay, check the scoja.log file for errors.
Check the scoja.log file for errors
Use cat to display the contents of the scoja.log:
scoja.log
# cat /var/log/scoja.log
May 24 16:03:54 relayInhouseSecMon syslog.scoja.configuration: (Re)Loading configuration file /opt/logtrust/scoja/version1/all-me.conf
May 24 16:03:54 relayInhouseSecMon syslog.scoja.thread: Starting thread 1 for Queue "internal queue" with 1 queued events, 1 max threads, 1 threads started, 0 threads awaiting
May 24 16:03:54 relayInhouseSecMon syslog.scoja.configuration: (Re)Loading configuration file /opt/logtrust/scoja/version1/parameters.conf
May 24 16:03:55 relayInhouseSecMon syslog.scoja.configuration: Configuration file /opt/logtrust/scoja/version1/parameters.conf successfully parsed
May 24 16:03:55 relayInhouseSecMon syslog.scoja.configuration: Configuration file /opt/logtrust/scoja/version1/parameters.conf successfully (re)loaded
May 24 16:03:55 relayInhouseSecMon syslog.scoja.configuration: (Re)Loading configuration file /opt/logtrust/scoja/version1/me.conf
May 24 16:03:56 relayInhouseSecMon syslog.scoja.configuration: Configuration file /opt/logtrust/scoja/version1/me.conf successfully parsed
May 24 16:03:56 relayInhouseSecMon syslog.scoja.configuration: Configuration file /opt/logtrust/scoja/version1/me.conf successfully (re)loaded
May 24 16:03:56 relayInhouseSecMon syslog.scoja.configuration: Configuration file /opt/logtrust/scoja/version1/all-me.conf successfully (re)loaded
May 24 16:03:56 relayInhouseSecMon syslog.scoja.configuration: (Re)Loading configuration file /opt/logtrust/scoja/version1/all-var.conf
May 24 16:03:57 relayInhouseSecMon syslog.scoja.configuration: Configuration file /opt/logtrust/scoja/version1/all-var.conf successfully parsed
May 24 16:03:57 relayInhouseSecMon syslog.scoja.configuration: Configuration file /opt/logtrust/scoja/version1/all-var.conf successfully (re)loaded
...
May 24 16:03:57 relayInhouseSecMon syslog.scoja.source.net.udp: Starting UDP source listening at 0.0.0.0:13002
May 24 16:03:57 relayInhouseSecMon syslog.scoja.source.net.tcp: Opening server socket for Selecting TCP source listening at 0.0.0.0:13001
May 24 16:03:57 relayInhouseSecMon syslog.scoja.thread: Starting thread 1 for UDP source listening at 0.0.0.0:13002
May 24 16:03:57 relayInhouseSecMon syslog.scoja.source.net.tcp: Starting Selecting TCP source listening at 0.0.0.0:13002
May 24 16:03:57 relayInhouseSecMon syslog.scoja.source.net.udp: Opening server socket for UDP source listening at 0.0.0.0:13002
May 24 16:03:57 relayInhouseSecMon syslog.scoja.thread: Starting thread 1 for Selecting TCP source listening at 0.0.0.0:13002
May 24 16:03:57 relayInhouseSecMon syslog.scoja.main: Reloader started to run every 5.0 seconds
May 24 16:03:57 relayInhouseSecMon syslog.scoja.main: Scoja started
If the log file contains the error /opt/logtrust/scoja/scoja.sh: 60: java: not found, this means that it is unable to find the Java interpreter. In this case, consider creating a symbolic link or editing the JAVA_HOME environment variable.
Confirm that the default ports are listening
Ports 13000-13002 are listening on both TCP and UDP.
Port 12999 is listening on UDP and is prepared to receive external Netflow traffic (Netflow version < 9).Â
Port 5141 is for internal Netflow traffic obtained using fprobe.
Port 5140 is listening on TCP and UDP to handle internal relay logs.Â
Ensure that the client certificate is installed
The client certificate file, client.jks, should be installed in the relay's /opt/logtrust/scoja-server/conf/keys/ folder.Â
If the certificate download fails, you can force the download again:
Log into the Devo web application.
Go to Administration → Relays and ELBs → Relays, click the ellipsis menu of the required relay, and select Edit. The Relay Input (Rules) screen appears.Â
Select the Force Generate New Certificate check box, then click the Apply Configuration button.
Ensure that the relay configuration is updating correctly
A cron task runs every minute to check if any changes to the relay configuration have been made in Devo. The result of this check appears in the lt-relay.log file.Â
The "Property 'api.key' not found in conf file" meesage indicates that the devo-relay-configure process has not been executed yet and there is no API key defined in the relay.
The "Relay activation is still pending" message indicates that relay is registered but has not yet been activated in the Devo web application.
The "Relay is active" message confirms that the relay has been activated and new configuration has been downloaded.
Once activated, you will be able to define the relay rules using the web application. The relay will begin checking the configuration for updates every 1 minute.
The "No changes in Relay Configuration" message occurs every minute to confirm that no changes were detected in the relay configuration.
During the first configuration, the certificate is also downloaded. If the certificate download fails, you must force the download again.
Send test events to confirm relay is receiving and forwarding correctly
We can use netcat to send 100 events to the relay port 13000' to confirm that it is receiving and forwarding events to Devo. Enter this command on the relay machine:
To confirm that the events were processed correctly, open Devo, go to Data Search, and locate the test.keep.free table. This table should contain 100 events.Â
If there are no events logged in the test.keep.free table, check the unknown.unknown table. If there was a problem applying the tags, events will be logged in this table.
Check the relay's internet proxy configuration
If the Devo relay uses a proxy to access the Internet, you can review the configuration for possible errors.
The internet proxy is configured in /opt/logtrust/scoja-server/conf/local.py. In the sample configuration below, the proxy IP address is 12.12.12.12 and the port is 8080.
The hop host should be the hostname for the Devo region you are using and the port must always be 443. These are the hostnames by region.
Europe: eu.elb.relay.logtrust.net
USA: us.elb.relay.logtrust.net
Some common problems and solutions
Problem 1: Scoja doesn't start
In certain Linux distributions, edits need to be made to the /etc/hosts file to define the localhost IP address. If these edits are not made, the Scoja process will not start and the following error is written to the /var/log/scoja.log file.
scoja.log
Solution: Open the /etc/hosts for editing and set the relay_hostname to resolve to localhost IP 127.0.0.1 as indicated here.
Problem 2: Daily logs not getting compressed at night
Each night, a cron task should compress the daily logs stored in /var/logt/local/<year>/<month>/<day>/<relayName>/syslog/scoja/. If these are not getting compressed at night, there is a problem.
Solution: Fix the configuration of the cron task. The cron task must run as the root user. For example:Â
Incorrect: cat /etc/cron.d/lt-compress 30 02 * * * devo /usr/local/bin/daily_compress.sh
Correct: cat /etc/cron.d/lt-compress 30 02 * * * root /usr/local/bin/daily_compress.sh