[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Monotone-devel] Monotone serve - no listen port opened?
From: |
Zack Weinberg |
Subject: |
Re: [Monotone-devel] Monotone serve - no listen port opened? |
Date: |
Tue, 2 Jun 2009 15:54:18 -0700 |
On Tue, Jun 2, 2009 at 3:24 PM, J Decker <address@hidden> wrote:
> How can I validate (other than with netstat) that monotone is opening
> a tcp port? (I tried adding the --bind 0.0.0.0:4691 and --bind :4691
> and --bind <specific IP>:4691, and none of them opened a port, as seen
> in 'netstat -ant' (linux)
Try strace; the last few operations should be something like this
(beware, the trace may include your pass phrase in cleartext):
$ strace mtn -d monotone.mtn serve
...
socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 13
fcntl(13, F_GETFL) = 0x2 (flags O_RDWR)
setsockopt(13, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
bind(13, {sa_family=AF_INET, sin_port=htons(4691),
sin_addr=inet_addr("0.0.0.0")}, 16) = 0
socket(PF_INET6, SOCK_STREAM, IPPROTO_IP) = 14
fcntl(14, F_GETFL) = 0x2 (flags O_RDWR)
setsockopt(14, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
setsockopt(14, SOL_IPV6, IPV6_V6ONLY, [1], 4) = 0
bind(14, {sa_family=AF_INET6, sin6_port=htons(4691),
inet_pton(AF_INET6, "::", &sin6_addr), sin6_flowinfo=0,
sin6_scope_id=0}, 28) = 0
listen(13, 128) = 0
listen(14, 128) = 0
write(2, "mtn: beginning service on <all i"..., 50) = 50
mtn: beginning service on <all interfaces> : 4691
select(15, [13 14], [13 14], [13 14], NULL
and then it should block until a connection is received.
zw