Skip to content

ros2daemon log behavior and management with doc #1236

@fujitatomoya

Description

@fujitatomoya

Generated by Generative AI

No response

Operating System:

Linux tomoyafujita-B760M-Pro-RS-D4 6.17.0-29-generic #29~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon May 11 10:30:58 UTC 2 x86_64 GNU/Linux

ROS version or commit hash:

rolling source build

RMW implementation (if applicable):

No response

RMW Configuration (if applicable):

No response

Client library (if applicable):

No response

'ros2 doctor --report' output

ros2 doctor --report
<COPY OUTPUT HERE>

Steps to reproduce issue

i would like to track 2 things on this issue.

  1. ros2daemon (daemonized process) does not print any logging information into the file. this does not really help to debug the daemon process behavior when we find the issues related to ros2daemon. my guess is that, daemon is forked off the CLI, so its stdout/stderr are disabled during instantiation. besides that, we probably should use node (daemonized node) logger instead of python print to keep the log data via rcl and logging backend.
root@tomoyafujita-B760M-Pro-RS-D4:~/.ros/log# ps -ef
UID          PID    PPID  C STIME TTY          TIME CMD
root           1       0  0 17:56 pts/0    00:00:00 /bin/bash
root          18       0  0 17:56 pts/1    00:00:00 /bin/bash
root         467       0  0 18:02 pts/2    00:00:00 /bin/bash
root         656       1  8 18:04 pts/1    00:00:02 /usr/bin/python3 -c from ros2cli.daemon.daemonize import main; main() --name ros2-daemon --ros-domain-
root         773     467  0 18:05 pts/2    00:00:00 ps -ef
root@tomoyafujita-B760M-Pro-RS-D4:~/.ros/log# ls
python3_656_1779354288599.log
root@tomoyafujita-B760M-Pro-RS-D4:~/.ros/log# cat python3_656_1779354288599.log
  1. adding the documentation how to start the _ros2_daemon without daemonizing. this is sometimes helpful to see the debug log of ros2daemon in stdout and stderror. probably not for the general users, but _ros2_daemon is intentionally there to start the entry point for running the daemon itself in the foreground.
root@tomoyafujita-B760M-Pro-RS-D4:~/ros2_ws/colcon_ws# _ros2_daemon --ros-domain-id 0 --rmw-implementation rmw_fastrtps_cpp
Addresses by interfaces: {'lo': [snicaddr(family=<AddressFamily.AF_INET: 2>, address='127.0.0.1', netmask='255.0.0.0', broadcast=None, ptp=None), snicaddr(family=<AddressFamily.AF_INET6: 10>, address='::1', netmask='ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff', broadcast=None, ptp=None), snicaddr(family=<AddressFamily.AF_PACKET: 17>, address='00:00:00:00:00:00', netmask=None, broadcast=None, ptp=None)], 'enp4s0': [snicaddr(family=<AddressFamily.AF_INET: 2>, address='43.3.240.191', netmask='255.255.248.0', broadcast='43.3.247.255', ptp=None), snicaddr(family=<AddressFamily.AF_INET6: 10>, address='2001:cf8:1:519:0:dddd:ac5:b6c6', netmask='ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff', broadcast=None, ptp=None), snicaddr(family=<AddressFamily.AF_INET6: 10>, address='fe80::ba89:29ee:4484:94f2%enp4s0', netmask='ffff:ffff:ffff:ffff::', broadcast=None, ptp=None), snicaddr(family=<AddressFamily.AF_PACKET: 17>, address='9c:6b:00:9c:f5:62', netmask=None, broadcast='ff:ff:ff:ff:ff:ff', ptp=None)], 'br-1c9465528373': [snicaddr(family=<AddressFamily.AF_INET: 2>, address='172.18.0.1', netmask='255.255.0.0', broadcast='172.18.255.255', ptp=None), snicaddr(family=<AddressFamily.AF_INET6: 10>, address='fc00:f853:ccd:e793::1', netmask='ffff:ffff:ffff:ffff::', broadcast=None, ptp=None), snicaddr(family=<AddressFamily.AF_PACKET: 17>, address='42:1c:83:cb:ee:9e', netmask=None, broadcast='ff:ff:ff:ff:ff:ff', ptp=None)], 'docker0': [snicaddr(family=<AddressFamily.AF_INET: 2>, address='172.17.0.1', netmask='255.255.0.0', broadcast='172.17.255.255', ptp=None), snicaddr(family=<AddressFamily.AF_PACKET: 17>, address='fe:84:b1:3a:96:78', netmask=None, broadcast='ff:ff:ff:ff:ff:ff', ptp=None)]}
Serving XML-RPC on http://127.0.0.1:11511/ros2cli/
get_topic_names_and_types((), {})
Addresses by interfaces: {'lo': [snicaddr(family=<AddressFamily.AF_INET: 2>, address='127.0.0.1', netmask='255.0.0.0', broadcast=None, ptp=None), snicaddr(family=<AddressFamily.AF_INET6: 10>, address='::1', netmask='ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff', broadcast=None, ptp=None), snicaddr(family=<AddressFamily.AF_PACKET: 17>, address='00:00:00:00:00:00', netmask=None, broadcast=None, ptp=None)], 'enp4s0': [snicaddr(family=<AddressFamily.AF_INET: 2>, address='43.3.240.191', netmask='255.255.248.0', broadcast='43.3.247.255', ptp=None), snicaddr(family=<AddressFamily.AF_INET6: 10>, address='2001:cf8:1:519:0:dddd:ac5:b6c6', netmask='ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff', broadcast=None, ptp=None), snicaddr(family=<AddressFamily.AF_INET6: 10>, address='fe80::ba89:29ee:4484:94f2%enp4s0', netmask='ffff:ffff:ffff:ffff::', broadcast=None, ptp=None), snicaddr(family=<AddressFamily.AF_PACKET: 17>, address='9c:6b:00:9c:f5:62', netmask=None, broadcast='ff:ff:ff:ff:ff:ff', ptp=None)], 'br-1c9465528373': [snicaddr(family=<AddressFamily.AF_INET: 2>, address='172.18.0.1', netmask='255.255.0.0', broadcast='172.18.255.255', ptp=None), snicaddr(family=<AddressFamily.AF_INET6: 10>, address='fc00:f853:ccd:e793::1', netmask='ffff:ffff:ffff:ffff::', broadcast=None, ptp=None), snicaddr(family=<AddressFamily.AF_PACKET: 17>, address='42:1c:83:cb:ee:9e', netmask=None, broadcast='ff:ff:ff:ff:ff:ff', ptp=None)], 'docker0': [snicaddr(family=<AddressFamily.AF_INET: 2>, address='172.17.0.1', netmask='255.255.0.0', broadcast='172.17.255.255', ptp=None), snicaddr(family=<AddressFamily.AF_PACKET: 17>, address='fe:84:b1:3a:96:78', netmask=None, broadcast='ff:ff:ff:ff:ff:ff', ptp=None)]}
...

Expected behavior

see above.

Actual behavior

see above.

Additional information

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions