Skip to content
New issue

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

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

Already on GitHub? # to your account

Sync error #507

Closed
Stephan-4711 opened this issue Feb 25, 2025 · 9 comments
Closed

Sync error #507

Stephan-4711 opened this issue Feb 25, 2025 · 9 comments

Comments

@Stephan-4711
Copy link
Contributor

What happened?

Everytime the sync runs between 2 adguard home Servers I get this error:
one is running as addon on home assistant and the replica on opnsense

AdguardHome-Sync Version

v0.7.0

AdguardHome Version

v0.107.57

Configuration

Sorry it's from the unraid webinterface:
Name:
AdGuardHome-Sync
Beschreibung:
Synchronize AdGuardHome config to replica instances.
No config file needed, all done via environmental variables.

General Settings
Filters
Rewrites
Services
Clients
DNS Config
DHCP Config
Theme
Zusätzliche Anforderungen:
Source:
ghcr.io/bakito/adguardhome-sync
Registry URL:
https://registry.hub.docker.com/r/ghcr.io/bakito/adguardhome-sync
Symbol-URL:
https://raw.githubusercontent.com/CorneliousJD/Docker-Templates/master/icons/adguardhome-sync.png
Web Interface:
8779

Container Port: 8080

  ORIGIN_URL:
http://192.168.100.110:8000

Container Variable: ORIGIN_URL

  ORIGIN_USERNAME:
Stephan

Container Variable: ORIGIN_USERNAME

  ORIGIN_PASSWORD:

Container Variable: ORIGIN_PASSWORD

  REPLICA1_URL:
http://192.168.100.1:3000

Container Variable: REPLICA1_URL

  REPLICA1_USERNAME:
Stephan

Container Variable: REPLICA1_USERNAME

  REPLICA1_PASSWORD:

Container Variable: REPLICA1_PASSWORD
CRON:
*/1 * * * *

Relevant log output

`2025-02-25T02:33:28.779-0800	ERROR	sync	sync/sync.go:141	Error getting origin status	{"from": "", "error": ": Get \"//control/./status\": unsupported protocol scheme \"\""}
github.com/bakito/adguardhome-sync/pkg/sync.(*worker).getStatus
	/go/src/app/pkg/sync/sync.go:141
github.com/bakito/adguardhome-sync/pkg/sync.(*worker).status
	/go/src/app/pkg/sync/sync.go:107
github.com/bakito/adguardhome-sync/pkg/sync.(*worker).handleStatus
	/go/src/app/pkg/sync/http.go:86
github.com/gin-gonic/gin.(*Context).Next
	/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185
github.com/gin-gonic/gin.CustomRecoveryWithWriter.func1
	/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/recovery.go:102
github.com/gin-gonic/gin.(*Context).Next
	/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185
github.com/gin-gonic/gin.(*Engine).handleHTTPRequest
	/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/gin.go:633
github.com/gin-gonic/gin.(*Engine).ServeHTTP
	/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/gin.go:589
net/http.serverHandler.ServeHTTP
	/usr/local/go/src/net/http/server.go:3301
net/http.(*conn).serve
	/usr/local/go/src/net/http/server.go:2102`

Anything else?

No response

@bakito
Copy link
Owner

bakito commented Feb 25, 2025

Hi @Stephan-4711

Can you print and attach the current config be setting the env variable PRINT_CONFIG_ONLY=true

@Stephan-4711
Copy link
Contributor Author

Hope this is what we are looking for.
2025-02-25T04:05:15.093-0800 INFO run cmd/run.go:35 Printing adguardhome-sync config (THE APPLICATION WILL NOT START IN THIS MODE): origin: url: http://192.168.100.110:8000 webURL: http://192.168.100.110:8000 apiPath: /control username: Stephan password: PASSWORD insecureSkipVerify: false autoSetup: false replicas: - url: http://192.168.100.1:3000 webURL: http://192.168.100.1:3000 apiPath: /control username: Stephan password: PASSWORD insecureSkipVerify: false autoSetup: false - url: http://192.168.100.1:3000 webURL: http://192.168.100.1:3000 apiPath: /control insecureSkipVerify: false autoSetup: false cron: '*/1 * * * *' runOnStart: true printConfigOnly: true api: port: 8080 darkMode: true features: dns: accessLists: true serverConfig: true rewrites: true dhcp: serverConfig: true staticLeases: true generalSettings: true queryLogConfig: true statsConfig: true clientSettings: true services: true filters: true theme: true

@bakito
Copy link
Owner

bakito commented Feb 25, 2025

I see two things here:

  1. the replica IP is 192.168.100.1 is this correct, as in most networks the x.x.x.1 IP is reserved for the default gateway.
  2. you config shows 2 entries in the replicas array, which is a bi strange. I can either explain nor reproduce this behavior.

@Stephan-4711
Copy link
Contributor Author

  1. Yea it's my opnsense firewall, which also runs adguard home.
  2. I saw that too, also a new docker with a new sync config brings the same result. What seems to be weird, I figured out these errors don't happen on every sync cycle

@bakito
Copy link
Owner

bakito commented Feb 25, 2025

Are you saying, the issue dies not always happen?
Could there be an inconsistency in the env variables?

I've extended the config output in v0.7.1 (images are currently building: https://github.com/bakito/adguardhome-sync/actions/runs/13530317579)

could you please run this version with PRINT_CONFIG_ONLY=true and attach the output to the issue?
don't forget to mask sensitive information.

the output is pre-formatted as markdown and ban be pasted as is to the gitlab issue.

Perhaps his helps understanding or reproducing the issue.

bakito added a commit that referenced this issue Feb 25, 2025
@lisim
Copy link

lisim commented Feb 26, 2025

Hi
To add to this i Had similar issue with a Unraid Based Template, the template had extra Env Args for replica2 i removed those arg completly and the issue seems to have resolved

@Stephan-4711
Copy link
Contributor Author

@lisim thx seems to fix the issue.

@bakito Sorry this wasn't described in the unraid docker template.

@bakito bakito closed this as completed Feb 26, 2025
@bakito
Copy link
Owner

bakito commented Feb 26, 2025

@lisim @Stephan-4711 Would it be possible, that you describe the issue/solution in the README.md add make a pull request to give others a hint, when facing the same issue on unraid environments?

@Stephan-4711
Copy link
Contributor Author

@bakito please double check my comment if this is understandable

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants