Forums

Temporary failure in name resolution

I'm having this error I've seen you have before. I see staff has some automated systems in place to try to fix the DNS. I've already restarted the server. Does anyone have a fix for this or can staff look in to this?

Here's old threads where staff has talked about the problem.

Here's the URL to the user and the always-on task log with the problem.

The actual error message looks like this:

Jul 7 04:58:14 socket.gaierror: [Errno -3] Temporary failure in name resolution

I'm having the same issue with one of my always-on tasks. https://www.pythonanywhere.com/user/smith7929/files/var/log/alwayson-log-16648.log

same error here only with allways on tasks. If I run the script in a console everything works well. I have found this thread here: https://www.pythonanywhere.com/forums/topic/13504/

The always on task servers sometimes have DNS issues. We have systems in place to ensure that they recover from it, but it appears that they did not work well this time. I will investigate to find out why the recovery systems failed.

But unfortunately that didn't solved the dns issues completely. I will run my always on tasks in consoles until this issue got resolved.

Thanks for reporting that, everyone. It looks like we are having some network problems with always-on tasks this morning; we're looking into it.

One question that might help us with debugging this -- is anyone seeing any issues that are not specifically DNS lookups for MySQL servers hosted on PythonAnywhere -- that is, for yourusername.mysql.pythonanywhere-services.com?

One slight change to the above; we restarted the networking system on always-on tasks just now, so my question becomes:

Has anyone seen any DNS/name resolution errors between 4am and 11am UTC today that were not caused by lookups for PythonAnywhere-hosted MySQL servers?

I still receive

Jul 7 19:50:38 pymysql.err.OperationalError: (2003, "Can't connect to MySQL server on 'myname.mysql.pythonanywhere-services.com' ([Errno -3] Temporary failure in name resolution)")

please fix that issue - I got productive services running here

edit: okay my scripts are running now just minutes after I posted this. Could you please prevent it to happen again? thx

I think that might have been a side-effect of the larger system outage we had yesterday afternoon; however, we're working on the general networking problem with always-on tasks. Again, if anyone sees any issues like this, please do let us know, but we're particularly interested in knowing whether it only affects lookups for MySQL databases, or if other lookups are failing too.

@giles I am still receiving this error with fair frequency. It has gotten a lot better since first reported but still happens often.

It looks like the last time you recevied that message, was about half an hour after your previous post. Are you seeing it somewhere else? If so, please give more details so we can track it down.

I got this error again on 2020-07-14 12:59:51,066. It happens when connecting to api.telegram.org . When I run the same task on my laptop, this problem does not occur.

Is it safe to run an always-on task in a console, until this problem is fixed?

Thank you!

You can certainly run the task in a console -- the DNS system used there is a different one. However, remember that you'll need to manually restart it when it stops, because console servers have to be rebooted for system maintenance and when they start up again, your console will be in a freshly-started state.

How long did the DNS issue last when it happened on the 14th? If it was only a minute or two, then while it's obviously a problem that needs to be fixed, you might find even then that using an always-on task would be a more reliable way to run your task.

Thank you!

Today it happened again, and it seems it lasted from 2020-07-17 15:25:52,165 to 2020-07-17 15:27:13,341, so a bit more than one minute. It was similar on the 14th.

Interesting, thanks for letting us know! Our monitoring didn't pick that up, which is strange -- it works via a heartbeat mechanism, so it might not detect outages of less than a minute, but I would certainly expect it to have picked up one of a minute and a half. We'll continue investigating.

Thanks. I can privately share the logs, if that can be helpful.

okay, thanks- if you give us permission, we could also access your files to view it. Perhaps point us to where you are seeing this within the log files?

I sent the logs via email to support@pythonanywhere.com. Hope this helps!

great!

Yesterday + Today it happened again. And it is still persistent for internal mysql database and outside urls:

Jul 19 10:46:57 raise exc Jul 19 10:46:57 pymysql.err.OperationalError: (2003, "Can't connect to MySQL server on 'tibfox.mysql.pythonanywhere-services.com' ([Errno -3] Temporary failure in name resolution)") Jul 19 10:46:57 Jul 19 10:46:57 During handling of the above exception, another exception occurred:

...

Jul 19 11:00:59 raise ClientConnectorError(req.connection_key, exc) from exc Jul 19 11:00:59 aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host discordapp.com:443 ssl:default [Temporary failure in name resolution] Jul 19 11:03:10 Error: HTTPSConnectionPool(host='api.hive.blog', port=443): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f20703b8588>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)) Jul 19 11:03:10 Lost connection or internal error on node: https://api.hive.blog (5/100) Jul 19 11:03:10

Ok. Thanks for the report. We are continuing to look at this.

Thanks! I really need stable jobs otherwise I need to switch to another provider :/

Understood!

It happened to me this morning also.

