Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Error happened at parsedmarc container. Run docker-compose up -d. #55

Open
eno-conan opened this issue Feb 1, 2024 · 2 comments
Open

Comments

@eno-conan
Copy link

eno-conan commented Feb 1, 2024

Error happened at parsedmarc container when I run docker-compose up -d.
Are some settings missing?

environment

  • OS : Windows 11
  • Docker Desktop : 4.24.1

operation

  • Clone Repo to Local.
  • Renamed parsedmarc/parsedmarc.sample.ini to parsedmarc/parsedmarc.ini
  • parsedmarc/Dockerfile updated to add 'msgraph-core<1.0.0' after parsedmarc bacause ModuleNotFoundError: No module named 'msgraph' had happened.
    • from
      RUN apk add --update --no-cache --virtual .build_deps build-base libffi-dev \
          && pip install parsedmarc \
      
    • to
      RUN apk add --update --no-cache --virtual .build_deps build-base libffi-dev \
          && pip install parsedmarc 'msgraph-core<1.0.0' \
      
  • Run docker-compose up -d

Error Detail

Docker Desktop Log

2024-02-01 11:46:14 INFO:cli.py:802:Starting parsedmarc
2024-02-01 11:46:14 Traceback (most recent call last):
2024-02-01 11:46:14 File "/usr/local/lib/python3.9/site-packages/urllib3/connection.py", line 174, in _new_conn
2024-02-01 11:46:14 conn = connection.create_connection(
2024-02-01 11:46:14 File "/usr/local/lib/python3.9/site-packages/urllib3/util/connection.py", line 95, in create_connection
2024-02-01 11:46:14 raise err
2024-02-01 11:46:14 File "/usr/local/lib/python3.9/site-packages/urllib3/util/connection.py", line 85, in create_connection
2024-02-01 11:46:14 sock.connect(sa)
2024-02-01 11:46:14 ConnectionRefusedError: [Errno 111] Connection refused
2024-02-01 11:46:14
2024-02-01 11:46:14 During handling of the above exception, another exception occurred:
2024-02-01 11:46:14
2024-02-01 11:46:14 Traceback (most recent call last):
2024-02-01 11:46:14 File "/usr/local/lib/python3.9/site-packages/elasticsearch/connection/http_urllib3.py", line 251, in perform_request
2024-02-01 11:46:14 response = self.pool.urlopen(
2024-02-01 11:46:14 File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 799, in urlopen
2024-02-01 11:46:14 retries = retries.increment(
2024-02-01 11:46:14 File "/usr/local/lib/python3.9/site-packages/urllib3/util/retry.py", line 525, in increment
2024-02-01 11:46:14 raise six.reraise(type(error), error, _stacktrace)
2024-02-01 11:46:14 File "/usr/local/lib/python3.9/site-packages/urllib3/packages/six.py", line 770, in reraise
2024-02-01 11:46:14 raise value
2024-02-01 11:46:14 File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 715, in urlopen
2024-02-01 11:46:14 httplib_response = self._make_request(
2024-02-01 11:46:14 File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 416, in _make_request
2024-02-01 11:46:14 conn.request(method, url, **httplib_request_kw)
2024-02-01 11:46:14 File "/usr/local/lib/python3.9/site-packages/urllib3/connection.py", line 244, in request
2024-02-01 11:46:14 super(HTTPConnection, self).request(method, url, body=body, headers=headers)
2024-02-01 11:46:14 File "/usr/local/lib/python3.9/http/client.py", line 1285, in request
2024-02-01 11:46:14 self._send_request(method, url, body, headers, encode_chunked)
2024-02-01 11:46:14 File "/usr/local/lib/python3.9/http/client.py", line 1331, in _send_request
2024-02-01 11:46:14 self.endheaders(body, encode_chunked=encode_chunked)
2024-02-01 11:46:14 File "/usr/local/lib/python3.9/http/client.py", line 1280, in endheaders
2024-02-01 11:46:14 self._send_output(message_body, encode_chunked=encode_chunked)
2024-02-01 11:46:14 File "/usr/local/lib/python3.9/http/client.py", line 1040, in _send_output
2024-02-01 11:46:14 self.send(msg)
2024-02-01 11:46:14 File "/usr/local/lib/python3.9/http/client.py", line 980, in send
2024-02-01 11:46:14 self.connect()
2024-02-01 11:46:14 File "/usr/local/lib/python3.9/site-packages/urllib3/connection.py", line 205, in connect
2024-02-01 11:46:14 conn = self._new_conn()
2024-02-01 11:46:14 File "/usr/local/lib/python3.9/site-packages/urllib3/connection.py", line 186, in _new_conn
2024-02-01 11:46:14 raise NewConnectionError(
2024-02-01 11:46:14 urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f1a311b4070>: Failed to establish a new connection: [Errno 111] Connection refused
2024-02-01 11:46:14
2024-02-01 11:46:14 During handling of the above exception, another exception occurred:
2024-02-01 11:46:14
2024-02-01 11:46:14 Traceback (most recent call last):
2024-02-01 11:46:14 File "/usr/local/bin/parsedmarc", line 8, in
2024-02-01 11:46:14 sys.exit(_main())
2024-02-01 11:46:14 File "/usr/local/lib/python3.9/site-packages/parsedmarc/cli.py", line 821, in _main
2024-02-01 11:46:14 elastic.migrate_indexes(aggregate_indexes=[es_aggregate_index],
2024-02-01 11:46:14 File "/usr/local/lib/python3.9/site-packages/parsedmarc/elastic.py", line 241, in migrate_indexes
2024-02-01 11:46:14 if not Index(aggregate_index_name).exists():
2024-02-01 11:46:14 File "/usr/local/lib/python3.9/site-packages/elasticsearch_dsl/index.py", line 414, in exists
2024-02-01 11:46:14 return self._get_connection(using).indices.exists(index=self._name, **kwargs)
2024-02-01 11:46:14 File "/usr/local/lib/python3.9/site-packages/elasticsearch/client/utils.py", line 168, in _wrapped
2024-02-01 11:46:14 return func(*args, params=params, headers=headers, **kwargs)
2024-02-01 11:46:14 File "/usr/local/lib/python3.9/site-packages/elasticsearch/client/indices.py", line 332, in exists
2024-02-01 11:46:14 return self.transport.perform_request(
2024-02-01 11:46:14 File "/usr/local/lib/python3.9/site-packages/elasticsearch/transport.py", line 413, in perform_request
2024-02-01 11:46:14 raise e
2024-02-01 11:46:14 File "/usr/local/lib/python3.9/site-packages/elasticsearch/transport.py", line 381, in perform_request
2024-02-01 11:46:14 status, headers_response, data = connection.perform_request(
2024-02-01 11:46:14 File "/usr/local/lib/python3.9/site-packages/elasticsearch/connection/http_urllib3.py", line 266, in perform_request
2024-02-01 11:46:14 raise ConnectionError("N/A", str(e), e)
2024-02-01 11:46:14 elasticsearch.exceptions.ConnectionError: ConnectionError(<urllib3.connection.HTTPConnection object at 0x7f1a311b4070>: Failed to establish a new connection: [Errno 111] Connection refused) caused by: NewConnectionError(<urllib3.connection.HTTPConnection object at 0x7f1a311b4070>: Failed to establish a new connection: [Errno 111] Connection refused)

@eno-conan eno-conan changed the title Error happened at parsedmarc container when I run docker-compose up -d. Error happened at parsedmarc container. Run docker-compose up -d. Feb 1, 2024
@resulraveendran
Copy link

Hi,

I got the same error

Traceback (most recent call last):
parsedmarc_1 | File "/usr/local/bin/parsedmarc", line 5, in
parsedmarc_1 | from parsedmarc.cli import _main
parsedmarc_1 | File "/usr/local/lib/python3.9/site-packages/parsedmarc/init.py", line 31, in
parsedmarc_1 | from parsedmarc.mail import MailboxConnection
parsedmarc_1 | File "/usr/local/lib/python3.9/site-packages/parsedmarc/mail/init.py", line 2, in
parsedmarc_1 | from parsedmarc.mail.graph import MSGraphConnection
parsedmarc_1 | File "/usr/local/lib/python3.9/site-packages/parsedmarc/mail/graph.py", line 10, in
parsedmarc_1 | from msgraph.core import GraphClient
parsedmarc_1 | ModuleNotFoundError: No module named 'msgraph'

@eno-conan
Copy link
Author

eno-conan commented Feb 2, 2024

@resulraveendran

No module named 'msgraph'

If you follow the instructions I do, you can resolve this error.
#55 (comment)

I have trouble in connecting elasticsearch container so It's not the same as the error you presented...

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

No branches or pull requests

2 participants