Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't update filter on Windows #1088

Closed
3 tasks done
bestpika opened this issue Oct 19, 2019 · 11 comments
Closed
3 tasks done

Can't update filter on Windows #1088

bestpika opened this issue Oct 19, 2019 · 11 comments
Assignees
Milestone

Comments

@bestpika
Copy link

bestpika commented Oct 19, 2019

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

@ghost
Copy link

ghost commented Oct 19, 2019

I also experience this issue

@szolin
Copy link
Contributor

szolin commented 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
Copy link
Contributor

szolin commented 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).

@ghost
Copy link

ghost commented Oct 21, 2019

@szolin that doesn't occur on v0.98.1

@szolin
Copy link
Contributor

szolin commented 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.

@bestpika
Copy link
Author

bestpika commented Oct 21, 2019

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

@bestpika
Copy link
Author

bestpika commented 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

@ameshkov
Copy link
Member

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

@ghost
Copy link

ghost commented 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)

@bestpika
Copy link
Author

bestpika commented Oct 22, 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

@ghost
Copy link

ghost commented Oct 22, 2019

@bestpika Yup

#1088 (comment)

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.

@ameshkov ameshkov changed the title Can't update filter Can't update filter on Windows Oct 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants