[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: |
Mon, 31 Oct 2022 10:59:46 -0700 |
Yo Nick!
On Mon, 31 Oct 2022 11:30:31 +0000
Nick Taylor <nicktaylor@dataskill.uk> wrote:
> My failure case occurs if I interrupt the feed using iptables...
Why should it matter how the TCP packets get blocked?
> On 25/10/2022 23:59, Gary E. Miller wrote
> > So I finally got a test running. tcp:// reconnect is working fine
> > for me.
> >
> > I'm feeding nmea this way:
> >
> > # socat EXEC:'gpspipe -r' TCP-LISTEN:2948,reuseaddr,fork
> Yep I have the same
> >
> > And getting the NMEA remotely this way:
> >
> > # gpsd -D 4 -n -N tcp://204.17.205.27:2948
> >
> I use similar to this
>
> Test is as follows:
>
> On the source server:
>
> root@TSB-1650:~# socat EXEC:'gpspipe -r'
You might want to use the new gpspipe -B option, to stopp buffereing, and
thus reduce latency.
> TCP-LISTEN:2948,reuseaddr,fork& [1] 14020
> root@TSB-1650:~# iptables -I OUTPUT -d 192.168.2.52 -j DROP
Why are you only blocking packets in one direction? That confuses the
TCP handshaking.
> So as you can see socat connection seems to time out after about 20
> mins
Similar to what I see.
> Now dest gps log looks like this:
You keep snipping the initalization part. I need that. From the first
log message.
> gpsd:PROG: CORE: pselect: timeout
> gpsd:PROG: checking client(0)
> gpsd:CLIENT: <= client(0): ?WATCH={"enable":true,"json":true};
>
> gpsd:PROG: awaken(0) fd 7, path tcp://192.168.2.53:2948
> gpsd:PROG: device 0 (fd=7, path tcp://192.168.2.53:2948) already active
It is timing out, but not killing the connection. I suspect because
TCP packets are still going one way. So gpsd sees a timeout, but not an
error.
> Interrupt and restart gpsd and all back to normal
>
> Hopefully you would see same symptoms in your setup?
Been there, done that. Nope.
Maybe you should try blocking both directions of the connection.
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
pgpXh5VIuOaxk.pgp
Description: OpenPGP digital signature