Installation fails due to SSL error. #52

Closed
opened 9 years ago by makzan · 13 comments
makzan commented 9 years ago (Migrated from github.com)

I was trying to install pollen and faced an error when the process tries to download the pollen from github over SSL.

I didn’t faced the same issue before when I was install in in another linux box. This seems to be a new issue on the installation.

$ /usr/racket/bin/raco pkg install pollen
Resolving "pollen" via http://download.racket-lang.org/releases/6.1.1/catalog/
Resolving "pollen" via http://pkgs.racket-lang.org
Downloading https://github.com/mbutterick/pollen/tarball/bb8805b16496ddc4d734f21d0864b0a0f0d0cdc3
ssl-connect: requested protocol not supported
  requested: 'sslv2-or-v3
  context...:
   /usr/racket/collects/openssl/mzssl.rkt:471:18
   /usr/racket/collects/racket/private/more-scheme.rkt:264:2: call-with-exception-handler
   /usr/racket/collects/net/http-client.rkt:220:0: http-conn-open46
   /usr/racket/collects/net/url.rkt:130:0: http://getpost-impure-port
   /usr/racket/collects/net/url.rkt:264:2: redirection-loop
   /usr/racket/collects/pkg/util.rkt:36:0: call/input-url+2007
   /usr/racket/collects/file/cache.rkt:63:2: fetch-and-continue
   /usr/racket/collects/pkg/lib.rkt:1171:14
   /usr/racket/collects/pkg/lib.rkt:1073:0: stage-package/info96
   /usr/racket/collects/pkg/lib.rkt:1073:0: stage-package/info96
   /usr/racket/collects/pkg/lib.rkt:1979:4: for-loop
   /usr/racket/collects/pkg/lib.rkt:1533:0: install-packages158
   /usr/racket/collects/racket/file.rkt:363:8
   /usr/racket/collects/racket/file.rkt:352:0: call-with-file-lock44
   /usr/racket/collects/pkg/main.rkt:169:14
   (submod /usr/racket/collects/pkg/main.rkt main): [running body]...
I was trying to install pollen and faced an error when the process tries to download the pollen from github over SSL. I didn’t faced the same issue before when I was install in in another linux box. This seems to be a new issue on the installation. ``` $ /usr/racket/bin/raco pkg install pollen Resolving "pollen" via http://download.racket-lang.org/releases/6.1.1/catalog/ Resolving "pollen" via http://pkgs.racket-lang.org Downloading https://github.com/mbutterick/pollen/tarball/bb8805b16496ddc4d734f21d0864b0a0f0d0cdc3 ssl-connect: requested protocol not supported requested: 'sslv2-or-v3 context...: /usr/racket/collects/openssl/mzssl.rkt:471:18 /usr/racket/collects/racket/private/more-scheme.rkt:264:2: call-with-exception-handler /usr/racket/collects/net/http-client.rkt:220:0: http-conn-open46 /usr/racket/collects/net/url.rkt:130:0: http://getpost-impure-port /usr/racket/collects/net/url.rkt:264:2: redirection-loop /usr/racket/collects/pkg/util.rkt:36:0: call/input-url+2007 /usr/racket/collects/file/cache.rkt:63:2: fetch-and-continue /usr/racket/collects/pkg/lib.rkt:1171:14 /usr/racket/collects/pkg/lib.rkt:1073:0: stage-package/info96 /usr/racket/collects/pkg/lib.rkt:1073:0: stage-package/info96 /usr/racket/collects/pkg/lib.rkt:1979:4: for-loop /usr/racket/collects/pkg/lib.rkt:1533:0: install-packages158 /usr/racket/collects/racket/file.rkt:363:8 /usr/racket/collects/racket/file.rkt:352:0: call-with-file-lock44 /usr/racket/collects/pkg/main.rkt:169:14 (submod /usr/racket/collects/pkg/main.rkt main): [running body]... ```
mbutterick commented 9 years ago (Migrated from github.com)

How can I reproduce this error? I just did raco pkg install pollen on OS X and it worked fine using the https:// URL (meaning, I wonder if it was a temporary glitch on the Github side)

How can I reproduce this error? I just did `raco pkg install pollen` on OS X and it worked fine using the `https://` URL (meaning, I wonder if it was a temporary glitch on the Github side)
makzan commented 9 years ago (Migrated from github.com)

I have checked the difference between my previous working installation and the new one. I chose the wrong platform in the racket download page. I am in x86_64 and installed the i386 version. Re-installing the right one solves the issue.

By the way, thanks a lot for open sourcing the Pollen. I agree with your idea of a book is a program. I’m now learning Racket in order to learn more about the behind-the-scenes of Pollen.

