gpsd-dev
[Top][All Lists]
Advanced

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

Re: [gpsd-dev] gpsd crashes upon external tcp server failure


From: Roy Barkas
Subject: Re: [gpsd-dev] gpsd crashes upon external tcp server failure
Date: Mon, 1 Jun 2015 18:18:40 +1000

The good news:
Since building and installing the latest version with the patch that you mentioned I have not seen any further instances of the daemon crashing.

Thanks for the fix

The not so good??? news:

What should the daemons behaviour be when a connected tcp data source becomes unavailable, then, later, becomes available again?

Should the daemon try to reconnect to the external tcp data source more than once?

That doesn't seem to be what is happening.

What I see in the logfile is a single attempt to reconnect followed by a deactivation, with no further reconnect attempts.:

Jun  1 08:00:01 sop gpsd[29377]: gpsd:ERROR: TCP device open error can't connect to host/port pair.
Jun  1 08:00:01 sop gpsd[29377]: gpsd:ERROR: tcp://localhost:46001: device activation failed.
Jun  1 08:00:01 sop gpsd[29377]: gpsd:ERROR: tcp://localhost:46001: activation failed, freeing device

If I start gpsd with several TCP sources, then kill one of the sources and restart it, nothing ever comes out the other end from the restarted tcp source,
If I telnet to the daemon and issue:

?WATCH={"enable":true, "json":true, "split24":true, "device": "tcp://localhost:46001"}

I get back from the daemon (until I restart the daemon)

 {"class":"ERROR","message":"No such device as tcp://localhost:46001"}

I think that the best behaviour when an input tcp connection is lost, would be to retry forever, perhaps slowing the retry rate as successive attempts fail.

I imagine that I could have an external process that would periodically check the gpsd daemon via ?DEVICES; and use the ?DEVICE= to reconnect the daemon to it when a required device is missing but that seems quite messy.

Roy


reply via email to

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