question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bad address at /etc/hosts line 5

See original GitHub issue

Noticing this in my error.log:

Jun 3 15:19:44 ubuntu dnsmasq[28680]: bad address at /etc/hosts line 5

I’m running dnsmasq 2.75 Dnsmasq version 2.75 Copyright (c) 2000-2015 Simon Kelley

>lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.2 LTS
Release:        16.04
Codename:       xenial

Here’s the first few lines of /etc/hosts:

# This hosts file is a merged collection of hosts from reputable sources,
# with a dash of crowd sourcing via Github
#
# Date: June 03 2017
# Number of unique domains: 36,247
#
# Fetch the latest version of this file: https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
# Project home page: https://github.com/StevenBlack/hosts
#
# ===============================================================

127.0.0.1 localhost
127.0.0.1 localhost.localdomain
127.0.0.1 local
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost
0.0.0.0 0.0.0.0
127.0.1.1 ubuntu
127.0.0.53 ubuntu

# Custom host records are listed here.

I update my hosts file via cron:

0 0 * * * root /usr/bin/python /opt/hostupdate/updateHostsFile.py -a -r -f 2>&1 | /usr/bin/logger -t UpdateHosts

Not sure what else I could provide. Could just be my system, or something more common? Doesn’t seem to have any issues though.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:16 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
aasrilcommented, Apr 10, 2019

@dnmTX now that you’ve said it like that, i get it. maybe it was only me, but you could have phrased those sentences more clearly.

I assume that it’s specifically connected to MacOS

which one? the error, the line for ipv6 link-local? i thought you’re talking about the error, hence my response.

Probably the best thing is (the line fe80::1%lo0 localhost) to be commented(by default.) with some note for Mac users(.)


I’m not picking up on your post just trying to clarify what was my line of thought. and thanks btw, for now I’ll just comment out that line.

1reaction
aasrilcommented, Apr 9, 2019

Since I saw that you were responding to this issue I’ve been motivated to find some more info and fixes I could.

The first thing I do was to make sure that I didn’t disable ipv6 intentionally or unintentionally in the past. After following three different tutorials which check three different files, I can say that ipv6 is not disable on this machine.

The first possible fix I tried is to add my interface to /etc/network/interfaces with added inet6 on the line. It didn’t work. The second thing I did was to disable dns-over-https proxy that I’m using since in one of my search this was mentioned, but also didn’t get rid of the error. The third thing I did was to install wide-dhcpv6-client. After it was installed I added a recommended config, then I also applied a patch for script the application used since it was mentioned that the default script was buggy. This also has no effect on the error.

I should mention that I rebooted the machine after each of try, just in case.

Since this error message seems doesn’t have any negative effects on my day-to-day use, I didn’t even notice this for more than a couple of years I have this machine. So there it is how far my motivation to the bottom of the problem go 😀 I don’t have any knowledge to go deeper, though if anyone has some suggestions I’ll be happy to try.

And @StevenBlack, thanks for your hard work maintaining this ever growing lists.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Solved: DNS FIOS drop outs - Verizon Forums
This tells me that DNSMasq is occasionally hitting an invalid entry when it tries to add a DNS Record for a device on...
Read more >
1357227 – dnsmasq DNS server providing entries from /etc ...
tld master.tld has address 127.0.1.1 master.tld has address 1.2.3.4 So, last resort for me was to tell libvirt to not use /etc/hosts at...
Read more >
dnsmasq & bad name at /var/etc/hosts.dyn
Anyone have an idea what this error message is for in my NVG589? It fulled my diagnostic log completely in 5 hours.
Read more >
Why do I see "bad address at" in pihole.log? - FAQs
The 'Find' command in Notepad in all list files doesn't work because the non UTF-8 decoding of the URL.
Read more >
Host/domain name problem in /etc/hosts and /etc/resolv.conf
... in 5.x, but without "localdoma" at the end of search line. With the hostname "localhost.localdoma" on IP address 192.168.2.1 Oracle 12c ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found