I have checked the difference between my previous working installation and the new one. I chose the wrong platform in the racket download page. I am in _x86_64_ and installed the _i386_ version. Re-installing the right one solves the issue. By the way, thanks a lot for open sourcing the Pollen. I agree with your idea of a book is a program. I’m now learning Racket in order to learn more about the behind-the-scenes of Pollen.
rbonvall commented 9 years ago (Migrated from github.com)

On a fresh Linux installation I compiled the latest Racket myself, then the first thing I did was raco pkg install pollen and I got almost exactly the same error as @makzan:

~$ raco pkg install pollen
Resolving "pollen" via http://download.racket-lang.org/releases/6.2/catalog/
Resolving "pollen" via http://pkgs.racket-lang.org
Downloading https://github.com/mbutterick/pollen/tarball/26814c08b058105a1893c2a426a4e33954f49463
ssl-connect: requested protocol not supported
  requested: 'auto
  context...:
   /home/rbonvall/codigo/racket-6.2/collects/openssl/mzssl.rkt:608:0: make-raw-context
   [...]

(The only difference is that the requested protocol is 'auto instead of 'sslv2-or-v3). The machine is x86_64 and the configure script recognized it as such. I wonder if this is an issue with Racket on Linux or with Pollen.

On a fresh Linux installation I compiled the latest Racket myself, then the first thing I did was `raco pkg install pollen` and I got almost exactly the same error as @makzan: ``` ~$ raco pkg install pollen Resolving "pollen" via http://download.racket-lang.org/releases/6.2/catalog/ Resolving "pollen" via http://pkgs.racket-lang.org Downloading https://github.com/mbutterick/pollen/tarball/26814c08b058105a1893c2a426a4e33954f49463 ssl-connect: requested protocol not supported requested: 'auto context...: /home/rbonvall/codigo/racket-6.2/collects/openssl/mzssl.rkt:608:0: make-raw-context [...] ``` (The only difference is that the requested protocol is `'auto` instead of `'sslv2-or-v3`). The machine is x86_64 and the configure script recognized it as such. I wonder if this is an issue with Racket on Linux or with Pollen.
mbutterick commented 9 years ago (Migrated from github.com)

Sorry about the trouble. I’m pretty sure the problem isn’t Pollen, since it hasn’t been installed yet. The error is arising at an earlier stage, from ssl-connect.

One alternative is to try installing from a snapshot build (rather than compiling from scratch) and see if that makes a difference.

Beyond that, this looks like it might be related to 933a71ce71, so maybe @rmculpepper will weigh in.

Sorry about the trouble. I’m pretty sure the problem isn’t Pollen, since it hasn’t been installed yet. The error is arising at an earlier stage, from `ssl-connect`. One alternative is to try installing from a snapshot build (rather than compiling from scratch) and see if that makes a difference. Beyond that, this looks like it might be related to https://github.com/plt/racket/commit/933a71ce71b142cf31b6a356318e9a557126f3f9, so maybe @rmculpepper will weigh in.
rmculpepper commented 9 years ago (Migrated from github.com)

@rbonvall: What is the version of Linux? Also, can you run the following at a racket repl and report what it prints in response?

(enter! openssl/mzssl)
SSLv23_client_method  ;; probably returns #f 
(define-crypto SSLeay_version (_fun _int -> _string))
(SSLeay_version 0)

It looks like the SSLv23_*_method functions were (recently?) deprecated; they may have been removed or replaced with macros in the version of openssl you have.

@rbonvall: What is the version of Linux? Also, can you run the following at a racket repl and report what it prints in response? ``` (enter! openssl/mzssl) SSLv23_client_method ;; probably returns #f (define-crypto SSLeay_version (_fun _int -> _string)) (SSLeay_version 0) ``` It looks like the `SSLv23_*_method` functions were (recently?) deprecated; they may have been removed or replaced with macros in the version of openssl you have.
rbonvall commented 9 years ago (Migrated from github.com)

@rmculpepper It's Fedora 21, kernel 3.17.4-301.fc21.x86_64.

~/codigo/racket-6.2/src/build$ racket
Welcome to Racket v6.2.
> (enter! openssl/mzssl)
> SSLv23_client_method
#f
> (define-crypto SSLeay_version (_fun _int -> _string))
> (SSLeay_version 0)
SSLeay_version: implementation not found; arguments: 0
  context...:
   /home/rbonvall/codigo/racket-6.2/collects/racket/private/misc.rkt:87:7