Traceback (most recent call last): File "/home/canonburygroup/.local/lib/python3.8/site-packages/requests/packages/urllib3/connection.py", line 140, in _new_conn conn = connection.create_connection( File "/home/canonburygroup/.local/lib/python3.8/site-packages/requests/packages/urllib3/util/connection.py", line 60, in create_connection for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): File "/usr/lib/python3.8/socket.py", line 914, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): socket.gaierror: [Errno -3] Temporary failure in name resolution During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/canonburygroup/.local/lib/python3.8/site-packages/requests/packages/urllib3/connectionpool.py", line 597, in urlopen httplib_response = self._make_request(conn, method, url, File "/home/canonburygroup/.local/lib/python3.8/site-packages/requests/packages/urllib3/connectionpool.py", line 345, in _make_request self._validate_conn(conn) File "/home/canonburygroup/.local/lib/python3.8/site-packages/requests/packages/urllib3/connectionpool.py", line 844, in _validate_conn raise MaxRetryError(_pool, url, error or ResponseError(cause)) conn.connect() File "/home/canonburygroup/.local/lib/python3.8/site-packages/requests/packages/urllib3/connection.py", line 284, in connect conn = self._new_conn() File "/home/canonburygroup/.local/lib/python3.8/site-packages/requests/packages/urllib3/connection.py", line 149, in _new_conn raise NewConnectionError( requests.packages.urllib3.exceptions.NewConnectionError: <requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7fab1c4910d0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/canonburygroup/.local/lib/python3.8/site-packages/requests/adapters.py", line 413, in send resp = conn.urlopen( File "/home/canonburygroup/.local/lib/python3.8/site-packages/requests/packages/urllib3/connectionpool.py", line 648, in urlopen retries = retries.increment(method, url, error=e, _pool=self, File "/home/canonburygroup/.local/lib/python3.8/site-packages/requests/packages/urllib3/util/retry.py", line 376, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) requests.packages.urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='user-api.simplybook.it', port=443): Max retries exceeded with url: /login (Caused by NewConnectionError('<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7fab1c4910d0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))

These are my server logs

2020-07-28 10:20:10 Tue Jul 28 10:20:09 2020 - *** HARAKIRI ON WORKER 2 (pid: 13, try: 1) *** 2020-07-28 10:20:10 Tue Jul 28 10:20:09 2020 - HARAKIRI !!! worker 2 status !!! 2020-07-28 10:20:10 Tue Jul 28 10:20:09 2020 - HARAKIRI [core 0] 10.0.0.52 - GET /product/retail since 1595931308 2020-07-28 10:20:10 Tue Jul 28 10:20:09 2020 - HARAKIRI !!! end of worker 2 status !!! 2020-07-28 10:20:10 DAMN ! worker 2 (pid: 13) died, killed by signal 9 :( trying respawn ... 2020-07-28 10:20:10 Respawned uWSGI worker 2 (new pid: 18) 2020-07-28 10:20:10 spawned 2 offload threads for uWSGI worker 2 2020-07-28 10:20:10 announcing my loyalty to the Emperor... 2020-07-28 10:22:10 Tue Jul 28 10:22:09 2020 - *** HARAKIRI ON WORKER 1 (pid: 10, try: 1) *** 2020-07-28 10:22:10 Tue Jul 28 10:22:09 2020 - HARAKIRI !!! worker 1 status !!! 2020-07-28 10:22:10 Tue Jul 28 10:22:09 2020 - HARAKIRI [core 0] 10.0.0.52 - GET /product/retail since 1595931428 2020-07-28 10:22:10 Tue Jul 28 10:22:09 2020 - HARAKIRI !!! end of worker 1 status !!! 2020-07-28 10:22:10 DAMN ! worker 1 (pid: 10) died, killed by signal 9 :( trying respawn ... 2020-07-28 10:22:10 Respawned uWSGI worker 1 (new pid: 21) 2020-07-28 10:22:10 spawned 2 offload threads for uWSGI worker 1 2020-07-28 10:22:10 announcing my loyalty to the Emperor...

it is happening to me also now. internal mysql database and outside urls are.(2005, "Unknown MySQL server host '*.mysql.pythonanywhere-services.com' (0)"). And this is not from an always on task.

AWS had a partial outage of their DNS servers (which we use extensively) and so that would have happened intermittently for the last 2 hours or so. They have largely mitigated the issue now, so things should begin returning to normal.

Hi, I am again getting same error on always run tasks Today and since past few days:

2022-04-29 10:40:43 - Task preparing to start Apr 29 10:43:27 ping: google.com: Temporary failure in name resolution Apr 29 10:43:31 ping: google.com: Temporary failure in name resolution Apr 29 10:43:50 ping: google.com: Temporary failure in name resolution Apr 29 10:44:19 ping: google.com: Temporary failure in name resolution Apr 29 10:45:19 ping: google.com: Temporary failure in name resolution

Same, https://www.pythonanywhere.com/forums/topic/31240/ this thread also.

Same

Sorry about that, we had a problem with always-on tasks earlier on today. The problem is now fixed, and tasks are spinning up.

In the future, you might want to keep an eye on our Twitter feed -- that's where we post status updates for system-wide issues like this.

All tasks are now up and running -- please contact us on support@pythonanywhere.com if you're still seeing issues.

I have been geting this exception several times in my always on task today:

MySQLdb._exceptions.OperationalError: (2005, "Unknown MySQL server host 'avabvaldus.mysql.pythonanywhere-services.com' (11)")

It occurred a bunch of times around 15:12 and a bunch of times around 18:19. Is this a temporary glitch? Or is it something you can fix?