gpsd-users
[Top][All Lists]
Advanced

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

Re: [gpsd-users] Fedora 23 - why port is still taken when service is sto


From: Alexander Carver
Subject: Re: [gpsd-users] Fedora 23 - why port is still taken when service is stopped?
Date: Sat, 30 Apr 2016 11:43:27 -0700
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.0

I believe this is an attempt by systemd to replicate the features of
inetd, in theory spawning the listening program whenever traffic arrives
at the port.  However, I don't think package maintainers have fully
grasped the concept nor have the systemd creators properly explained it
in glorious detail.

I suspect that disabling the socket feature entirely (systemctl disable
gpsd.socket) for gpsd will prevent systemd from capturing the port and
allow gpsd to function normally, perhaps even using the systemd service
feature.  I can't test this because I never enabled systemd on any of my
machines but I could try to spin up a virtual machine and see what it does.

On 2016-04-30 11:37, Jon Brase wrote:
> Systemd "helpfully" listens on the port of any program (or at least programs 
> with certain configurations) that it launches at boot time and passes any 
> data 
> it receives to the program. If the program dies for whatever reason unrelated 
> to 
> the normal systemd service stopping procedure, systemd init is still 
> listening 
> on that port, so new instances of the program can't use it.
> 
> Jon Brase
> 
> 
> -------- Original message --------
> From: Mike <address@hidden>
> Date: 4/30/2016 11:56 (GMT-06:00)
> To: address@hidden
> Subject: Re: [gpsd-users] Fedora 23 - why port is still taken when service is 
> stopped?
> 
> On 04/30/2016 07:43 AM, Askar Ibragimov wrote:
>> Hello,
>>
>> I try to get gpsd running from command line to see the output. For some 
>> reason 
>> port is taken when gpsd is stopped:
>>
>> address@hidden ~]# service gpsd stop
>> Redirecting to /bin/systemctl stop  gpsd.service
>> Warning: Stopping gpsd.service, but it can still be activated by:
>>   gpsd.socket
>>
>> address@hidden sbin]# gpsd -D 5 -n -N /dev/ttyS0
>> gpsd:INFO: launching (Version 3.15)
>> gpsd:IO: opening IPv4 socket
>> gpsd:ERROR: can't bind to IPv4 port gpsd, Address already in use
>> gpsd:ERROR: maybe gpsd is already running!
>> gpsd:IO: opening IPv6 socket
>> gpsd:ERROR: can't bind to IPv6 port gpsd, Address already in use
>> gpsd:ERROR: maybe gpsd is already running!
>> gpsd:INFO: command sockets creation failed, netlib errors -1, -1
>>
>> What could be the reason? GPSD starts ok if I use another custom port.
>>
>> Cheers, Askar
> 
> systemctl stop gpsd.socket
> 
> Mike
> 




reply via email to

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