aderm
August 9, 2024, 6:53am
1
Hi,
I have read the other thread with the same title, didn't manage to resolve the issue.
I'm getting error of Cannot resolve NTP server address: Unrecognized service
.
Output of pihole-FTL --config ntp
ntp.ipv4.active = true
ntp.ipv4.address =
ntp.ipv6.active = true
ntp.ipv6.address =
ntp.sync.active = true
ntp.sync.server = pool.ntp.org
ntp.sync.interval = 3600
ntp.sync.count = 8
ntp.sync.rtc.set = true
ntp.sync.rtc.device =
ntp.sync.rtc.utc = true
and output of pihole -v
:
Core
Version is v5.18.2-432-ga16e053b (Latest: null)
Branch is development-v6
Hash is a16e053b (Latest: a16e053b)
Web
Version is v5.19-836-g7950f87b (Latest: null)
Branch is development-v6
Hash is 7950f87b (Latest: 7950f87b)
FTL
Version is vDev-cce2c21 (Latest: null)
Branch is development-v6
Hash is cce2c210 (Latest: cce2c210)
I'm aware that I can disable the NTP service, but I'd prefer to try resolve the issue.
Thanks for the great work.
Please upload a debug log and post just the token URL that is generated after the log is uploaded by running the following command from the Pi-hole host terminal:
pihole -d
aderm
August 9, 2024, 11:24pm
5
Hello, thank you
https://tricorder.pi-hole.net/vOV3jOni/
Something is wrong, essential logfiles are missing
*** [ DIAGNOSING ]: contents of /var/log/pihole
-rw-r----- 1 pihole pihole 2 Aug 10 00:00 /var/log/pihole/FTL.log
-----head of FTL.log------
-----tail of FTL.log------
-rw-r----- 1 pihole pihole 0 Aug 8 10:17 /var/log/pihole/webserver.log
-----head of webserver.log------
-----tail of webserver.log------
DL6ER
August 10, 2024, 6:33am
8
Thanks! This is great and helps us improve Pi-hole overall.
aderm:
Unrecognized service
this error comes from gai_strerror
and means your system did not know what kind of service "ntp"
is.
Could you please run
less /etc/services | grep "^ntp"
and see what this returns? On all my systems, it returns
ntp 123/udp # Network Time Protocol
DL6ER
August 10, 2024, 6:46am
9
In addition to above, please try
pihole checkout ftl fix/ntp_service_unknown
if it resolves the error. Having checked the particular implementation details of getaddrinfo()
(and the therein used lookup_serv()
) in musl
, it seems this should allow NTP to work even on systems which don't know the service beforehand.
pi-hole:development-v6
← pi-hole:fix/ntp_service_unknown
opened 06:48AM - 10 Aug 24 UTC
# What does this implement/fix?
Directly specify NTP port instead of service … by name. Having checked the actual implementation of `getaddrinfo()`, we see that this avoids iterating over /etc/services ensuring we don't get "Unknown service" errors on systems that - for any reason - either lack the file or somehow lack the particular NTP service line.
**Related issue or feature (if applicable):** https://discourse.pi-hole.net/t/cannot-resolve-ntp-server-address-unrecognized-service/71653
**Pull request in [docs](https://github.com/pi-hole/docs) with documentation (if applicable):** N/A
---
**By submitting this pull request, I confirm the following:**
1. I have read and understood the [contributors guide](https://docs.pi-hole.net/guides/github/contributing/), as well as this entire template. I understand which branch to base my commits and Pull Requests against.
2. I have commented my proposed changes within the code.
3. I am willing to help maintain this change if there are issues with it later.
4. It is compatible with the [EUPL 1.2 license](https://opensource.org/licenses/EUPL-1.1)
5. I have squashed any insignificant commits. ([`git rebase`](http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html))
## Checklist:
- [x] The code change is tested and works locally.
- [x] I based my code and PRs against the repositories `developmental` branch.
- [x] I [signed off](https://docs.pi-hole.net/guides/github/how-to-signoff/) all commits. Pi-hole enforces the [DCO](https://docs.pi-hole.net/guides/github/dco/) for all contributions
- [x] I [signed](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits) all my commits. Pi-hole requires signatures to verify authorship
- [x] I have read the above and my PR is ready for review.
aderm
August 12, 2024, 4:13pm
10
Hello,
So less /etc/services | grep "^ntp"
didn't return anything, having ran pihole checkout ftl fix/ntp_service_unknown
I will give this a try for a little while and see if I get any errors.
If it helps, Raspberry Pi 2 Model B - Old I know
Cheers for your help, massively!
aderm
August 12, 2024, 7:14pm
11
If I remember rightly I used to get the warning every hour, it's been 3hours since appling change and seems to have resolved the problem!
DL6ER
August 12, 2024, 8:25pm
12
Thanks for confirming - the change has now been merged into the beta code. Please get back on track using
pihole checkout ftl development-v6
as this special branch you are currently on will stop to receive future updates.
aderm
August 13, 2024, 10:20pm
13
Thanks for your hard work and dedication guys.