gpsd-users
[Top][All Lists]
Advanced

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

Re: Can't get gpsfake/gpsd to work together


From: Steven Wawryk
Subject: Re: Can't get gpsfake/gpsd to work together
Date: Tue, 17 May 2022 09:53:36 +0000

Hi Gary,

On Mon, 2022-05-16 at 11:12 -0700, Gary E. Miller wrote:
> > On Fri, 2022-05-13 at 11:09 -0700, Gary E. Miller wrote:
> > > > An example command line with resulting output is:
> > > > 
> > > > $ gpsfake -v -l -P 2948 -c 1 output.nmea
> > > > Processing output.nmea
> > > > gpsd:ERROR: can't bind to local socket /tmp/gpsfake-3691836.sock
> > > > gpsd:ERROR: control socket create failed, netlib error -1
> > > > Traceback (most recent call last):
> > > >   File "/usr/bin/gpsfake", line 319, in <module>
> > > >     test.run()
> > > >   File "/usr/lib/python3/dist-packages/gps/fake.py", line 737, in run
> > > >     raise TestSessionError("daemon died")
> > > > gps.fake.TestSessionError  
> > > 
> > > "can't bind to local socket" is a permission error.  Maybe you have
> > > AppArmour, or SELinux, or some "seceurity" thing going.  Be sure those
> > > are OFF.  Also try as root.
> > > 
> > > Maybe also check that your /tmp is drwxrwxrwt  
> > 
> > Thanks!  Looks like it's apparmor.  This has taken me down a bit of a
> > rabbit hole with apparmor.
> 
> Please file a bug report with your upstream.  Help your distro not
> confuse any more poor users.
> 
> This would have been spotted right away if you had sent us the output
> of gpsdebugingo run as root.  Get a copy here:
> 
> https://gpsd.io/gpsdebuginfo
> 
> Please do that next.  That will save a lot of back and forth asking you
> what versions of things you have, etc.

I don't have the root password for my development machine, so sudo is my only
option for now.  But as well as running with sudo (attached gpsdebuginfo.sudo),
I also ran it from a "sudo bash" shell (attached gpsdebuginfo.sudo.bash) just
in case that makes a difference.  Checking the diff, there are some
differences, but I'm not sure that's what you need.

> > The gpsd install also installed /etc/apparmor.d/usr.sbin.gpsd.
> 
> How did you install gpsd?  That is NOT part of the default gpsd install!
> I assume you got a package from somewhere?  Somewhere that is not us?

The ubuntu 20.04 repos

> > $ gpsfake -v -l -P 2948 -c 1 output.nmea
> 
> Ambitious to start with, but looks OK.
> 
> > Processing output.nmea
> > gpsfake: log cycle of output.nmea begins.
> > Traceback (most recent call last):
> >  File "/usr/bin/gpsfake", line 319, in <module>
> >    test.run()
> >  File "/usr/lib/python3/dist-packages/gps/fake.py", line 755, in run
> >    if not chosen.go_predicate(chosen.index, chosen):
> >  File "/usr/bin/gpsfake", line 120, in fakehook
> >    announce = fakegps.testload.legend \
> > TypeError: can only concatenate str (not "bytes") to str
> 
> Those line numnbners don't work for me/  Are you using a really old gpsfake?

Version 3.20 - standard with the above repos

> > Does this error mean anything to you?
> 
> Yeah, it looks like you are using a Python2 program under Python3....

Oh dear!  The "gpsd-clients" package containing gpsfake depends on the
"python3-gps" and "python3" packages in the above repos, so I don't know where
any python2 program is coming from.

> Can you try the lates gpsd release (3.24) or gsd from git?
> You already showed you package has problems, this looks like anouther one.

I'll give that a go, but it might take a few days before I can do that.

Cheers,
Steve

Attachment: gpsdebuginfo.sudo
Description: gpsdebuginfo.sudo

Attachment: gpsdebuginfo.sudo.bash
Description: gpsdebuginfo.sudo.bash


reply via email to

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