Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7883599
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T04:34:31+00:00 2026-06-03T04:34:31+00:00

I currently get a Network is unreachable error to any request I’m making with

  • 0

I currently get a Network is unreachable error to any request I’m making with python. No matter if im using the urllib library or the requests library.

After some more research its likely that its being caused by an incorrect setup ipv6 tunnel, which seems to be still active:

$ ip -6 addr show  
$ ip -6 route
default dev wlan0  metric 1

Some context: I’m running Archlinux and updated the system today, although there didnt seem to be any special updates today related to python. I’m also running this under a virtualenv, but other virtualenvs and using my Python outside the virtualenv also have the same problem.
I’m using a VPN, but also without the VPN I get the same error.
I also tried restarting the PC, haha that normally helps with any problem lol but also didnt help.
I got a feeling it may be Archlinux related but I’m not sure.

This is what I tried before to setup a ipv6 tunnel:

sudo modprobe ipv6
sudo ip tunnel del sit1
sudo ip tunnel add sit1 mode sit remote 59.66.4.50 local $ipv4
sudo ifconfig sit1 down
sudo ifconfig sit1 up
sudo ifconfig sit1 add 2001:da8:200:900e:0:5efe:$ipv4/64
sudo ip route add ::/0 via 2001:da8:200:900e::1 metric 1 

Also used this command:

ip -6 addr add 2001:0db8:0:f101::1/64 dev eth0 

Update 3 after removing line of ipv6 in my /etc/systemctl.conf, some urls started working:

>>> urllib2.urlopen('http://www.google.com')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/urllib2.py", line 126, in urlopen
    return _opener.open(url, data, timeout)
  File "/usr/lib/python2.7/urllib2.py", line 400, in open
    response = self._open(req, data)
  File "/usr/lib/python2.7/urllib2.py", line 418, in _open
    '_open', req)
  File "/usr/lib/python2.7/urllib2.py", line 378, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 1207, in http_open
    return self.do_open(httplib.HTTPConnection, req)
  File "/usr/lib/python2.7/urllib2.py", line 1177, in do_open
    raise URLError(err)
urllib2.URLError: <urlopen error [Errno 101] Network is unreachable>
>>> urllib2.urlopen('http://baidu.com')
<addinfourl at 27000560 whose fp = <socket._fileobject object at 0x7f4d1fed5e50>>

This is the error log from ipython.

In [1]: import urllib2

In [2]: urllib2.urlopen('http://google.com')
---------------------------------------------------------------------------
URLError                                  Traceback (most recent call last)

/home/samos/<ipython console> in <module>()

/usr/lib/python2.7/urllib2.py in urlopen(url, data, timeout)
    124     if _opener is None:
    125         _opener = build_opener()
--> 126     return _opener.open(url, data, timeout)
    127 
    128 def install_opener(opener):

/usr/lib/python2.7/urllib2.py in open(self, fullurl, data, timeout)
    398             req = meth(req)
    399 
--> 400         response = self._open(req, data)
    401 
    402         # post-process response


/usr/lib/python2.7/urllib2.py in _open(self, req, data)
    416         protocol = req.get_type()
    417         result = self._call_chain(self.handle_open, protocol, protocol +
--> 418                                   '_open', req)
    419         if result:
    420             return result

/usr/lib/python2.7/urllib2.py in _call_chain(self, chain, kind, meth_name, *args)
    376             func = getattr(handler, meth_name)
    377 
--> 378             result = func(*args)
    379             if result is not None:
    380                 return result

/usr/lib/python2.7/urllib2.py in http_open(self, req)
   1205 
   1206     def http_open(self, req):
-> 1207         return self.do_open(httplib.HTTPConnection, req)
   1208 
   1209     http_request = AbstractHTTPHandler.do_request_

/usr/lib/python2.7/urllib2.py in do_open(self, http_class, req)
   1175         except socket.error, err: # XXX what error?
   1176             h.close()
-> 1177             raise URLError(err)
   1178         else:
   1179             try:

URLError: <urlopen error [Errno 101] Network is unreachable>

I can access google.com normally from a web browser and im pretty sure the network is reachable.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T04:34:32+00:00Added an answer on June 3, 2026 at 4:34 am

    Are you sure you are not using any http proxy server to get to internet?

    Try changing the network settings in your browser to no-proxy and check if it is still connecting to internet.

    And if you are using proxy ( assume proxy address as http://yourproxy.com) then try doing this to check if this solves the issue.

    import urllib2
    proxy = urllib2.ProxyHandler({'http': 'yourproxy.com'})
    opener = urllib2.build_opener(proxy)
    urllib2.install_opener(opener)
    urllib2.urlopen('http://www.google.com')
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use TelephonyManager to get the network type as in getNetworkType() . Currently I
I'm currently using phpmsnclass to send messages to contacts on the MSN network. But
I'm currently using Thread.Sleep(2500) to simulate a network call in a mock layer until
Currently I'm transferring a String across the network, using DataInput/OutputStream's. The String I am
What I'm currently doing is using jQuery to perform an ajax request on every
I have a list box and i am trying to get currently checked item
I'm currently trying to get the output of an executable console-app into an other
I am currently trying to get data out of a plist. It basically looks
I'm currently trying to get a grip on Android development and working my way
i am currently trying to get Input Mode Editor (IME) support working with a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.