gpsd-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: New gpsd version with TCP reconnect


From: Gary E. Miller
Subject: Re: New gpsd version with TCP reconnect
Date: Wed, 2 Nov 2022 17:47:20 -0700

Yo Nick!

On Wed, 2 Nov 2022 09:54:13 +0000
Nick Taylor <nicktaylor@dataskill.uk> wrote:

> > My fail case is only when I use blackhole and wait around 15 mins
> > for socat to timeout. In this case gpsd doesn't seem to realise
> > that the connection has failed...  

So I setup 2 test hosts.  One send NMEA with socat this way:

# socat EXEC:'gpspipe -rB' TCP-LISTEN:2948,reuseaddr,fork

On a second host, i read that feed this way:

# gpsd -nND 10 tcp://192.168.99.27:2948

I get a good, feed.  On the lcient host, I kill the feed:

# iptables -A INPUT -p tcp --source-port 2948  -j DROP

And I see input to gpsd stop, but the connection does not drop, because the
default Linux tcp timeout is two hours.

I reenable the feed:

# iptables -D INPUT -p tcp --source-port 2948  -j DROP

Socat had buffered a lot of data, and it all comes thourgh, then the
conenction back to normal.

What do you get when you do this on the client:

client ~  # ls /proc/sys/net/ipv4/tcp_keepalive* -l
-rw-r--r-- 1 root root 0 Nov  2 17:43 /proc/sys/net/ipv4/tcp_keepalive_intvl
-rw-r--r-- 1 root root 0 Nov  2 17:43 /proc/sys/net/ipv4/tcp_keepalive_probes
-rw-r--r-- 1 root root 0 Nov  2 17:43 /proc/sys/net/ipv4/tcp_keepalive_time
client ~ # cat /proc/sys/net/ipv4/tcp_keepalive*   
75
9
7200

On mine, that shows 7200 seconds (2 hours), before dropping the conenction
due to keep alive.

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
        gem@rellim.com  Tel:+1 541 382 8588

            Veritas liberabit vos. -- Quid est veritas?
    "If you can't measure it, you can't improve it." - Lord Kelvin

Attachment: pgpGQeT7ATjmC.pgp
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]