@rmculpepper It's Fedora 21, kernel 3.17.4-301.fc21.x86_64. ``` ~/codigo/racket-6.2/src/build$ racket Welcome to Racket v6.2. > (enter! openssl/mzssl) > SSLv23_client_method #f > (define-crypto SSLeay_version (_fun _int -> _string)) > (SSLeay_version 0) SSLeay_version: implementation not found; arguments: 0 context...: /home/rbonvall/codigo/racket-6.2/collects/racket/private/misc.rkt:87:7 ```
rmculpepper commented 9 years ago (Migrated from github.com)

@rbonvall, thanks. I'm surprised the last part didn't work. Can you find the version of openssl you have installed through the package manager? And one more thing to try:

(enter! openssl/mzssl)
(define-ssl TLS_client_method (_fun -> _pointer) #:fail (lambda () #f))
TLS_client_method
@rbonvall, thanks. I'm surprised the last part didn't work. Can you find the version of openssl you have installed through the package manager? And one more thing to try: ``` (enter! openssl/mzssl) (define-ssl TLS_client_method (_fun -> _pointer) #:fail (lambda () #f)) TLS_client_method ```
rbonvall commented 9 years ago (Migrated from github.com)

@rmculpepper openssl package version is 1.0.1j:

~$ rpm -qa | grep -i ssl
openssl-1.0.1j-1.fc21.x86_64
openssl-libs-1.0.1j-1.fc21.x86_64

Your snippet returns false:

~$ racket
Welcome to Racket v6.2.
> (enter! openssl/mzssl)
> (define-ssl TLS_client_method (_fun -> _pointer) #:fail (lambda () #f))
> TLS_client_method
#f
@rmculpepper openssl package version is 1.0.1j: ``` ~$ rpm -qa | grep -i ssl openssl-1.0.1j-1.fc21.x86_64 openssl-libs-1.0.1j-1.fc21.x86_64 ``` Your snippet returns false: ``` ~$ racket Welcome to Racket v6.2. > (enter! openssl/mzssl) > (define-ssl TLS_client_method (_fun -> _pointer) #:fail (lambda () #f)) > TLS_client_method #f ```
rmculpepper commented 9 years ago (Migrated from github.com)

@rbonvall, thanks, I'm a bit baffled. I'll look at the openssl source and maybe make a VM to figure this out later when I get a chance. One more thing to try first:

(require openssl)
ssl-available?
ssl-load-fail-reason
@rbonvall, thanks, I'm a bit baffled. I'll look at the openssl source and maybe make a VM to figure this out later when I get a chance. One more thing to try first: ``` (require openssl) ssl-available? ssl-load-fail-reason ```
rbonvall commented 9 years ago (Migrated from github.com)

@rmculpepper It's clear now:

> (require openssl)
> ssl-available?
#f
> ssl-load-fail-reason
"ffi-lib: couldn't open \"libcrypto.so\" (libcrypto.so: cannot open shared object file: No such file or directory)"

I'll try installing libcrypto.so and see what happens.

@rmculpepper It's clear now: ``` > (require openssl) > ssl-available? #f > ssl-load-fail-reason "ffi-lib: couldn't open \"libcrypto.so\" (libcrypto.so: cannot open shared object file: No such file or directory)" ``` I'll try installing libcrypto.so and see what happens.
rmculpepper commented 9 years ago (Migrated from github.com)

I suspect the problem is in openssl/libcrypto.rkt: it doesn't list "1.0.1j" in the library version search list---if that's even the right suffix. What does running locate libcrypto.so on your system turn up under /lib or /usr/lib?

A workaround is to install the development package ("openssl-devel", maybe), which will install a version-less symlink to the current version of the library, which Racket should find.

I suspect the problem is in openssl/libcrypto.rkt: it doesn't list "1.0.1j" in the library version search list---if that's even the right suffix. What does running `locate libcrypto.so` on your system turn up under /lib or /usr/lib? A workaround is to install the development package ("openssl-devel", maybe), which will install a version-less symlink to the current version of the library, which Racket should find.
rbonvall commented 9 years ago (Migrated from github.com)

@rmculpepper: Installing openssl-devel solved the problem. Thanks for your patience! libcrypto.so was not there neither under /lib nor /usr/lib.

@mbutterick: Sorry for hijacking the issue with my Racket problems :) Can't wait to start playing with pollen.

@rmculpepper: Installing openssl-devel solved the problem. Thanks for your patience! `libcrypto.so` was not there neither under `/lib` nor `/usr/lib`. @mbutterick: Sorry for hijacking the issue with my Racket problems :) Can't wait to start playing with pollen.
rbonvall commented 9 years ago (Migrated from github.com)

(@rmculpepper: after installing openssl-devel, libcrypto.so was put under /usr/lib64.)

(@rmculpepper: after installing openssl-devel, `libcrypto.so` was put under `/usr/lib64`.)
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: mbutterick/pollen#52
Loading…
There is no content yet.