Hi Adel,

The java tracing facilities make use of an agent that communicates with the 
session deamon through a TCP socket. You must to ensure your java application 
can connect to the session daemon's 'agent-tcp-port'.

https://lttng.org/man/8/lttng-sessiond/v2.13/#doc-opt--agent-tcp-port

Is that port properly exposed by your container configuration?

Jérémie

--
Jérémie Galarneau
EfficiOS Inc.
https://www.efficios.com
________________________________
From: lttng-dev <lttng-dev-boun...@lists.lttng.org> on behalf of Adel Belkhiri 
via lttng-dev <lttng-dev@lists.lttng.org>
Sent: March 15, 2023 20:03
To: lttng-dev@lists.lttng.org <lttng-dev@lists.lttng.org>
Subject: [lttng-dev] Tracing a docker containerized java application from the 
host

Hello everyone,

I am reaching out to seek assistance in tracing an instrumented Java 
application running within a Docker container from the host side.

In my setup, the LTTng session daemon, running on the host side, indicates that 
application registration has been completed (please refer to the logs). 
However, when running the command "lttng list --jul," no registered 
applications are displayed. Although the application successfully creates the 
"LttngLogHandler" object and attaches it to the logger, no traces are generated.

To allow the application to access the lttng socket file, the host's 
/var/run/lttng directory is shared with the container at launch (using the 
command "sudo docker run -p 8080:8080 -v /var/run/lttng:/var/run/lttng 
sample-image"). I am only interested in collecting userspace Java (--jul) 
traces.

I would greatly appreciate any assistance or guidance that you can provide. 
Thank you for your time.

Additional details include:

Ubuntu 22.04
Kernel: 5.15.0-60-generic
LTTng session daemon version: 2.13.2
Docker version 20.10.21, build 20.10.21-0ubuntu1~22.04.2
Regards,
Adel Belkhiri
_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

Reply via email to