Discussion:
[chrony-users] gpsd:ERROR... Permission denied
Charles Muggen
2018-02-05 19:57:30 UTC
Permalink
I'm trying to setup chronyd with gpsd on a Raspberry Pi Model 2 running Raspbian Jessie.

I'm getting a continuous stream of errors in my var/log/syslog:

Feb 5 19:32:51 raspberrypi gpsd[610]: gpsd:ERROR: device open failed: Permission denied - retrying read-only
Feb 5 19:32:51 raspberrypi gpsd[610]: gpsd:ERROR: read-only device open failed: Permission denied
Feb 5 19:32:51 raspberrypi gpsd[610]: gpsd:ERROR: /dev/pps0: device activation failed.

What could be causing the error?

##### contents of /etc/chrony/chrony.conf file
driftfile /var/lib/chrony/chrony.drift

log tracking measurements statistics
logdir /var/log/chrony

# Stop bad estimates upsetting machine clock.
maxupdateskew 100.0

dumponexit
dumpdir /var/lib/chrony

local stratum 8
manual
smoothtime 400 0.01
makestep .1 -1

allow
logchange 0.5
rtcsync

# set larger delay to allow the NMEA source to overlap with
# the other sources and avoid the falseticker status
refclock SHM 0 refid GPS precision 1e-1 offset 0.9999 delay 0.2
refclock PPS /dev/pps0 lock NMEA


##### contents of /etc/default/gpsd
# Default settings for the gpsd init script and the hotplug wrapper.

# Start the gpsd daemon automatically at boot time
START_DAEMON="true"

# Use USB hotplugging to add new USB devices automatically to the daemon
USBAUTO="false"

# Devices gpsd should collect to at boot time.
# They need to be read/writeable, either by user gpsd or the group dialout.
DEVICES=""

# Other options you want to pass to gpsd
GPSD_OPTIONS="-n /dev/ttyAMA0 /dev/pps0"
--
To unsubscribe email chrony-users-***@chrony.tuxfamily.org
with "unsubscribe" in the subject.
For help email chrony-users-***@chrony.tuxfamily.org
with "help" in the subject.
Trouble? Email ***@chrony.tuxfamily.org.
Bill Unruh
2018-02-05 20:28:33 UTC
Permalink
This has nothing to do with chrony. It is a problem in gpsd. You need to tell
gpsd what it should be reading. Also the error is permission denied, which
suggests that pps0 has wrong permissions for gpsd.
ls -l /dev/pps0
will show you its permission.
ps auxww |grep gpsd
should show what user/group gpsd is running under.



