gpsd-users
[Top][All Lists]
Advanced

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

Re: [gpsd-users] GPSD on Debian 10 (buster): allowing other hosts to acc


From: Gary E. Miller
Subject: Re: [gpsd-users] GPSD on Debian 10 (buster): allowing other hosts to access gpsd
Date: Wed, 18 Sep 2019 17:49:28 -0700

Yo Charles!

On Wed, 18 Sep 2019 18:34:14 -0600
Charles Curley <address@hidden> wrote:

> > How did you verify that?  Did you try an nmap remotely?
> >     nmap -p 2947 xx.xx.xx.xx.  
> 
> root@orca:~# nmap -p 2947 hawk
> Starting Nmap 7.70 ( https://nmap.org ) at 2019-09-18 17:57 MDT
> Nmap scan report for hawk (192.168.100.6)
> Host is up (0.0013s latency).
> rDNS record for 192.168.100.6: hawk.localdomain
> 
> PORT     STATE  SERVICE
> 2947/tcp closed gpsd
> MAC Address: 30:5A:3A:81:83:79 (Asustek Computer)

Ouch.  Was this with, or without the gpsd "-n" option?

> However, syslog on hawk does not show any packets hitting the
> firewall.

If nmap saw a firewall it would likely not have reported "closed" it
would likely have reported "filtered".

> root@hawk:/home/charles/versioned/gpsd# netstat -apn | fgrep gpsd
> tcp        0      0 127.0.0.1:2947          127.0.0.1:56042 ESTABLISHED 
> 16423/gpsd

Uh, oh.  Notice gpsd is not listening on ANY port.

If gpsd was listening, you would see:

pi3 /usr/local/src/GPS/gpsd # netstat -apn | fgrep gpsd
tcp        0      0 0.0.0.0:2947            0.0.0.0:*    LISTEN      24275/gpsd 
         
tcp6       0      0 :::2947                 :::*         LISTEN      24275/gpsd 
         

Notice the "LISTEN".

Since you are running systemdumb, it has control of the port.  So see
what this shows:

    netstat -apn | fgrep :2947



> > > * Copied gpsd.socket to /etc/systemd/system, and edited it to
> > > allow access from all interfaces:    
> > 
> > Oh.  Then you realize you are not running gpsd, you are running
> > systemd which is hijacking port 2947...  
> 
> gpsd is running. I have a receiver running, and I get reports on
> multiple clients.

Local clients.  If you kill your clients, and run this, you will see
that gpsd is not running:

        pstree -paul | fgrep gpsd

systemdracula is managing 2947, not gpsd.  And badly.

> > I'll bet you have a systemd problem.  Have you tried without
> > systemdumb?  
> 
> Good luck getting rid of systemd on Debian. Like kudzu or bureaucracy,
> it takes over everything. I need to hornswaggle it into doing what I
> want.

Which is why the godesses invented devuan.  But, you can just remote
the gpsd.serice file and at least run gpsd without systemdestroyer.

> > > * Edited /etc/default/gpsd to include the -G option:    
> > 
> > And why not the "-n" option?  
> 
> Possibly because I didn't see that it was relevant to the matter at
> hand? I already have multiple clients on hawk getting data from gpsd.

Well, try it and see it it actually is relevant.

> In any case when I add the n option ("-Gn"), it shows up in ps's
> output, but still no joy. Nmap still reports the port closed.

And what did this show:
        netstat -apn | fgrep :2947

I'm guessing systemdrool has grabbed the port.

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
        address@hidden  Tel:+1 541 382 8588

            Veritas liberabit vos. -- Quid est veritas?
    "If you can't measure it, you can't improve it." - Lord Kelvin

Attachment: pgpanP54zQjYk.pgp
Description: OpenPGP digital signature


reply via email to

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