Or let me put it the other way. Below goes what I have figured out so far. 1. Whenever I start my virtual machine (from a "Powered Off" state) internet via proxy does not work.
$ env | grep -i http_proxy HTTP_PROXY=http://localhost:48080/ http_proxy=http://localhost:48080/ $ systemctl status squid ● squid.service - LSB: Squid HTTP Proxy version 3.x Loaded: loaded (/etc/init.d/squid; generated; vendor preset: enabled) Active: active (running) since Fri 2018-02-16 13:11:38 CET; 7min ago Docs: man:systemd-sysv-generator(8) Process: 2081 ExecReload=/etc/init.d/squid reload (code=exited, status=0/SUCCESS) Process: 383 ExecStart=/etc/init.d/squid start (code=exited, status=0/SUCCESS) Tasks: 4 (limit: 4915) CGroup: /system.slice/squid.service ├─ 539 /usr/sbin/squid -YC -f /etc/squid/squid.conf ├─ 541 (squid-1) -YC -f /etc/squid/squid.conf ├─2095 (logfile-daemon) /var/log/squid/access.log └─2285 (pinger) Feb 16 13:11:38 hatchling squid[539]: Squid Parent: will start 1 kids Feb 16 13:11:38 hatchling squid[539]: Squid Parent: (squid-1) process 541 started Feb 16 13:11:49 hatchling systemd[1]: Reloading LSB: Squid HTTP Proxy version 3.x. Feb 16 13:11:49 hatchling squid[904]: * Reloading Squid HTTP Proxy configuration files Feb 16 13:11:49 hatchling squid[904]: ...done. Feb 16 13:11:49 hatchling systemd[1]: Reloaded LSB: Squid HTTP Proxy version 3.x. Feb 16 13:13:58 hatchling systemd[1]: Reloading LSB: Squid HTTP Proxy version 3.x. Feb 16 13:13:58 hatchling squid[2081]: * Reloading Squid HTTP Proxy configuration files Feb 16 13:13:58 hatchling squid[2081]: ...done. Feb 16 13:13:58 hatchling systemd[1]: Reloaded LSB: Squid HTTP Proxy version 3.x. $ sudo netstat -tulpn | grep 48080 tcp6 0 0 :::48080 :::* LISTEN 541/(squid-1) $ wget google.com --2018-02-16 13:20:59-- http://google.com/ Resolving localhost (localhost)... 127.0.0.1 Connecting to localhost (localhost)|127.0.0.1|:48080... connected. Proxy request sent, awaiting response... 500 Internal Server Error 2018-02-16 13:20:59 ERROR 500: Internal Server Error. The curious thing is that squid listens to port 48080 (as stated in my configuration). I.e. I assume it *has* read the configuration file. 2. Issuing `invoke-rc.d squid reload` manually does help: $ sudo invoke-rc.d squid reload $ systemctl status squid ● squid.service - LSB: Squid HTTP Proxy version 3.x Loaded: loaded (/etc/init.d/squid; generated; vendor preset: enabled) Active: active (running) since Fri 2018-02-16 13:11:38 CET; 11min ago Docs: man:systemd-sysv-generator(8) Process: 2674 ExecReload=/etc/init.d/squid reload (code=exited, status=0/SUCCESS) Process: 383 ExecStart=/etc/init.d/squid start (code=exited, status=0/SUCCESS) Tasks: 5 (limit: 4915) CGroup: /system.slice/squid.service ├─ 539 /usr/sbin/squid -YC -f /etc/squid/squid.conf ├─ 541 (squid-1) -YC -f /etc/squid/squid.conf ├─2285 (pinger) ├─2688 (logfile-daemon) /var/log/squid/access.log └─2689 (pinger) Feb 16 13:11:49 hatchling squid[904]: ...done. Feb 16 13:11:49 hatchling systemd[1]: Reloaded LSB: Squid HTTP Proxy version 3.x. Feb 16 13:13:58 hatchling systemd[1]: Reloading LSB: Squid HTTP Proxy version 3.x. Feb 16 13:13:58 hatchling squid[2081]: * Reloading Squid HTTP Proxy configuration files Feb 16 13:13:58 hatchling squid[2081]: ...done. Feb 16 13:13:58 hatchling systemd[1]: Reloaded LSB: Squid HTTP Proxy version 3.x. Feb 16 13:23:09 hatchling systemd[1]: Reloading LSB: Squid HTTP Proxy version 3.x. Feb 16 13:23:09 hatchling squid[2674]: * Reloading Squid HTTP Proxy configuration files Feb 16 13:23:09 hatchling squid[2674]: ...done. Feb 16 13:23:09 hatchling systemd[1]: Reloaded LSB: Squid HTTP Proxy version 3.x. $ wget google.com --2018-02-16 13:24:10-- http://google.com/ Resolving localhost (localhost)... 127.0.0.1 Connecting to localhost (localhost)|127.0.0.1|:48080... connected. Proxy request sent, awaiting response... 302 Found Location: http://www.google.pl/?gfe_rd=cr&dcr=0&ei=bM2GWp3vE6Li8Af6wZGwAQ [following] --2018-02-16 13:24:10-- http://www.google.pl/?gfe_rd=cr&dcr=0&ei=bM2GWp3vE6Li8Af6wZGwAQ Reusing existing connection to localhost:48080. Proxy request sent, awaiting response... 200 OK Length: unspecified [text/html] Saving to: ‘index.html’ index.html [ <=> ] 12,79K --.-KB/s in 0,003s 2018-02-16 13:24:10 (3,91 MB/s) - ‘index.html’ saved [13094] 3. However, if I replace `invoke-rc.d` with `systemctl` analog in /etc/resolvconf/update-libc.d/squid the problem does not appear at all. Squid just works since startup -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1748471 Title: Automatic squid reload on resolv.conf update does not work To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/squid3/+bug/1748471/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