William G. Unruh __| Canadian Institute for|____ Tel: +1(604)822-3273
Physics&Astronomy _|___ Advanced Research _|____ Fax: +1(604)822-5324
UBC, Vancouver,BC _|_ Program in Cosmology |____ ***@physics.ubc.ca
Canada V6T 1Z1 ____|____ and Gravity ______|_ www.theory.physics.ubc.ca/
Post by Charles Muggen
I'm trying to setup chronyd with gpsd on a Raspberry Pi Model 2 running Raspbian Jessie.
Feb 5 19:32:51 raspberrypi gpsd[610]: gpsd:ERROR: device open failed: Permission denied - retrying read-only
Feb 5 19:32:51 raspberrypi gpsd[610]: gpsd:ERROR: read-only device open failed: Permission denied
Feb 5 19:32:51 raspberrypi gpsd[610]: gpsd:ERROR: /dev/pps0: device activation failed.
What could be causing the error?
##### contents of /etc/chrony/chrony.conf file
driftfile /var/lib/chrony/chrony.drift
log tracking measurements statistics
logdir /var/log/chrony
# Stop bad estimates upsetting machine clock.
maxupdateskew 100.0
dumponexit
dumpdir /var/lib/chrony
local stratum 8
manual
smoothtime 400 0.01
makestep .1 -1
allow
logchange 0.5
rtcsync
# set larger delay to allow the NMEA source to overlap with
# the other sources and avoid the falseticker status
refclock SHM 0 refid GPS precision 1e-1 offset 0.9999 delay 0.2
refclock PPS /dev/pps0 lock NMEA
##### contents of /etc/default/gpsd
# Default settings for the gpsd init script and the hotplug wrapper.
# Start the gpsd daemon automatically at boot time
START_DAEMON="true"
# Use USB hotplugging to add new USB devices automatically to the daemon
USBAUTO="false"
# Devices gpsd should collect to at boot time.
# They need to be read/writeable, either by user gpsd or the group dialout.
DEVICES=""
# Other options you want to pass to gpsd
GPSD_OPTIONS="-n /dev/ttyAMA0 /dev/pps0"
--
with "unsubscribe" in the subject.
with "help" in the subject.
--
To unsubscribe email chrony-users-***@chrony.tuxfamily.org
with "unsubscribe" in the subject.
For help email chrony-users-***@chrony.tuxfamily.org
with "help" in the subject.
Trouble? Email ***@chrony.tuxfamily.org.
Charles Muggen
2018-02-05 21:05:41 UTC
Permalink
During reboot, I see [OK] Started NTP client/server.
Is it okay for the NTP client/server to be running next to chronyd?
Sent: Monday, February 05, 2018 at 3:28 PM
Subject: Re: [chrony-users] gpsd:ERROR... Permission denied
--
To unsubscribe email chrony-users-***@chrony.tuxfamily.org
with "unsubscribe" in the subject.
For help email chrony-users-***@chrony.tuxfamily.org
with "help" in the subject.
Trouble? Email ***@chrony.tuxfamily.org.
Ariel Garcia
2018-02-05 21:15:48 UTC
Permalink
Post by Charles Muggen
During reboot, I see [OK] Started NTP client/server.
Is it okay for the NTP client/server to be running next to chronyd?
I guess that is the message printed when starting chrony.
Are you using systemd?

Check chrony's systemd status with
# systemctl status chrony
mine shows:
chrony.service - NTP client/server

or just check the [Unit] Description field in
/lib/systemd/system/chrony.service
or
/etc/systemd/system/chrony.service


If you really have NTPd running besides chrony, then you have two programs
trying to "correct" the same clock... which will make both misunderstand the
clock drift. In that case you must definitely chose one and turn off the other.
Since you are in the chrony mailing list, you must of course turn off NTPd
off ;-)
--
Dr. Ariel García
Gemfony scientific UG (haftungsbeschränkt)
Hauptstraße 2
D-76344 Eggenstein-Leopoldshafen
GERMANY

Phone: +49 7247 934 2783
Fax: +49 7247 934 2781
E-Mail: ***@gemfony.eu
Web: http://www.gemfony.eu

Geschäftsführer: Dr. Rüdiger Berlich
HandelsregisterNr: HRB 710566, Amtsgericht Mannheim, Ust-IdNr: DE274421406
--
To unsubscribe email chrony-users-***@chrony.tuxfamily.org
with "unsubscribe" in the subject.
For help email chrony-users-***@chrony.tuxfamily.org
with "help" in the subject.
Trouble? Email ***@chrony.tuxfamily.org.
Charles Muggen
2018-02-06 17:07:01 UTC
Permalink
here are the results for systemctl status chrony

● chrony.service - LSB: Controls chronyd NTP time daemon
Loaded: loaded (/etc/init.d/chrony)
Active: active (exited) since Tue 2018-02-06 16:56:53 UTC; 4min 28s ago
Process: 483 ExecStart=/etc/init.d/chrony start (code=exited, status=0/SUCCESS)


