Can't update filter on Windows #1010

Closed
opened 2026-03-04 01:00:19 -05:00 by deekerman · 11 comments
Owner

Originally created by @bestpika on GitHub (Oct 18, 2019).

Originally assigned to: @szolin on GitHub.

Prerequisites

  • I am running the latest version
  • I checked the documentation and found no answer
  • I checked to make sure that this issue has not already been filed

Issue Details

  • Version of AdGuard Home server:
    • 0.99.0
  • How did you setup DNS configuration:
    • System
  • Operating system and version:
    • Windows 8.1 x64
    • Windows 10 x64 1903

Steps

  1. Click image

Expected Behavior

Actual Behavior

The filter's rule count does not change and filter files seem like locked and AGH create .tmp file to save it.
I have to stop service and delete files then start service to update filters.
See screenshots.

Screenshots

Screenshot:

image

Additional Information

Originally created by @bestpika on GitHub (Oct 18, 2019). Originally assigned to: @szolin on GitHub. ### Prerequisites - [x] I am running the latest version - [x] I checked the documentation and found no answer - [x] I checked to make sure that this issue has not already been filed ### Issue Details * **Version of AdGuard Home server:** * `0.99.0` * **How did you setup DNS configuration:** * `System` * **Operating system and version:** * `Windows 8.1 x64` * `Windows 10 x64 1903` ### Steps 1. Click ![image](https://user-images.githubusercontent.com/5698157/67135035-373fb580-f248-11e9-932b-765a4951a6b4.png) ### Expected Behavior ### Actual Behavior The filter's rule count does not change and filter files seem like locked and AGH create `.tmp` file to save it. I have to stop service and delete files then start service to update filters. See screenshots. ### Screenshots <!-- If applicable, add screenshots to help explain your problem. --> <details><summary>Screenshot:</summary> ![image](https://user-images.githubusercontent.com/5698157/67134987-c39da880-f247-11e9-9bcc-afb2e60bdc06.png) </details> ### Additional Information
deekerman 2026-03-04 01:00:19 -05:00
Author
Owner

@ghost commented on GitHub (Oct 19, 2019):

I also experience this issue

@ghost commented on GitHub (Oct 19, 2019): I also experience this issue
Author
Owner

@szolin commented on GitHub (Oct 21, 2019):

How long did you wait for the update procedure to complete?
Please note that this procedure can be long because it downloads all your enabled filters and parses all their rules, so it may take several minutes to complete. During the update DNS server works as usual - you don't have to restart the service or anything.

@szolin commented on GitHub (Oct 21, 2019): How long did you wait for the update procedure to complete? Please note that this procedure can be long because it downloads all your enabled filters and parses all their rules, so it may take several minutes to complete. During the update DNS server works as usual - you don't have to restart the service or anything.
Author
Owner

@szolin commented on GitHub (Oct 21, 2019):

I see now that on Windows update procedure is broken - AGH can't rename files from .tmp to .txt because Windows has these file paths locked (they are being used until new files are ready).

@szolin commented on GitHub (Oct 21, 2019): I see now that on Windows update procedure is broken - AGH can't rename files from .tmp to .txt because Windows has these file paths locked (they are being used until new files are ready).
Author
Owner

@ghost commented on GitHub (Oct 21, 2019):

@szolin that doesn't occur on v0.98.1

@ghost commented on GitHub (Oct 21, 2019): @szolin that doesn't occur on v0.98.1
Author
Owner

@szolin commented on GitHub (Oct 21, 2019):

Yes, because for #928 I implemented a new algorithm for this whole thing. The current problem is that it doesn't account for Windows specific behaviour.

@szolin commented on GitHub (Oct 21, 2019): Yes, because for #928 I implemented a new algorithm for this whole thing. The current problem is that it doesn't account for Windows specific behaviour.
Author
Owner

@bestpika commented on GitHub (Oct 21, 2019):

