[Bug 1041606] New: Privoxy needs to be restarted after every boot when using wlan
![](https://seccdn.libravatar.org/avatar/3035b38ff33cf86f480bb169b8500b80.jpg?s=120&d=mm&r=g)
http://bugzilla.opensuse.org/show_bug.cgi?id=1041606 Bug ID: 1041606 Summary: Privoxy needs to be restarted after every boot when using wlan Classification: openSUSE Product: openSUSE Distribution Version: Leap 42.2 Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Network Assignee: bnc-team-screening@forge.provo.novell.com Reporter: siebertjonathan@aim.com QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- After installing privoxy and enabling the privoxy.service in systemd, the service is automatically started at boot but when only a wlan connection is setup by NetworkManager, privoxy needs to be restarted once before it can be used (verified in Firefox only, so far). This is similar to #977944 but in this case I do not get any error messages in journalctl about privoxy entering 'failed' state. Also `systemctl status privoxy.service` shows that privoxy is up and running. When a wired connection is present at boot, everything works nicely, even if the wired connection is removed and one switches to wlan. The necessity to restart the privoxy service makes using privoxy as a daemon rather painful. -- You are receiving this mail because: You are on the CC list for the bug.
![](https://seccdn.libravatar.org/avatar/3035b38ff33cf86f480bb169b8500b80.jpg?s=120&d=mm&r=g)
http://bugzilla.opensuse.org/show_bug.cgi?id=1041606
Andreas Stieger
![](https://seccdn.libravatar.org/avatar/3035b38ff33cf86f480bb169b8500b80.jpg?s=120&d=mm&r=g)
http://bugzilla.opensuse.org/show_bug.cgi?id=1041606
http://bugzilla.opensuse.org/show_bug.cgi?id=1041606#c3
Hyde Zhou
![](https://seccdn.libravatar.org/avatar/3035b38ff33cf86f480bb169b8500b80.jpg?s=120&d=mm&r=g)
http://bugzilla.opensuse.org/show_bug.cgi?id=1041606
http://bugzilla.opensuse.org/show_bug.cgi?id=1041606#c4
--- Comment #4 from Hyde Zhou
![](https://seccdn.libravatar.org/avatar/3035b38ff33cf86f480bb169b8500b80.jpg?s=120&d=mm&r=g)
http://bugzilla.opensuse.org/show_bug.cgi?id=1041606
http://bugzilla.opensuse.org/show_bug.cgi?id=1041606#c5
--- Comment #5 from Hyde Zhou
The problem is related to files '/usr/lib/systemd/system/privoxy.service' and '/etc/NetworkManager/dispatcher.d/privoxyd'
Leap 42.3 and Leap 15.0 have same 'privoxy.service' and 'privoxyd'
## /usr/lib/systemd/system/privoxy.service ''' [Unit] Description=Privoxy Web Proxy With Advanced Filtering Capabilities After=network.target
[Service] Type=forking PIDFile=/run/privoxy.pid ExecStartPre=-/usr/bin/cp -upf /etc/resolv.conf /etc/host.conf /etc/hosts /etc/localtime /var/lib/privoxy/etc/ ExecStartPre=-/usr/bin/cp -upf /lib64/libresolv.so.2 /lib64/libnss_dns.so.2 /var/lib/privoxy/lib64/ ExecStart=/usr/sbin/privoxy --chroot --pidfile /run/privoxy.pid --user privoxy /etc/config ExecReload=/bin/kill -HUP $MAINPID
[Install] WantedBy=multi-user.target '''
According to the file 'privoxy.service', a copy of 'resolv.conf' is created before privoxy starts, and privoxy uses the copy instead of '/etc/resolv.conf'.
## /etc/NetworkManager/dispatcher.d/privoxyd ''' case "$2" in up) /usr/bin/systemctl restart privoxy ;; down) /usr/bin/systemctl restart privoxy ;; *) exit 0 ;; esac '''
According to the file 'privoxyd', privoxy will be reloaded either a connection is up or down.
The point is, if privoxy starts when the system's network is still offline, the copy from '/etc/resolv.conf' contains no nameserver. In this situation, later connection changes will only cause privoxy reload, and the copy of '/etc/resolv.conf' still contains no nameserver. Thus, 503(URL Cannot be resolved) happened.
## Solution
My temporary solution is to modify the file 'privoxyd', changing
'/usr/bin/systemctl reload privoxy' into
'/usr/bin/systemctl restart privoxy'
The solution may not be perfect but it at least works.
If there is any confusing expression, please let me know.
Sorry for the misleading comment, the original file '/etc/NetworkManager/dispatcher.d/privoxyd' is ''' case "$2" in up) /usr/bin/systemctl reload privoxy ;; down) /usr/bin/systemctl reload privoxy ;; *) exit 0 ;; esac ''' And I fix the bug by modifying it into ''' case "$2" in up) /usr/bin/systemctl restart privoxy ;; down) /usr/bin/systemctl restart privoxy ;; *) exit 0 ;; esac ''' -- You are receiving this mail because: You are on the CC list for the bug.
![](https://seccdn.libravatar.org/avatar/a895f78a81a109471893519443e4d933.jpg?s=120&d=mm&r=g)
http://bugzilla.opensuse.org/show_bug.cgi?id=1041606
http://bugzilla.opensuse.org/show_bug.cgi?id=1041606#c7
Peter Chambers
participants (2)
-
bugzilla_noreply@novell.com
-
bugzilla_noreply@suse.com