mtalcott / google-photos-deduper

Locally run web app and Chrome extension to remove duplicates from Google Photos
MIT License
208 stars 18 forks source link

"Address already in use" RuntimeError #63

Closed coffeemonk closed 3 days ago

coffeemonk commented 2 months ago

I've had no success yet getting the deduper to successfully process my library after running all day and night. Trying again today, I'm seeing in the terminal the following error:

worker-1  | Traceback (most recent call last):
worker-1  |   File "/usr/local/lib/python3.9/runpy.py", line 197, in _run_module_as_main
worker-1  |     return _run_code(code, main_globals, None,
worker-1  |   File "/usr/local/lib/python3.9/runpy.py", line 87, in _run_code
worker-1  |     exec(code, run_globals)
worker-1  |   File "/usr/local/lib/python3.9/site-packages/debugpy/__main__.py", line 39, in <module>
worker-1  |     cli.main()
worker-1  |   File "/usr/local/lib/python3.9/site-packages/debugpy/server/cli.py", line 430, in main
worker-1  |     run()
worker-1  |   File "/usr/local/lib/python3.9/site-packages/debugpy/server/cli.py", line 302, in run_module
worker-1  |     start_debugging(argv_0)
worker-1  |   File "/usr/local/lib/python3.9/site-packages/debugpy/server/cli.py", line 256, in start_debugging
worker-1  |     debugpy.listen(options.address)
worker-1  |   File "/usr/local/lib/python3.9/site-packages/debugpy/public_api.py", line 31, in wrapper
worker-1  |     return wrapped(*args, **kwargs)
worker-1  |   File "/usr/local/lib/python3.9/site-packages/debugpy/server/api.py", line 143, in debug
worker-1  |     log.reraise_exception("{0}() failed:", func.__name__, level="info")
worker-1  |   File "/usr/local/lib/python3.9/site-packages/debugpy/server/api.py", line 141, in debug
worker-1  |     return func(address, settrace_kwargs, **kwargs)
worker-1  |   File "/usr/local/lib/python3.9/site-packages/debugpy/server/api.py", line 262, in listen
worker-1  |     raise RuntimeError(str(endpoints["error"]))
worker-1  | RuntimeError: Can't listen for client connections: [Errno 98] Address already in use

This error appears to be getting written out once for every time something like the following appears:

server-1  | [2024-09-07 05:12:17,891] INFO in server: Excluding result info in active task response,
server-1  |                 status: SENT, info: None
server-1  | 172.18.0.8 - - [07/Sep/2024 05:12:17] "GET /api/active_task HTTP/1.0" 200 -
nginx-1   | 172.18.0.1 - - [07/Sep/2024:05:12:17 +0000] "GET /api/active_task HTTP/1.1" 200 23 "http://localhost/active_task" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" "-"

It's kind of hard to follow in the terminal as the output just keeps piling up.

coffeemonk commented 2 months ago

Actually, this is happening on startup, before the UI is even launched in a browser or processing is initiated...

coffeemonk commented 1 week ago

@mtalcott Wanted to follow up on this one. I have managed to get it running and processing duplicates. I think the issue was that I was attempting to use colima in place of docker desktop. I had used colima with success for other local-machine docker stuff, but I think in this case there's some incompatibility at work. I'm no docker expert, so I couldn't say for sure.

mtalcott commented 3 days ago

Okay, I haven't tested with anything besides Docker Desktop.

The worker is set up to run debugpy for dev purposes, but it's not essential to running the app. It's mapped to port 5679 (one off from the default) but that could have been in use on your machine. If you or anyone else runs into this again you can try commenting out these lines then running docker compose up: https://github.com/mtalcott/google-photos-deduper/blob/087a9edf3c73b49b38dd114b4c071d70aec7b329/docker-compose.yml#L69-L70