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

UA production parser down #3981

Open
tmrow-bot opened this issue Apr 18, 2022 · 10 comments
Open

UA production parser down #3981

tmrow-bot opened this issue Apr 18, 2022 · 10 comments

Comments

@tmrow-bot
Copy link
Contributor

Description

This is an automatic error report generated for Ukraine (UA).

Issues:

  • No recent data found for consumption parser
  • No recent data found for consumptionForecast parser
  • No recent data found for generationForecast parser
  • No recent data found for price parser
  • No recent data found for production parser
  • No recent data found for productionPerModeForecast parser

Suggestions

You can see an overview of all parser issues here.

@jarek
Copy link
Collaborator

jarek commented Apr 18, 2022

I'm getting an "Access denied Error code 1020" error from Cloudflare attempting to load https://ua.energy/ from Canada, I guess it got geolocked?

@VIKTORVAV99
Copy link
Member

VIKTORVAV99 commented Apr 20, 2022

Hmm, it's loading just fine for me in Sweden.
Perhaps we could use a proxy in Sweden (or another EU/Europe country?) to get it back up?

@ajoga
Copy link
Contributor

ajoga commented May 16, 2022

I'm getting an "Access denied Error code 1020" error from Cloudflare attempting to load https://ua.energy/ from Canada, I guess it got geolocked?

Working well in France too

@madsnedergaard
Copy link
Member

Seems like it's consumption data that is failing (in the ENTSO-E parser):
Screenshot 2022-05-16 at 13 13 06

@Darkvyl
Copy link
Contributor

Darkvyl commented Aug 22, 2023

Hey guys, it looks like we can fix a UA.py parser
image
if we use http.client instead of requests and mock User-Agent to "PostmanRuntime/7.32.3". I haven't got time to set up my environment and create proper PR to fix this bug, but I'll get to it today in the evening (probably). But, if someone wants to fix it earlier, it looks like this
image

    conn = http.client.HTTPSConnection("ua.energy")
    payload = f"action=get_data_oes&report_date={today}&type=day"
    headers = {
        "Content-Type": "application/x-www-form-urlencoded",
        "User-Agent": "PostmanRuntime/7.32.3",
    }
    conn.request("POST", "/wp-admin/admin-ajax.php", payload, headers)
    res = conn.getresponse()
    response = json.loads(res.read().decode("utf-8"))

    for serie in response:

instead of

    url = "https://ua.energy/wp-admin/admin-ajax.php"
    postdata = {"action": "get_data_oes", "report_date": today, "type": "day"}

    response = r.post(
        url, postdata, headers={"User-Agent": "electricitymap-parser/1.0"}
    )

    for serie in response.json():

BTW, this is my first experience with open source, if I do something wrong, please let me know.

@Darkvyl
Copy link
Contributor

Darkvyl commented Aug 29, 2023

Hi all, I see in logs that parser is still crashing. From where electricityMaps server is trying to connect? Maybe we should set up some proxy for that parser?

@VIKTORVAV99
Copy link
Member

Hi all, I see in logs that parser is still crashing. From where electricityMaps server is trying to connect? Maybe we should set up some proxy for that parser?

We are already on it ;)

@madsnedergaard
Copy link
Member

I've been looking a bit into this yesterday, but our server is calling from "europe-west1". So the EU proxy we could use wouldn't change anything.

When I ssh into the server and curl, I hit the CloudFlare protection page:

Screenshot 2023-08-30 at 07 42 23

@shuuji3
Copy link
Contributor

shuuji3 commented Sep 3, 2023

I just tried showing the response (the same URL as above) on the browser:

Screenshot 2023-09-03 at 18 10 11

tmp.html.zip

One option might be to ask the website owner to whitelist the static IP from the backend server, though I'm not sure that will be allowed to access wp-admin. 😅

@NeoUKR
Copy link

NeoUKR commented Nov 5, 2023

In connection with a targeted attack on the energy infrastructure of the Russian Federation. All data was closed until the end of the war.

https://translate.google.com/translate?sl=uk&tl=en&hl=en&u=https://www.nerc.gov.ua/acts/pro-vnesennya-zmin-do-postanovi-nacionalnoyi-komisiyi-shcho-zdijsnyuye-derzhavne-regulyuvannya-u-sferah-energetiki-ta-komunalnih-poslug-vid-26-bereznya-2022-roku-349&client=webapp

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

No branches or pull requests

8 participants