Frequent errors

If something goes wrong after having restarted the server or reloaded the configuration file, first have a look in the logs to see if there is an error message. (errors.log and warning.log, usually in /var/log/ocsigen).

Compiling errors

  • While compiling:
    ocamlducefind ocamlc  -thread -package netstring,cryptokit -I ../lwt -I ../baselib -I ../http -I ../xmlp4 -I ../server -I ../extensions -I ../eliom  -c error_pages.ml 
    Fatal error: cannot open pervasives.cmi
    
    Your ocamlduce version is probably different from your ocaml version. Update ocamlduce, or do configure --disable-ocamlduce

Startup errors

  • Internal error in preemptive.ml (read failed on the pipe) Unix.Unix_error(2, "read", "")

Are you sure that the preemptive.cmo is linked only once? Do not include lwt.cma in your modules, it is already in the server.

  • The server says:
    [errors.log] 01-01-2008 16:00:38 - Fatal - While loading /usr/lib/ocaml/3.09.2/cryptokit/cryptokit.cma: 
    Dynlink.Error: error while linking /usr/lib/ocaml/3.09.2/cryptokit/cryptokit.cma.
    Reference to undefined global `Nat'
    
    nums.cma has been removed from the executable in version 0.99.5, and you are probably using an old configuration file. Load it manually before cryptokit in the configuration file. For example:
     <extension module="/usr/lib/ocaml/3.09.2/nums.cma"/>
     <extension module="/usr/lib/ocaml/3.09.2/cryptokit/cryptokit.cma"/>
    
  • At startup, the server says:
    [errors.log] 2008-08-07 06:24:06 - Fatal - Uncaught exception: Ocsigen_loader.Findlib_error("ocsigen_ext.redirectmod", _)
    
    This error message occurs with a broken findlib installation, usually missing META files. The compilation of ocsigen itself should have tested the META files of ocsigen's dependencies. If you compiled ocsigen yourself (without patching it to avoid usage of ocamlfind), look at ocsigen.conf. There must be a <findlib path=.../> pointing to the directory containing META.ocsigen_ext. The default when compiling from sources is /usr/local/lib/ocsigen/METAS.

Runtime errors

  • After a reload, the server says that some services are not registered, but I'm sure they are all registered. What's wrong? Have a look in the logs to check whether some other module failed to load.