The process seems to get stuck upon start of the container and doesn't sync any changes
digitalapnea opened this issue · comments
Thanks for creating this software, it will be very handy for me when I get it up and running. I'm having some issues and wondered if you could help?
Here is my environment:
Primary AdGuard host
- Host IP: 192.168.88.174
- Docker container image for AdGuard: adguard/adguardhome:latest
- AdGuard container name: adguard
- AdGuard container exposed ports: 53:53/tcp, 53:53/udp, 853:853/tcp, 3000:3000/tcp
- Also running on this host is the Docker container image for adguard-sync: atoy3731/adguard-sync:latest
Secondary AdGuard host
- Host IP: 192.168.88.35
- Docker container image for AdGuard: adguard/adguardhome:latest
- AdGuard container name: adguard
- AdGuard container exposed ports: 53:53/tcp, 53:53/udp, 853:853/tcp, 3000:3000/tcp
adguard-sync docker-compose.yml file contents
version: "3.3"
services:
agsync:
image: atoy3731/adguard-sync:latest
container_name: agsync
hostname: agsync
restart: always
environment:
- PUID=${PUID}
- PGID=${PGID}
- TZ=${TZ}
- ADGUARD_PRIMARY=http://192.168.88.174:3000
- ADGUARD_SECONDARY=http://192.168.88.35:3000
- ADGUARD_USER=admin
- ADGUARD_PASS=********************************
- REFRESH_INTERVAL_SECS=10
Issue
When I do a docker-compose up -d on the adguard-sync folder, it gets created and starts running. However when I tail the logs with docker logs -tf adguard-sync it just has a single entry as follows:
2021-12-21T23:04:15.314397989Z Running Adguard Sync for 'http://192.168.88.174:3000' => 'http://192.168.88.35:3000'..
No further entries ever appear, and when I make changes to the configuration of my primary AdGuard container, they never get synchronised to the secondary one. Any ideas what might be going wrong in my setup?
Hello and apologize for the delay. To confirm, the ADGUARD_USER
and ADGUARD_PASS
are both the same for each AGH deployment? You can also docker exec
into your sync container and try to curl
both your primary/secondary instances to at least confirm network connectivity.
Realistically, I think this comes down to improving logging if/when there are issues.
@atoy3731 I appear to be having a similar issue.
I've confirmed that there are no connectivity issues between my two AdGuard Home instances. In fact, I had used this container a while back (a long time ago) without issue. That makes me wonder if it's possible that an update to Adguard, itself, is causing issues.
Here is the log output I receive:
2022-11-08T03:11:19.090082837Z Running Adguard Sync for 'http://10.10.80.187' => 'http://10.10.80.241'.. 2022-11-08T03:11:19.093969873Z Traceback (most recent call last): 2022-11-08T03:11:19.093982043Z File "/opt/app.py", line 128, in <module> 2022-11-08T03:11:19.094125643Z primary_cookie = get_login_cookie(ADGUARD_PRIMARY, ADGUARD_USER, ADGUARD_PASS) 2022-11-08T03:11:19.094139738Z File "/opt/app.py", line 38, in get_login_cookie 2022-11-08T03:11:19.094351444Z return response.cookies['agh_session'] 2022-11-08T03:11:19.094360695Z File "/usr/lib/python3.8/site-packages/requests/cookies.py", line 328, in __getitem__ 2022-11-08T03:11:19.094475456Z return self._find_no_duplicates(name) 2022-11-08T03:11:19.094483047Z File "/usr/lib/python3.8/site-packages/requests/cookies.py", line 399, in _find_no_duplicates 2022-11-08T03:11:19.094709311Z raise KeyError('name=%r, domain=%r, path=%r' % (name, domain, path)) 2022-11-08T03:11:19.094715672Z KeyError: "name='agh_session', domain=None, path=None"
I'm having the same issue. I tried giving network_mode: host
access in my compose, which didn't help.
Running Adguard Sync for 'http://192.168.x.y' => 'http://192.168.z.t'..
Traceback (most recent call last):
File "/opt/app.py", line 128, in <module>
primary_cookie = get_login_cookie(ADGUARD_PRIMARY, ADGUARD_USER, ADGUARD_PASS)
File "/opt/app.py", line 38, in get_login_cookie
return response.cookies['agh_session']
File "/usr/lib/python3.8/site-packages/requests/cookies.py", line 328, in __getitem__
return self._find_no_duplicates(name)
File "/usr/lib/python3.8/site-packages/requests/cookies.py", line 399, in _find_no_duplicates
raise KeyError('name=%r, domain=%r, path=%r' % (name, domain, path))
KeyError: "name='agh_session', domain=None, path=None"
I'm having the same issue. I tried giving
network_mode: host
access in my compose, which didn't help.Running Adguard Sync for 'http://192.168.x.y' => 'http://192.168.z.t'.. Traceback (most recent call last): File "/opt/app.py", line 128, in <module> primary_cookie = get_login_cookie(ADGUARD_PRIMARY, ADGUARD_USER, ADGUARD_PASS) File "/opt/app.py", line 38, in get_login_cookie return response.cookies['agh_session'] File "/usr/lib/python3.8/site-packages/requests/cookies.py", line 328, in __getitem__ return self._find_no_duplicates(name) File "/usr/lib/python3.8/site-packages/requests/cookies.py", line 399, in _find_no_duplicates raise KeyError('name=%r, domain=%r, path=%r' % (name, domain, path)) KeyError: "name='agh_session', domain=None, path=None"
What image version of adguard-sync are you using? Can you try to update your docker-compose.yaml to use latest
? There was a lingering issue when AGH updated that should be fixed in the latest image version, but I just noticed I hadn't updated the docker-compose.yaml in this repo to reflect the latest.