Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
From: "Jérémie Galarneau via lttng-dev" <lttng-dev@lists.lttng.org>
To: "lttng-dev@lists.lttng.org" <lttng-dev@lists.lttng.org>
Subject: Re: [lttng-dev] Tracing a docker containerized java application from the host
Date: Thu, 16 Mar 2023 16:14:14 +0000	[thread overview]
Message-ID: <YT2PR01MB598409B4EB4A498DFDF47B5EBCBC9@YT2PR01MB5984.CANPRD01.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <CAMxxxdPaVF+gd-TK73XYpSQstmFtH98DVyo2SfoHqbH_+c2rDw@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 1902 bytes --]

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-bounces@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

[-- Attachment #1.2: Type: text/html, Size: 5111 bytes --]

[-- Attachment #2: Type: text/plain, Size: 156 bytes --]

_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

  reply	other threads:[~2023-03-16 16:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-16  0:03 Adel Belkhiri via lttng-dev
2023-03-16 16:14 ` Jérémie Galarneau via lttng-dev [this message]
     [not found]   ` <CAMxxxdNWgAM-UuOy+PWjoW9fV=6bQMTUersWinn4teN2+5XxqA@mail.gmail.com>
     [not found]     ` <CAMxxxdOiWf734KK3kOKOBJ56uj97Cc3rgfM2ppeMqJVuoW6-CQ@mail.gmail.com>
2023-03-17 16:17       ` Jérémie Galarneau via lttng-dev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YT2PR01MB598409B4EB4A498DFDF47B5EBCBC9@YT2PR01MB5984.CANPRD01.PROD.OUTLOOK.COM \
    --to=lttng-dev@lists.lttng.org \
    --cc=jgalar@efficios.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox