gpsd-dev
[Top][All Lists]
Advanced

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

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


From: Roy Barkas
Subject: [gpsd-dev] gpsd crashes upon external tcp server failure
Date: Wed, 20 May 2015 17:02:46 +1000

I am running gpsd with input from 4 tcp servers. each of the servers provides ais data.

I am starting gpsd with the command:
sudo /usr/local/sbin/gpsd -b -D 0 -F /tmp/gpsd.sock tcp://localhost:46001 tcp://localhost:46002 tcp://localhost:46003 tcp://localhost:46004
After starting gpsd, if I kill one of the tcp servers that it has connected to, gpsd crashes and I have to restart it.  The error log contains:
May 20 06:56:56 sop gpsd[879]: gpsd:INFO: closing GPS=tcp://localhost:46001 (9) May 20 06:56:56 sop gpsd[879]: gpsd:PROG: no /etc/gpsd/device-hook present, skipped running DEACTIVATE hook May 20 06:56:56 sop gpsd[879]: gpsd:INFO: reconnection attempt on device 0 May 20 06:56:56 sop gpsd[879]: gpsd:PROG: no /etc/gpsd/device-hook present, skipped running ACTIVATE hook May 20 06:56:56 sop gpsd[879]: gpsd:INFO: opening TCP feed at localhost, port 46001. May 20 06:56:56 sop gpsd[879]: gpsd:ERROR: TCP device open error can't connect to host/port pair. May 20 06:56:56 sop gpsd[879]: gpsd:ERROR: tcp://localhost:46001: device activation failed. 
If the tcp server that provides the ais data is not running when gpsd starts, then gpsd starts normally, and emits more or less the same log messages as above.  GPSD only terminates if the external server was available and then disappears.

I'm surprised that GPSD reacts the way it does when a previously connected tcp server source is no longer available.
I can work around this by having my code restart gpsd when gpsd unavailability is detected, but that's a bit hacky for my taste.
I was going to put this in the bug tracker but thought it better to post here first, in case a solution already exists.
Cheer;
Roy Barkas


reply via email to

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