by the way, what is a recommended way to remove NTPd?
are there any dependencies on NTP libs from chronyd?
Sent: Monday, February 05, 2018 at 4:15 PM
Subject: Re: [chrony-users] gpsd:ERROR... Permission denied
Post by Charles Muggen
During reboot, I see [OK] Started NTP client/server.
Is it okay for the NTP client/server to be running next to chronyd?
I guess that is the message printed when starting chrony.
Are you using systemd?
Check chrony's systemd status with
# systemctl status chrony
chrony.service - NTP client/server
or just check the [Unit] Description field in
/lib/systemd/system/chrony.service
or
/etc/systemd/system/chrony.service
If you really have NTPd running besides chrony, then you have two programs
trying to "correct" the same clock... which will make both misunderstand the
clock drift. In that case you must definitely chose one and turn off the other.
Since you are in the chrony mailing list, you must of course turn off NTPd
off ;-)
--
Dr. Ariel García
Gemfony scientific UG (haftungsbeschränkt)
Hauptstraße 2
D-76344 Eggenstein-Leopoldshafen
GERMANY
Phone: +49 7247 934 2783
Fax: +49 7247 934 2781
Web: http://www.gemfony.eu
Geschäftsführer: Dr. Rüdiger Berlich
HandelsregisterNr: HRB 710566, Amtsgericht Mannheim, Ust-IdNr: DE274421406
--
with "unsubscribe" in the subject.
with "help" in the subject.
--
To unsubscribe email chrony-users-***@chrony.tuxfamily.org
with "unsubscribe" in the subject.
For help email chrony-users-***@chrony.tuxfamily.org
with "help" in the subject.
Trouble? Email ***@chrony.tuxfamily.org.
Bill Unruh
2018-02-06 17:13:46 UTC
Permalink
William G. Unruh __| Canadian Institute for|____ Tel: +1(604)822-3273
Physics&Astronomy _|___ Advanced Research _|____ Fax: +1(604)822-5324
UBC, Vancouver,BC _|_ Program in Cosmology |____ ***@physics.ubc.ca
Canada V6T 1Z1 ____|____ and Gravity ______|_ www.theory.physics.ubc.ca/
Post by Charles Muggen
here are the results for systemctl status chrony
● chrony.service - LSB: Controls chronyd NTP time daemon
Loaded: loaded (/etc/init.d/chrony)
Active: active (exited) since Tue 2018-02-06 16:56:53 UTC; 4min 28s ago
Process: 483 ExecStart=/etc/init.d/chrony start (code=exited, status=0/SUCCESS)
by the way, what is a recommended way to remove NTPd?
are there any dependencies on NTP libs from chronyd?
The easiest is jut to not install ntpd.. The next is to make sure that neither
in /etc/rc?.d or in /lib/systemd there is nothing that calls ntpd. ntp is the
protocol, and chrony uses that protocol. ntpd is the reference implimentation
of that protocol to discipline the local clock, which would be in conflict
with chrony.
Post by Charles Muggen
Sent: Monday, February 05, 2018 at 4:15 PM
Subject: Re: [chrony-users] gpsd:ERROR... Permission denied
Post by Charles Muggen
During reboot, I see [OK] Started NTP client/server.
Is it okay for the NTP client/server to be running next to chronyd?
I guess that is the message printed when starting chrony.
Are you using systemd?
Check chrony's systemd status with
# systemctl status chrony
chrony.service - NTP client/server
or just check the [Unit] Description field in
/lib/systemd/system/chrony.service
or
/etc/systemd/system/chrony.service
If you really have NTPd running besides chrony, then you have two programs
trying to "correct" the same clock... which will make both misunderstand the
clock drift. In that case you must definitely chose one and turn off the other.
Since you are in the chrony mailing list, you must of course turn off NTPd
off ;-)
--
Dr. Ariel García
Gemfony scientific UG (haftungsbeschrÀnkt)
Hauptstraße 2
D-76344 Eggenstein-Leopoldshafen
GERMANY
Phone: +49 7247 934 2783
Fax: +49 7247 934 2781
Web: http://www.gemfony.eu
GeschÀftsfÌhrer: Dr. RÌdiger Berlich
HandelsregisterNr: HRB 710566, Amtsgericht Mannheim, Ust-IdNr: DE274421406
--
with "unsubscribe" in the subject.
with "help" in the subject.
--
with "unsubscribe" in the subject.
with "help" in the subject.
Charles Muggen
2018-02-06 17:24:29 UTC
Permalink
I'm sorry, but your reply messages are appearing as one continuous stream of words.
My mail server must be stripping linefeeds in both directions.
Do you think you could send as plain text?
Thanks!
Sent: Tuesday, February 06, 2018 at 12:13 PM
Subject: Re: [chrony-users] gpsd:ERROR... Permission denied
--
To unsubscribe email chrony-users-***@chrony.tuxfamily.org
with "unsubscribe" in the subject.
For help email chrony-users-***@chrony.tuxfamily.org
with "help" in the subject.
Trouble? Email ***@chrony.tuxfamily.org.
Bill Unruh
2018-02-06 18:35:56 UTC
Permalink
I do send it as plain text and it has the usual Unix CR-LF at the end of every
line of 70 or so characters.



