mirage / ocaml-conduit

Dereference URIs into communication channels for Async or Lwt
ISC License
84 stars 74 forks source link

Conduit crashes on startup due to ca-certifcates, even when not using tls #388

Closed talex5 closed 3 years ago

talex5 commented 3 years ago
$ utop
utop # #require "cohttp-lwt-unix";;
Exception:
(Failure
   "ca-certs: no trust anchor file found, looked into /etc/ssl/certs/ca-certificates.crt, /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem, /etc/ssl/ca-bundle.pem.\
  \nPlease report an issue at https://github.com/mirage/ca-certs, including:\
  \n- the output of uname -s\
  \n- the distribution you use\
  \n- the location of default trust anchors (if known)\
  \n")
Error: Reference to undefined global `Conduit_lwt_unix'

Probably this should be lazy: https://github.com/mirage/ocaml-conduit/blob/a2f91d0fb17c9b0a8436dd39c4267b9144f0bdea/src/conduit-lwt-unix/conduit_lwt_tls.real.ml#L25-L28

(I hit this when I updated ocluster-scheduler. It doesn't use https, so the Docker images didn't contain any certificates.)