How to fix temporary failure in name resolution; connection reset












0















I develop on a machine with Ubuntu 16.04 and for the past couple of weeks I've been getting a connection reset error whenever I try to access Pypi through the browser: ERR_CONNECTION_RESET. I ping'ed the server (ping pypy.org) and it worked just fine, without any packet loss.



This is usually solved by resetting the Wi-Fi but only lasts for another couple of minutes. If I need to access Pypi again I need to follow the same steps: turn off Wi-Fi, turn back on, reload Pypi really quick (doesn't always work).



The same happens when I try to install any Python package from the terminal (pip install ...): Connection error: resetting connection. This isn't exacly the error message, I can't reproduce it as of now. This is also 'solved' by resetting my connection.



This wasn't such an issue until I left my machine running some code through the night which required making calls to Twitter's API. I had 2 terminals running the same code in parallel. One stopped the execution with a Temporary failure in name resolution, while the other was fine.



The error output was the following:



Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f24be513860>: 
Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'


I'm assuming my DNS is misconfigured, but I'm no expert in the matter and would like to hear some opinions before I try to do anything. My first though was to switch to Google's DNS.



What do you think?



Edit:
If that's any help, this is the content of my /etc/resolv.conf



# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.1.1
search lan









share|improve this question









New contributor




Khabz is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

























    0















    I develop on a machine with Ubuntu 16.04 and for the past couple of weeks I've been getting a connection reset error whenever I try to access Pypi through the browser: ERR_CONNECTION_RESET. I ping'ed the server (ping pypy.org) and it worked just fine, without any packet loss.



    This is usually solved by resetting the Wi-Fi but only lasts for another couple of minutes. If I need to access Pypi again I need to follow the same steps: turn off Wi-Fi, turn back on, reload Pypi really quick (doesn't always work).



    The same happens when I try to install any Python package from the terminal (pip install ...): Connection error: resetting connection. This isn't exacly the error message, I can't reproduce it as of now. This is also 'solved' by resetting my connection.



    This wasn't such an issue until I left my machine running some code through the night which required making calls to Twitter's API. I had 2 terminals running the same code in parallel. One stopped the execution with a Temporary failure in name resolution, while the other was fine.



    The error output was the following:



    Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f24be513860>: 
    Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'


    I'm assuming my DNS is misconfigured, but I'm no expert in the matter and would like to hear some opinions before I try to do anything. My first though was to switch to Google's DNS.



    What do you think?



    Edit:
    If that's any help, this is the content of my /etc/resolv.conf



    # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
    # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
    nameserver 127.0.1.1
    search lan









    share|improve this question









    New contributor




    Khabz is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.























      0












      0








      0








      I develop on a machine with Ubuntu 16.04 and for the past couple of weeks I've been getting a connection reset error whenever I try to access Pypi through the browser: ERR_CONNECTION_RESET. I ping'ed the server (ping pypy.org) and it worked just fine, without any packet loss.



      This is usually solved by resetting the Wi-Fi but only lasts for another couple of minutes. If I need to access Pypi again I need to follow the same steps: turn off Wi-Fi, turn back on, reload Pypi really quick (doesn't always work).



      The same happens when I try to install any Python package from the terminal (pip install ...): Connection error: resetting connection. This isn't exacly the error message, I can't reproduce it as of now. This is also 'solved' by resetting my connection.



      This wasn't such an issue until I left my machine running some code through the night which required making calls to Twitter's API. I had 2 terminals running the same code in parallel. One stopped the execution with a Temporary failure in name resolution, while the other was fine.



      The error output was the following:



      Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f24be513860>: 
      Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'


      I'm assuming my DNS is misconfigured, but I'm no expert in the matter and would like to hear some opinions before I try to do anything. My first though was to switch to Google's DNS.



      What do you think?



      Edit:
      If that's any help, this is the content of my /etc/resolv.conf



      # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
      # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
      nameserver 127.0.1.1
      search lan









      share|improve this question









      New contributor




      Khabz is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.












      I develop on a machine with Ubuntu 16.04 and for the past couple of weeks I've been getting a connection reset error whenever I try to access Pypi through the browser: ERR_CONNECTION_RESET. I ping'ed the server (ping pypy.org) and it worked just fine, without any packet loss.



      This is usually solved by resetting the Wi-Fi but only lasts for another couple of minutes. If I need to access Pypi again I need to follow the same steps: turn off Wi-Fi, turn back on, reload Pypi really quick (doesn't always work).



      The same happens when I try to install any Python package from the terminal (pip install ...): Connection error: resetting connection. This isn't exacly the error message, I can't reproduce it as of now. This is also 'solved' by resetting my connection.



      This wasn't such an issue until I left my machine running some code through the night which required making calls to Twitter's API. I had 2 terminals running the same code in parallel. One stopped the execution with a Temporary failure in name resolution, while the other was fine.



      The error output was the following:



      Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f24be513860>: 
      Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'


      I'm assuming my DNS is misconfigured, but I'm no expert in the matter and would like to hear some opinions before I try to do anything. My first though was to switch to Google's DNS.



      What do you think?



      Edit:
      If that's any help, this is the content of my /etc/resolv.conf



      # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
      # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
      nameserver 127.0.1.1
      search lan






      networking dns






      share|improve this question









      New contributor




      Khabz is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question









      New contributor




      Khabz is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question








      edited 8 hours ago







      Khabz













      New contributor




      Khabz is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 9 hours ago









      KhabzKhabz

      1011




      1011




      New contributor




      Khabz is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      Khabz is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      Khabz is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















          0






          active

          oldest

          votes











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "89"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });






          Khabz is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1109720%2fhow-to-fix-temporary-failure-in-name-resolution-connection-reset%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          Khabz is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          Khabz is a new contributor. Be nice, and check out our Code of Conduct.













          Khabz is a new contributor. Be nice, and check out our Code of Conduct.












          Khabz is a new contributor. Be nice, and check out our Code of Conduct.
















          Thanks for contributing an answer to Ask Ubuntu!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1109720%2fhow-to-fix-temporary-failure-in-name-resolution-connection-reset%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          日野市

          GameSpot

          Tu-95轟炸機