https://pantsbuild.org/ logo
#development
Title
# development
j

jolly-midnight-72759

11/10/2020, 7:08 PM
I'm trying to troubleshoot what I think is
pantsd
daemon not being able to run a command. Is there a way to run
pantsd
in a debug mode so it gives ore information? Is there a way to interact directly with it using netcat or similar tool?
w

witty-crayon-22786

11/10/2020, 7:12 PM
tailing the
.pants.d/pantsd/pantsd.log
file while it is starting is helpful… it should pick up the
-ldebug
flag and render slightly more information in that log as well.
👍🏽 2
j

jolly-midnight-72759

11/10/2020, 7:16 PM
It has debug info for launching, but on a given
pants
run it only says "Accepted connection".
Looks like something outside
pantsd
is stopping it.
This is what I see in the log.
All of that only happens on the initial start. Once
pantsd
is running, then
pants
runs result in just
Accepted connection
.
w

witty-crayon-22786

11/10/2020, 7:24 PM
can you isolate the log entries to just the portion that is relevant to the bug you’re looking at?
getting SIGTERM is expected if the client decides that it needs to restart the server before connecting (which you would see in the client log)
j

jolly-midnight-72759

11/10/2020, 7:32 PM
14:30:24.03 [DEBUG] Accepted connection: TcpStream { addr: 127.0.0.1:43221, peer: 127.0.0.1:36690, fd: 3 }
That's the only log entry when I run
./pants -ldebug --print-stacktrace list ::
from the example repo
w

witty-crayon-22786

11/10/2020, 7:33 PM
and does the command work, or fail?
j

jolly-midnight-72759

11/10/2020, 7:33 PM
oops.
interpreter_constraints = [">=3.7"]
won't work on this box. let me fix that
same error
w

witty-crayon-22786

11/10/2020, 7:37 PM
sorry, which error?
j

jolly-midnight-72759

11/10/2020, 7:38 PM
`Failed to launch child `/var/lib/buildkite-agent/.cache/pants/setup/bootstrap-Linux-x86_64/2.0.0_py36/bin/pants`: Os { code: 13, kind: PermissionDenied, message: "Permission denied" }`
That is on STDOUT from the
pants
run.
The Accepted Connection is from the
pantsd.log
I don't see anything in
/var/log/syslog
or
dmesg
that indicates that the kernel is denying this interaction (i.e. an apparmor smoking gun)
The user has full read-write access to the directory (
/var/lib/buildkite-agent/.cache/pants/setup/bootstrap-Linux-x86_64/2.0.0_py36/bin/
) and everything in it.