@szolin I am waiting for a long time.
The first filter (1.txt) only 1KB (17 rules).

@bestpika commented on GitHub (Oct 21, 2019): @szolin I am waiting for a long time. The first filter (1.txt) only 1KB (17 rules).
Author
Owner

@bestpika commented on GitHub (Oct 21, 2019):

Here is the log.

2019/10/21 23:59:46 [info] Filter 2 has been updated: 601570 bytes, 31276 rules
2019/10/21 23:59:46 [info] Filter 19 has been updated: 26455 bytes, 1204 rules
2019/10/21 23:59:46 [info] Filter 20 has been updated: 28230 bytes, 1375 rules
2019/10/21 23:59:49 [info] Filter 51 has been updated: 951859 bytes, 33534 rules
2019/10/21 23:59:50 [info] Filter 52 has been updated: 89807 bytes, 3303 rules
2019/10/21 23:59:50 [info] Saving filter 2 contents to: C:\AdGuardHome\data\filters\2.txt
2019/10/21 23:59:50 [info] Failed to save the updated filter 2: rename C:\AdGuardHome\data\filters\2.txt.tmp C:\AdGuardHome\data\filters\2.txt: Access is denied.
2019/10/21 23:59:50 [info] Saving filter 19 contents to: C:\AdGuardHome\data\filters\19.txt
2019/10/21 23:59:50 [info] Failed to save the updated filter 19: rename C:\AdGuardHome\data\filters\19.txt.tmp C:\AdGuardHome\data\filters\19.txt: Access is denied.
2019/10/21 23:59:50 [info] Saving filter 20 contents to: C:\AdGuardHome\data\filters\20.txt
2019/10/21 23:59:50 [info] Failed to save the updated filter 20: rename C:\AdGuardHome\data\filters\20.txt.tmp C:\AdGuardHome\data\filters\20.txt: Access is denied.
2019/10/21 23:59:50 [info] Saving filter 51 contents to: C:\AdGuardHome\data\filters\51.txt
2019/10/21 23:59:50 [info] Failed to save the updated filter 51: rename C:\AdGuardHome\data\filters\51.txt.tmp C:\AdGuardHome\data\filters\51.txt: Access is denied.
2019/10/21 23:59:50 [info] Saving filter 52 contents to: C:\AdGuardHome\data\filters\52.txt
2019/10/21 23:59:50 [info] Failed to save the updated filter 52: rename C:\AdGuardHome\data\filters\52.txt.tmp C:\AdGuardHome\data\filters\52.txt: Access is denied.
2019/10/21 23:59:54 [info] Stopping AdGuard Home
2019/10/21 23:59:54 [info] Stopping the DNS proxy server
2019/10/21 23:59:54 [info] tcpListen.Accept() returned because we're reading from a closed connection, exiting loop
2019/10/21 23:59:54 [info] udpListen.ReadFrom() returned because we're reading from a closed connection, exiting loop
2019/10/21 23:59:54 [info] Stopped the DNS proxy server
2019/10/21 23:59:54 [info] Stopped
@bestpika commented on GitHub (Oct 21, 2019): Here is the log. ```text 2019/10/21 23:59:46 [info] Filter 2 has been updated: 601570 bytes, 31276 rules 2019/10/21 23:59:46 [info] Filter 19 has been updated: 26455 bytes, 1204 rules 2019/10/21 23:59:46 [info] Filter 20 has been updated: 28230 bytes, 1375 rules 2019/10/21 23:59:49 [info] Filter 51 has been updated: 951859 bytes, 33534 rules 2019/10/21 23:59:50 [info] Filter 52 has been updated: 89807 bytes, 3303 rules 2019/10/21 23:59:50 [info] Saving filter 2 contents to: C:\AdGuardHome\data\filters\2.txt 2019/10/21 23:59:50 [info] Failed to save the updated filter 2: rename C:\AdGuardHome\data\filters\2.txt.tmp C:\AdGuardHome\data\filters\2.txt: Access is denied. 2019/10/21 23:59:50 [info] Saving filter 19 contents to: C:\AdGuardHome\data\filters\19.txt 2019/10/21 23:59:50 [info] Failed to save the updated filter 19: rename C:\AdGuardHome\data\filters\19.txt.tmp C:\AdGuardHome\data\filters\19.txt: Access is denied. 2019/10/21 23:59:50 [info] Saving filter 20 contents to: C:\AdGuardHome\data\filters\20.txt 2019/10/21 23:59:50 [info] Failed to save the updated filter 20: rename C:\AdGuardHome\data\filters\20.txt.tmp C:\AdGuardHome\data\filters\20.txt: Access is denied. 2019/10/21 23:59:50 [info] Saving filter 51 contents to: C:\AdGuardHome\data\filters\51.txt 2019/10/21 23:59:50 [info] Failed to save the updated filter 51: rename C:\AdGuardHome\data\filters\51.txt.tmp C:\AdGuardHome\data\filters\51.txt: Access is denied. 2019/10/21 23:59:50 [info] Saving filter 52 contents to: C:\AdGuardHome\data\filters\52.txt 2019/10/21 23:59:50 [info] Failed to save the updated filter 52: rename C:\AdGuardHome\data\filters\52.txt.tmp C:\AdGuardHome\data\filters\52.txt: Access is denied. 2019/10/21 23:59:54 [info] Stopping AdGuard Home 2019/10/21 23:59:54 [info] Stopping the DNS proxy server 2019/10/21 23:59:54 [info] tcpListen.Accept() returned because we're reading from a closed connection, exiting loop 2019/10/21 23:59:54 [info] udpListen.ReadFrom() returned because we're reading from a closed connection, exiting loop 2019/10/21 23:59:54 [info] Stopped the DNS proxy server 2019/10/21 23:59:54 [info] Stopped ```
Author
Owner