William G. Unruh __| Canadian Institute for|____ Tel: +1(604)822-3273
Physics&Astronomy _|___ Advanced Research _|____ Fax: +1(604)822-5324
UBC, Vancouver,BC _|_ Program in Cosmology |____ ***@physics.ubc.ca
Canada V6T 1Z1 ____|____ and Gravity ______|_ www.theory.physics.ubc.ca/
Post by Charles Muggen
I'm sorry, but your reply messages are appearing as one continuous stream of words.
My mail server must be stripping linefeeds in both directions.
Do you think you could send as plain text?
Thanks!
Sent: Tuesday, February 06, 2018 at 12:13 PM
Subject: Re: [chrony-users] gpsd:ERROR... Permission denied
--
with "unsubscribe" in the subject.
with "help" in the subject.
Chris Greenman
2018-02-09 16:14:57 UTC
Permalink
Just curious. Are you using the chrony and gpsd from the Raspbian Jessie
repositories? If so, do yourself a favor and get rid of them both,
download the latest source for BOTH and compile them yourself. I beat my
head against a wall trying to get the repo versions to work but they are
horribly outdated.

Also verify the permission on /dev/pps0 and make sure the user running gpsd
has access to the device file.
Post by Bill Unruh
I do send it as plain text and it has the usual Unix CR-LF at the end of every
line of 70 or so characters.
William G. Unruh __| Canadian Institute for|____ Tel: +1(604)822-3273
Physics&Astronomy _|___ Advanced Research _|____ Fax: +1(604)822-5324
Canada V6T 1Z1 ____|____ and Gravity ______|_ www.theory.physics.ubc.ca/
I'm sorry, but your reply messages are appearing as one continuous stream
Post by Charles Muggen
of words.
My mail server must be stripping linefeeds in both directions.
Do you think you could send as plain text?
Thanks!
Sent: Tuesday, February 06, 2018 at 12:13 PM
Subject: Re: [chrony-users] gpsd:ERROR... Permission denied
William G. Unruh __| Canadian Institute for|____ Tel: +1(604)822-3273
Physics&Astronomy _|___ Advanced Research _|____ Fax: +1(604)822-5324
Canada V6T 1Z1 ____|____ and Gravity ______|_ www.theory.physics.ubc.ca/
On Tue, 6 Feb 2018, Charles Muggen wrote: > here are the results for
systemctl status chrony > > ● chrony.service - LSB: Controls chronyd NTP
time daemon > Loaded: loaded (/etc/init.d/chrony) > Active: active (exited)
since Tue 2018-02-06 16:56:53 UTC; 4min 28s ago > Process: 483
ExecStart=/etc/init.d/chrony start (code=exited, status=0/SUCCESS) > > > by
the way, what is a recommended way to remove NTPd? > are there any
dependencies on NTP libs from chronyd? The easiest is jut to not install
ntpd.. The next is to make sure that neither in /etc/rc?.d or in
/lib/systemd there is nothing that calls ntpd. ntp is the protocol, and
chrony uses that protocol. ntpd is the reference implimentation of that
protocol to discipline the local clock, which would be in conflict with
chrony. > > > >> Sent: Monday, February 05, 2018 at 4:15 PM >> From: "Ariel
[chrony-users] gpsd:ERROR... Permission denied >> >>> During reboot, I see
[OK] Started NTP client/server. >>> Is it okay for the NTP client/server to
be running next to chronyd? >> >> I guess that is the message printed when
starting chrony. >> Are you using systemd? >> >> Check chrony's systemd
status with >> # systemctl status chrony >> mine shows: >> chrony.service -
NTP client/server >> >> or just check the [Unit] Description field in >>
/lib/systemd/system/chrony.service >> or >>
/etc/systemd/system/chrony.service >> >> >> If you really have NTPd
running besides chrony, then you have two programs >> trying to "correct"
the same clock... which will make both misunderstand the >> clock drift. In
that case you must definitely chose one and turn off the other. >> Since
you are in the chrony mailing list, you must of course turn off NTPd >> off
;-) >> >> -- >> Dr. Ariel García >> Gemfony scientific UG
(haftungsbeschrÀnkt) >> Hauptstraße 2 >> D-76344 Eggenstein-Leopoldshafen
GERMANY >> >> Phone: +49 7247 934 2783 >> Fax: +49 7247 934 2781 >>
GeschÀftsfÌhrer: Dr. RÌdiger Berlich >> HandelsregisterNr: HRB 710566,
Amtsgericht Mannheim, Ust-IdNr: DE274421406 >> >> >> -- >> To unsubscribe
xfamily.org >> with "help" in the subject. >> Trouble? Email
with "help" in the subject. > Trouble? Email
--
with "unsubscribe" in the subject.
with "help" in the subject.
Charles Muggen
2018-02-06 17:08:33 UTC
Permalink
the gpsd error messages are collected in /var/log/syslog
Sent: Monday, February 05, 2018 at 4:15 PM
Subject: Re: [chrony-users] gpsd:ERROR... Permission denied
Post by Charles Muggen
During reboot, I see [OK] Started NTP client/server.
Is it okay for the NTP client/server to be running next to chronyd?
I guess that is the message printed when starting chrony.
Are you using systemd?
Check chrony's systemd status with
# systemctl status chrony
chrony.service - NTP client/server
or just check the [Unit] Description field in
/lib/systemd/system/chrony.service
or
/etc/systemd/system/chrony.service
If you really have NTPd running besides chrony, then you have two programs
trying to "correct" the same clock... which will make both misunderstand the
clock drift. In that case you must definitely chose one and turn off the other.
Since you are in the chrony mailing list, you must of course turn off NTPd
off ;-)
--
Dr. Ariel García
Gemfony scientific UG (haftungsbeschränkt)
Hauptstraße 2
D-76344 Eggenstein-Leopoldshafen
GERMANY
Phone: +49 7247 934 2783
Fax: +49 7247 934 2781
Web: http://www.gemfony.eu
Geschäftsführer: Dr. Rüdiger Berlich
HandelsregisterNr: HRB 710566, Amtsgericht Mannheim, Ust-IdNr: DE274421406
--
with "unsubscribe" in the subject.
with "help" in the subject.
--
To unsubscribe email chrony-users-***@chrony.tuxfamily.org
with "unsubscribe" in the subject.
For help email chrony-users-***@chrony.tuxfamily.org
with "help" in the subject.
Trouble? Email ***@chrony.tuxfamily.org.
Bill Unruh
2018-02-06 17:17:11 UTC
Permalink
William G. Unruh __| Canadian Institute for|____ Tel: +1(604)822-3273
Physics&Astronomy _|___ Advanced Research _|____ Fax: +1(604)822-5324
UBC, Vancouver,BC _|_ Program in Cosmology |____ ***@physics.ubc.ca
Canada V6T 1Z1 ____|____ and Gravity ______|_ www.theory.physics.ubc.ca/
Post by Charles Muggen
the gpsd error messages are collected in /var/log/syslog
That depends on how you have set up your system. If you have a systemd system,
then they are by default seen by running journalctl. The logs theselves are
unreadable. If your system runs syslogd or rsyslogd, (which can be run with
systemd) then you are right, although /var/log/messages is another place to
look.
Post by Charles Muggen
Sent: Monday, February 05, 2018 at 4:15 PM
Subject: Re: [chrony-users] gpsd:ERROR... Permission denied
Post by Charles Muggen
During reboot, I see [OK] Started NTP client/server.
Is it okay for the NTP client/server to be running next to chronyd?
I guess that is the message printed when starting chrony.
Are you using systemd?
Check chrony's systemd status with
# systemctl status chrony
chrony.service - NTP client/server
or just check the [Unit] Description field in
/lib/systemd/system/chrony.service
or
/etc/systemd/system/chrony.service
If you really have NTPd running besides chrony, then you have two programs
trying to "correct" the same clock... which will make both misunderstand the
clock drift. In that case you must definitely chose one and turn off the other.
Since you are in the chrony mailing list, you must of course turn off NTPd
off ;-)
--
Dr. Ariel García
Gemfony scientific UG (haftungsbeschrÀnkt)
Hauptstraße 2
D-76344 Eggenstein-Leopoldshafen
GERMANY
Phone: +49 7247 934 2783
Fax: +49 7247 934 2781
Web: http://www.gemfony.eu
GeschÀftsfÌhrer: Dr. RÌdiger Berlich
HandelsregisterNr: HRB 710566, Amtsgericht Mannheim, Ust-IdNr: DE274421406
--
with "unsubscribe" in the subject.
with "help" in the subject.
--
with "unsubscribe" in the subject.
with "help" in the subject.
Bill Unruh
2018-02-05 21:27:07 UTC
Permalink
William G. Unruh __| Canadian Institute for|____ Tel: +1(604)822-3273
Physics&Astronomy _|___ Advanced Research _|____ Fax: +1(604)822-5324
UBC, Vancouver,BC _|_ Program in Cosmology |____ ***@physics.ubc.ca
Canada V6T 1Z1 ____|____ and Gravity ______|_ www.theory.physics.ubc.ca/
Post by Charles Muggen
During reboot, I see [OK] Started NTP client/server.
Is it okay for the NTP client/server to be running next to chronyd?
chrony is an ntp client/server. NTP is different from ntpd. Look to see if
ntpd is running. If it is that is problematic. But I think systemd is just
reporting that it has started an NTP client/server, which happens to be
chronyd.
--
To unsubscribe email chrony-users-***@chrony.tuxfamily.org
with "unsubscribe" in the subject.
For help email chrony-users-***@chrony.tuxfamily.org
with "help" in the subject.
Trouble? Email ***@chrony.tuxfamily.org.
Charles Muggen
2018-02-06 17:18:00 UTC
Permalink
I entered ps -aef | grep ntpd
there is no ntpd running

