How To Debug Trap

Summary

This article outlines steps that can be taken to debug trap.

Trap Debugging

Where are the trap logs?

/opt/aspera/var/log/trapd/

On ec2 instances, this directory is also linked to:

/mnt/ephemeral/.trap/logs

How to start trap in debug mode

As root run:

# /etc/init.d/asperatrapd restart -DD

In Aspera On Demand 3.5.4 the debug log is called aspera-trapd-debug.log:

/opt/aspera/var/log/trapd/aspera-trapd-debug.log

In On Demand 3.4.6 and earlier the debug log is called aspera-ec2-s3.log:

/opt/aspera/var/log/trapd/aspera-ec2-s3.log

NOTE: Once asperatrapd has been started in debug mode, all of the log files located in trapd prior to starting asperatrapd in debug mode will be archived into a new directory, /mnt/ephemeral/.trap/logs-<date>. For example:

/mnt/ephemeral/.trapd/logs-2015-05-18_19-39-58

/mnt/ephemeral/.trapd/logs will contain log files beginning from when trap was started in debug mode. The debug logs can also be found in:

/opt/aspera/var/log/trapd/logs

Changing log levels at runtime

Trap supports changing log levels while it is running. To do this, edit the logback.xml configuration file:

# vi /opt/aspera/etc/trap/logback.xml

Change the ‘root’ element in the configuration file to level debug as follows:

 <root>
   <level value="debug"/>
   <appender-ref ref="TrapdAppender"/>
   <appender-ref ref="syslog-appender"/>
 </root> 

The change should be reflected in the logs approximately 60 seconds later.

NOTE: Be sure to restore the original values when finished. 

What is the current version of Trap ?

# /etc/init.d/asperatrapd version

Trap seems to hang: What should I do ?

Generate a thread dump from Trap for analysis:

# /etc/init.d/asperatrapd threaddump

The thread dump will be located in:

/opt/aspera/var/log/trapd/trapd_stdout.log

Unable to create system buffer pool with buffer capacity

This happens when there is not sufficient system memory.

2016-05-19T08:18:49.393Z ERROR [main] START_LOG - Failed to start TrapDaemon: java.io.IOException: Unable to create system buffer pool with buffer capacity [1048576], max-buffers [5381]
 Either the system is running with less memory than requested
 or Shared Memory is ill configured on this system.

You can check the available memory with the command "free"

solutions are:

  • add more memory
  • add swap (create a swap file or partition)
  • reduce the amount of buffers in trapd:
    edit the file: /opt/aspera/etc/trapd/trap.properties and set the parameter: system.buffer-pool.memory

 

 

 

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk