nlmatics / nlm-ingestor

This repo provides the server side code for llmsherpa API to connect. It includes parsers for various file formats.
https://www.nlmatics.com
Apache License 2.0
1.1k stars 158 forks source link

Connection error with Docker run #67

Open kjoth opened 5 months ago

kjoth commented 5 months ago

Hi,

I ran the docker version of the image, and tried to test it using the test_llmsherpa_api notebook. But getting Connection to 172.17.0.2 timed out. (connect timeout=None)')) at pdf_reader.read_pdf(pdf_url).

docker pull ghcr.io/nlmatics/nlm-ingestor:latest

docker run -p 5010:5001 ghcr.io/nlmatics/nlm-ingestor:latest
image

MaxRetryError: HTTPConnectionPool(host='172.17.0.2', port=5001): Max retries exceeded with url: [/api/parseDocument](http://localhost:8081/api/parseDocument)?renderFormat=all&useNewIndentParser=true&applyOcr=yes (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x107884c20>, 'Connection to 172.17.0.2 timed out. (connect timeout=None)'))

image
Tizzzzy commented 3 months ago

Same here, I successfully ran docker run -p 5010:5001 ghcr.io/nlmatics/nlm-ingestor:latest, but when I tried to run test_llmsherpa_api.ipynb, I got this error:

---------------------------------------------------------------------------
ConnectionRefusedError                    Traceback (most recent call last)
File c:\Users\super\anaconda3\envs\nlm-ingestor\lib\site-packages\urllib3\connection.py:169, in HTTPConnection._new_conn(self)
    [168](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connection.py:168) try:
--> [169](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connection.py:169)     conn = connection.create_connection(
    [170](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connection.py:170)         (self._dns_host, self.port), self.timeout, **extra_kw
    [171](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connection.py:171)     )
    [173](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connection.py:173) except SocketTimeout:

File c:\Users\super\anaconda3\envs\nlm-ingestor\lib\site-packages\urllib3\util\connection.py:96, in create_connection(address, timeout, source_address, socket_options)
     [95](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/util/connection.py:95) if err is not None:
---> [96](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/util/connection.py:96)     raise err
     [98](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/util/connection.py:98) raise socket.error("getaddrinfo returns an empty list")

File c:\Users\super\anaconda3\envs\nlm-ingestor\lib\site-packages\urllib3\util\connection.py:86, in create_connection(address, timeout, source_address, socket_options)
     [85](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/util/connection.py:85)     sock.bind(source_address)
---> [86](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/util/connection.py:86) sock.connect(sa)
     [87](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/util/connection.py:87) return sock

ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it

During handling of the above exception, another exception occurred:

NewConnectionError                        Traceback (most recent call last)
File c:\Users\super\anaconda3\envs\nlm-ingestor\lib\site-packages\urllib3\connectionpool.py:699, in HTTPConnectionPool.urlopen(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, **response_kw)
    [698](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:698) # Make the request on the httplib connection object.
--> [699](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:699) httplib_response = self._make_request(
    [700](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:700)     conn,
    [701](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:701)     method,
    [702](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:702)     url,
    [703](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:703)     timeout=timeout_obj,
    [704](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:704)     body=body,
    [705](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:705)     headers=headers,
    [706](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:706)     chunked=chunked,
    [707](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:707) )
    [709](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:709) # If we're going to release the connection in ``finally:``, then
    [710](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:710) # the response doesn't need to know about the connection. Otherwise
    [711](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:711) # it will also try to release it and we'll have a double-release
    [712](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:712) # mess.

File c:\Users\super\anaconda3\envs\nlm-ingestor\lib\site-packages\urllib3\connectionpool.py:394, in HTTPConnectionPool._make_request(self, conn, method, url, timeout, chunked, **httplib_request_kw)
    [393](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:393)     else:
--> [394](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:394)         conn.request(method, url, **httplib_request_kw)
    [396](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:396) # We are swallowing BrokenPipeError (errno.EPIPE) since the server is
    [397](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:397) # legitimately able to close the connection after sending a valid response.
    [398](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:398) # With this behaviour, the received response is still readable.

File c:\Users\super\anaconda3\envs\nlm-ingestor\lib\site-packages\urllib3\connection.py:234, in HTTPConnection.request(self, method, url, body, headers)
    [233](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connection.py:233)     headers["User-Agent"] = _get_default_user_agent()
--> [234](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connection.py:234) super(HTTPConnection, self).request(method, url, body=body, headers=headers)

File c:\Users\super\anaconda3\envs\nlm-ingestor\lib\http\client.py:1285, in HTTPConnection.request(self, method, url, body, headers, encode_chunked)
   [1284](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/http/client.py:1284) """Send a complete request to the server."""
-> [1285](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/http/client.py:1285) self._send_request(method, url, body, headers, encode_chunked)

File c:\Users\super\anaconda3\envs\nlm-ingestor\lib\http\client.py:1331, in HTTPConnection._send_request(self, method, url, body, headers, encode_chunked)
   [1330](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/http/client.py:1330)     body = _encode(body, 'body')
-> [1331](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/http/client.py:1331) self.endheaders(body, encode_chunked=encode_chunked)

File c:\Users\super\anaconda3\envs\nlm-ingestor\lib\http\client.py:1280, in HTTPConnection.endheaders(self, message_body, encode_chunked)
   [1279](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/http/client.py:1279)     raise CannotSendHeader()
-> [1280](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/http/client.py:1280) self._send_output(message_body, encode_chunked=encode_chunked)

File c:\Users\super\anaconda3\envs\nlm-ingestor\lib\http\client.py:1040, in HTTPConnection._send_output(self, message_body, encode_chunked)
   [1039](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/http/client.py:1039) del self._buffer[:]
-> [1040](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/http/client.py:1040) self.send(msg)
   [1042](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/http/client.py:1042) if message_body is not None:
   [1043](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/http/client.py:1043) 
   [1044](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/http/client.py:1044)     # create a consistent interface to message_body

File c:\Users\super\anaconda3\envs\nlm-ingestor\lib\http\client.py:980, in HTTPConnection.send(self, data)
    [979](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/http/client.py:979) if self.auto_open:
--> [980](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/http/client.py:980)     self.connect()
    [981](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/http/client.py:981) else:

File c:\Users\super\anaconda3\envs\nlm-ingestor\lib\site-packages\urllib3\connection.py:200, in HTTPConnection.connect(self)
    [199](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connection.py:199) def connect(self):
--> [200](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connection.py:200)     conn = self._new_conn()
    [201](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connection.py:201)     self._prepare_conn(conn)

File c:\Users\super\anaconda3\envs\nlm-ingestor\lib\site-packages\urllib3\connection.py:181, in HTTPConnection._new_conn(self)
    [180](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connection.py:180) except SocketError as e:
--> [181](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connection.py:181)     raise NewConnectionError(
    [182](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connection.py:182)         self, "Failed to establish a new connection: %s" % e
    [183](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connection.py:183)     )
    [185](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connection.py:185) return conn

NewConnectionError: <urllib3.connection.HTTPConnection object at 0x0000028EA7DB0A60>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it

During handling of the above exception, another exception occurred:

MaxRetryError                             Traceback (most recent call last)
Cell In[3], [line 18](vscode-notebook-cell:?execution_count=3&line=18)
     [16](vscode-notebook-cell:?execution_count=3&line=16)     llmsherpa_api_url = llmsherpa_api_url + "&applyOcr=yes"
     [17](vscode-notebook-cell:?execution_count=3&line=17) pdf_reader = LayoutPDFReader(llmsherpa_api_url)
---> [18](vscode-notebook-cell:?execution_count=3&line=18) doc = pdf_reader.read_pdf(pdf_url)

File c:\Users\super\anaconda3\envs\nlm-ingestor\lib\site-packages\llmsherpa\readers\file_reader.py:71, in LayoutPDFReader.read_pdf(self, path_or_url, contents)
     [69](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/llmsherpa/readers/file_reader.py:69)             file_data = f.read()
     [70](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/llmsherpa/readers/file_reader.py:70)             pdf_file = (file_name, file_data, 'application/pdf')
---> [71](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/llmsherpa/readers/file_reader.py:71) parser_response = self._parse_pdf(pdf_file)
     [72](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/llmsherpa/readers/file_reader.py:72) response_json = json.loads(parser_response.data.decode("utf-8"))
     [73](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/llmsherpa/readers/file_reader.py:73) blocks = response_json['return_dict']['result']['blocks']

File c:\Users\super\anaconda3\envs\nlm-ingestor\lib\site-packages\llmsherpa\readers\file_reader.py:45, in LayoutPDFReader._parse_pdf(self, pdf_file)
     [43](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/llmsherpa/readers/file_reader.py:43) def _parse_pdf(self, pdf_file):
     [44](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/llmsherpa/readers/file_reader.py:44)     auth_header = {}
---> [45](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/llmsherpa/readers/file_reader.py:45)     parser_response = self.api_connection.request("POST", self.parser_api_url, fields={'file': pdf_file})
     [46](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/llmsherpa/readers/file_reader.py:46)     return parser_response

File c:\Users\super\anaconda3\envs\nlm-ingestor\lib\site-packages\urllib3\request.py:78, in RequestMethods.request(self, method, url, fields, headers, **urlopen_kw)
     [74](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/request.py:74)     return self.request_encode_url(
     [75](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/request.py:75)         method, url, fields=fields, headers=headers, **urlopen_kw
     [76](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/request.py:76)     )
     [77](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/request.py:77) else:
---> [78](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/request.py:78)     return self.request_encode_body(
     [79](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/request.py:79)         method, url, fields=fields, headers=headers, **urlopen_kw
     [80](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/request.py:80)     )

File c:\Users\super\anaconda3\envs\nlm-ingestor\lib\site-packages\urllib3\request.py:170, in RequestMethods.request_encode_body(self, method, url, fields, headers, encode_multipart, multipart_boundary, **urlopen_kw)
    [167](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/request.py:167) extra_kw["headers"].update(headers)
    [168](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/request.py:168) extra_kw.update(urlopen_kw)
--> [170](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/request.py:170) return self.urlopen(method, url, **extra_kw)

File c:\Users\super\anaconda3\envs\nlm-ingestor\lib\site-packages\urllib3\poolmanager.py:375, in PoolManager.urlopen(self, method, url, redirect, **kw)
    [373](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/poolmanager.py:373)     response = conn.urlopen(method, url, **kw)
    [374](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/poolmanager.py:374) else:
--> [375](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/poolmanager.py:375)     response = conn.urlopen(method, u.request_uri, **kw)
    [377](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/poolmanager.py:377) redirect_location = redirect and response.get_redirect_location()
    [378](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/poolmanager.py:378) if not redirect_location:

File c:\Users\super\anaconda3\envs\nlm-ingestor\lib\site-packages\urllib3\connectionpool.py:783, in HTTPConnectionPool.urlopen(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, **response_kw)
    [778](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:778) if not conn:
    [779](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:779)     # Try again
    [780](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:780)     log.warning(
    [781](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:781)         "Retrying (%r) after connection broken by '%r': %s", retries, err, url
    [782](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:782)     )
--> [783](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:783)     return self.urlopen(
    [784](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:784)         method,
    [785](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:785)         url,
    [786](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:786)         body,
    [787](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:787)         headers,
    [788](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:788)         retries,
    [789](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:789)         redirect,
    [790](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:790)         assert_same_host,
    [791](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:791)         timeout=timeout,
    [792](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:792)         pool_timeout=pool_timeout,
    [793](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:793)         release_conn=release_conn,
    [794](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:794)         chunked=chunked,
    [795](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:795)         body_pos=body_pos,
    [796](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:796)         **response_kw
    [797](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:797)     )
    [799](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:799) # Handle redirect?
    [800](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:800) redirect_location = redirect and response.get_redirect_location()

File c:\Users\super\anaconda3\envs\nlm-ingestor\lib\site-packages\urllib3\connectionpool.py:783, in HTTPConnectionPool.urlopen(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, **response_kw)
    [778](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:778) if not conn:
    [779](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:779)     # Try again
    [780](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:780)     log.warning(
    [781](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:781)         "Retrying (%r) after connection broken by '%r': %s", retries, err, url
    [782](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:782)     )
--> [783](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:783)     return self.urlopen(
    [784](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:784)         method,
    [785](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:785)         url,
    [786](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:786)         body,
    [787](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:787)         headers,
    [788](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:788)         retries,
    [789](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:789)         redirect,
    [790](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:790)         assert_same_host,
    [791](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:791)         timeout=timeout,
    [792](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:792)         pool_timeout=pool_timeout,
    [793](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:793)         release_conn=release_conn,
    [794](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:794)         chunked=chunked,
    [795](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:795)         body_pos=body_pos,
    [796](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:796)         **response_kw
    [797](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:797)     )
    [799](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:799) # Handle redirect?
    [800](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:800) redirect_location = redirect and response.get_redirect_location()

File c:\Users\super\anaconda3\envs\nlm-ingestor\lib\site-packages\urllib3\connectionpool.py:783, in HTTPConnectionPool.urlopen(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, **response_kw)
    [778](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:778) if not conn:
    [779](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:779)     # Try again
    [780](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:780)     log.warning(
    [781](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:781)         "Retrying (%r) after connection broken by '%r': %s", retries, err, url
    [782](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:782)     )
--> [783](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:783)     return self.urlopen(
    [784](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:784)         method,
    [785](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:785)         url,
    [786](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:786)         body,
    [787](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:787)         headers,
    [788](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:788)         retries,
    [789](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:789)         redirect,
    [790](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:790)         assert_same_host,
    [791](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:791)         timeout=timeout,
    [792](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:792)         pool_timeout=pool_timeout,
    [793](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:793)         release_conn=release_conn,
    [794](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:794)         chunked=chunked,
    [795](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:795)         body_pos=body_pos,
    [796](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:796)         **response_kw
    [797](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:797)     )
    [799](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:799) # Handle redirect?
    [800](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:800) redirect_location = redirect and response.get_redirect_location()

File c:\Users\super\anaconda3\envs\nlm-ingestor\lib\site-packages\urllib3\connectionpool.py:755, in HTTPConnectionPool.urlopen(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, **response_kw)
    [752](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:752) elif isinstance(e, (SocketError, HTTPException)):
    [753](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:753)     e = ProtocolError("Connection aborted.", e)
--> [755](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:755) retries = retries.increment(
    [756](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:756)     method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
    [757](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:757) )
    [758](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:758) retries.sleep()
    [760](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/connectionpool.py:760) # Keep track of the error for the retry warning.

File c:\Users\super\anaconda3\envs\nlm-ingestor\lib\site-packages\urllib3\util\retry.py:574, in Retry.increment(self, method, url, response, error, _pool, _stacktrace)
    [563](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/util/retry.py:563) new_retry = self.new(
    [564](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/util/retry.py:564)     total=total,
    [565](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/util/retry.py:565)     connect=connect,
   (...)
    [570](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/util/retry.py:570)     history=history,
    [571](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/util/retry.py:571) )
    [573](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/util/retry.py:573) if new_retry.is_exhausted():
--> [574](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/util/retry.py:574)     raise MaxRetryError(_pool, url, error or ResponseError(cause))
    [576](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/util/retry.py:576) log.debug("Incremented Retry for (url='%s'): %r", url, new_retry)
    [578](file:///C:/Users/super/anaconda3/envs/nlm-ingestor/lib/site-packages/urllib3/util/retry.py:578) return new_retry

MaxRetryError: HTTPConnectionPool(host='localhost', port=5001): Max retries exceeded with url: /api/parseDocument?renderFormat=all&useNewIndentParser=true&applyOcr=yes (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x0000028EA7DB0A60>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it'))