and if I enter ps -aef | grep chronyd
I see chronyd running as root

root 399 1 0 16:56 ? 00:00:00 /usr/local/sbin/chronyd
Sent: Monday, February 05, 2018 at 4:27 PM
Subject: Re: [chrony-users] gpsd:ERROR... Permission denied
--
To unsubscribe email chrony-users-***@chrony.tuxfamily.org
with "unsubscribe" in the subject.
For help email chrony-users-***@chrony.tuxfamily.org
with "help" in the subject.
Trouble? Email ***@chrony.tuxfamily.org.
Bill Unruh
2018-02-06 18:34:01 UTC
Permalink
Post by Charles Muggen
I entered ps -aef | grep ntpd
there is no ntpd running
So that suggests strongly that there is no ntpd running to conflict with
chrony. Good.
Post by Charles Muggen
and if I enter ps -aef | grep chronyd
I see chronyd running as root
root 399 1 0 16:56 ? 00:00:00 /usr/local/sbin/chronyd
Sent: Monday, February 05, 2018 at 4:27 PM
Subject: Re: [chrony-users] gpsd:ERROR... Permission denied
--
with "unsubscribe" in the subject.
with "help" in the subject.
--
To unsubscribe email chrony-users-***@chrony.tuxfamily.org
with "unsubscribe" in the subject.
For help email chrony-users-***@chrony.tuxfamily.org
with "help" in the subject.
Trouble? Email ***@chrony.tuxfamily.org.
Loading...