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

SE watcher crashes on XML parsing errors #1033

Open
rgaudin opened this issue Oct 22, 2024 · 0 comments
Open

SE watcher crashes on XML parsing errors #1033

rgaudin opened this issue Oct 22, 2024 · 0 comments
Labels

Comments

@rgaudin
Copy link
Member

rgaudin commented Oct 22, 2024

The SE watcher is frequently restarting after crashing (exit code 1). The last one was due to XML parsing errors when retrieving the list of sites.

Given the very nature of this watcher, I think it should report the issue and retry/wait for next turn.

  __                                         _       _
 / _| __ _ _ __ _ __ ___      __      ____ _| |_ ___| |__   ___ _ __
| |_ / _` | '__| '_ ` _ \ ____\ \ /\ / / _` | __/ __| '_ \ / _ \ '__|
|  _| (_| | |  | | | | | |_____\ V  V / (_| | || (__| | | |  __/ |
|_|  \__,_|_|  |_| |_| |_|      \_/\_/ \__,_|\__\___|_| |_|\___|_|


[2024-10-21 17:29:49,041::INFO] Testing S3 credentials
[2024-10-21 17:29:52,370::INFO] Testing Zimfarm credentials with https://api.farm.openzim.org/v1…
[2024-10-21 17:29:53,048::INFO] Starting watcher:
  with zimfarm username: stackwatcher
  using cache: s3.us-west-1.wasabisys.com
  with bucket: org-kiwix-stackexchange
[2024-10-21 17:29:53,048::INFO] Getting list of SE domains
[2024-10-21 17:30:02,888::ERROR] FAILED. An error occurred: mismatched tag: line 1, column 146
[2024-10-21 17:30:02,888::ERROR] mismatched tag: line 1, column 146
Traceback (most recent call last):
  File "/usr/local/bin/watcher", line 583, in entrypoint
    sys.exit(runner.run())
             ^^^^^^^^^^^^
  File "/usr/local/bin/watcher", line 490, in run
    self.check_and_go()
  File "/usr/local/bin/watcher", line 398, in check_and_go
    domains = self.retrieve_all_sites()
              ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/bin/watcher", line 248, in retrieve_all_sites
    sites = parser.parse(resp.text).get("sites", {}).get("row", ])
            ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/xml_to_dict/xml_to_dict.py", line 8, in parse
    return self.__to_dict(ET.fromstring(xml))
                          ^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/xml/etree/ElementTree.py", line 1335, in XML
    parser.feed(text)
xml.etree.ElementTree.ParseError: mismatched tag: line 1, column 146
Stream closed EOF for zimfarm/watcher-deployment-5f4bdfd65b-m6lx5 (zimfarm-watcher)

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

No branches or pull requests

1 participant