WARNING: DNS lookup for 'example.com' failed!

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

WARNING: DNS lookup for 'example.com' failed!

chiasa.men
I have to restart squid after each reboot to get it working. I think that is
because squid starts before systemd has started the network and so the dns
lookups fail:

journalctl says:
"squid.service: Unit cannot be reloaded because it is inactive."

cache.log contains:
"WARNING: DNS lookup for 'example.com' failed!"


The problems seems to be the squid.service file which I took from ubuntus
squid package:

# Automatically generated by systemd-sysv-generator

[Unit]
Documentation=man:systemd-sysv-generator(8)
SourcePath=/etc/init.d/squid
Description=LSB: Squid HTTP Proxy version 3.x
Before=multi-user.target
Before=multi-user.target
Before=multi-user.target
Before=graphical.target
Before=shutdown.target
After=network-online.target
After=remote-fs.target
After=systemd-journald-dev-log.socket
After=nss-lookup.target
Wants=network-online.target
Conflicts=shutdown.target

[Service]
Type=forking
Restart=no
TimeoutSec=5min
IgnoreSIGPIPE=no
KillMode=process
GuessMainPID=no
RemainAfterExit=yes
ExecStart=/etc/init.d/squid start
ExecStop=/etc/init.d/squid stop
ExecReload=/etc/init.d/squid reload

Did anybody have the same problem and a nicer solution than adding each
hostname to /etc/hosts?

_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|

Re: WARNING: DNS lookup for 'example.com' failed!

Amos Jeffries
Administrator
On 30/09/17 04:32, chiasa.men wrote:
> I have to restart squid after each reboot to get it working. I think that is
> because squid starts before systemd has started the network and so the dns
> lookups fail:
>
> journalctl says:
> "squid.service: Unit cannot be reloaded because it is inactive."
>

So systemd thinks Squid is disabled.


> cache.log contains:
> "WARNING: DNS lookup for 'example.com' failed!"
>
>
> The problems seems to be the squid.service file which I took from ubuntus
> squid package:

Nod, quite probably. Squid-3 does not support systemd.

The gory details of that are outlined in:
<https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=855268#26>


Amos
_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users