I'm trying to troubleshoot what I think is `pantsd...
# development
j
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
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
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
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
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
and does the command work, or fail?
j
oops.
interpreter_constraints = [">=3.7"]
won't work on this box. let me fix that
same error
w
sorry, which error?
j
`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.