gpsd-users
[Top][All Lists]
Advanced

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

Re: Socket Problems


From: Charles Curley
Subject: Re: Socket Problems
Date: Thu, 7 Oct 2021 11:44:25 -0600

On Wed, 6 Oct 2021 16:28:37 -0700
Cale Collins <ccollins@gateworks.com> wrote:


See responses below. What gpsd package did you use, and where did you
get it?

> Hello,
> 
> When I "cat" the output of my GPS (/dev/ttyACM0) I see the expected
> fix data, also when I use "gpsmon" it's working great.  But I have a
> problem when using "cgps", all the fields are N/A.  I'm thinking this
> has to do with how the socket is configured.
> 
> When I installed the gpsd package I noticed this in the output:
> 
> Creating/updating gpsd user account...
> Created symlink /etc/systemd/system/sockets.target.wants/gpsd.socket →
> /lib/systemd/system/gpsd.socket.


> Failed to preset unit: Unit file gpsd.socket.in.service does not
> exist. /usr/bin/deb-systemd-helper: error: systemctl preset failed on
> gpsd.socket.in: No such file or directory

Something is wrong here. There is no unit file gpsd.socket.in.service.
gpsd.socket is the closest that I'm aware of. gpsd.socket.in is a
source code file, which the build process modifies to produce
gpsd.socket.


> gpsd.service is a disabled or a static unit, not starting it.
> Failed to get unit file state for gpsd.socket.in.service: No such file
> or directory
> gpsd.socket.in is a disabled or a static unit, not starting it.

gpsd.socket.in is part of the source code for gpsd, and should not be
in a package.

> 
> I can recreate this when reconfiguring the package:
> 
> root@focal-newport:~# dpkg-reconfigure gpsd

I never use dpkg-reconfigure gpsd. I either edit /etc/default/gpsd
directly, and then restart everything, or I abandon it entirely and put
my own gpsd systemd files into /etc/systemd/system, thereby over-riding
the packaged ones, and eliminating the need for /etc/default/gpsd.


> Creating/updating gpsd user account...
> Failed to preset unit: Unit file gpsd.socket.in.service does not
> exist. /usr/bin/deb-systemd-helper: error: systemctl preset failed on
> gpsd.socket.in: No such file or directory
> gpsd.service is a disabled or a static unit not running, not starting
> it. Failed to get unit file state for gpsd.socket.in.service: No such
> file or directory
> gpsd.socket.in is a disabled or a static unit not running, not
> starting it.
> 
> Following the troubleshooting guide:
> 
> "ls /dev/ttyACM0" shows my device is available
> /dev/ttyACM0

Good.

> 
> "ps -ef|grep gpsd" No GPSD process is running
> root        2203     451  0 01:49 ttyAMA0  00:00:00 grep --color=auto
> gpsd
> 
> "lsof -n | grep /dev/ttyACM0" returns nothing

Good. I would be surprised if after those errors gpsd was running.

> 
> "gpsmon /dev/ttyACM0" returns expected output (works)
> 
> "ldconfig"
> /sbin/ldconfig.real: /lib/aarch64-linux-gnu/libgps.so.27 is not a
> symbolic link
> /sbin/ldconfig.real: /lib/aarch64-linux-gnu/libQgpsmm.so.27 is not a
> symbolic link
> /sbin/ldconfig.real: /lib/aarch64-linux-gnu/libgpsdpacket.so.27 is not
> a symbolic link
> 
> "gpsd -N -D3 -F @RUNDIR/gpsd.sock /dev/ttyACM0" fails:
> gpsd:ERROR: can't bind to local socket @RUNDIR/gpsd.sock
> gpsd:ERROR: control socket create failed, netlib error -1

I see two problems here.

* @RUNDIR "should" be @RUNDIR@. Except that....

* @RUNDIR@ is there only because the build process neglected somehow to
  substitute the actual run directory for it. On Debian Bullseye or
  Buster, that should be /run. Your mileage may vary.


> 
> I'm not sure how much output to include, I don't want to overwhelm
> with a bunch of garbage.  Please let me know if there's any more
> relevant information I should provide.  I went through the systemd
> troubleshooting section, but I had no success.
> 
> The system I'm using is ARM64, Ubuntu Focal, 5.10 kernel.  This is a
> custom built kernel, could it be I'm missing a kernel parameter?
> 
> Thanks,
> 
> Cale Collins
> Field Applications Engineer II
> Gateworks Corporation
> (805)781-2000 x37
> 3026 S. Higuera, San Luis Obispo, CA 93401
> www.gateworks.com



-- 
Does anybody read signatures any more?

https://charlescurley.com
https://charlescurley.com/blog/



reply via email to

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