Network is Unreachable - Certbot Installation

Hello there !
Firstly, be gentle about my English level because i’m French and i try to do my best !
So,
I try to install & configure Certbot for Encrypt one of my Web Application…
The server be a Debian 8 (Jessie) with Apache2 & PHP 7.0.
I must use a Proxy for Web request and i think that give me an issue at the installation !
Apache2 has the required “rewrite_module” & “ssl_module” activates.
I get the certbot script with the following command :

[code]    
wget https://dl.eff.org/certbot-auto
chmod a+x certbot-auto 
[/code]

But when i launch “.\certbot-auto”, i meet an error :

[code]     
[...]
Paramétrage de python3-virtualenv (1.11.6+ds-1) ...
Paramétrage de virtualenv (1.11.6+ds-1) ...
Traitement des actions différées (« triggers ») pour libc-bin (2.19-18+deb8u10) ...
WARNING: unable to check for updates.
Creating virtual environment...
Installing Python packages...
Traceback (most recent call last):
  File "/tmp/tmp.TfnQuw0IV2/pipstrap.py", line 177, in <module>
    sys.exit(main())
  File "/tmp/tmp.TfnQuw0IV2/pipstrap.py", line 158, in main
    for path, digest in PACKAGES]
  File "/tmp/tmp.TfnQuw0IV2/pipstrap.py", line 117, in hashed_download
    response = opener(using_https=parsed_url.scheme == 'https').open(url)
  File "/usr/lib/python2.7/urllib2.py", line 431, in open
    response = self._open(req, data)
  File "/usr/lib/python2.7/urllib2.py", line 449, in _open
    '_open', req)
  File "/usr/lib/python2.7/urllib2.py", line 409, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 1240, in https_open
    context=self._context)
  File "/usr/lib/python2.7/urllib2.py", line 1197, in do_open
    raise URLError(err)
urllib2.URLError: <urlopen error [Errno 101] Network is unreachable>
[/code] 

I’ve try to configure my Proxy into the “urllib2.py” file but without success …
And i need help to understand what’s wrong with my installation … !
Thanks for your attention =)

I believe it should be sufficient to configure your proxy in the http_proxy and https_proxy environment variables - you shouldn’t need to modify urllib2.py.

btw there is also #help:aide-en-francais if you are not comfortable with English :slight_smile:

2 Likes

Hello !
I’ve also put the proxy settings, i don’t got a WAN connection without …
But i hadn’t configured the “https” settings !
I added that :

  • Into “/etc/profile.d/proxy.sh” ->
    export http_proxy=http://my.proxy.ip:port #AlreadyThere
    export https_proxy=https://my.proxy.ip:port #Added
  • Into “/etc/apt/apt.conf” ->
    Acquire::http::Proxy “http://my.proxy.ip:port”;
    Acquire::https::Proxy “https://my.proxy.ip:port”;

But nothing happen ;_;
I’ll also try to post at the French section, thanks for the link =)

Hmm, I’m not sure but I think that should probably be

export https_proxy=http://my.proxy.ip:port

i.e. the connection to the proxy itself is still over http, you’re just saying it should also be used for https connections

not sure about apt, I’ve never needed to set it up behind a proxy

4 Likes

My gosh, it works ! (After a Reboot)
You’ve perfectly identified the issue and I thank you for that !
I wasted a lot of time on this installation, and I’m really happy to see it finally end.
Really, thank you for your help :upside_down_face:
I’m going to mark your answer as the solution !

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.