<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof">
Hi Adel,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof">
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'.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof ContentPasted0">
<a href="https://lttng.org/man/8/lttng-sessiond/v2.13/#doc-opt--agent-tcp-port" id="LPNoLPOWALinkPreview">https://lttng.org/man/8/lttng-sessiond/v2.13/#doc-opt--agent-tcp-port</a><br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof ContentPasted0">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof ContentPasted0">
Is that port properly exposed by your container configuration?</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof ContentPasted0">
<br>
</div>
<div class="_Entity _EType_OWALinkPreview _EId_OWALinkPreview _EReadonly_1"></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof">
<span style="color: rgb(0, 0, 0); font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;">Jérémie</span><br>
</div>
<div class="elementToProof">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="Signature">
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
--</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Jérémie Galarneau</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<div>EfficiOS Inc.</div>
<a href="https://www.efficios.com" data-loopstyle="link">https://www.efficios.com</a><br>
</div>
</div>
</div>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> lttng-dev <lttng-dev-bounces@lists.lttng.org> on behalf of Adel Belkhiri via lttng-dev <lttng-dev@lists.lttng.org><br>
<b>Sent:</b> March 15, 2023 20:03<br>
<b>To:</b> lttng-dev@lists.lttng.org <lttng-dev@lists.lttng.org><br>
<b>Subject:</b> [lttng-dev] Tracing a docker containerized java application from the host</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div>Hello everyone,<br>
<br>
I am reaching out to seek assistance in tracing an instrumented Java application running within a Docker container from the host side.<br>
<br>
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.<br>
<br>
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.<br>
<br>
I would greatly appreciate any assistance or guidance that you can provide. Thank you for your time.<br>
<br>
Additional details include:<br>
<br>
Ubuntu 22.04<br>
Kernel: 5.15.0-60-generic<br>
LTTng session daemon version: 2.13.2<br>
Docker version 20.10.21, build 20.10.21-0ubuntu1~22.04.2<br>
Regards,</div>
<div>Adel Belkhiri <br>
</div>
</div>
</div>
</body>
</html>