deployer: Remove any pre-existing socket file before starting the server (again) #1282
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Tackling those errors:
17:03:19.064 ERROR ocrd_network.tcp_to_uds_mets_proxy - Uds-Mets-Server gives unexpected error. Response: {'_content': b'"A file with ID==FILE_0015_OCR-D-DEWARP_region0002_region0002_line0011.IMG-DEWARP already exists <OcrdFile fileGrp=OCR-D-DEWARP ID=FILE_0015_OCR-D-DEWARP_region0002_region0002_line0011.IMG-DEWARP, mimetype=image/png, url=---, local_filename=OCR-D-DEWARP/FILE_0015_OCR-D-DEWARP_region0002_region0002_line0011.IMG-DEWARP.png]/> and neither force nor ignore are set"', '_content_consumed': True, '_next': None, 'status_code': 400, 'headers': {'date': 'Tue, 01 Oct 2024 15:03:18 GMT', 'server': 'uvicorn', 'content-length': '364', 'content-type': 'application/json'}, 'raw': <urllib3.response.HTTPResponse object at 0x7fc5ad35cac0>, 'url': 'http+unix://%2Ftmp%2Focrd_network_sockets%2F_home_mm_repos_ocrd_network_tests_ws29_data.sock/file', 'encoding': 'utf-8', 'history': [], 'reason': 'Bad Request', 'cookies': <RequestsCookieJar[]>, 'elapsed': datetime.timedelta(microseconds=5356), 'request': <PreparedRequest [POST]>, 'connection': <requests_unixsocket.adapters.UnixAdapter object at 0x7fc5b00fb8e0>}
But before we merge, we should be absolutely sure that there really is no METS server running anymore at that location at this point. Because otherwise, we still have spurious METS server instances running and just hiding the error.