@ameshkov commented on GitHub (Oct 21, 2019):

Here's what I think -- start using in-memory filter lists on Windows, and keep file-based filter lists on macOS and Linux only.

@ameshkov commented on GitHub (Oct 21, 2019): Here's what I think -- start using in-memory filter lists on Windows, and keep file-based filter lists on macOS and Linux only.
Author
Owner

@ghost commented on GitHub (Oct 21, 2019):

@bestpika

I am waiting for a long time.

You dont have to wait such time. Don't you see that "All filters are already up-to-date" notification?

(And as you said if stop service and delete all files then start service again helps to update them)

@ghost commented on GitHub (Oct 21, 2019): @bestpika > I am waiting for a long time. You dont have to wait such time. Don't you see that "All filters are already up-to-date" notification? (And as you said if stop service and delete all files then start service again helps to update them)
Author
Owner

@bestpika commented on GitHub (Oct 21, 2019):

@ArchiveBase I am posted AGH's log.
The log said AGH CANNOT save the file.
And I saw All filters are already up-to-date.
image

@bestpika commented on GitHub (Oct 21, 2019): @ArchiveBase I am posted AGH's log. The log said AGH CANNOT save the file. And I saw `All filters are already up-to-date`. ![image](https://user-images.githubusercontent.com/5698157/67253468-58074580-f4aa-11e9-9bea-b33308ee26aa.png)
Author
Owner

@ghost commented on GitHub (Oct 21, 2019):

@bestpika Yup

https://github.com/AdguardTeam/AdGuardHome/issues/1088#issuecomment-544486819

Yes, because for #928 I implemented a new algorithm for this whole thing. The current problem is that it doesn't account for Windows specific behaviour.

@ghost commented on GitHub (Oct 21, 2019): @bestpika Yup https://github.com/AdguardTeam/AdGuardHome/issues/1088#issuecomment-544486819 > Yes, because for #928 I implemented a new algorithm for this whole thing. The current problem is that it doesn't account for Windows specific behaviour.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/AdGuardHome#1010
No description provided.